Microsoft QuickC v2.51

This commit is contained in:
davidly 2024-07-02 08:12:15 -07:00
parent 7a92a5f9cb
commit 7a44dc7526
159 changed files with 16653 additions and 0 deletions

Binary file not shown.

View File

@ -0,0 +1,459 @@
/* SCCSWHAT( "@(#)c1.err 3.73 90/02/01 15:31:59 " ) */
/* warnings */
4001 "nonstandard extension used - '%Fs'"
4002 "too many actual parameters for macro '%s'"
4003 "not enough actual parameters for macro '%s'"
4004 "missing ')' after 'defined'"
4005 "'%s' : macro redefinition"
4006 "#undef expected an identifier"
4007 "'%Fs' : must be '%Fs'"
4008 "'%Fs' : '%Fs' attribute on data ignored"
4009 "string too big, trailing characters truncated"
4011 "identifier truncated to '%Fs'"
4012 "float constant in a cross compilation" /* XC */
4014 "'%Fs' : type of bit field must be unsigned" /* QC2 */
4015 "'%Fs' : type of bit field must be integral"
4016 "'%s' : no function return type, using int as default"
4017 "cast of int expression to far pointer"
4018 "'%Fs' : signed/unsigned mismatch"
4020 "'%Fs' : too many actual parameters"
4021 "'%Fs' : too few actual parameters"
4022 "'%Fs' : pointer mismatch : parameter %d"
4023 "'%Fs' : _based pointer passed to unprototyped function : parameter %d"
4024 "'%Fs' : different types : parameter %d"
4026 "function declared with formal argument list"
4027 "function declared without formal argument list"
4028 "parameter %d declaration different"
4029 "declared parameter list different from definition"
4030 "first parameter list longer than the second"
4031 "second parameter list longer than the first"
4032 "unnamed struct/union as parameter"
4033 "function must return a value"
4034 "sizeof returns 0"
4035 "'%Fs' : no return value"
4037 "'%Fs' : formal parameters ignored" /* QC2 */
4038 "'%Fs' : formal parameter has bad storage class" /* QC2 */
4040 "memory attribute on '%Fs' ignored"
4042 "'%Fs' : has bad storage class"
4044 "_huge on '%Fs' ignored, must be an array"
4045 "'%s' : array bounds overflow"
4046 "'&' on function/array, ignored" /* QC2 */
4047 "'%s' : different levels of indirection"
4048 "array's declared subscripts different"
4049 "'%s' : indirection to different types"
4050 "'%s' : different code attributes"
4051 "type conversion - possible loss of data"
4053 "at least one void operand"
4056 "overflow in constant arithmetic" /* QC2, c1, c23 */
4058 "address of automatic (local) variable taken, DS != SS" /* QC, c23 */
4059 "segment lost in conversion" /* QC, c23 */
4060 "conversion of long address to short address" /* QC2 */
4061 "long/short mismatch in argument : conversion supplied" /* QC, c23 */
4062 "near/far mismatch in argument : conversion supplied" /* QC, c23 */
4067 "unexpected characters following '%s' directive - newline expected"
4068 "unknown pragma"
4069 "conversion of near pointer to long integer" /* QC, c23 */
4071 "'%Fs' : no function prototype given"
4072 "'%Fs' : no function prototype on _fastcall function"
4074 "nonstandard extension used - '%s'" /* QC2 */
4075 "size of switch expression or case constant too large - converted to int" /* QC2 */
4076 "'%s' : may be used on integral types only"
4077 "unknown check_stack option"
4078 "case constant '%ld' too big for the type of switch expression"
4079 "unexpected token '%s'"
4080 "expected identifier for segment name, found '%s'"
4081 "expected a comma, found '%s'"
4082 "expected an identifier, found '%s'"
4083 "expected '(', found '%s'"
4084 "expected a pragma directive, found '%s'"
4085 "expected [on | off]"
4086 "expected [1 | 2 | 4]"
4087 "'%Fs' : declared with void parameter list"
4088 "'%Fs' : pointer mismatch : parameter %d, parameter list %d"
4089 "'%Fs' : different types : parameter %d, parameter list %d"
4090 "different 'const/volatile' qualifiers"
4091 "no symbols were declared"
4092 "untagged enum/struct/union declared no symbols"
4093 "unescaped newline in character constant in inactive code"
4095 "expected ')', found '%s'"
4096 "'%Fs' must be used with '%Fs'"
4098 "void function returning a value"
4100 "'%Fs' : unreferenced formal parameter"
4101 "'%Fs' : unreferenced local variable"
4102 "'%Fs' : unreferenced label"
4104 "'%s' : near data in same_seg pragma, ignored"
4105 "'%Fs' : code modifiers only on function or pointer to function"
4106 "pragma requires integer between 1 and 127"
4107 "pragma requires integer between 15 and 255"
4108 "pragma requires integer between 79 and 132"
4109 "unexpected identifier '%s'"
4110 "unexpected token 'int constant'"
4111 "unexpected token 'string'"
4112 "macro name '%s' is reserved, '%s' ignored"
4113 "function parameter lists differed"
4114 "same type qualifier used more than once"
4115 "'%Fs' : type definition in formal parameter list"
4116 "(no tag) : type definition in formal parameter list"
4118 "pragma not supported"
4119 "different bases '%Fs' and '%Fs' specified"
4120 "_based/unbased mismatch"
4123 "different base expressions specified"
4124 "_fastcall with stack checking is inefficient"
4125 "decimal digit terminates octal escape sequence"
4126 "'%c' : unknown memory model flag"
4127 "conditional expression is constant"
4128 "storage-class specifier after type"
4129 "'%c' : unrecognized character escape sequence"
4130 "'%Fs' : logical operation on address of string constant"
4131 "'%Fs' : uses old-style declarator"
4132 "'%Fs' : const object should be initialized"
4135 "conversion between different integral types"
4136 "conversion between different floating types"
4137 "'%Fs' : no return value from floating-point function"
4138 "'*/' found outside of comment"
4139 "'0x%x' : hex escape sequence is out of range"
4140 "'%Fs' : redefined, preceding references may be invalid" /* QC */
4185 "near call to '%Fs' in different segment" /* QC, c23 */
4206 "assignment within conditional expression" /* QC, c23 */
4401 "'%s' : member is bit field"
4402 "must use PTR operator"
4403 "illegal PTR operator"
4404 "period on directive ignored"
4405 "'%s' : identifier is reserved word"
4406 "operand on directive ignored"
4407 "operand size conflict"
4408 "'%s' : ambiguous label" /* QC2 */
4409 "illegal instruction size"
4410 "illegal size for operand"
4411 "'%s' : symbol resolves to displacement register"
4412 "'%s' : identifier is also assembler mnemonic"
4413 "'%Fs' : redefined, preceding references may be invalid" /* QC2 */
4414 "'%Fs' : short jump to function converted to near"
4901 "listing overrides assembly output" /* driver */
4902 "ignoring unknown flag '%s'" /* driver */
4903 "different processors selected for code generation" /* driver */
4905 "could not locate '%s';\nPlease enter new file name (full path) or Ctrl-C to quit: " /* driver */
4907 "/C ignored (must also specify /P or /E or /EP)" /* driver */
4909 "threshold only for far/huge data, ignored" /* driver */
4911 "preprocessing overrides source listing" /* driver */
4912 "function declarations override source listing" /* driver */
4913 "combined listing overrides object listing" /* driver */
4914 "invalid value '%d' for '%s'; default '%d' is used" /* driver */
4918 ".DEF files supported in protected mode only" /* driver */
4919 "string too long; truncated to '%d' characters" /* driver */
4920 "unsupported switch '%s'" /* driver */
4000 "UNKNOWN WARNING\n\t\tContact Microsoft Product Support Services"
/* errors */
2001 "newline in constant"
2003 "expected 'defined id'"
2004 "expected 'defined(id)'"
2005 "#line expected a line number, found '%s'"
2006 "#include expected a file name, found '%s'"
2007 "#define syntax"
2008 "'%c' : unexpected in macro definition"
2009 "reuse of macro formal '%Fs'"
2010 "'%c' : unexpected in macro formal-parameter list"
2012 "missing name following '<'"
2013 "missing '>'"
2014 "preprocessor command must start as first non-white-space"
2015 "too many characters in constant"
2016 "no closing single quotation mark"
2017 "illegal escape sequence"
2018 "unknown character '0x%x'"
2019 "expected preprocessor directive, found '%c'"
2021 "expected exponent value, not '%c'"
2022 "'%ld' : too big for character"
2023 "divide by 0"
2024 "mod by 0"
2025 "'%s' : enum/struct/union type redefinition"
2026 "'%s' : member of enum redefinition"
2027 "use of undefined enum/struct/union '%Fs'"
2028 "struct/union member needs to be inside a struct/union"
2030 "'%Fs' : struct/union member redefinition"
2031 "'%Fs' : function cannot be struct/union member"
2033 "'%Fs' : bit field cannot have indirection"
2034 "'%Fs' : type of bit field too small for number of bits"
2035 "struct/union '%Fs' : unknown size"
2036 "left of '%s%s' must have a struct/union base type" /* QC2 */
2037 "left of '%s' specifies undefined struct/union '%Fs'"
2038 "'%s' : not struct/union member"
2039 "'->' : left operand must point to struct/union" /* QC2 */
2040 "'.' : left operand must have struct/union type" /* QC2 */
2041 "illegal digit '%c' for base %d"
2042 "signed/unsigned keywords mutually exclusive"
2043 "illegal break"
2044 "illegal continue"
2045 "'%s' : label redefined"
2046 "illegal case"
2047 "illegal default"
2048 "more than one default"
2049 "case value '%ld' already used"
2050 "nonintegral switch expression"
2051 "case expression not constant"
2052 "case expression not integral"
2053 "case value %d already used" /* QC2 */
2054 "expected '(' to follow '%Fs'"
2055 "expected formal-parameter list, not a type list"
2056 "illegal expression"
2057 "expected constant expression"
2058 "constant expression is not integral"
2059 "syntax error : '%s'"
2060 "syntax error : end-of-file found"
2061 "syntax error : identifier '%s'"
2062 "type '%s' unexpected"
2063 "'%s' : not a function"
2064 "term does not evaluate to a function"
2065 "'%s' : undefined"
2066 "cast to function type is illegal"
2067 "cast to array type is illegal"
2068 "illegal cast"
2069 "cast of void term to nonvoid"
2070 "illegal sizeof operand"
2071 "'%Fs' : illegal storage class"
2072 "'%Fs' : initialization of a function"
2075 "'%Fs' : array initialization needs curly braces"
2076 "'%Fs' : struct/union initialization needs curly braces"
2077 "nonscalar field initializer '%Fs'"
2078 "too many initializers"
2079 "'%Fs' uses undefined struct/union '%Fs'"
2080 "illegal far _fastcall function"
2081 "'%Fs' : illegal memory attribute" /* QC2 */
2082 "redefinition of formal parameter '%Fs'"
2084 "function '%Fs' already has a body"
2085 "'%Fs' : not in formal-parameter list"
2086 "'%Fs' : redefinition"
2087 "'%Fs' : missing subscript"
2090 "function returns array"
2091 "function returns function"
2092 "array element type cannot be function"
2093 "cannot use address of automatic variable as static initializer"
2094 "label '%Fs' was undefined"
2095 "'%Fs' : actual has type void : parameter %d"
2096 "struct/union comparison illegal"
2097 "illegal initialization"
2098 "nonaddress expression"
2099 "nonconstant initializer"
2100 "illegal indirection"
2101 "'&' on constant"
2102 "'&' requires lvalue"
2103 "'&' on register variable"
2104 "'&' on bit field ignored"
2105 "'%s' needs lvalue"
2106 "'%s' : left operand must be lvalue"
2107 "illegal index, indirection not allowed"
2108 "nonintegral index"
2109 "subscript on nonarray"
2110 "pointer + pointer"
2111 "pointer + nonintegral value"
2112 "illegal pointer subtraction"
2113 "pointer subtracted from nonpointer"
2114 "'%s' : pointer on left; needs integral right"
2115 "'%s' : incompatible types"
2116 "'%s' : illegal %s operand" /* QC2 */
2117 "'%s' : illegal for struct/union"
2118 "negative subscript"
2119 "typedef types both define indirection"
2120 "void illegal with all types"
2121 "'%s' : bad %Fs operand"
2124 "divide or mod by zero"
2125 "'%Fs' : allocation exceeds 64K" /* QC, c23 */
2127 "parameter allocation exceeds 32K" /* QC, c23 */
2130 "#line expected a string containing the file name, found '%s'"
2131 "more than one memory attribute"
2132 "syntax error : unexpected identifier"
2133 "'%Fs' : unknown size"
2134 "'%Fs' : struct/union too large"
2136 "'%Fs' : prototype must have parameter types"
2137 "empty character constant"
2138 "unmatched close comment '*/'" /* QC2 */
2139 "type following '%s' is illegal"
2140 "argument cannot be function type"
2141 "value out of range for enum constant"
2142 "ellipsis requires three periods" /* QC2 */
2143 "syntax error : missing '%s' before '%s'"
2144 "syntax error : missing '%s' before type '%Fs'"
2145 "syntax error : missing '%s' before identifier"
2146 "syntax error : missing '%s' before identifier '%s'"
2147 "unknown size"
2148 "array too large"
2149 "'%Fs' : named bit field cannot have 0 width"
2150 "'%Fs' : bit field must have type int, signed int, or unsigned int"
2151 "more than one language attribute"
2152 "'%s' : pointers to functions with different attributes"
2153 "hex constants must have at least 1 hex digit"
2154 "'%Fs' : does not refer to a segment name"
2156 "pragma must be outside function"
2157 "'%s' : must be declared before use in pragma list"
2158 "'%s' : is a function"
2159 "more than one storage class specified"
2160 "## cannot occur at the beginning of a macro definition"
2161 "## cannot occur at the end of a macro definition"
2162 "expected macro formal parameter"
2163 "'%s' : not available as an intrinsic function"
2164 "'%s' : intrinsic function not declared"
2165 "'%s' : cannot modify pointers to data"
2166 "lvalue specifies const object"
2167 "'%Fs' : too many actual parameters for intrinsic"
2168 "'%Fs' : too few actual parameters for intrinsic"
2169 "'%Fs' : intrinsic function, cannot be defined"
2170 "'%s' : not declared as a function, cannot be intrinsic"
2171 "'%s' : illegal operand"
2172 "'%Fs' : actual is not a pointer : parameter %d"
2173 "'%Fs' : actual is not a pointer : parameter %d, parameter list %d"
2174 "'%Fs' : actual has type void : parameter %d, parameter list %d"
2175 "'%Fs' : unresolved external" /* QC */
2176 "static huge data not supported by /qc" /* QC */
2177 "constant too big"
2178 "'%s' : storage class for same_seg variables must be extern"
2179 "'%Fs' : was used in same_seg, but storage class is no longer extern"
2180 "controlling expression has type void"
2181 "pragma requires command line option '%s'" /* QC2 */
2182 "'%Fs' : has type void"
2183 "pragma requires command line option '%Fs'" /* QC */
2185 "'%Fs' : illegal _based allocation"
2187 "cast of near function pointer to far function pointer"
2188 "#error : %s" /* QC2 */
2189 "#error : %Fs"
2193 "'%Fs' : already in a segment"
2194 "'%Fs' : is a text segment"
2195 "'%Fs' : is a data segment"
2196 "/ML cannot be used with floating point" /* QC */
2198 "'%Fs' : tried to be allocated in code segment '%Fs'" /* QC2 */
2199 "'%Fs' : tried to be allocated in data segment '%Fs'" /* QC2 */
2200 "'%Fs' : function has already been defined"
2201 "'%Fs' : storage class must be extern"
2202 "'interrupt' function must be 'far'" /* QC2 */
2203 "'%s' function must be 'cdecl'" /* QC2 */
2204 "'saveregs/interrupt' modifiers mutually exclusive" /* QC2 */
2205 "'%Fs' : cannot initialize extern block-scoped variables"
2206 "'%Fs' : typedef cannot be used for function definition"
2207 "'%Fs' in struct/union '%Fs' has a zero-sized array"
2208 "no members defined using this type"
2209 "type cast in _based construct must be (_segment)"
2210 "'%Fs' : must be near/far data pointer"
2211 "(_segment) applied to function identifier '%s'"
2212 "'%Fs' : _based not available for functions/pointers to functions"
2213 "'%s' : illegal argument to _based"
2214 "pointers based on void require the use of :>"
2215 ":> operator only for objects based on void"
2216 "'%Fs' may not be used with '%Fs'"
2217 "'%Fs' must be used with '%Fs'"
2218 "type in _based construct must be void"
2219 "syntax error : type qualifier must be after '*'"
2220 "warning treated as error - no object file generated"
2221 "'.' : left operand points to struct/union, use '->'"
2222 "'->' : left operand has struct/union type, use '.'"
2223 "left of '->%Fs' must point to struct/union"
2224 "left of '.%Fs' must have struct/union type"
2225 "'%Fs' : first member of struct is unnamed"
2400 "in-line syntax error in '%s', found '%Fs'"
2401 "'%s' : register must be base in '%s'"
2402 "'%s' : register must be index in '%s'"
2403 "'%s' : register must be base/index in '%s'"
2404 "'%s' : illegal register in '%s'"
2405 "illegal short forward reference with offset"
2406 "'%s' : name undefined in '%s'"
2407 "illegal float register in '%s'"
2408 "illegal type on PTR operator in '%s'"
2409 "illegal type used as operator in '%s'"
2410 "'%s' : ambiguous member name in '%s'"
2411 "'%s' : illegal struct/union member in '%s'"
2412 "'%Fs' : case insensitive label redefined"
2413 "'%s' : illegal align size"
2414 "illegal number of operands"
2415 "improper operand type"
2416 "'%s' : illegal opcode for processor"
2417 "divide by zero in '%s'"
2418 "'%Fs' : not in a register"
2419 "mod by zero in '%s'"
2420 "'%s' : illegal symbol in %s"
2421 "PTR operator used with register in '%s'"
2422 "illegal segment override in '%s'"
2424 "'%Fs' : improper expression in '%s'"
2425 "'%Fs' : nonconstant expression in '%s'"
2426 "'%Fs' : illegal operator in '%s'"
2427 "'%Fs' : jump referencing label is out of range" /* QC */
2428 "'%Fs' : segment redefinition" /* QC2 */
2429 "'%Fs' : illegal far label reference"
2901 "too many symbols predefined with /D" /* driver */
2902 "conflict in memory-model specification" /* driver */
2903 "missing source file name" /* driver */
2908 "limit of %s exceeded at '%s'" /* driver */
2911 "only one floating-point option allowed" /* driver */
2912 "too many linker flags on command line" /* driver */
2913 "incomplete model specification" /* driver */
2916 "'%s' and '%s' are incompatible" /* driver */
2918 "cannot open linker response file" /* driver */
2919 "cannot overwrite the source/object file, '%s'" /* driver */
2920 "%s option requires extended keywords to be enabled (/Ze)" /* driver */
2921 "invalid numerical argument '%s'" /* driver */
2922 "cannot open help file, '%s'" /* driver */
2927 "could not execute '%s', status %d" /* driver */
2928 "too many open files, cannot redirect '%s'" /* driver */
2930 "INTERNAL COMPILER ERROR in '%s'\n\t\tContact Microsoft Product Support Services" /* driver */
2931 "too many flags/files on command line" /* driver */
2000 "UNKNOWN ERROR\n\t\tContact Microsoft Product Support Services"
/* fatals */
1001 "Internal Compiler Error\n\t\t(compiler file '%s', line %d)\n\t\tContact Microsoft Product Support Services"
1003 "error count exceeds %d; stopping compilation"
1004 "unexpected end-of-file found"
1005 "string too big for buffer"
1006 "write error on compiler-generated file"
1007 "unrecognized flag '%s' in '%s'"
1008 "no input file specified"
1009 "compiler limit : macros nested too deeply"
1010 "compiler limit : macro expansion too big"
1011 "compiler limit : '%s': macro definition too big"
1012 "unmatched parenthesis - missing '%c'"
1013 "cannot open source file '%s'" /* QC2 */
1014 "too many include files"
1015 "cannot open include file '%s'" /* QC2 */
1016 "#if[n]def expected an identifier"
1017 "invalid integer constant expression"
1018 "unexpected '#elif'"
1019 "unexpected '#else'"
1020 "unexpected '#endif'"
1021 "invalid preprocessor command '%s'"
1022 "expected '#endif'"
1023 "cannot open source file '%Fs'"
1024 "cannot open include file '%Fs'"
1025 "compiler terminated by user" /* QC */
1026 "parser stack overflow, please simplify your program"
1027 "DGROUP data allocation exceeds 64K" /* QC, c23 */
1028 "'%s' : segment allocation exceeds 64K" /* QC */
1031 "compiler limit : function calls nested too deeply" /* QC, c23 */
1032 "cannot open object listing file '%s'" /* QC, c23 */
1035 "expression too complex, please simplify" /* QC, c23 */
1037 "cannot open object file '%s'" /* QC, c23 */
1041 "cannot open compiler intermediate file - no more files"
1042 "cannot open compiler intermediate file - no such file or directory"
1043 "cannot open compiler intermediate file"
1044 "out of disk space for compiler intermediate file"
1045 "floating-point overflow" /* QC2 */
1047 "limit of %s exceeded at '%s'"
1048 "unknown option '%c' in '%s'"
1049 "invalid numerical argument '%s'"
1052 "compiler limit : #if/#ifdef blocks nested too deeply"
1053 "compiler limit : struct/union nested too deeply"
1054 "compiler limit : initializers nested too deeply"
1055 "compiler limit : out of keys"
1056 "compiler limit : out of macro expansion space"
1057 "unexpected end-of-file in macro expansion (missing ')'?)"
1059 "compiler is out of near heap space"
1060 "compiler is out of far heap space"
1061 "compiler limit : blocks nested too deeply" /* QC */
1062 "error writing to preprocessor output file"
1063 "compiler limit : compiler stack overflow" /* QC */
1064 "compiler limit : token overflowed internal buffer"
1068 "cannot open file '%s'"
1069 "write error on file '%s'" /* QC */
1070 "mismatched #if/#endif pair in file '%Fs'"
1071 "unexpected end-of-file found in comment"
1072 "'%Fs' : cannot read file"
1126 "'%Fs' : automatic allocation exceeds %s" /* QC, c23 */
1127 "'%Fs' : segment redefinition"
1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Product Support Services"

Binary file not shown.

View File

@ -0,0 +1,90 @@
/* Constants */
#define CR 13 /* ASCII code for Return */
#define ESCAPE 27 /* ASCII code for Esc key */
#define MDA 0 /* Adapter constants */
#define CGA 1
#define MCGA 2
#define EGA 3
#define VGA 4
#define MONO 0 /* Display constants */
#define COLOR 1
#define clear_scrn( attr, row1, row2 ) ClearBox( attr, row1, 0, row2, 79 )
/* Structure members at 1-byte boundaries */
#pragma pack( 1 )
/* Video configuration structure */
struct vid_config
{
unsigned char vmode; /* Current mode */
unsigned char dpage; /* Current display page */
unsigned char rows; /* Number of display rows - 1 */
unsigned char display; /* Either MONO or COLOR */
unsigned char adapter; /* Adapter code */
unsigned char CGAvalue; /* Enable value for CGA */
unsigned sgmnt; /* Video segment with page offset */
};
struct vid_config vconfig; /* Structure for video configuration */
/* Disk statistics returned from GetDiskSize procedure */
struct disk_stat
{
unsigned total; /* total clusters */
unsigned avail; /* available clusters */
unsigned sects; /* sectors per cluster */
unsigned bytes; /* bytes per sector */
};
/* File information returned from FindFirst procedure */
struct file_info
{
char pad[21]; /* pad to 43 bytes */
char attrib; /* file attribute */
int time; /* file time */
int date; /* file date */
long size; /* file size */
char name[13]; /* file name */
};
/* Procedure prototypes from COMMON.ASM */
void GetVidConfig( void );
void StrWrite( int row, int col, char *str );
void ClearBox( int attr, int row1, int col1, int row2, int col2 );
int GetVer( void );
int SetCurPos( int row, int col );
/* Procedure prototypes from MATH.ASM */
long AddLong( long long1, long long2 );
long SubLong( long long1, long long2 );
long ImulLong( long long1, long long2 );
long *MulLong( long long1, long long2 );
int DivLong( long long1, short short2, short *remn );
int IdivLong( long long1, short short2, short *remn );
int Quadratic( float a, float b, float c, float *r1, float *r2 );
/* Procedure prototypes from FILE.ASM */
void ChangeDrive( int drive );
void GetDiskSize( int drive, struct disk_stat *disk );
void GetVidConfig( void );
int ReadCharAttr( int *attr );
int GetCurDir( char *spec );
int GetCurDisk( void );
int CopyFile( int imode, char *fspec1, char *fspec2 );
int DelFile( char *fspec );
int MakeDir( char *pspec );
int RemoveDir( char *pspec );
int ChangeDir( char *pspec );
int GetAttribute( char *fspec );
int SetAttribute( int attr, char *fspec );
int RenameFile( char *fspec1, char *fspec2 );
int GetFileTime( int handle, char *str );
int FindFirst( int attr, char *fspec, struct file_info *finfo );
int FindNext( struct file_info *finfo );
int UniqueFile( int attr, char *fspec );
int OpenFile( int access, char *fspec );
int CloseFile( int handle );
int ReadFile( int handle, int len, char *pbuff );
int SetCurPos( int row, int col );
int GetStr( char *bufstr, int maxlen );
char *StrCompare( char *str1, char *str2, int len );
char *StrFindChar( char ichar, char *str, int direct );

View File

@ -0,0 +1,57 @@
PATCH320.DOC File
Notes on patching IBM(R) PC-DOS Version 3.20
(C) Copyright Microsoft Corporation, 1988
Version 3.20 of IBM(R) PC-DOS contains a bug that can cause unexpected results
in programs that generate floating-point exceptions. This file explains how to
install a small patch in DOS to eliminate the problem.
It is especially important to install this patch if you wish to use the C
run-time routine signal with the SIGFPE parameter, since that routine does
not work correctly in the unpatched version of IBM PC-DOS 3.20. IBM Corporation
also supplies a patch to eliminate this problem.
Note that MS-DOS(R) Version 3.20 contains another, different floating-point
bug. The README.DOC file for this release tells you where to find more
information about installing a patch for that bug. If you use any version of
DOS 3.20 other than IBM PC-DOS 3.20 or MS-DOS 3.20, contact your hardware
manufacturer to determine whether the problem exists in your version.
You can install the DOS patch for IBM PC-DOS 3.20 by following these steps:
1. Format a blank floppy disk. (Do NOT use the /s formatting option to
transfer system files to the disk.)
2. Use the SYS command to copy the files IBMDOS.COM and IBMBIO.COM to
the new disk. For example, if you boot from drive C:, you could use
these commands:
C:
SYS A:
3. Use the COPY command to copy the files COMMAND.COM, SYS.COM, and
DEBUG.COM to the new disk.
4. Use the COPY command to copy the files STKPAT.BAT, STKPAT.SCR,
RMRHS.EXE, and SETRHS.EXE from the \PATCH directory of your hard-disk
drive to the new disk.
5. Reboot your system from the floppy disk that you prepared in steps 1-4.
6. Run the STKPAT.BAT file to patch the IBMBIO.COM file on the new disk.
7. Use the SYS command to transfer the patch from the floppy disk to any
other Version 3.20 disk. For example, if you normally boot from drive
C:, you would enter these commands to transfer the patched DOS to
your hard-disk drive:
A:
SYS C:
This installs the patch.
8. Reboot your system as you normally do.

View File

@ -0,0 +1,107 @@
PATCH87.DOC File
Notes on patching MS-DOS(R) Version 3.20
(C) Copyright Microsoft Corporation, 1988
Version 3.20 of MS-DOS(R) contains a bug that can cause unexpected results in
programs that use floating-point math. This file explains how to eliminate
that problem by using PATCH87.EXE, a program included in this release.
Note that IBM(R) PC-DOS 3.20 contains another, different floating-point bug.
The README.DOC file for this release tells you where to find more information
about installing a patch for that bug. If you use any version of DOS 3.20
other than IBM PC-DOS 3.20 or MS-DOS 3.20, contact your hardware manufacturer
to determine whether the problem exists in your version.
Do I Need to Use This Program?
------------------------------
You do not need to read any further unless your system has ALL of the following
characteristics:
1. You use MS-DOS version 3.20.
2. You boot from a hard-disk drive.
3. Your system has a math coprocessor (for instance, an 8087 chip).
4. You run programs that use floating-point math.
For systems that satisfy all of the preceding conditions, you may be able to
eliminate floating-point math problems by installing a small patch in DOS. If
you are not sure whether you need the patch, perform the following steps:
1. Copy the program PATCH87.EXE (included in this release) to the root
directory of your hard-disk drive.
2. Reboot your system from the hard disk and DO NOT PERFORM ANY FLOPPY-
DISK OPERATIONS after rebooting. It is very important that you avoid
floppy-disk I/O after rebooting, since that will affect the reliability
of the diagnostic test that you are about to perform.
3. If necessary, use the CD command to move to the root directory of your
hard-disk drive.
4. Run the PATCH87.EXE program by entering this command at the DOS prompt:
PATCH87
The program performs a diagnostic test on your system to determine
whether it needs the DOS patch, and, if the patch is needed,
whether it can be performed successfully.
5. Follow the procedure described in the next section if the program
tells you that you need to install the DOS patch, and that it can
be done.
NOTE: The floating-point problem has been eliminated in versions of
MS-DOS higher than 3.20. This includes MS-DOS versions 3.21 and 3.30.
If You Need to Install the Patch
--------------------------------
If you performed the preceding test and determined that you should install the
DOS patch on your system, perform the following steps:
1. Format a blank floppy disk. (Do NOT use the /s formatting option to
transfer system files to the disk.)
2. Use the SYS command to copy IO.SYS and MSDOS.SYS from the root
directory of your hard disk to the new floppy disk. For instance, if
you boot from drive C:, you would enter the following commands:
C:
SYS A:
3. Use the COPY command to copy COMMAND.COM and SYS.COM to the same
floppy disk.
4. Use the COPY command to copy the program PATCH87.EXE (included in this
release) to the same floppy disk.
5. Change the current drive and directory to the floppy disk, by entering
the following command:
A:
7. Install the DOS patch by entering the following command:
PATCH87 /F
WARNING: If you experience any disk errors during steps 2 through 7,
do NOT proceed with step 8. Reboot from your hard disk and repeat the
entire process.
8. If you have not experienced any errors, use the SYS command to transfer
the files IO.SYS and MSDOS.SYS from the floppy disk back to your hard
disk. For instance, if the boot directory of your system is the root
directory of drive C:, you would enter the following command at the DOS
prompt:
A:
SYS C:
This installs the DOS patch.
9. Reboot the system.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,6 @@
echo This script will work only on drive a:
rmrhs
debug ibmbio.com <stkpat.scr
setrhs

View File

@ -0,0 +1,5 @@
a c48
jmp short c64
w
q

View File

@ -0,0 +1,35 @@
#include <stdio.h>
#ifndef MWC
#include <string.h>
#include <stdlib.h>
#endif
#define DIGITS_TO_FIND 200 /*9009*/
int main() {
int N = DIGITS_TO_FIND;
int x = 0;
int a[ DIGITS_TO_FIND ];
int n;
for (n = N - 1; n > 0; --n) {
a[n] = 1;
}
a[1] = 2, a[0] = 0;
while (N > 9) {
n = N--;
while (--n) {
a[n] = x % n;
x = 10 * a[n-1] + x/n;
}
printf("%d", x);
}
printf( "\ndone\n" );
return 0;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,2 @@
files=20
buffers=10

View File

@ -0,0 +1,3 @@
SET PATH=C:\QC25\BIN;C:\QC25\TUTORIAL;Z:\
SET LIB=C:\QC25\LIB
SET INCLUDE=C:\QC25\INCLUDE

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,36 @@
/* error messages */
2001 "too many symbols predefined with /D"
2002 "conflict in memory-model specification"
2003 "missing source file name"
2008 "limit of %s exceeded at '%s'"
2011 "only one floating-point option allowed"
2012 "too many linker flags on command line"
2013 "incomplete model specification"
2016 "'%s' and '%s' are incompatible"
2018 "cannot open linker response file"
2019 "cannot overwrite the source/object file, '%s'"
2020 "%s option requires extended keywords to be enabled (/Ze)"
2021 "invalid numerical argument '%s'"
2022 "cannot open help file, '%s'"
2027 "could not execute '%s'"
2028 "too many open files, cannot redirect '%s'"
2030 "INTERNAL COMPILER ERROR in '%s'\n\t\tContact Microsoft Product Support Services"
2031 "too many flags/files on command line"
2000 "UNKNOWN COMMAND LINE ERROR\n\t\tContact Microsoft Product Support Services"
/* warning messages */
4001 "listing overrides assembly output"
4002 "ignoring unknown flag '%s'"
4003 "different processors selected for code generation"
4005 "could not locate '%s';\nPlease enter new file name (full path) or Ctrl-C to quit: "
4007 "/C ignored (must also specify /P or /E or /EP)"
4009 "threshold only for far/huge data, ignored"
4011 "preprocessing overrides source listing"
4012 "function declarations override source listing"
4013 "combined listing overrides object listing"
4014 "invalid value '%d' for '%s'; default '%d' is used"
4018 ".DEF files supported in protected mode only"
4019 "string too long; truncated to '%d' characters"
4000 "UNKNOWN COMMAND LINE WARNING\n\t\tContact Microsoft Product Support Services"

Binary file not shown.

View File

@ -0,0 +1,67 @@
QUICK C COMPILER OPTIONS
-MEMORY MODEL-
/AS small model (default)
/AC compact model
/AM medium model
/AL large model
/AH huge model
/AT tiny model (.COM files)
-OPTIMIZATION-
/O enable optimization (same as /Ot)
/Od disable optimizations
/Ol enable loop optimizations
/Ot optimize for speed
/Ox max. optimization (/Olt /Gs)
-CODE GENERATION-
/G0 8086 instructions (default)
/G1 186 instructions
/G2 286 instructions
/Gc Pascal style function calls
/Gi incremental compilation
/Gr _fastcall type calls
/Gs no stack checking
/Gt[number] data size threshold
/ND <data segment name>
/NT <text segment name>
-OUTPUT FILES-
/Fe<executable file>
/Fm[map file]
/Fo<object file>
-PREPROCESSOR-
/C don't strip comments
/D<name>[=text] define macro
/E preprocess to stdout
/EP same as /E but no #line
/I<name> add #include path
/P preprocess to file
/U<name> remove predefined macro
/u remove all predefined macros
/X ignore "standard places"
-LANGUAGE-
/Za disable extensions
/Zd line number information
/Ze enable extensions (default)
/Zi symbolic debugging information
/Zl remove default library info
/Zp[n] pack structs on n-byte boundary
/Zr enable pointer checking
/Zs syntax check only
-FLOATING POINT-
/FPi inline with emulator (default)
/FPi87 inline with 8087
-MISCELLANEOUS-
/batch no interactive prompts
/c compile only, no link
/J default char type is unsigned
/nologo no sign-on message
/Tc<file> compile file without .c
/V<string> set version string
/W<number> warning level
-MASM SUPPORT-
/Ta<file> assemble file without .asm
-LINKING-
/F <hex_number> stack size (hex. bytes)
/link [linker_options_and_libraries]
/Lc link compatibility mode executable
/Ln link without C Startup Code
/Lr link compatibility mode executable

Binary file not shown.

View File

@ -0,0 +1,507 @@
README.DOC File
Release Notes for the
Microsoft(R) QuickC(R) Compiler with QuickAssembler, Version 2.51
(C) Copyright Microsoft Corporation, 1989-1990
This document contains release notes for Version 2.51 of the Microsoft
QuickC Compiler with QuickAssembler. It includes information on both C and
assembly language. The Contents section below lists the documentation for
C and assembly language affected by the release notes. In all cases, the
information in this document supersedes the information in the manuals.
However, Microsoft revises its documentation at the time of reprinting;
the manuals may already include some of this information.
Note: If you're reading this from within on-line help, but would prefer to
print it out by loading README.DOC into a word processor, you can find the
file in the executable files directory (the default is \QC25\BIN).
The other documentation files are \SAMPLES\QASAMPLES.DOC, which explains
the assembly-language example programs in the SAMPLES directory; and
SAMPLES.DOC, which explains the C-language example programs in the same
directory.
(COMPAQ is a registered trademark of Compaq Computer Corporation.)
(Intel is a registered trademark of Intel Corporation.)
(Novell is a registered trademark of Novell, Inc.)
===============================< Contents >================================
This document has five parts:
Part Notes
---- ----------------------------------------------
1 Notes on "Up and Running"
2 Notes on "C for Yourself"
3 Notes on "QuickC Tool Kit"
4 Notes on "QuickAssembler Programmer's Guide"
5 Additional Notes on QuickC with QuickAssembler
===================< Part 1: Notes on "Up and Running" >===================
Page Note
---- ----
Inside Front Cover
Brief Guide to Keystrokes
--- -------------------------
The chart on the inside front cover says the ESC key "stops the
compiler and linker from continuing." ESC stops the compiler but NOT
the linker. Press CTRL+BREAK to stop both the compiler and linker.
If you are using the debugger and running a program that expects
keyboard input, pressing either CTRL+C or CTRL+BREAK and then ENTER
will allow you to exit.
6 Running SETUP
--- -------------
If you already have QuickC installed, SETUP will overwrite the
existing QC.INI file that contains the current compiler options,
etc. set in the environment. If you wish to save those settings,
rename this file before running SETUP.
19 Using QuickC
--- ------------
If you own a COMPAQ(R) SLT/286, and the LCD display goes
blank when exiting from QuickC back to DOS, you should
run the program DAC_ON.COM before loading QuickC. To obtain a
copy of DAC_ON.COM, contact your authorized COMPAQ Computer
Dealer.
42 The Debugger
--- ------------
The Quickwatch command does not display complete information
for assembler structures. Only the first member of a structure
is shown.
You may see the message "currently running program terminated"
while debugging.
This may happen if your program is linked with a user-created
library module that contains debugging information, and for
which the source files are present. In such a case, single-
stepping into a function contained in the library will cause
the debugger to terminate the current program and attempt to
compile the source files for the library module into an
executable program.
You can avoid this problem by setting your program list to
contain only the name of the source file of your program.
(miscellaneous)
Accessing Memory at 0xFFFF
--------------------------
Due to a problem with the Intel(R) processor, any attempt to
access a word value at memory location 0xFFFF may cause the
system to hang. The most likely way for this to happen is from
within the QuickC debugger, if you use the WO (display word) or
DW (display double word) operators to examine a register
containing 0xFFFF. Any C or assembly-language program trying
to access that location may also cause the system to hang.
Incompatibility with Novell(R) Netware
--------------------------------------
If you have a peripheral (such as a mouse) that uses IRQ 3, and
your system is part of a network using Novell Netware version
2.15 or lower, your system may hang when you load the QuickC
environment. As a temporary solution, reset your peripheral to
use another interrupt. For more information, contact your Novell
Netware dealer.
===================< Part 2: Notes on "C for Yourself" >===================
Page Note
---- ----
53 Type Qualifiers
--- ---------------
The fourth paragraph in this section is incorrect. A long double
value is the same size as a double. It contains 8 bytes, not 10. It
expresses a floating-point number with at least 15 digits of
precision, not 19. Table 4.1 on page 49 should also be corrected.
164 Declaring a Pointer with the Wrong Type
--- ---------------------------------------
In the first program listing on the page, the line
ptr = val; /* Error! */
should read
ptr = &val; /* Error! */
215 Table 11.4 Standard vs. Low-Level
--- -----------------------------------
The headings across the top of the table should read
Function Parameters Returns Error Condition
298 Vector-Mapped Fonts
--- -------------------
Add this note to the description of vector mapping:
If a vector-mapped font is selected in graphics mode, any function
affecting "_moveto" or "_lineto" will also affect the font
("_setlinestyle" and so on) when "_outgtext" is called.
304 Example Program Using Fonts
--- ---------------------------
The line reading
if( !_setfont( list ) )
should read
if( _setfont( list ) >= 0 )
309 Limits on _asm Identifiers
--- --------------------------
Never use reserved assembly words as labels, variable names, or other
identifiers within an _asm block. This includes words in the
following categories:
- ASM Opcodes such as CMP or MOV
- Opcodes new to the 80186, 80286, and 80386 such as ARPLS or CLTS
- Reserved operand words such as WORD or PARA
- C library functions such as "exit" or "time"
For example, the following code is not permitted:
main()
{
int word;
_asm { mov WORD PTR [word],ax }
}
The variable 'word' can be used in the C part of the program, but not
within the assembly block.
366 Font Display Routines
--- ---------------------
The return values for the _registerfonts and _setfont functions
should be
_registerfonts
Returns: the number of fonts registered, or a negative value if
failure
_setfont
Returns: a negative value if failure, zero or positive if
successful
==================< Part 3: Notes on "QuickC Tool Kit" >===================
Page Note
---- ----
94 /Gw, GW (Generate Code for Windows Function Calls)
--- --------------------------------------------------
QuickC 2.5 supports development of programs for the next release
of Windows. If you wish to develop programs for Windows 2.03, you
must explicitly link your program with C51STUBS.LIB.
130 /INC (Prepare for ILINK)
--- ------------------------
By default, ILINK will call LINK if the incremental link fails.
To make ILINK call QLINK instead, use the /E option and an
argument. For example:
ILINK /E "QLINK @RESPONSE" PROGRAM.EXE
259 Warning Message C4018
--- ---------------------
The warning message below is new and should be added to page 259:
C4018 'operator': signed/unsigned mismatch
An expression involving the specified operator had inconsistent
integer types. The two integer expressions used in the comparison
operation are not of the same signed or unsigned type.
(miscellaneous)
Makefile Compatibility with QuickC 2.0
--------------------------------------
The name of the linker supplied with QuickC has been changed
from LINK to QLINK. Any makefile used with QuickC 2.0 that
specify the LINK command should be changed accordingly.
Makefile Compatibility with Programmer's WorkBench
--------------------------------------------------
The makefiles generated by QuickC are not fully readable by
Microsoft Programmer's WorkBench (PWB) included with Microsoft's
Professional Development Systems. PWB is unable to read the
linker options specified in QuickC makefiles, so you will have to
re-specify those options using PWB's menus. QuickC cannot read
makefiles generated by PWB.
========< Part 4: Notes on "QuickAssembler Programmer's Guide" >===========
Page Note
---- ----
xi Running SETUP Before Using Help
--- -------------------------------
Before using the Quick Advisor, make sure you run the SETUP
program. This program combines files on different disks to build
QA.HLP, which contains help on assembly language as well as DOS
and BIOS interrupt functions.
xi Expanding Environment Space
--- ---------------------------
QuickAssembler for QuickC makes use of certain environment
variables, such as HELPFILES. However, these variables are stored
in an area of memory called the "environment space." You may need
to expand this memory to use the new environment variables
successfully.
If you run DOS 3.2 or later, you can set the environment space
with the DOS SHELL command. For example, the following command
sets the environment size at 3000 bytes when placed in CONFIG.SYS:
SHELL=COMMAND.COM /E:3000 /p
Consult your DOS manual for more information.
xi Temporary Files and the TMP Environment Variable
--- ------------------------------------------------
If you do not have a TMP environment variable set, the linker
prints the following message when it creates a temporary file:
temporary file <filename> created
To avoid getting this message, set the TMP environment variable to
the name of a drive and directory. This drive should have some free
space. For example, the following command line sets C:\TEMP as the
directory where the linker places temporary files:
SET TMP=C:\TEMP
For convenience, place this command (or a similar one) in your
AUTOEXEC.BAT file to execute it automatically.
6 Terminating the Program with .EXIT
--- ----------------------------------
When you use the .STARTUP directive, the recommended method for
terminating the program is to use the .EXIT directive. With
stand-alone assembly programs, you must explicitly terminate
or the processor will execute meaningless instructions beyond the
end of the program.
The .EXIT directive has the following syntax:
.EXIT [exitcode]
in which exitcode is an optional register, memory location, or
constant that contains a value to return to DOS. This value must
not be larger than one byte.
When you use this directive, the assembler generates instructions
that call DOS function 4CH (Exit with Return Code). You can use
another method to terminate the program if you wish. The assembler
generates an advisory warning if you use .STARTUP without .EXIT.
The .EXIT directive requires that .MODEL was previously used.
Within the environment, the assembler generates an advisory
warning message if you use .STARTUP without using .EXIT. Outside
the environment, the assembler does not generate this message.
7 Effect of ILINK on Building a Program
--- -------------------------------------
By default, the QuickC environment invokes ILINK to link programs.
ILINK, in turn, requires that a program have a default data
segment (it may be empty). To meet this requirement, you can do
any of three alternatives:
1. Declare a data segment with .DATA if using simplified segment
directives.
2. Declare a group named DGROUP.
3. Turn Incremental Link off in the Linker Flags dialog box.
The use of ILINK imposes some other requirements on assembly-
language programs:
1. You cannot have a segment with the AT attribute.
2. Avoid depending on distances between segments being fixed. Some
programs calculate the distance between two segments and then
use this value elsewhere. When ILINK is in use, segment-address
arithmetic is unpredictable.
3. The DUP operator cannot have a program address as an operand.
For example, the following statement is compatible with ILINK:
myarr DW 10 DUP (5)
However, the next statement is not compatible with ILINK, even
though it is supported by the assembler:
myarr DW 10 DUP (myproc)
7 Searching for Include Files
--- ---------------------------
When building and running a program, note that the assembler looks
for include files in the following order:
1. The directory in which the current source file is located
2. Directories specified with the /I command-line option
3. The current directory (as recognized by the environment)
4. Directories specified in the INCLUDE environment variable
9 Assembling from the Command Line
--- --------------------------------
QCL does not report some warning messages reported inside the QuickC
environment. QCL does not warn you if you use .STARTUP without .EXIT.
14 Specifying Debug Expressions
--- ----------------------------
The QuickC environment now supports an optional display-format
character for examining arrays. You can add a suffix to any
expression for the Watch window as follows:
expression,nf
in which n is a number and f is a format specifier (such as i, x,
d, or a). Both are optional. The use of n displays the expression
as if it were an array. If the expression is already an array,
then the use of n displays the array as if it were an array of a
higher dimension. The assembler does not type any symbol as an
array. Thus, the use of n with a variable declared in assembly
always displays the variable as an array of one dimension.
The optional f display-format specifier only affects the format
in which each member of the array is displayed.
The Watch window determines the type of array from the expression
or from BY, WO, or DW if used. If WVAR is declared as type WORD
(or "int" in C), then WVAR,5x displays the first five words at the
address of WVAR. The "x" specifies hex format. BY WVAR,5x displays
the first five bytes at the address of WVAR. Each byte is
displayed as if it were a hexadecimal word-sized value.
56 The PROC Directive
--- ------------------
The PROC directive sets the BP register to point to a procedure's
frame, but only if you use a parameter list or the LOCAL directive.
82 Using Full Segment Definitions
--- ------------------------------
The program example on this page should declare class name 'CODE'
for the segment definition:
_TEXT SEGMENT 'CODE'
The class name 'CODE' is necessary if you want to debug the
module. The assembler issues a warning message if you assemble a
code segment without this class name. If you use simplified
segment directives, the code segments automatically have this
class name.
109 Defining Segment Combine Types
--- ------------------------------
The combine type describes how the linker combines segments, but
does not affect the assembler itself. Within any given module, the
assembler concatenates segments with the same name. Thus, segments
with the COMMON attribute are overlapped only if they are in
different modules.
383 Assembling with Two Passes
--- --------------------------
In addition to the options listed in Appendix B, QCL supports the
/P2 option, which specifies two-pass assembly. The /P1 option
specifies one-pass assembly and is now the default. Two-pass
assembly is slower than one-pass assembly, but enables some
language-specific features (such as IF1 and IF2) that rely on two
passes.
383 Removing Copyright Message
--- --------------------------
In addition to the options listed in Appendix B, QCL supports the
/nologo option, which prevents QCL from printing the product name
and copyright information. QCL also prints a warning message when a
nonstandard version of DOS is detected. The /nologo option prevents
this message from being printed.
386 Using /AT to Generate a .COM File
--- ---------------------------------
If you use QCL to generate a .COM file but do not use /AT, the
linker may produce a file with an .EXE extension. This file is
really in .COM format. It should be renamed immediately. You can
prevent this situation by using the /AT option, or by using the
/Fe option to explicitly give the name of the output file. For
example, the following command line produces a file with a .EXE
extension:
QCL sample.asm /link /TINY
However, the following command lines each produce a file with a
.COM extension:
QCL /AT /Ln sample.asm /link /TINY
QCL /Fe sample.com sample.asm /link /TINY
392 Line-Number Index in Listing File
--- ---------------------------------
The line-number index generated by /Sq (and generated by default
within the environment) lists correspondences between source-file
lines and listing-file lines. This index, placed at the end of the
listing file, is read and interpreted by the QuickC environment.
You should avoid writing utilities that read this index. The
format of the line-number index is subject to change without
notice.
========< Part 5: Additional Notes for QuickC with QuickAssembler>=========
Source of DOS and BIOS Function Information in Help
---------------------------------------------------
On-line help includes information on IBM ROM BIOS services as well as
MS-DOS service calls. The information on these topics is adapted from the
books "IBM ROM BIOS" and "MS-DOS Functions" by Ray Duncan. Both books are
published by Microsoft Press and are part of the Programmer's Quick
Reference Series.
Math Coprocessor Instructions in .ASM Programs
----------------------------------------------
If you do not have a math coprocessor chip, you must use the /FPi option
when assembling code for emulated floating-point instructions. If the
switch is omitted, your assembly-language programs may hang your machine.
Setting Breakpoints on Assembly Procedures and Labels
-----------------------------------------------------
Version 2.51 of QuickAssembler now supports setting breakpoints on labels.
Because assembly procedures are treated as labels, a dialog box verifies if
you want to set a breakpoint at a procedure label. Additional information
can be found in the on-line help.
ILINK and Tiny Model
--------------------
When switching to tiny model from another model, or from another model to
tiny model, turn off the incremental link option the first time you build
after switching models. Alternatively, you can delete to .SYM and .ILK
files to force a full link. ILINK should always be disabled
when creating tiny model (.COM) programs.

Binary file not shown.

View File

@ -0,0 +1,35 @@
/* sieve.c */
/* Eratosthenes Sieve Prime Number Program in C from Byte Jan 1983
to compare the speed. */
#include <stdio.h>
#define TRUE 1
#define FALSE 0
#define SIZE 8190
typedef int bool;
char flags[SIZE+1];
int main()
{
int i,k;
int prime,count,iter;
for (iter = 1; iter <= 10; iter++) { /* do program 10 times */
count = 0; /* initialize prime counter */
for (i = 0; i <= SIZE; i++) /* set all flags TRUE */
flags[i] = TRUE;
for (i = 0; i <= SIZE; i++) {
if (flags[i]) { /* found a prime */
prime = i + i + 3; /* twice index + 3 */
for (k = i + prime; k <= SIZE; k += prime)
flags[k] = FALSE; /* kill all multiples */
count++; /* primes found */
}
}
}
printf("%d primes.\n",count); /*primes found in 10th pass */
return 0;
}

View File

@ -0,0 +1,165 @@
#include <stdio.h>
#ifdef AZTEC86
#include <stdlib.h>
#endif
#ifdef HISOFTC
#include <stdlib.h>
#endif
#ifdef WATCOM
#include <malloc.h>
#include <process.h>
#endif
#ifdef powerc
#define allocs 50
#else
#ifdef HISOFTC
#define allocs 66 /* not enough RAM with hisoft to go higher */
#else
/* most c runtimes work up to 69, but use 66 to have a consistent benchmark */
#define allocs 66
#endif
#endif
int logging = 1;
char * memset_x( p, v, c ) char * p; int v; int c;
{
unsigned char * pc = (unsigned char *) p;
unsigned char val = (unsigned char) ( v & 0xff );
int i;
if ( 0 == p )
{
printf( "request to memset a null pointer\n" );
exit( 1 );
}
if ( logging )
#ifdef CPMTIME
printf( " memset p %u, v %d, val %x, c %d\n", p, v, val, c );
#else
#ifdef HISOFTC
printf( " memset p %u, v %d, val %x, c %d\n", p, v, val, c );
#else
printf( " memset p %p, v %d, val %x, c %d\n", p, v, val, c );
#endif
#endif
for ( i = 0; i < c; i++ )
*pc++ = val;
return p;
}
void chkmem( p, v, c ) char * p; int v; int c;
{
unsigned char * pc = (unsigned char *) p;
unsigned char val = (unsigned char) ( v & 0xff );
int i;
if ( 0 == p )
{
printf( "request to chkmem a null pointer\n" );
exit( 1 );
}
for ( i = 0; i < c; i++ )
{
if ( *pc != val )
{
#ifdef CPMTIME
printf( "memory isn't as expected! p %u, v %d, c %d, *pc %d\n",p, v, c, *pc );
#else
printf( "memory isn't as expected! p %p, v %d, c %d, *pc %d\n",p, v, c, *pc );
#endif
exit( 1 );
}
pc++;
}
}
int main( argc, argv ) int argc; char * argv[];
{
int i, cb, c_cb, j;
char * pc;
char * ap[ allocs ];
logging = ( argc > 1 );
pc = argv[ 0 ]; /* evade compiler warning */
for ( j = 0; j < 10; j++ )
{
if ( logging )
printf( "in alloc mode\n" );
for ( i = 0; i < allocs; i++ )
{
cb = 8 + ( i * 10 );
c_cb = cb + 5;
if ( logging )
printf( " i, cb: %d %d\n", i, cb );
pc = (char *) calloc( c_cb, 1 );
chkmem( pc, 0, c_cb );
memset_x( pc, 0xcc, c_cb );
ap[ i ] = (char *) malloc( cb );
memset_x( ap[ i ], 0xaa, cb );
chkmem( pc, 0xcc, c_cb );
free( pc );
}
if ( logging )
printf( "in free mode, even first\n" );
for ( i = 0; i < allocs; i += 2 )
{
cb = 8 + ( i * 10 );
c_cb = cb + 3;
if ( logging )
printf( " i, cb: %d %d\n", i, cb );
pc = (char *) calloc( c_cb, 1 );
chkmem( pc, 0, c_cb );
memset_x( pc, 0xcc, c_cb );
chkmem( ap[ i ], 0xaa, cb );
memset_x( ap[ i ], 0xff, cb );
free( ap[ i ] );
chkmem( pc, 0xcc, c_cb );
free( pc );
}
if ( logging )
printf( "in free mode, now odd\n" );
for ( i = 1; i < allocs; i += 2 )
{
cb = 8 + ( i * 10 );
c_cb = cb + 7;
if ( logging )
printf( " i, cb: %d %d\n", i, cb );
pc = (char *) calloc( c_cb, 1 );
chkmem( pc, 0, c_cb );
memset_x( pc, 0xcc, c_cb );
chkmem( ap[ i ], 0xaa, cb );
memset_x( ap[ i ], 0xff, cb );
free( ap[ i ] );
chkmem( pc, 0xcc, c_cb );
free( pc );
}
}
printf( "success\n" );
return 0;
}

View File

@ -0,0 +1,527 @@
/*
This version builds with old compilers including:
Aztec C 1.06 for 8080 & Z80 on CP/M.
Microsoft C Compiler V1.04 for 8086 on DOS. (This is Lattice C)
Microsoft C Compiler V2.03 for 8086 on DOS. (Still Lattice C)
Microsoft C Compiler V3.00 for 8086 on DOS.
QuickC 1.0
Turbo C 2.0
The syntax is old and reminds me of 7th grade summer vacation.
Much of this code is awkward to satisfy the lowest common denominator of many compilers.
unsigned long isn't supported in many older compilers, so long is used instead.
Early DOS and CP/M require register variabes to be int, not char or other types.
The perf improvement of using register-int instead of stack-char is worth it.
*/
#define LINT_ARGS
#include <stdio.h>
#ifdef DOSTIME
#include <time.h>
#include <dos.h>
#endif
#define true 1
#define false 0
/* Function Pointers are the fastest implementation for almost every compiler */
#define UseFunPointers 1
#define UseWinner2 2
#define UseLookForWinner 3
#define WinMethod UseFunPointers
#define ABPrune true /* alpha beta pruning */
#define WinLosePrune true /* stop early on win/lose */
#define ScoreWin 6
#define ScoreTie 5
#define ScoreLose 4
#define ScoreMax 9
#define ScoreMin 2
#define DefaultIterations 100
#define PieceX 1
#define PieceO 2
#define PieceBlank 0
typedef char ttype; /* 8-bit and 16-bit cpus do best with char aside from register in locals */
int g_Iterations = DefaultIterations;
ttype g_board[ 9 ];
#if WinMethod == UseFunPointers
ttype pos0func()
{
/* using "register int" instead of "ttype" for x is faster on 8086 and Z80 */
register int x = g_board[0];
if ( ( x == g_board[1] && x == g_board[2] ) ||
( x == g_board[3] && x == g_board[6] ) ||
( x == g_board[4] && x == g_board[8] ) )
return x;
return PieceBlank;
}
ttype pos1func()
{
register int x = g_board[1];
if ( ( x == g_board[0] && x == g_board[2] ) ||
( x == g_board[4] && x == g_board[7] ) )
return x;
return PieceBlank;
}
ttype pos2func()
{
register int x = g_board[2];
if ( ( x == g_board[0] && x == g_board[1] ) ||
( x == g_board[5] && x == g_board[8] ) ||
( x == g_board[4] && x == g_board[6] ) )
return x;
return PieceBlank;
}
ttype pos3func()
{
register int x = g_board[3];
if ( ( x == g_board[4] && x == g_board[5] ) ||
( x == g_board[0] && x == g_board[6] ) )
return x;
return PieceBlank;
}
ttype pos4func()
{
register int x = g_board[4];
if ( ( x == g_board[0] && x == g_board[8] ) ||
( x == g_board[2] && x == g_board[6] ) ||
( x == g_board[1] && x == g_board[7] ) ||
( x == g_board[3] && x == g_board[5] ) )
return x;
return PieceBlank;
}
ttype pos5func()
{
register int x = g_board[5];
if ( ( x == g_board[3] && x == g_board[4] ) ||
( x == g_board[2] && x == g_board[8] ) )
return x;
return PieceBlank;
}
ttype pos6func()
{
register int x = g_board[6];
if ( ( x == g_board[7] && x == g_board[8] ) ||
( x == g_board[0] && x == g_board[3] ) ||
( x == g_board[4] && x == g_board[2] ) )
return x;
return PieceBlank;
}
ttype pos7func()
{
register int x = g_board[7];
if ( ( x == g_board[6] && x == g_board[8] ) ||
( x == g_board[1] && x == g_board[4] ) )
return x;
return PieceBlank;
}
ttype pos8func()
{
register int x = g_board[8];
if ( ( x == g_board[6] && x == g_board[7] ) ||
( x == g_board[2] && x == g_board[5] ) ||
( x == g_board[0] && x == g_board[4] ) )
return x;
return PieceBlank;
}
typedef ttype pfunc_t();
pfunc_t * winner_functions[9] =
{
pos0func,
pos1func,
pos2func,
pos3func,
pos4func,
pos5func,
pos6func,
pos7func,
pos8func,
};
#endif
#if WinMethod == UseWinner2
ttype winner2( move ) ttype move;
{
register int x; /* faster than ttype x on the stack */
switch( move ) /* msc v3 from 1985 generates a jump table! */
{
case 0:
{
x = g_board[ 0 ];
if ( ( ( x == g_board[1] ) && ( x == g_board[2] ) ) ||
( ( x == g_board[3] ) && ( x == g_board[6] ) ) ||
( ( x == g_board[4] ) && ( x == g_board[8] ) ) )
return x;
break;
}
case 1:
{
x = g_board[ 1 ];
if ( ( ( x == g_board[0] ) && ( x == g_board[2] ) ) ||
( ( x == g_board[4] ) && ( x == g_board[7] ) ) )
return x;
break;
}
case 2:
{
x = g_board[ 2 ];
if ( ( ( x == g_board[0] ) && ( x == g_board[1] ) ) ||
( ( x == g_board[5] ) && ( x == g_board[8] ) ) ||
( ( x == g_board[4] ) && ( x == g_board[6] ) ) )
return x;
break;
}
case 3:
{
x = g_board[ 3 ];
if ( ( ( x == g_board[4] ) && ( x == g_board[5] ) ) ||
( ( x == g_board[0] ) && ( x == g_board[6] ) ) )
return x;
break;
}
case 4:
{
x = g_board[ 4 ];
if ( ( ( x == g_board[0] ) && ( x == g_board[8] ) ) ||
( ( x == g_board[2] ) && ( x == g_board[6] ) ) ||
( ( x == g_board[1] ) && ( x == g_board[7] ) ) ||
( ( x == g_board[3] ) && ( x == g_board[5] ) ) )
return x;
break;
}
case 5:
{
x = g_board[ 5 ];
if ( ( ( x == g_board[3] ) && ( x == g_board[4] ) ) ||
( ( x == g_board[2] ) && ( x == g_board[8] ) ) )
return x;
break;
}
case 6:
{
x = g_board[ 6 ];
if ( ( ( x == g_board[7] ) && ( x == g_board[8] ) ) ||
( ( x == g_board[0] ) && ( x == g_board[3] ) ) ||
( ( x == g_board[4] ) && ( x == g_board[2] ) ) )
return x;
break;
}
case 7:
{
x = g_board[ 7 ];
if ( ( ( x == g_board[6] ) && ( x == g_board[8] ) ) ||
( ( x == g_board[1] ) && ( x == g_board[4] ) ) )
return x;
break;
}
case 8:
{
x = g_board[ 8 ];
if ( ( ( x == g_board[6] ) && ( x == g_board[7] ) ) ||
( ( x == g_board[2] ) && ( x == g_board[5] ) ) ||
( ( x == g_board[0] ) && ( x == g_board[4] ) ) )
return x;
break;
}
}
return PieceBlank;
} /*winner2*/
#endif
#if WinMethod == UseLookForWinner
ttype LookForWinner()
{
register int p = g_board[0]; /* faster as register int than ttype on 8086 and Z80 */
if ( PieceBlank != p )
{
if ( p == g_board[1] && p == g_board[2] )
return p;
if ( p == g_board[3] && p == g_board[6] )
return p;
}
p = g_board[3];
if ( PieceBlank != p && p == g_board[4] && p == g_board[5] )
return p;
p = g_board[6];
if ( PieceBlank != p && p == g_board[7] && p == g_board[8] )
return p;
p = g_board[1];
if ( PieceBlank != p && p == g_board[4] && p == g_board[7] )
return p;
p = g_board[2];
if ( PieceBlank != p && p == g_board[5] && p == g_board[8] )
return p;
p = g_board[4];
if ( PieceBlank != p )
{
if ( ( p == g_board[0] ) && ( p == g_board[8] ) )
return p;
if ( ( p == g_board[2] ) && ( p == g_board[6] ) )
return p;
}
return PieceBlank;
} /*LookForWinner*/
#endif
int g_IMoves = 0;
ttype MinMax( alpha, beta, depth, move ) ttype alpha; ttype beta; ttype depth; ttype move;
{
ttype pieceMove, score; /* better perf with char than int. out of registers so use stack */
register int p, value; /* better perf with these as an int on Z80, 8080, and 8086 */
g_IMoves++;
if ( depth >= 4 )
{
#if WinMethod == UseFunPointers
p = ( * winner_functions[ move ] )();
#endif
#if WinMethod == UseWinner2
p = winner2( move );
#endif
#if WinMethod == UseLookForWinner
p = LookForWinner();
#endif
if ( PieceBlank != p )
{
if ( PieceX == p )
return ScoreWin;
return ScoreLose;
}
if ( 8 == depth )
return ScoreTie;
}
if ( depth & 1 )
{
value = ScoreMin;
pieceMove = PieceX;
}
else
{
value = ScoreMax;
pieceMove = PieceO;
}
for ( p = 0; p < 9; p++ )
{
if ( PieceBlank == g_board[ p ] )
{
g_board[p] = pieceMove;
score = MinMax( alpha, beta, depth + 1, p );
g_board[p] = PieceBlank;
if ( depth & 1 )
{
#if WinLosePrune /* #if statements must be in first column for MS C 1.0 */
if ( ScoreWin == score )
return ScoreWin;
#endif
if ( score > value )
{
value = score;
#if ABPrune
if ( value >= beta )
return value;
if ( value > alpha )
alpha = value;
#endif
}
}
else
{
#if WinLosePrune
if ( ScoreLose == score )
return ScoreLose;
#endif
if ( score < value )
{
value = score;
#if ABPrune
if ( value <= alpha )
return value;
if ( value < beta )
beta = value;
#endif
}
}
}
}
return value;
} /*MinMax*/
long g_Moves = 0;
int FindSolution( position ) ttype position;
{
register int i;
for ( i = 0; i < 9; i++ )
g_board[ i ] = PieceBlank;
g_board[ position ] = PieceX;
for ( i = 0; i < g_Iterations; i++ )
{
g_IMoves = 0;
MinMax( ScoreMin, ScoreMax, 0, position );
g_Moves += g_IMoves; /* do the 4-byte long addition once per loop to save work */
}
return 0;
} /*FindSolution*/
#ifdef CPMTIME
struct CPMTimeValue
{
int h, m, s, l;
};
void print_time_now()
{
/* This CP/M BDOS call of 105 is only implemented in NTVCM -- it's not a standard CP/M 2.2 call */
struct CPMTimeValue t;
t.h = t.m = t.s = t.l = 0;
bdos( 105, &t );
printf( "current time: %02d:%02d:%02d.%02d\n", t.h, t.m, t.s, t.l );
} /*print_time_now*/
long get_ms()
{
/* This CP/M BDOS call of 105 is only implemented in NTVCM -- it's not a standard CP/M 2.2 call */
long h, m, s, l;
struct CPMTimeValue t;
t.h = t.m = t.s = t.l = 0;
bdos( 105, &t );
h = t.h;
m = t.m;
s = t.s;
l = t.l;
return h * 3600000 + m * 60000 + s * 1000 + l * 10;
} /*get_ms*/
#else /* no elif with old compilers */
#ifdef DOSTIME
void print_time_now()
{
/* Make a DOS interrupt call to get the time */
union REGS wrIn, wrOut;
wrIn.h.ah = 0x2c;
intdos( &wrIn, &wrOut );
printf( "current time: %02d:%02d:%02d.%02d\n", wrOut.h.ch, wrOut.h.cl, wrOut.h.dh, wrOut.h.dl );
fflush( stdout );
} /*print_time_now*/
long get_ms()
{
/* this function takes about 3 milliseconds on the original IBM PC */
long h, m, s, l;
union REGS wrIn, wrOut;
wrIn.h.ah = 0x2c;
intdos( &wrIn, &wrOut );
h = wrOut.h.ch;
m = wrOut.h.cl;
s = wrOut.h.dh;
l = wrOut.h.dl;
return h * 3600000 + m * 60000 + s * 1000 + l * 10;
} /*get_ms*/
#else
/* must do this on actual CP/M machines */
int print_time_now() { return 0; }
long get_ms() { return 0; }
#endif
#endif
int _cdecl main( argc, argv ) int argc; char * argv[];
{
long start_time, end_time;
if ( 2 == argc )
sscanf( argv[ 1 ], "%d", &g_Iterations ); /* no atoi in MS C 1.0 */
start_time = get_ms();
FindSolution( 0 );
FindSolution( 1 );
FindSolution( 4 );
end_time = get_ms();
printf( "runtime in ms: %ld\n", end_time - start_time );
printf( "move count: %ld\n", g_Moves ); /* 6493 * g_Iterations */
printf( "iteration count: %d\n", g_Iterations );
printf( "method: %s\n",
( WinMethod == UseFunPointers ) ? "function pointers" :
( WinMethod == UseWinner2 ) ? "winner2" :
( WinMethod == UseLookForWinner ) ? "look for winner" :
"invalid method" );
return 0;
} /*main*/

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,5 @@
ntvdm -r:. -e:lib=..\lib /h /c qcl /DDOSTIME /I..\include /Fm%1.map /AS /Ox /Gs %1.c
rem ntvdm -r:. /h /c qcl /DDOSTIME /I..\include /AS /Ox /Gs /c %1.c
rem ntvdm -r:. /h qlink %1,,%1,..\lib\slibce+..\lib\em

Binary file not shown.

View File

@ -0,0 +1 @@
ntvdm /r:.. /h /t /e:include=..\include,lib=..\lib qc

View File

@ -0,0 +1 @@
ntvdm -t -C:50 -r:.. -h -e:include=..\include,lib=..\lib qc ttt.c

View File

@ -0,0 +1,34 @@
/***
*assert.h - define the assert macro
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines the assert(exp) macro.
* [ANSI/System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#undef assert
#ifdef NDEBUG
#define assert(exp) ((void)0)
#else
void _FAR_ _cdecl _assert(void _FAR_ *, void _FAR_ *, unsigned);
#define assert(exp) \
( (exp) ? (void) 0 : _assert(#exp, __FILE__, __LINE__) )
#endif /* NDEBUG */

View File

@ -0,0 +1,175 @@
/***
*bios.h - declarations for bios interface functions and supporting definitions
*
* Copyright (c) 1987-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file declares the constants, structures, and functions
* used for accessing and using various BIOS interfaces.
*
****/
#ifndef _MT
/* manifest constants for BIOS serial communications (RS-232) support */
/* serial port services */
#define _COM_INIT 0 /* init serial port */
#define _COM_SEND 1 /* send character */
#define _COM_RECEIVE 2 /* receive character */
#define _COM_STATUS 3 /* get serial port status */
/* serial port initializers. One and only one constant from each of the
* following four groups - character size, stop bit, parity, and baud rate -
* must be specified in the initialization byte.
*/
/* character size initializers */
#define _COM_CHR7 2 /* 7 bits characters */
#define _COM_CHR8 3 /* 8 bits characters */
/* stop bit values - on or off */
#define _COM_STOP1 0 /* 1 stop bit */
#define _COM_STOP2 4 /* 2 stop bits */
/* parity initializers */
#define _COM_NOPARITY 0 /* no parity */
#define _COM_ODDPARITY 8 /* odd parity */
#define _COM_EVENPARITY 24 /* even parity */
/* baud rate initializers */
#define _COM_110 0 /* 110 baud */
#define _COM_150 32 /* 150 baud */
#define _COM_300 64 /* 300 baud */
#define _COM_600 96 /* 600 baud */
#define _COM_1200 128 /* 1200 baud */
#define _COM_2400 160 /* 2400 baud */
#define _COM_4800 192 /* 4800 baud */
#define _COM_9600 224 /* 9600 baud */
/* manifest constants for BIOS disk support */
/* disk services */
#define _DISK_RESET 0 /* reset disk controller */
#define _DISK_STATUS 1 /* get disk status */
#define _DISK_READ 2 /* read disk sectors */
#define _DISK_WRITE 3 /* write disk sectors */
#define _DISK_VERIFY 4 /* verify disk sectors */
#define _DISK_FORMAT 5 /* format disk track */
/* struct used to send/receive information to/from the BIOS disk services */
#ifndef _DISKINFO_T_DEFINED
struct diskinfo_t {
unsigned drive;
unsigned head;
unsigned track;
unsigned sector;
unsigned nsectors;
void _far *buffer;
};
#define _DISKINFO_T_DEFINED
#endif
/* manifest constants for BIOS keyboard support */
/* keyboard services */
#define _KEYBRD_READ 0 /* read next character from keyboard */
#define _KEYBRD_READY 1 /* check for keystroke */
#define _KEYBRD_SHIFTSTATUS 2 /* get current shift key status */
/* services for enhanced keyboards */
#define _NKEYBRD_READ 0x10 /* read next character from keyboard */
#define _NKEYBRD_READY 0x11 /* check for keystroke */
#define _NKEYBRD_SHIFTSTATUS 0x12 /* get current shift key status */
/* manifest constants for BIOS printer support */
/* printer services */
#define _PRINTER_WRITE 0 /* write character to printer */
#define _PRINTER_INIT 1 /* intialize printer */
#define _PRINTER_STATUS 2 /* get printer status */
/* manifest constants for BIOS time of day support */
/* time of day services */
#define _TIME_GETCLOCK 0 /* get current clock count */
#define _TIME_SETCLOCK 1 /* set current clock count */
#ifndef _REGS_DEFINED
/* word registers */
struct WORDREGS {
unsigned int ax;
unsigned int bx;
unsigned int cx;
unsigned int dx;
unsigned int si;
unsigned int di;
unsigned int cflag;
};
/* byte registers */
struct BYTEREGS {
unsigned char al, ah;
unsigned char bl, bh;
unsigned char cl, ch;
unsigned char dl, dh;
};
/* general purpose registers union -
* overlays the corresponding word and byte registers.
*/
union REGS {
struct WORDREGS x;
struct BYTEREGS h;
};
/* segment registers */
struct SREGS {
unsigned int es;
unsigned int cs;
unsigned int ss;
unsigned int ds;
};
#define _REGS_DEFINED
#endif /* _REGS_DEFINED */
/* function prototypes */
unsigned _cdecl _bios_disk(unsigned, struct diskinfo_t *);
unsigned _cdecl _bios_equiplist(void);
unsigned _cdecl _bios_keybrd(unsigned);
unsigned _cdecl _bios_memsize(void);
unsigned _cdecl _bios_printer(unsigned, unsigned, unsigned);
unsigned _cdecl _bios_serialcom(unsigned, unsigned, unsigned);
unsigned _cdecl _bios_timeofday(unsigned, long *);
int _cdecl int86(int, union REGS *, union REGS *);
int _cdecl int86x(int, union REGS *, union REGS *, struct SREGS *);
#endif /* _MT */

View File

@ -0,0 +1,36 @@
/***
*conio.h - console and port I/O declarations
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This include file contains the function declarations for
* the MS C V2.03 compatible console and port I/O routines.
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* function prototypes */
char _FAR_ * _FAR_ _cdecl cgets(char _FAR_ *);
int _FAR_ _cdecl cprintf(const char _FAR_ *, ...);
int _FAR_ _cdecl cputs(const char _FAR_ *);
int _FAR_ _cdecl cscanf(const char _FAR_ *, ...);
int _FAR_ _cdecl getch(void);
int _FAR_ _cdecl getche(void);
int _FAR_ _cdecl inp(unsigned);
unsigned _FAR_ _cdecl inpw(unsigned);
int _FAR_ _cdecl kbhit(void);
int _FAR_ _cdecl outp(unsigned, int);
unsigned _FAR_ _cdecl outpw(unsigned, unsigned);
int _FAR_ _cdecl putch(int);
int _FAR_ _cdecl ungetch(int);

View File

@ -0,0 +1,96 @@
/***
*ctype.h - character conversion macros and ctype macros
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines macros for character classification/conversion.
* [ANSI/System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/*
* This declaration allows the user access to the ctype look-up
* array _ctype defined in ctype.obj by simply including ctype.h
*/
#ifdef _DLL
extern unsigned char _FAR_ _cdecl _ctype[];
#else
extern unsigned char _near _cdecl _ctype[];
#endif
/* set bit masks for the possible character types */
#define _UPPER 0x1 /* upper case letter */
#define _LOWER 0x2 /* lower case letter */
#define _DIGIT 0x4 /* digit[0-9] */
#define _SPACE 0x8 /* tab, carriage return, newline, */
/* vertical tab or form feed */
#define _PUNCT 0x10 /* punctuation character */
#define _CONTROL 0x20 /* control character */
#define _BLANK 0x40 /* space char */
#define _HEX 0x80 /* hexadecimal digit */
/* character classification function prototypes */
#ifndef _CTYPE_DEFINED
int _FAR_ _cdecl isalpha(int);
int _FAR_ _cdecl isupper(int);
int _FAR_ _cdecl islower(int);
int _FAR_ _cdecl isdigit(int);
int _FAR_ _cdecl isxdigit(int);
int _FAR_ _cdecl isspace(int);
int _FAR_ _cdecl ispunct(int);
int _FAR_ _cdecl isalnum(int);
int _FAR_ _cdecl isprint(int);
int _FAR_ _cdecl isgraph(int);
int _FAR_ _cdecl iscntrl(int);
int _FAR_ _cdecl toupper(int);
int _FAR_ _cdecl tolower(int);
int _FAR_ _cdecl _tolower(int);
int _FAR_ _cdecl _toupper(int);
int _FAR_ _cdecl isascii(int);
int _FAR_ _cdecl toascii(int);
int _FAR_ _cdecl iscsymf(int);
int _FAR_ _cdecl iscsym(int);
#define _CTYPE_DEFINED
#endif
/* the character classification macro definitions */
#define isalpha(_c) ( (_ctype+1)[_c] & (_UPPER|_LOWER) )
#define isupper(_c) ( (_ctype+1)[_c] & _UPPER )
#define islower(_c) ( (_ctype+1)[_c] & _LOWER )
#define isdigit(_c) ( (_ctype+1)[_c] & _DIGIT )
#define isxdigit(_c) ( (_ctype+1)[_c] & _HEX )
#define isspace(_c) ( (_ctype+1)[_c] & _SPACE )
#define ispunct(_c) ( (_ctype+1)[_c] & _PUNCT )
#define isalnum(_c) ( (_ctype+1)[_c] & (_UPPER|_LOWER|_DIGIT) )
#define isprint(_c) ( (_ctype+1)[_c] & (_BLANK|_PUNCT|_UPPER|_LOWER|_DIGIT) )
#define isgraph(_c) ( (_ctype+1)[_c] & (_PUNCT|_UPPER|_LOWER|_DIGIT) )
#define iscntrl(_c) ( (_ctype+1)[_c] & _CONTROL )
#ifndef NO_EXT_KEYS
#define toupper(_c) ( (islower(_c)) ? _toupper(_c) : (_c) )
#define tolower(_c) ( (isupper(_c)) ? _tolower(_c) : (_c) )
#endif
#define _tolower(_c) ( (_c)-'A'+'a' )
#define _toupper(_c) ( (_c)-'a'+'A' )
#define isascii(_c) ( (unsigned)(_c) < 0x80 )
#define toascii(_c) ( (_c) & 0x7f )
/* MS C version 2.0 extended ctype macros */
#define iscsymf(_c) (isalpha(_c) || ((_c) == '_'))
#define iscsym(_c) (isalnum(_c) || ((_c) == '_'))

View File

@ -0,0 +1,36 @@
/***
*direct.h - function declarations for directory handling/creation
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This include file contains the function declarations for the library
* functions related to directory handling and creation.
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
/* function prototypes */
int _FAR_ _cdecl chdir(const char _FAR_ *);
int _FAR_ _cdecl _chdrive(int);
char _FAR_ * _FAR_ _cdecl getcwd(char _FAR_ *, int);
char _FAR_ * _FAR_ _cdecl _getdcwd(int, char _FAR_ *, int);
int _FAR_ _cdecl _getdrive(void);
int _FAR_ _cdecl mkdir(const char _FAR_ *);
int _FAR_ _cdecl rmdir(const char _FAR_ *);

View File

@ -0,0 +1,209 @@
/***
*dos.h - definitions for MS-DOS interface routines
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines the structs and unions used for the direct DOS interface
* routines; includes macros to access the segment and offset
* values of far pointers, so that they may be used by the routines; and
* provides function prototypes for direct DOS interface functions.
*
****/
#ifndef _REGS_DEFINED
/* word registers */
struct WORDREGS {
unsigned int ax;
unsigned int bx;
unsigned int cx;
unsigned int dx;
unsigned int si;
unsigned int di;
unsigned int cflag;
};
/* byte registers */
struct BYTEREGS {
unsigned char al, ah;
unsigned char bl, bh;
unsigned char cl, ch;
unsigned char dl, dh;
};
/* general purpose registers union -
* overlays the corresponding word and byte registers.
*/
union REGS {
struct WORDREGS x;
struct BYTEREGS h;
};
/* segment registers */
struct SREGS {
unsigned int es;
unsigned int cs;
unsigned int ss;
unsigned int ds;
};
#define _REGS_DEFINED
#endif
/* dosexterror structure */
#ifndef _DOSERROR_DEFINED
struct DOSERROR {
int exterror;
char class;
char action;
char locus;
};
#define _DOSERROR_DEFINED
#endif
/* _dos_findfirst structure */
#ifndef _FIND_T_DEFINED
struct find_t {
char reserved[21];
char attrib;
unsigned wr_time;
unsigned wr_date;
long size;
char name[13];
};
#define _FIND_T_DEFINED
#endif
/* _dos_getdate/_dossetdate and _dos_gettime/_dos_settime structures */
#ifndef _DATETIME_T_DEFINED
struct dosdate_t {
unsigned char day; /* 1-31 */
unsigned char month; /* 1-12 */
unsigned int year; /* 1980-2099 */
unsigned char dayofweek; /* 0-6, 0=Sunday */
};
struct dostime_t {
unsigned char hour; /* 0-23 */
unsigned char minute; /* 0-59 */
unsigned char second; /* 0-59 */
unsigned char hsecond; /* 0-99 */
};
#define _DATETIME_T_DEFINED
#endif
/* _dos_getdiskfree structure */
#ifndef _DISKFREE_T_DEFINED
struct diskfree_t {
unsigned total_clusters;
unsigned avail_clusters;
unsigned sectors_per_cluster;
unsigned bytes_per_sector;
};
#define _DISKFREE_T_DEFINED
#endif
/* manifest constants for _hardresume result parameter */
#define _HARDERR_IGNORE 0 /* Ignore the error */
#define _HARDERR_RETRY 1 /* Retry the operation */
#define _HARDERR_ABORT 2 /* Abort program issuing Interrupt 23h */
#define _HARDERR_FAIL 3 /* Fail the system call in progress */
/* _HARDERR_FAIL is not supported on DOS 2.x */
/* File attribute constants */
#define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */
#define _A_RDONLY 0x01 /* Read only file */
#define _A_HIDDEN 0x02 /* Hidden file */
#define _A_SYSTEM 0x04 /* System file */
#define _A_VOLID 0x08 /* Volume ID file */
#define _A_SUBDIR 0x10 /* Subdirectory */
#define _A_ARCH 0x20 /* Archive file */
/* macros to break C "far" pointers into their segment and offset components
*/
#define FP_SEG(fp) (*((unsigned _far *)&(fp)+1))
#define FP_OFF(fp) (*((unsigned _far *)&(fp)))
/* external variable declarations */
extern unsigned int _near _cdecl _osversion;
/* function prototypes */
#ifndef _MT
int _cdecl bdos(int, unsigned int, unsigned int);
void _cdecl _chain_intr(void (_cdecl _interrupt _far *)());
void _cdecl _disable(void);
unsigned _cdecl _dos_allocmem(unsigned, unsigned *);
unsigned _cdecl _dos_close(int);
unsigned _cdecl _dos_creat(const char *, unsigned, int *);
unsigned _cdecl _dos_creatnew(const char *, unsigned, int *);
unsigned _cdecl _dos_findfirst(const char *, unsigned, struct find_t *);
unsigned _cdecl _dos_findnext(struct find_t *);
unsigned _cdecl _dos_freemem(unsigned);
void _cdecl _dos_getdate(struct dosdate_t *);
void _cdecl _dos_getdrive(unsigned *);
unsigned _cdecl _dos_getdiskfree(unsigned, struct diskfree_t *);
unsigned _cdecl _dos_getfileattr(const char *, unsigned *);
unsigned _cdecl _dos_getftime(int, unsigned *, unsigned *);
void _cdecl _dos_gettime(struct dostime_t *);
void (_cdecl _interrupt _far * _cdecl _dos_getvect(unsigned))();
void _cdecl _dos_keep(unsigned, unsigned);
unsigned _cdecl _dos_open(const char *, unsigned, int *);
unsigned _cdecl _dos_read(int, void _far *, unsigned, unsigned *);
unsigned _cdecl _dos_setblock(unsigned, unsigned, unsigned *);
unsigned _cdecl _dos_setdate(struct dosdate_t *);
void _cdecl _dos_setdrive(unsigned, unsigned *);
unsigned _cdecl _dos_setfileattr(const char *, unsigned);
unsigned _cdecl _dos_setftime(int, unsigned, unsigned);
unsigned _cdecl _dos_settime(struct dostime_t *);
void _cdecl _dos_setvect(unsigned, void (_cdecl _interrupt _far *)());
unsigned _cdecl _dos_write(int, const void _far *, unsigned, unsigned *);
int _cdecl dosexterr(struct DOSERROR *);
void _cdecl _enable(void);
void _cdecl _harderr(void (_far *)());
void _cdecl _hardresume(int);
void _cdecl _hardretn(int);
int _cdecl intdos(union REGS *, union REGS *);
int _cdecl intdosx(union REGS *, union REGS *, struct SREGS *);
int _cdecl int86(int, union REGS *, union REGS *);
int _cdecl int86x(int, union REGS *, union REGS *, struct SREGS *);
#endif /* _MT */
void _cdecl segread(struct SREGS *);

View File

@ -0,0 +1,71 @@
/***
*errno.h - system wide error numbers (set by system calls)
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the system-wide error numbers (set by
* system calls). Conforms to the XENIX standard. Extended
* for compatibility with Uniforum standard.
* [ANSI/System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* declare reference to errno */
#ifdef _MT
extern int _far * _cdecl _far volatile _errno(void);
#define errno (*_errno())
#else
extern int _near _cdecl volatile errno;
#endif
/* Error Codes */
#define EZERO 0
#define EPERM 1
#define ENOENT 2
#define ESRCH 3
#define EINTR 4
#define EIO 5
#define ENXIO 6
#define E2BIG 7
#define ENOEXEC 8
#define EBADF 9
#define ECHILD 10
#define EAGAIN 11
#define ENOMEM 12
#define EACCES 13
#define EFAULT 14
#define ENOTBLK 15
#define EBUSY 16
#define EEXIST 17
#define EXDEV 18
#define ENODEV 19
#define ENOTDIR 20
#define EISDIR 21
#define EINVAL 22
#define ENFILE 23
#define EMFILE 24
#define ENOTTY 25
#define ETXTBSY 26
#define EFBIG 27
#define ENOSPC 28
#define ESPIPE 29
#define EROFS 30
#define EMLINK 31
#define EPIPE 32
#define EDOM 33
#define ERANGE 34
#define EUCLEAN 35
#define EDEADLOCK 36

View File

@ -0,0 +1,35 @@
/***
*fcntl.h - file control options used by open()
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines constants for the file control options used
* by the open() function.
* [System V]
*
****/
#define O_RDONLY 0x0000 /* open for reading only */
#define O_WRONLY 0x0001 /* open for writing only */
#define O_RDWR 0x0002 /* open for reading and writing */
#define O_APPEND 0x0008 /* writes done at eof */
#define O_CREAT 0x0100 /* create and open file */
#define O_TRUNC 0x0200 /* open and truncate */
#define O_EXCL 0x0400 /* open only if file doesn't already exist */
/* O_TEXT files have <cr><lf> sequences translated to <lf> on read()'s,
** and <lf> sequences translated to <cr><lf> on write()'s
*/
#define O_TEXT 0x4000 /* file mode is text (translated) */
#define O_BINARY 0x8000 /* file mode is binary (untranslated) */
/* macro to translate the C 2.0 name used to force binary mode for files */
#define O_RAW O_BINARY
/* Open handle inherit bit */
#define O_NOINHERIT 0x0080 /* child process doesn't inherit file */

View File

@ -0,0 +1,140 @@
/***
*float.h - constants for floating point values
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains defines for a number of implementation dependent
* values which are commonly used by sophisticated numerical (floating
* point) programs.
* [ANSI]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#define DBL_DIG 15 /* # of decimal digits of precision */
#define DBL_EPSILON 2.2204460492503131e-016 /* smallest such that 1.0+DBL_EPSILON != 1.0 */
#define DBL_MANT_DIG 53 /* # of bits in mantissa */
#define DBL_MAX 1.7976931348623158e+308 /* max value */
#define DBL_MAX_10_EXP 308 /* max decimal exponent */
#define DBL_MAX_EXP 1024 /* max binary exponent */
#define DBL_MIN 2.2250738585072014e-308 /* min positive value */
#define DBL_MIN_10_EXP (-307) /* min decimal exponent */
#define DBL_MIN_EXP (-1021) /* min binary exponent */
#define DBL_RADIX 2 /* exponent radix */
#define DBL_ROUNDS 1 /* addition rounding: near */
#define FLT_DIG 7 /* # of decimal digits of precision */
#define FLT_EPSILON 1.192092896e-07F /* smallest such that 1.0+FLT_EPSILON != 1.0 */
#define FLT_GUARD 0
#define FLT_MANT_DIG 24 /* # of bits in mantissa */
#define FLT_MAX 3.402823466e+38F /* max value */
#define FLT_MAX_10_EXP 38 /* max decimal exponent */
#define FLT_MAX_EXP 128 /* max binary exponent */
#define FLT_MIN 1.175494351e-38F /* min positive value */
#define FLT_MIN_10_EXP (-37) /* min decimal exponent */
#define FLT_MIN_EXP (-125) /* min binary exponent */
#define FLT_NORMALIZE 0
#define FLT_RADIX 2 /* exponent radix */
#define FLT_ROUNDS 1 /* addition rounding: near */
#define LDBL_DIG 19 /* # of decimal digits of precision */
#define LDBL_EPSILON 5.4210108624275221706e-020 /* smallest such that 1.0+LDBL_EPSILON != 1.0 */
#define LDBL_MANT_DIG 64 /* # of bits in mantissa */
#define LDBL_MAX 1.189731495357231765e+4932L /* max value */
#define LDBL_MAX_10_EXP 4932 /* max decimal exponent */
#define LDBL_MAX_EXP 16384 /* max binary exponent */
#define LDBL_MIN 3.3621031431120935063e-4932L /* min positive value */
#define LDBL_MIN_10_EXP (-4931) /* min decimal exponent */
#define LDBL_MIN_EXP (-16381) /* min binary exponent */
#define LDBL_RADIX 2 /* exponent radix */
#define LDBL_ROUNDS 1 /* addition rounding: near */
/*
* 8087/80287 math control information
*/
/* User Control Word Mask and bit definitions.
* These definitions match the 8087/80287
*/
#define MCW_EM 0x003f /* interrupt Exception Masks */
#define EM_INVALID 0x0001 /* invalid */
#define EM_DENORMAL 0x0002 /* denormal */
#define EM_ZERODIVIDE 0x0004 /* zero divide */
#define EM_OVERFLOW 0x0008 /* overflow */
#define EM_UNDERFLOW 0x0010 /* underflow */
#define EM_INEXACT 0x0020 /* inexact (precision) */
#define MCW_IC 0x1000 /* Infinity Control */
#define IC_AFFINE 0x1000 /* affine */
#define IC_PROJECTIVE 0x0000 /* projective */
#define MCW_RC 0x0c00 /* Rounding Control */
#define RC_CHOP 0x0c00 /* chop */
#define RC_UP 0x0800 /* up */
#define RC_DOWN 0x0400 /* down */
#define RC_NEAR 0x0000 /* near */
#define MCW_PC 0x0300 /* Precision Control */
#define PC_24 0x0000 /* 24 bits */
#define PC_53 0x0200 /* 53 bits */
#define PC_64 0x0300 /* 64 bits */
/* initial Control Word value */
#define CW_DEFAULT ( IC_AFFINE + RC_NEAR + PC_64 + EM_DENORMAL + EM_UNDERFLOW + EM_INEXACT )
/* user Status Word bit definitions */
#define SW_INVALID 0x0001 /* invalid */
#define SW_DENORMAL 0x0002 /* denormal */
#define SW_ZERODIVIDE 0x0004 /* zero divide */
#define SW_OVERFLOW 0x0008 /* overflow */
#define SW_UNDERFLOW 0x0010 /* underflow */
#define SW_INEXACT 0x0020 /* inexact (precision) */
/* invalid subconditions (SW_INVALID also set) */
#define SW_UNEMULATED 0x0040 /* unemulated instruction */
#define SW_SQRTNEG 0x0080 /* square root of a neg number */
#define SW_STACKOVERFLOW 0x0200 /* FP stack overflow */
#define SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */
/* Floating point error signals and return codes */
#define FPE_INVALID 0x81
#define FPE_DENORMAL 0x82
#define FPE_ZERODIVIDE 0x83
#define FPE_OVERFLOW 0x84
#define FPE_UNDERFLOW 0x85
#define FPE_INEXACT 0x86
#define FPE_UNEMULATED 0x87
#define FPE_SQRTNEG 0x88
#define FPE_STACKOVERFLOW 0x8a
#define FPE_STACKUNDERFLOW 0x8b
#define FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */
/* function prototypes */
unsigned int _FAR_ _cdecl _clear87(void);
unsigned int _FAR_ _cdecl _control87(unsigned int, unsigned int);
void _FAR_ _cdecl _fpreset(void);
unsigned int _FAR_ _cdecl _status87(void);

View File

@ -0,0 +1,427 @@
/***
*graph.h - declare constants, functions, and macros for graphics library
*
* Copyright (c) 1987 - 1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file declares the graphics library functions and the
* structures and manifest constants that are used with them.
*
***************************************************************************/
/* force word packing to avoid possible -Zp override */
#pragma pack(2)
/* user-visible declarations for Quick-C Graphics Library */
#ifndef _VIDEOCONFIG_DEFINED
/* structure for _getvideoconfig() as visible to user */
struct videoconfig {
short numxpixels; /* number of pixels on X axis */
short numypixels; /* number of pixels on Y axis */
short numtextcols; /* number of text columns available */
short numtextrows; /* number of text rows available */
short numcolors; /* number of actual colors */
short bitsperpixel; /* number of bits per pixel */
short numvideopages; /* number of available video pages */
short mode; /* current video mode */
short adapter; /* active display adapter */
short monitor; /* active display monitor */
short memory; /* adapter video memory in K bytes */
};
#define _VIDEOCONFIG_DEFINED
#endif
#ifndef _XYCOORD_DEFINED
/* return value of _setvieworg(), etc. */
struct xycoord {
short xcoord;
short ycoord;
};
#define _XYCOORD_DEFINED
#endif
/* structure for text position */
#ifndef _RCCOORD_DEFINED
struct rccoord {
short row;
short col;
};
#define _RCCOORD_DEFINED
#endif
/* ERROR HANDLING */
short _far _cdecl _grstatus(void);
/* Error Status Information returned by _grstatus() */
/* successful */
#define _GROK 0
/* errors */
#define _GRERROR (-1)
#define _GRMODENOTSUPPORTED (-2)
#define _GRNOTINPROPERMODE (-3)
#define _GRINVALIDPARAMETER (-4)
#define _GRFONTFILENOTFOUND (-5)
#define _GRINVALIDFONTFILE (-6)
#define _GRCORRUPTEDFONTFILE (-7)
#define _GRINSUFFICIENTMEMORY (-8)
#define _GRINVALIDIMAGEBUFFER (-9)
/* warnings */
#define _GRNOOUTPUT 1
#define _GRCLIPPED 2
#define _GRPARAMETERALTERED 3
/* SETUP AND CONFIGURATION */
short _far _cdecl _setvideomode(short);
short _far _cdecl _setvideomoderows(short,short); /* return rows; 0 if error */
/* arguments to _setvideomode() */
#define _MAXRESMODE (-3) /* graphics mode with highest resolution */
#define _MAXCOLORMODE (-2) /* graphics mode with most colors */
#define _DEFAULTMODE (-1) /* restore screen to original mode */
#define _TEXTBW40 0 /* 40-column text, 16 grey */
#define _TEXTC40 1 /* 40-column text, 16/8 color */
#define _TEXTBW80 2 /* 80-column text, 16 grey */
#define _TEXTC80 3 /* 80-column text, 16/8 color */
#define _MRES4COLOR 4 /* 320 x 200, 4 color */
#define _MRESNOCOLOR 5 /* 320 x 200, 4 grey */
#define _HRESBW 6 /* 640 x 200, BW */
#define _TEXTMONO 7 /* 80-column text, BW */
#define _HERCMONO 8 /* 720 x 348, BW for HGC */
#define _MRES16COLOR 13 /* 320 x 200, 16 color */
#define _HRES16COLOR 14 /* 640 x 200, 16 color */
#define _ERESNOCOLOR 15 /* 640 x 350, BW */
#define _ERESCOLOR 16 /* 640 x 350, 4 or 16 color */
#define _VRES2COLOR 17 /* 640 x 480, BW */
#define _VRES16COLOR 18 /* 640 x 480, 16 color */
#define _MRES256COLOR 19 /* 320 x 200, 256 color */
#define _ORESCOLOR 64 /* 640 x 400, 1 of 16 colors (Olivetti) */
short _far _cdecl _setactivepage(short);
short _far _cdecl _setvisualpage(short);
short _far _cdecl _getactivepage(void);
short _far _cdecl _getvisualpage(void);
/* videoconfig adapter values */
/* these manifest constants can be used to determine the type of the active */
/* adapter, using either simple comparisons or the bitwise-AND operator (&) */
#define _MDPA 0x0001 /* Monochrome Display Adapter (MDPA) */
#define _CGA 0x0002 /* Color Graphics Adapter (CGA) */
#define _EGA 0x0004 /* Enhanced Graphics Adapter (EGA) */
#define _VGA 0x0008 /* Video Graphics Array (VGA) */
#define _MCGA 0x0010 /* MultiColor Graphics Array (MCGA) */
#define _HGC 0x0020 /* Hercules Graphics Card (HGC) */
#define _OCGA 0x0042 /* Olivetti Color Graphics Adapter (OCGA) */
#define _OEGA 0x0044 /* Olivetti Enhanced Graphics Adapter (OEGA) */
#define _OVGA 0x0048 /* Olivetti Video Graphics Array (OVGA) */
/* videoconfig monitor values */
/* these manifest constants can be used to determine the type of monitor in */
/* use, using either simple comparisons or the bitwise-AND operator (&) */
#define _MONO 0x0001 /* Monochrome */
#define _COLOR 0x0002 /* Color (or Enhanced emulating color) */
#define _ENHCOLOR 0x0004 /* Enhanced Color */
#define _ANALOGMONO 0x0008 /* Analog Monochrome only */
#define _ANALOGCOLOR 0x0010 /* Analog Color only */
#define _ANALOG 0x0018 /* Analog Monochrome and Color modes */
struct videoconfig _far * _far _cdecl _getvideoconfig(struct videoconfig _far *);
/* COORDINATE SYSTEMS */
struct xycoord _far _cdecl _setvieworg(short, short);
#define _setlogorg _setvieworg /* obsolescent */
struct xycoord _far _cdecl _getviewcoord(short, short);
#define _getlogcoord _getviewcoord /* obsolescent */
struct xycoord _far _cdecl _getphyscoord(short, short);
void _far _cdecl _setcliprgn(short, short, short, short);
void _far _cdecl _setviewport(short, short, short, short);
/* OUTPUT ROUTINES */
/* control parameters for _ellipse, _rectangle, _pie and _polygon */
#define _GBORDER 2 /* draw outline only */
#define _GFILLINTERIOR 3 /* fill using current fill mask */
/* parameters for _clearscreen */
#define _GCLEARSCREEN 0
#define _GVIEWPORT 1
#define _GWINDOW 2
void _far _cdecl _clearscreen(short);
struct xycoord _far _cdecl _moveto(short, short);
struct xycoord _far _cdecl _getcurrentposition(void);
short _far _cdecl _lineto(short, short);
short _far _cdecl _rectangle(short, short, short, short, short);
short _far _cdecl _polygon(short, const struct xycoord _far *, short);
short _far _cdecl _arc(short, short, short, short, short, short, short, short);
short _far _cdecl _ellipse(short, short, short, short, short);
short _far _cdecl _pie(short, short, short, short, short, short, short, short, short);
short _far _cdecl _getarcinfo(struct xycoord _far *, struct xycoord _far *, struct xycoord _far *);
short _far _cdecl _setpixel(short, short);
short _far _cdecl _getpixel(short, short);
short _far _cdecl _floodfill(short, short, short);
/* PEN COLOR, LINE STYLE, WRITE MODE, FILL PATTERN */
short _far _cdecl _setcolor(short);
short _far _cdecl _getcolor(void);
void _far _cdecl _setlinestyle(unsigned short);
unsigned short _far _cdecl _getlinestyle(void);
short _far _cdecl _setwritemode(short);
short _far _cdecl _getwritemode(void);
void _far _cdecl _setfillmask(const unsigned char _far *);
unsigned char _far * _far _cdecl _getfillmask(unsigned char _far *);
/* COLOR SELECTION */
long _far _cdecl _setbkcolor(long);
long _far _cdecl _getbkcolor(void);
long _far _cdecl _remappalette(short, long);
short _far _cdecl _remapallpalette(const long _far *);
short _far _cdecl _selectpalette(short);
/* TEXT */
/* parameters for _displaycursor */
#define _GCURSOROFF 0
#define _GCURSORON 1
/* parameters for _wrapon */
#define _GWRAPOFF 0
#define _GWRAPON 1
/* direction parameters for _scrolltextwindow */
#define _GSCROLLUP 1
#define _GSCROLLDOWN (-1)
/* request maximum number of rows in _settextrows and _setvideomoderows */
#define _MAXTEXTROWS (-1)
short _far _cdecl _settextrows(short); /* returns # rows set; 0 if error */
void _far _cdecl _settextwindow(short, short, short, short);
void _far _cdecl _gettextwindow(short _far *, short _far *, short _far *, short _far *);
void _far _cdecl _scrolltextwindow(short);
void _far _cdecl _outmem(const unsigned char _far *, short);
void _far _cdecl _outtext(const unsigned char _far *);
short _far _cdecl _wrapon(short);
short _far _cdecl _displaycursor(short);
short _far _cdecl _settextcursor(short);
short _far _cdecl _gettextcursor(void);
struct rccoord _far _cdecl _settextposition(short, short);
struct rccoord _far _cdecl _gettextposition(void);
short _far _cdecl _settextcolor(short);
short _far _cdecl _gettextcolor(void);
/* SCREEN IMAGES */
void _far _cdecl _getimage(short, short, short, short, char _huge *);
void _far _cdecl _putimage(short, short, char _huge *, short);
long _far _cdecl _imagesize(short, short, short, short);
/* "action verbs" for _putimage() and _setwritemode() */
#define _GPSET 3
#define _GPRESET 2
#define _GAND 1
#define _GOR 0
#define _GXOR 4
/* Color values are used with _setbkcolor in graphics modes and also by
_remappalette and _remapallpalette. Also known as palette colors.
Not to be confused with color indices (aka. color attributes). */
/* universal color values (all color modes): */
#define _BLACK 0x000000L
#define _BLUE 0x2a0000L
#define _GREEN 0x002a00L
#define _CYAN 0x2a2a00L
#define _RED 0x00002aL
#define _MAGENTA 0x2a002aL
#define _BROWN 0x00152aL
#define _WHITE 0x2a2a2aL
#define _GRAY 0x151515L
#define _LIGHTBLUE 0x3F1515L
#define _LIGHTGREEN 0x153f15L
#define _LIGHTCYAN 0x3f3f15L
#define _LIGHTRED 0x15153fL
#define _LIGHTMAGENTA 0x3f153fL
#define _YELLOW 0x153f3fL
#define _BRIGHTWHITE 0x3f3f3fL
/* the following is obsolescent and defined only for backward compatibility */
#define _LIGHTYELLOW _YELLOW
/* mono mode F (_ERESNOCOLOR) color values: */
#define _MODEFOFF 0L
#define _MODEFOFFTOON 1L
#define _MODEFOFFTOHI 2L
#define _MODEFONTOOFF 3L
#define _MODEFON 4L
#define _MODEFONTOHI 5L
#define _MODEFHITOOFF 6L
#define _MODEFHITOON 7L
#define _MODEFHI 8L
/* mono mode 7 (_TEXTMONO) color values: */
#define _MODE7OFF 0L
#define _MODE7ON 1L
#define _MODE7HI 2L
/* Warning: these '_xy' entrypoints are undocumented.
They may or may not be supported in future versions. */
struct xycoord _far _cdecl _moveto_xy(struct xycoord);
short _far _cdecl _lineto_xy(struct xycoord);
short _far _cdecl _rectangle_xy(short,struct xycoord,struct xycoord);
short _far _cdecl _arc_xy(struct xycoord, struct xycoord, struct xycoord, struct xycoord);
short _far _cdecl _ellipse_xy(short, struct xycoord, struct xycoord);
short _far _cdecl _pie_xy(short, struct xycoord, struct xycoord, struct xycoord, struct xycoord);
short _far _cdecl _getpixel_xy(struct xycoord);
short _far _cdecl _setpixel_xy(struct xycoord);
short _far _cdecl _floodfill_xy(struct xycoord, short);
void _far _cdecl _getimage_xy(struct xycoord,struct xycoord, char _huge *);
long _far _cdecl _imagesize_xy(struct xycoord,struct xycoord);
void _far _cdecl _putimage_xy(struct xycoord, char _huge *, short);
/* WINDOW COORDINATE SYSTEM */
#ifndef _WXYCOORD_DEFINED
/* structure for window coordinate pair */
struct _wxycoord {
double wx; /* window x coordinate */
double wy; /* window y coordinate */
};
#define _WXYCOORD_DEFINED
#endif
/* define real coordinate window - returns non-zero if successful */
short _far _cdecl _setwindow(short,double,double,double,double);
/* convert from view to window coordinates */
struct _wxycoord _far _cdecl _getwindowcoord(short,short);
struct _wxycoord _far _cdecl _getwindowcoord_xy(struct xycoord);
/* convert from window to view coordinates */
struct xycoord _far _cdecl _getviewcoord_w(double,double);
struct xycoord _far _cdecl _getviewcoord_wxy(const struct _wxycoord _far *);
/* return the window coordinates of the current graphics output
position as an _wxycoord structure. no error return. */
struct _wxycoord _far _cdecl _getcurrentposition_w(void);
/* window coordinate entry points for graphics output routines */
/* returns nonzero if successful; otherwise 0 */
short _far _cdecl _arc_w(double, double, double, double, double, double, double, double);
short _far _cdecl _arc_wxy(const struct _wxycoord _far *, const struct _wxycoord _far *, const struct _wxycoord _far *, const struct _wxycoord _far *);
/* returns nonzero if successful; otherwise 0 */
short _far _cdecl _ellipse_w(short, double, double, double, double);
short _far _cdecl _ellipse_wxy(short, const struct _wxycoord _far *, const struct _wxycoord _far *);
/* returns nonzero if successful; otherwise 0 */
short _far _cdecl _floodfill_w(double, double, short);
/* returns pixel value at given point; -1 if unsuccessful. */
short _far _cdecl _getpixel_w(double, double);
/* returns nonzero if successful; otherwise 0 */
short _far _cdecl _lineto_w(double, double);
/* returns the view coordinates of the previous output
position as an _xycoord structure. no error return */
struct _wxycoord _far _cdecl _moveto_w(double, double);
/* returns nonzero if successful; otherwise 0 */
short _far _cdecl _pie_w(short, double, double, double, double, double, double, double, double);
short _far _cdecl _pie_wxy(short, const struct _wxycoord _far *, const struct _wxycoord _far *, const struct _wxycoord _far *, const struct _wxycoord _far *);
/* returns nonzero if successful; otherwise 0 */
short _far _cdecl _rectangle_w(short, double, double, double, double);
short _far _cdecl _rectangle_wxy(short, const struct _wxycoord _far *, const struct _wxycoord _far *);
/* returns nonzero if successful; otherwise 0 */
short _far _cdecl _polygon_w(short, const double _far *, short);
short _far _cdecl _polygon_wxy(short, const struct _wxycoord _far *, short);
/* returns previous color; -1 if unsuccessful */
short _far _cdecl _setpixel_w(double, double);
/* window coordinate image routines */
/* no return value */
void _far _cdecl _getimage_w(double, double, double, double, char _huge *);
void _far _cdecl _getimage_wxy(const struct _wxycoord _far *, const struct _wxycoord _far *, char _huge *);
/* returns the image's storage size in bytes */
long _far _cdecl _imagesize_w(double, double, double, double);
long _far _cdecl _imagesize_wxy(const struct _wxycoord _far *, const struct _wxycoord _far *);
/* no return value */
void _far _cdecl _putimage_w(double, double ,char _huge * ,short);
/* FONTS */
#ifndef _FONTINFO_DEFINED
/* structure for _getfontinfo() */
struct _fontinfo {
int type; /* b0 set = vector,clear = bit map */
int ascent; /* pix dist from top to baseline */
int pixwidth; /* character width in pixels, 0=prop */
int pixheight; /* character height in pixels */
int avgwidth; /* average character width in pixels */
char filename[81]; /* file name including path */
char facename[32]; /* font name */
};
#define _FONTINFO_DEFINED
#endif
/* font function prototypes */
short _far _cdecl _registerfonts( const unsigned char _far *);
void _far _cdecl _unregisterfonts( void );
short _far _cdecl _setfont( const unsigned char _far * );
short _far _cdecl _getfontinfo( struct _fontinfo _far * );
void _far _cdecl _outgtext( const unsigned char _far * );
short _far _cdecl _getgtextextent( const unsigned char _far * );
struct xycoord _far _cdecl _setgtextvector( short, short );
struct xycoord _far _cdecl _getgtextvector(void);
/* restore default packing */
#pragma pack()

View File

@ -0,0 +1,47 @@
/***
*io.h - declarations for low-level file handling and I/O functions
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains the function declarations for the low-level
* file handling and I/O functions.
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* function prototypes */
int _FAR_ _cdecl access(const char _FAR_ *, int);
int _FAR_ _cdecl chmod(const char _FAR_ *, int);
int _FAR_ _cdecl chsize(int, long);
int _FAR_ _cdecl close(int);
int _FAR_ _cdecl creat(const char _FAR_ *, int);
int _FAR_ _cdecl dup(int);
int _FAR_ _cdecl dup2(int, int);
int _FAR_ _cdecl eof(int);
long _FAR_ _cdecl filelength(int);
int _FAR_ _cdecl isatty(int);
int _FAR_ _cdecl locking(int, int, long);
long _FAR_ _cdecl lseek(int, long, int);
char _FAR_ * _FAR_ _cdecl mktemp(char _FAR_ *);
int _FAR_ _cdecl open(const char _FAR_ *, int, ...);
int _FAR_ _cdecl _pipe(int _FAR_ *, unsigned int, int);
int _FAR_ _cdecl read(int, void _FAR_ *, unsigned int);
int _FAR_ _cdecl remove(const char _FAR_ *);
int _FAR_ _cdecl rename(const char _FAR_ *, const char _FAR_ *);
int _FAR_ _cdecl setmode(int, int);
int _FAR_ _cdecl sopen(const char _FAR_ *, int, int, ...);
long _FAR_ _cdecl tell(int);
int _FAR_ _cdecl umask(int);
int _FAR_ _cdecl unlink(const char _FAR_ *);
int _FAR_ _cdecl write(int, const void _FAR_ *, unsigned int);

View File

@ -0,0 +1,33 @@
/***
*limits.h - implementation dependent values
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Contains defines for a number of implementation dependent values
* which are commonly used in C programs.
* [ANSI]
*
****/
#define CHAR_BIT 8 /* number of bits in a char */
#define SCHAR_MIN (-127) /* minimum signed char value */
#define SCHAR_MAX 127 /* maximum signed char value */
#define UCHAR_MAX 0xff /* maximum unsigned char value */
#ifndef _CHAR_UNSIGNED
#define CHAR_MIN SCHAR_MIN /* mimimum char value */
#define CHAR_MAX SCHAR_MAX /* maximum char value */
#else
#define CHAR_MIN 0
#define CHAR_MAX UCHAR_MAX
#endif
#define MB_LEN_MAX 1 /* max. # bytes in multibyte char */
#define SHRT_MIN (-32767) /* minimum (signed) short value */
#define SHRT_MAX 32767 /* maximum (signed) short value */
#define USHRT_MAX 0xffff /* maximum unsigned short value */
#define INT_MIN (-32767) /* minimum (signed) int value */
#define INT_MAX 32767 /* maximum (signed) int value */
#define UINT_MAX 0xffff /* maximum unsigned int value */
#define LONG_MIN (-2147483647) /* minimum (signed) long value */
#define LONG_MAX 2147483647 /* maximum (signed) long value */
#define ULONG_MAX 0xffffffff /* maximum unsigned long value */

View File

@ -0,0 +1,78 @@
/***
*locale.h - definitions/declarations for localization routines
*
* Copyright (c) 1988-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the structures, values, macros, and functions
* used by the localization routines.
* [ANSI]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* define NULL pointer value */
#ifndef NULL
#if (_MSC_VER >= 600)
#define NULL ((void *)0)
#elif (defined(M_I86SM) || defined(M_I86MM))
#define NULL 0
#else
#define NULL 0L
#endif
#endif
/* Locale categories */
#define LC_ALL 0
#define LC_COLLATE 1
#define LC_CTYPE 2
#define LC_MONETARY 3
#define LC_NUMERIC 4
#define LC_TIME 5
#define LC_MIN LC_ALL
#define LC_MAX LC_TIME
/* Locale convention structure */
#ifndef _LCONV_DEFINED
struct lconv {
char *decimal_point;
char *thousands_sep;
char *grouping;
char *int_curr_symbol;
char *currency_symbol;
char *mon_decimal_point;
char *mon_thousands_sep;
char *mon_grouping;
char *positive_sign;
char *negative_sign;
char int_frac_digits;
char frac_digits;
char p_cs_precedes;
char p_sep_by_space;
char n_cs_precedes;
char n_sep_by_space;
char p_sign_posn;
char n_sign_posn;
};
#define _LCONV_DEFINED
#endif
/* function prototypes */
char _FAR_ * _FAR_ _cdecl setlocale(int, const char _FAR_ *);
struct lconv _FAR_ * _FAR_ _cdecl localeconv(void);

View File

@ -0,0 +1,136 @@
/***
*malloc.h - declarations and definitions for memory allocation functions
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Contains the function declarations for memory allocation functions;
* also defines manifest constants and types used by the heap routines.
* [System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* constants for based heap routines */
#if (_MSC_VER >= 600)
#define _NULLSEG ((_segment)0)
#define _NULLOFF ((void _based(void) *)0xffff)
#endif
/* constants for _heapchk/_heapset/_heapwalk routines */
#define _HEAPEMPTY (-1)
#define _HEAPOK (-2)
#define _HEAPBADBEGIN (-3)
#define _HEAPBADNODE (-4)
#define _HEAPEND (-5)
#define _HEAPBADPTR (-6)
#define _FREEENTRY 0
#define _USEDENTRY 1
/* maximum heap request that can ever be honored */
#define _HEAP_MAXREQ 0xFFE8
/* types and structures */
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#ifndef _HEAPINFO_DEFINED
typedef struct _heapinfo {
int _far * _pentry;
size_t _size;
int _useflag;
} _HEAPINFO;
#define _HEAPINFO_DEFINED
#endif
/* external variable declarations */
#ifdef _DLL
extern unsigned int _FAR_ _cdecl _amblksiz;
#else
extern unsigned int _near _cdecl _amblksiz;
#endif
/* based heap function prototypes */
#if (_MSC_VER >= 600)
void _based(void) * _FAR_ _cdecl _bcalloc(_segment, size_t, size_t);
void _based(void) * _FAR_ _cdecl _bexpand(_segment,
void _based(void) *, size_t);
void _FAR_ _cdecl _bfree(_segment, void _based(void) *);
int _FAR_ _cdecl _bfreeseg(_segment);
int _FAR_ _cdecl _bheapadd(_segment, void _based(void) *, size_t);
int _FAR_ _cdecl _bheapchk(_segment);
int _FAR_ _cdecl _bheapmin(_segment);
_segment _FAR_ _cdecl _bheapseg(size_t);
int _FAR_ _cdecl _bheapset(_segment, unsigned int);
int _FAR_ _cdecl _bheapwalk(_segment, _HEAPINFO *);
void _based(void) * _FAR_ _cdecl _bmalloc(_segment, size_t);
size_t _FAR_ _cdecl _bmsize(_segment, void _based(void) *);
void _based(void) * _FAR_ _cdecl _brealloc(_segment,
void _based(void) *, size_t);
#endif
/* function prototypes */
void _FAR_ * _FAR_ _cdecl alloca(size_t);
void _FAR_ * _FAR_ _cdecl calloc(size_t, size_t);
void _FAR_ * _FAR_ _cdecl _expand(void _FAR_ *, size_t);
void _far * _FAR_ _cdecl _fcalloc(size_t, size_t);
void _far * _FAR_ _cdecl _fexpand(void _far *, size_t);
void _FAR_ _cdecl _ffree(void _far *);
int _FAR_ _cdecl _fheapchk(void);
int _FAR_ _cdecl _fheapmin(void);
int _FAR_ _cdecl _fheapset(unsigned int);
int _FAR_ _cdecl _fheapwalk(_HEAPINFO _FAR_ *);
void _far * _FAR_ _cdecl _fmalloc(size_t);
size_t _FAR_ _cdecl _fmsize(void _far *);
void _far * _FAR_ _cdecl _frealloc(void _far *, size_t);
unsigned int _FAR_ _cdecl _freect(size_t);
void _FAR_ _cdecl free(void _FAR_ *);
void _huge * _FAR_ _cdecl halloc(long, size_t);
void _FAR_ _cdecl hfree(void _huge *);
int _FAR_ _cdecl _heapadd(void _far *, size_t);
int _FAR_ _cdecl _heapchk(void);
int _FAR_ _cdecl _heapmin(void);
int _FAR_ _cdecl _heapset(unsigned int);
int _FAR_ _cdecl _heapwalk(_HEAPINFO _FAR_ *);
void _FAR_ * _FAR_ _cdecl malloc(size_t);
size_t _FAR_ _cdecl _memavl(void);
size_t _FAR_ _cdecl _memmax(void);
size_t _FAR_ _cdecl _msize(void _FAR_ *);
void _near * _FAR_ _cdecl _ncalloc(size_t, size_t);
void _near * _FAR_ _cdecl _nexpand(void _near *, size_t);
void _FAR_ _cdecl _nfree(void _near *);
int _FAR_ _cdecl _nheapchk(void);
int _FAR_ _cdecl _nheapmin(void);
int _FAR_ _cdecl _nheapset(unsigned int);
int _FAR_ _cdecl _nheapwalk(_HEAPINFO _FAR_ *);
void _near * _FAR_ _cdecl _nmalloc(size_t);
size_t _FAR_ _cdecl _nmsize(void _near *);
void _near * _FAR_ _cdecl _nrealloc(void _near *, size_t);
void _FAR_ * _FAR_ _cdecl realloc(void _FAR_ *, size_t);
size_t _FAR_ _cdecl stackavail(void);

View File

@ -0,0 +1,235 @@
/***
*math.h - definitions and declarations for math library
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains constant definitions and external subroutine
* declarations for the math subroutine library.
* [ANSI/System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* definition of exception struct - this struct is passed to the matherr
* routine when a floating point exception is detected
*/
#ifndef _EXCEPTION_DEFINED
struct exception {
int type; /* exception type - see below */
char _FAR_ *name; /* name of function where error occured */
double arg1; /* first argument to function */
double arg2; /* second argument (if any) to function */
double retval; /* value to be returned by function */
} ;
#define _EXCEPTION_DEFINED
#endif
/* definition of a complex struct to be used by those who use cabs and
* want type checking on their argument
*/
#ifndef _COMPLEX_DEFINED
struct complex {
double x,y; /* real and imaginary parts */
} ;
#define _COMPLEX_DEFINED
#endif
/* Constant definitions for the exception type passed in the exception struct
*/
#define DOMAIN 1 /* argument domain error */
#define SING 2 /* argument singularity */
#define OVERFLOW 3 /* overflow range error */
#define UNDERFLOW 4 /* underflow range error */
#define TLOSS 5 /* total loss of precision */
#define PLOSS 6 /* partial loss of precision */
#define EDOM 33
#define ERANGE 34
/* definitions of HUGE and HUGE_VAL - respectively the XENIX and ANSI names
* for a value returned in case of error by a number of the floating point
* math routines
*/
#ifndef _DLL
extern double _near _cdecl HUGE;
#define HUGE_VAL HUGE
#else /* _DLL */
extern double _FAR_ _cdecl HUGE;
#define HUGE_VAL HUGE
#endif /* _DLL */
/* function prototypes */
#ifdef _MT /* function prototypes for _MT version */
int _FAR_ _cdecl abs(int);
double _FAR_ _pascal acos(double);
double _FAR_ _pascal asin(double);
double _FAR_ _pascal atan(double);
double _FAR_ _pascal atan2(double, double);
double _FAR_ _pascal atof(const char _FAR_ *);
double _FAR_ _pascal cabs(struct complex);
double _FAR_ _pascal ceil(double);
double _FAR_ _pascal cos(double);
double _FAR_ _pascal cosh(double);
int _FAR_ _cdecl dieeetomsbin(double _FAR_ *, double _FAR_ *);
int _FAR_ _cdecl dmsbintoieee(double _FAR_ *, double _FAR_ *);
double _FAR_ _pascal exp(double);
double _FAR_ _pascal fabs(double);
int _FAR_ _cdecl fieeetomsbin(float _FAR_ *, float _FAR_ *);
double _FAR_ _pascal floor(double);
double _FAR_ _pascal fmod(double, double);
int _FAR_ _cdecl fmsbintoieee(float _FAR_ *, float _FAR_ *);
double _FAR_ _pascal frexp(double, int _FAR_ *);
double _FAR_ _pascal hypot(double, double);
double _FAR_ _pascal j0(double);
double _FAR_ _pascal j1(double);
double _FAR_ _pascal jn(int, double);
long _FAR_ _cdecl labs(long);
double _FAR_ _pascal ldexp(double, int);
double _FAR_ _pascal log(double);
double _FAR_ _pascal log10(double);
int _FAR_ _cdecl matherr(struct exception _FAR_ *);
double _FAR_ _pascal modf(double, double _FAR_ *);
double _FAR_ _pascal pow(double, double);
double _FAR_ _pascal sin(double);
double _FAR_ _pascal sinh(double);
double _FAR_ _pascal sqrt(double);
double _FAR_ _pascal tan(double);
double _FAR_ _pascal tanh(double);
double _FAR_ _pascal y0(double);
double _FAR_ _pascal y1(double);
double _FAR_ _pascal yn(int, double);
#else /* function prototypes for non _MT version */
int _FAR_ _cdecl abs(int);
double _FAR_ _cdecl acos(double);
double _FAR_ _cdecl asin(double);
double _FAR_ _cdecl atan(double);
double _FAR_ _cdecl atan2(double, double);
double _FAR_ _cdecl atof(const char _FAR_ *);
double _FAR_ _cdecl cabs(struct complex);
double _FAR_ _cdecl ceil(double);
double _FAR_ _cdecl cos(double);
double _FAR_ _cdecl cosh(double);
int _FAR_ _cdecl dieeetomsbin(double _FAR_ *, double _FAR_ *);
int _FAR_ _cdecl dmsbintoieee(double _FAR_ *, double _FAR_ *);
double _FAR_ _cdecl exp(double);
double _FAR_ _cdecl fabs(double);
int _FAR_ _cdecl fieeetomsbin(float _FAR_ *, float _FAR_ *);
double _FAR_ _cdecl floor(double);
double _FAR_ _cdecl fmod(double, double);
int _FAR_ _cdecl fmsbintoieee(float _FAR_ *, float _FAR_ *);
double _FAR_ _cdecl frexp(double, int _FAR_ *);
double _FAR_ _cdecl hypot(double, double);
double _FAR_ _cdecl j0(double);
double _FAR_ _cdecl j1(double);
double _FAR_ _cdecl jn(int, double);
long _FAR_ _cdecl labs(long);
double _FAR_ _cdecl ldexp(double, int);
double _FAR_ _cdecl log(double);
double _FAR_ _cdecl log10(double);
int _FAR_ _cdecl matherr(struct exception _FAR_ *);
double _FAR_ _cdecl modf(double, double _FAR_ *);
double _FAR_ _cdecl pow(double, double);
double _FAR_ _cdecl sin(double);
double _FAR_ _cdecl sinh(double);
double _FAR_ _cdecl sqrt(double);
double _FAR_ _cdecl tan(double);
double _FAR_ _cdecl tanh(double);
double _FAR_ _cdecl y0(double);
double _FAR_ _cdecl y1(double);
double _FAR_ _cdecl yn(int, double);
#endif
/* definition of _exceptionl struct - this struct is passed to the _matherrl
* routine when a floating point exception is detected in a long double routine
*/
#ifndef _LD_EXCEPTION_DEFINED
struct _exceptionl {
int type; /* exception type - see below */
char _FAR_ *name; /* name of function where error occured */
long double arg1; /* first argument to function */
long double arg2; /* second argument (if any) to function */
long double retval; /* value to be returned by function */
} ;
#define _LD_EXCEPTION_DEFINED
#endif
/* definition of a _complexl struct to be used by those who use _cabsl and
* want type checking on their argument
*/
#ifndef _LD_COMPLEX_DEFINED
struct _complexl {
long double x,y; /* real and imaginary parts */
} ;
#define _LD_COMPLEX_DEFINED
#endif
#ifndef _DLL
extern long double _near _cdecl _LHUGE;
#define _LHUGE_VAL _LHUGE
#else /* _DLL */
extern long double _FAR_ _cdecl _LHUGE;
#define _LHUGE_VAL _LHUGE
#endif /* _DLL */
long double _FAR_ _cdecl acosl(long double);
long double _FAR_ _cdecl asinl(long double);
long double _FAR_ _cdecl atanl(long double);
long double _FAR_ _cdecl atan2l(long double, long double);
long double _FAR_ _cdecl _atold(const char _FAR_ *);
long double _FAR_ _cdecl cabsl(struct _complexl);
long double _FAR_ _cdecl ceill(long double);
long double _FAR_ _cdecl cosl(long double);
long double _FAR_ _cdecl coshl(long double);
long double _FAR_ _cdecl expl(long double);
long double _FAR_ _cdecl fabsl(long double);
long double _FAR_ _cdecl floorl(long double);
long double _FAR_ _cdecl fmodl(long double, long double);
long double _FAR_ _cdecl frexpl(long double, int _FAR_ *);
long double _FAR_ _cdecl hypotl(long double, long double);
long double _FAR_ _cdecl _j0l(long double);
long double _FAR_ _cdecl _j1l(long double);
long double _FAR_ _cdecl _jnl(int, long double);
long double _FAR_ _cdecl ldexpl(long double, int);
long double _FAR_ _cdecl logl(long double);
long double _FAR_ _cdecl log10l(long double);
int _FAR_ _cdecl _matherrl(struct _exceptionl _FAR_ *);
long double _FAR_ _cdecl modfl(long double, long double _FAR_ *);
long double _FAR_ _cdecl powl(long double, long double);
long double _FAR_ _cdecl sinl(long double);
long double _FAR_ _cdecl sinhl(long double);
long double _FAR_ _cdecl sqrtl(long double);
long double _FAR_ _cdecl tanl(long double);
long double _FAR_ _cdecl tanhl(long double);
long double _FAR_ _cdecl _y0l(long double);
long double _FAR_ _cdecl _y1l(long double);
long double _FAR_ _cdecl _ynl(int, long double);

View File

@ -0,0 +1,56 @@
/***
*memory.h - declarations for buffer (memory) manipulation routines
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This include file contains the function declarations for the
* buffer (memory) manipulation routines.
* [System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
/* function prototypes */
void _FAR_ * _FAR_ _cdecl memccpy(void _FAR_ *, const void _FAR_ *,
int, unsigned int);
void _FAR_ * _FAR_ _cdecl memchr(const void _FAR_ *, int, size_t);
int _FAR_ _cdecl memcmp(const void _FAR_ *, const void _FAR_ *,
size_t);
void _FAR_ * _FAR_ _cdecl memcpy(void _FAR_ *, const void _FAR_ *,
size_t);
int _FAR_ _cdecl memicmp(const void _FAR_ *, const void _FAR_ *,
unsigned int);
void _FAR_ * _FAR_ _cdecl memset(void _FAR_ *, int, size_t);
void _FAR_ _cdecl movedata(unsigned int, unsigned int, unsigned int,
unsigned int, unsigned int);
/* model independent function prototypes */
void _far * _far _cdecl _fmemccpy(void _far *, const void _far *,
int, unsigned int);
void _far * _far _cdecl _fmemchr(const void _far *, int, size_t);
int _far _cdecl _fmemcmp(const void _far *, const void _far *,
size_t);
void _far * _far _cdecl _fmemcpy(void _far *, const void _far *,
size_t);
int _far _cdecl _fmemicmp(const void _far *, const void _far *,
unsigned int);
void _far * _far _cdecl _fmemset(void _far *, int, size_t);

View File

@ -0,0 +1,219 @@
/***
*pgchart.h - Declare constants, functions and macros for charting library.
*
* Copyright (c) 1988-1990, Microsoft Corporation, All rights reserved.
*
*Purpose:
* This file declares the presentation graphics library functions and
* the structures and manifest constants that are used with them.
*
***************************************************************************/
/* Force word alignment to avoid possible -Zp override */
#pragma pack(2)
/* Required for the missing value definition */
#define FLT_MAX 3.402823466e+38F /* max value */
#define _PG_PALETTELEN 16 /* Number of entries in internal palette */
#define _PG_MAXCHARTTYPE 5 /* Maximum available chart type */
#define _PG_MAXCHARTSTYLE 2 /* Maximum chart style */
#define _PG_TITLELEN 70 /* Maximum title text length */
#define _PG_LEFT 1 /* Positions used for titles and legends */
#define _PG_CENTER 2
#define _PG_RIGHT 3
#define _PG_BOTTOM 4
#define _PG_OVERLAY 5
#define _PG_LINEARAXIS 1 /* Used to specify axis types */
#define _PG_LOGAXIS 2
#define _PG_DECFORMAT 1 /* Used to specify tic mark label format */
#define _PG_EXPFORMAT 2
#define _PG_BARCHART 1 /* Charttype for a bar chart */
#define _PG_COLUMNCHART 2 /* Charttype for a column chart */
#define _PG_PLAINBARS 1 /* Styles for bar and column charts */
#define _PG_STACKEDBARS 2
#define _PG_LINECHART 3 /* Charttype for a line chart */
#define _PG_SCATTERCHART 4 /* Charttype for a scatter chart */
#define _PG_POINTANDLINE 1 /* Styles for line and scatter charts */
#define _PG_POINTONLY 2
#define _PG_PIECHART 5 /* Charttype for pie chart */
#define _PG_PERCENT 1 /* Styles for pie charts */
#define _PG_NOPERCENT 2
#define _PG_MISSINGVALUE -FLT_MAX /* Indicates missing data values */
/* Error codes */
/* Numbers greater than 100 will terminate chart routine, others will cause
* default values to be used
*/
#define _PG_NOTINITIALIZED 102 /* If library not initialized */
#define _PG_BADSCREENMODE 103 /* Graphics mode not set before charting */
#define _PG_BADCHARTSTYLE 04 /* Chart style invalid */
#define _PG_BADCHARTTYPE 104 /* Chart type invalid */
#define _PG_BADLEGENDWINDOW 105 /* Invalid legend window specified */
#define _PG_BADCHARTWINDOW 07 /* x1=x2 or y1=y2 in chart window spec. */
#define _PG_BADDATAWINDOW 107 /* If chart window is too small */
#define _PG_NOMEMORY 108 /* Not enough memory for data arrays */
#define _PG_BADLOGBASE 05 /* Log base <= 0 */
#define _PG_BADSCALEFACTOR 06 /* Scale factor = 0 */
#define _PG_TOOSMALLN 109 /* Number of data points <= 0 */
#define _PG_TOOFEWSERIES 110 /* Number of series <= 0 */
/* Typedefs */
/* Typedef for chart title */
#ifndef _TITLETYPE_DEFINED
typedef struct {
char title[_PG_TITLELEN]; /* Title text */
short titlecolor; /* Internal palette color for title text */
short justify; /* _PG_LEFT, _PG_CENTER, _PG_RIGHT */
} titletype;
#define _TITLETYPE_DEFINED
#endif
/* Typedef for chart axes */
#ifndef _AXISTYPE_DEFINED
typedef struct {
short grid; /* TRUE=grid lines drawn; FALSE no lines */
short gridstyle; /* Style number from style pool for grid lines */
titletype axistitle; /* Title definition for axis */
short axiscolor; /* Color for axis */
short labeled; /* TRUE=tic marks and titles drawn */
short rangetype; /* _PG_LINEARAXIS, _PG_LOGAXIS */
float logbase; /* Base used if log axis */
short autoscale; /* TRUE=next 7 values calculated by system */
float scalemin; /* Minimum value of scale */
float scalemax; /* Maximum value of scale */
float scalefactor; /* Scale factor for data on this axis */
titletype scaletitle; /* Title definition for scaling factor */
float ticinterval; /* Distance between tic marks (world coord.) */
short ticformat; /* _PG_EXPFORMAT or _PG_DECFORMAT for tic labels */
short ticdecimals; /* Number of decimals for tic labels (max=9)*/
} axistype;
#define _AXISTYPE_DEFINED
#endif
/* Typedef used for defining chart and data windows */
#ifndef _WINDOWTYPE_DEFINED
typedef struct {
short x1; /* Left edge of window in pixels */
short y1; /* Top edge of window in pixels */
short x2; /* Right edge of window in pixels */
short y2; /* Bottom edge of window in pixels */
short border; /* TRUE for border, FALSE otherwise */
short background; /* Internal palette color for window bgnd */
short borderstyle; /* Style bytes for window border */
short bordercolor; /* Internal palette color for window border */
} windowtype;
#define _WINDOWTYPE_DEFINED
#endif
/* Typedef for legend definition */
#ifndef _LEGENDTYPE_DEFINED
typedef struct {
short legend; /* TRUE=draw legend; FALSE=no legend */
short place; /* _PG_RIGHT, _PG_BOTTOM, _PG_OVERLAY */
short textcolor; /* Internal palette color for text */
short autosize; /* TRUE=system calculates size */
windowtype legendwindow; /* Window definition for legend */
} legendtype;
#define _LEGENDTYPE_DEFINED
#endif
/* Typedef for legend definition */
#ifndef _CHARTENV_DEFINED
typedef struct {
short charttype; /* _PG_BAR, _PG_COLUMN, _PG_LINE, _PG_SCATTER, _PG_PIE */
short chartstyle; /* Style for selected chart type */
windowtype chartwindow; /* Window definition for overall chart */
windowtype datawindow; /* Window definition for data part of chart */
titletype maintitle; /* Main chart title */
titletype subtitle; /* Chart sub-title */
axistype xaxis; /* Definition for X-axis */
axistype yaxis; /* Definition for Y-axis */
legendtype legend; /* Definition for legend */
} chartenv;
#define _CHARTENV_DEFINED
#endif
/* Typedef for character bitmap */
#ifndef _CHARMAP_DEFINED
typedef unsigned char charmap[8];
#define _CHARMAP_DEFINED
#endif
/* Typedef for pattern bitmap */
#ifndef _FILLMAP_DEFINED
typedef unsigned char fillmap[8];
#define _FILLMAP_DEFINED
#endif
/* Typedef for palette entry definition */
#ifndef _PALETTEENTRY_DEFINED
typedef struct {
unsigned short color;
unsigned short style;
fillmap fill;
char plotchar;
} paletteentry;
#define _PALETTEENTRY_DEFINED
#endif
/* Typedef for palette definition */
#ifndef _PALETTETYPE_DEFINED
typedef paletteentry palettetype[_PG_PALETTELEN];
#define _PALETTETYPE_DEFINED
#endif
/* Typedef for style sets */
#ifndef _STYLESET_DEFINED
typedef unsigned short styleset[_PG_PALETTELEN];
#define _STYLESET_DEFINED
#endif
/* Function prototypes for charting routines */
short _far _cdecl _pg_initchart(void);
short _far _cdecl _pg_defaultchart(chartenv _far *, short, short);
short _far _cdecl _pg_chart(chartenv _far *, char _far * _far *, float _far *, short);
short _far _cdecl _pg_chartms(chartenv _far *, char _far * _far *, float _far *, short, short, short, char _far * _far *);
short _far _cdecl _pg_chartscatter(chartenv _far *, float _far *, float _far *, short);
short _far _cdecl _pg_chartscatterms(chartenv _far *, float _far *, float _far *, short, short, short, char _far * _far *);
short _far _cdecl _pg_chartpie(chartenv _far *, char _far * _far *, float _far *, short _far *, short);
/* Function prototypes for support routines */
short _far _cdecl _pg_hlabelchart(chartenv _far *, short, short, short, char _far *);
short _far _cdecl _pg_vlabelchart(chartenv _far *, short, short, short, char _far *);
short _far _cdecl _pg_analyzechart(chartenv _far *, char _far * _far *, float _far *, short);
short _far _cdecl _pg_analyzechartms(chartenv _far *, char _far * _far *, float _far *, short, short, short, char _far * _far *);
short _far _cdecl _pg_analyzescatter(chartenv _far *, float _far *, float _far *, short);
short _far _cdecl _pg_analyzescatterms(chartenv _far *, float _far *, float _far *, short, short, short, char _far * _far *);
short _far _cdecl _pg_analyzepie(chartenv _far *, char _far * _far *, float _far *, short _far *, short);
short _far _cdecl _pg_getpalette(paletteentry _far *);
short _far _cdecl _pg_setpalette(paletteentry _far *);
short _far _cdecl _pg_resetpalette(void);
void _far _cdecl _pg_getstyleset(unsigned short _far *);
void _far _cdecl _pg_setstyleset(unsigned short _far *);
void _far _cdecl _pg_resetstyleset(void);
short _far _cdecl _pg_getchardef(short, unsigned char _far *);
short _far _cdecl _pg_setchardef(short, unsigned char _far *);
/* Restore default packing */
#pragma pack()

View File

@ -0,0 +1,91 @@
/***
*process.h - definition and declarations for process control functions
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains the declarations and definitions for the
* spawnxx, execxx, and various other process control routines.
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* mode values for spawnxx routines
* (only P_WAIT and P_OVERLAY are supported on MS-DOS)
*/
#ifndef _MT
extern int _near _cdecl _p_overlay;
#endif
#define P_WAIT 0
#define P_NOWAIT 1
#ifdef _MT
#define P_OVERLAY 2
#else
#define P_OVERLAY _p_overlay
#endif
#define OLD_P_OVERLAY 2
#define P_NOWAITO 3
#define P_DETACH 4
/* action codes used with cwait() */
#define WAIT_CHILD 0
#define WAIT_GRANDCHILD 1
/* function prototypes */
#ifdef _MT
int _FAR_ _cdecl _beginthread(void(_cdecl _FAR_ *)(void _FAR_ *),
void _FAR_ *, unsigned, void _FAR_ *);
void _FAR_ _cdecl _endthread(void);
#endif
void _FAR_ _cdecl abort(void);
void _FAR_ _cdecl _cexit(void);
void _FAR_ _cdecl _c_exit(void);
int _FAR_ _cdecl cwait(int _FAR_ *, int, int);
int _FAR_ _cdecl execl(const char _FAR_ *, const char _FAR_ *, ...);
int _FAR_ _cdecl execle(const char _FAR_ *, const char _FAR_ *, ...);
int _FAR_ _cdecl execlp(const char _FAR_ *, const char _FAR_ *, ...);
int _FAR_ _cdecl execlpe(const char _FAR_ *, const char _FAR_ *, ...);
int _FAR_ _cdecl execv(const char _FAR_ *,
const char _FAR_ * const _FAR_ *);
int _FAR_ _cdecl execve(const char _FAR_ *,
const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
int _FAR_ _cdecl execvp(const char _FAR_ *,
const char _FAR_ * const _FAR_ *);
int _FAR_ _cdecl execvpe(const char _FAR_ *,
const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
void _FAR_ _cdecl exit(int);
void _FAR_ _cdecl _exit(int);
int _FAR_ _cdecl getpid(void);
int _FAR_ _cdecl spawnl(int, const char _FAR_ *, const char _FAR_ *,
...);
int _FAR_ _cdecl spawnle(int, const char _FAR_ *, const char _FAR_ *,
...);
int _FAR_ _cdecl spawnlp(int, const char _FAR_ *, const char _FAR_ *,
...);
int _FAR_ _cdecl spawnlpe(int, const char _FAR_ *, const char _FAR_ *,
...);
int _FAR_ _cdecl spawnv(int, const char _FAR_ *,
const char _FAR_ * const _FAR_ *);
int _FAR_ _cdecl spawnve(int, const char _FAR_ *,
const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
int _FAR_ _cdecl spawnvp(int, const char _FAR_ *,
const char _FAR_ * const _FAR_ *);
int _FAR_ _cdecl spawnvpe(int, const char _FAR_ *,
const char _FAR_ * const _FAR_ *, const char _FAR_ * const _FAR_ *);
int _FAR_ _cdecl system(const char _FAR_ *);
int _FAR_ _cdecl wait(int _FAR_ *);

View File

@ -0,0 +1,41 @@
/***
*search.h - declarations for searcing/sorting routines
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains the declarations for the sorting and
* searching routines.
* [System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
/* function prototypes */
void _FAR_ * _FAR_ _cdecl lsearch(const void _FAR_ *, void _FAR_ *,
unsigned int _FAR_ *, unsigned int, int (_FAR_ _cdecl *)
(const void _FAR_ *, const void _FAR_ *));
void _FAR_ * _FAR_ _cdecl lfind(const void _FAR_ *, const void _FAR_ *,
unsigned int _FAR_ *, unsigned int, int (_FAR_ _cdecl *)
(const void _FAR_ *, const void _FAR_ *));
void _FAR_ * _FAR_ _cdecl bsearch(const void _FAR_ *, const void _FAR_ *,
size_t, size_t, int (_FAR_ _cdecl *)(const void _FAR_ *,
const void _FAR_ *));
void _FAR_ _cdecl qsort(void _FAR_ *, size_t, size_t, int (_FAR_ _cdecl *)
(const void _FAR_ *, const void _FAR_ *));

View File

@ -0,0 +1,37 @@
/***
*setjmp.h - definitions/declarations for setjmp/longjmp routines
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the machine-dependent buffer used by
* setjmp/longjmp to save and restore the program state, and
* declarations for those routines.
* [ANSI/System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* define the buffer type for holding the state information */
#define _JBLEN 9 /* bp, di, si, sp, ret addr, ds */
#ifndef _JMP_BUF_DEFINED
typedef int jmp_buf[_JBLEN];
#define _JMP_BUF_DEFINED
#endif
/* function prototypes */
int _FAR_ _cdecl setjmp(jmp_buf);
void _FAR_ _cdecl longjmp(jmp_buf, int);

View File

@ -0,0 +1,15 @@
/***
*share.h - defines file sharing modes for sopen
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the file sharing modes for sopen().
*
****/
#define SH_COMPAT 0x00 /* compatibility mode */
#define SH_DENYRW 0x10 /* deny read/write mode */
#define SH_DENYWR 0x20 /* deny write mode */
#define SH_DENYRD 0x30 /* deny read mode */
#define SH_DENYNO 0x40 /* deny none mode */

View File

@ -0,0 +1,71 @@
/***
*signal.h - defines signal values and routines
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the signal values and declares the signal functions.
* [ANSI/System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#ifdef _DLL
#define _LOADDS_ _loadds
#else
#define _LOADDS_
#endif
#ifndef _SIG_ATOMIC_T_DEFINED
typedef int sig_atomic_t;
#define _SIG_ATOMIC_T_DEFINED
#endif
#define NSIG 23 /* maximum signal number + 1 */
/* signal types */
/* SIGINT, SIGFPE, SIGILL, SIGSEGV, and SIGABRT are recognized on DOS 3.x */
#define SIGINT 2 /* interrupt - corresponds to DOS 3.x int 23H */
#define SIGILL 4 /* illegal instruction - invalid function image */
#define SIGFPE 8 /* floating point exception */
#define SIGSEGV 11 /* segment violation */
#define SIGTERM 15 /* Software termination signal from kill */
#define SIGUSR1 16 /* User defined signal 1 */
#define SIGUSR2 17 /* User defined signal 2 */
#define SIGUSR3 20 /* User defined signal 3 */
#define SIGBREAK 21 /* Ctrl-Break sequence */
#define SIGABRT 22 /* abnormal termination triggered by abort call */
/* signal action codes */
/* SIG_DFL and SIG_IGN are recognized on DOS 3.x */
#define SIG_DFL (void (_FAR_ _cdecl _LOADDS_ *)())0 /* default signal action */
#define SIG_IGN (void (_FAR_ _cdecl _LOADDS_ *)())1 /* ignore */
#define SIG_SGE (void (_FAR_ _cdecl _LOADDS_ *)())3 /* signal gets error */
#define SIG_ACK (void (_FAR_ _cdecl _LOADDS_ *)())4 /* error if handler not setup */
/* signal error value (returned by signal call on error) */
#define SIG_ERR (void (_FAR_ _cdecl _LOADDS_ *)())-1 /* signal error value */
/* function prototypes */
void (_FAR_ _cdecl _LOADDS_ * _FAR_ _cdecl signal(int,
void (_FAR_ _cdecl _LOADDS_ *)()))();
#ifndef _MT
int _FAR_ _cdecl raise(int);
#endif

View File

@ -0,0 +1,42 @@
/***
*stdarg.h - defines ANSI-style macros for variable argument functions
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines ANSI-style macros for accessing arguments
* of functions which take a variable number of arguments.
* [ANSI]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* define NULL pointer value */
#ifndef NULL
#if (_MSC_VER >= 600)
#define NULL ((void *)0)
#elif (defined(M_I86SM) || defined(M_I86MM))
#define NULL 0
#else
#define NULL 0L
#endif
#endif
#ifndef _VA_LIST_DEFINED
typedef char _FAR_ *va_list;
#define _VA_LIST_DEFINED
#endif
#define va_start(ap,v) ap = (va_list)&v + sizeof(v)
#define va_arg(ap,t) ((t _FAR_ *)(ap += sizeof(t)))[-1]
#define va_end(ap) ap = NULL

View File

@ -0,0 +1,65 @@
/***
*stddef.h - definitions/declarations for common constants, types, variables
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains definitions and declarations for some commonly
* used constants, types, and variables.
* [ANSI]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* define the NULL pointer value and the offsetof() macro */
#ifndef NULL
#if (_MSC_VER >= 600)
#define NULL ((void *)0)
#elif (defined(M_I86SM) || defined(M_I86MM))
#define NULL 0
#else
#define NULL 0L
#endif
#endif
#define offsetof(s,m) (size_t)&(((s *)0)->m)
/* declare reference to errno */
#ifdef _MT
extern int _far * _cdecl _far volatile _errno(void);
#define errno (*_errno())
#else
extern int _near _cdecl volatile errno;
#endif
/* define the implementation dependent size types */
#ifndef _PTRDIFF_T_DEFINED
typedef int ptrdiff_t;
#define _PTRDIFF_T_DEFINED
#endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#ifdef _MT
/* define pointer to thread id value */
extern int _far *_threadid;
#endif

View File

@ -0,0 +1,224 @@
/***
*stdio.h - definitions/declarations for standard I/O routines
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the structures, values, macros, and functions
* used by the level 2 I/O ("standard I/O") routines.
* [ANSI/System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#ifndef _VA_LIST_DEFINED
typedef char _FAR_ *va_list;
#define _VA_LIST_DEFINED
#endif
/* buffered I/O macros */
#define BUFSIZ 512
#ifdef _MT
#define _NFILE 40
#else
#define _NFILE 20
#endif
#define EOF (-1)
#ifndef _FILE_DEFINED
struct _iobuf {
char _FAR_ *_ptr;
int _cnt;
char _FAR_ *_base;
char _flag;
char _file;
};
typedef struct _iobuf FILE;
#define _FILE_DEFINED
#endif
/* P_tmpnam: Directory where temporary files may be created.
* L_tmpnam size = size of P_tmpdir
* + 1 (in case P_tmpdir does not end in "\\")
* + 6 (for the temp number string)
* + 1 (for the null terminator)
*/
#define P_tmpdir "\\"
#define L_tmpnam sizeof(P_tmpdir)+8
/* fseek constants */
#define SEEK_CUR 1
#define SEEK_END 2
#define SEEK_SET 0
/* minimum guaranteed filename length, open file count, and unique
* tmpnam filenames.
*/
#define FILENAME_MAX 63
#define FOPEN_MAX 20
#define SYS_OPEN 20
#define TMP_MAX 32767
/* define NULL pointer value */
#ifndef NULL
#if (_MSC_VER >= 600)
#define NULL ((void *)0)
#elif (defined(M_I86SM) || defined(M_I86MM))
#define NULL 0
#else
#define NULL 0L
#endif
#endif
/* declare _iob[] array */
#ifndef _STDIO_DEFINED
#ifdef _DLL
extern FILE _FAR_ _cdecl _iob[];
#else
extern FILE _near _cdecl _iob[];
#endif
#endif
/* define file position type */
#ifndef _FPOS_T_DEFINED
typedef long fpos_t;
#define _FPOS_T_DEFINED
#endif
/* standard file pointers */
#define stdin (&_iob[0])
#define stdout (&_iob[1])
#define stderr (&_iob[2])
#define stdaux (&_iob[3])
#define stdprn (&_iob[4])
#define _IOREAD 0x01
#define _IOWRT 0x02
#define _IOFBF 0x0
#define _IOLBF 0x40
#define _IONBF 0x04
#define _IOMYBUF 0x08
#define _IOEOF 0x10
#define _IOERR 0x20
#define _IOSTRG 0x40
#define _IORW 0x80
/* function prototypes */
#ifndef _STDIO_DEFINED
int _FAR_ _cdecl _filbuf(FILE _FAR_ *);
int _FAR_ _cdecl _flsbuf(int, FILE _FAR_ *);
FILE _FAR_ * _FAR_ _cdecl _fsopen(const char _FAR_ *,
const char _FAR_ *, int);
void _FAR_ _cdecl clearerr(FILE _FAR_ *);
int _FAR_ _cdecl fclose(FILE _FAR_ *);
int _FAR_ _cdecl fcloseall(void);
FILE _FAR_ * _FAR_ _cdecl fdopen(int, const char _FAR_ *);
int _FAR_ _cdecl feof(FILE _FAR_ *);
int _FAR_ _cdecl ferror(FILE _FAR_ *);
int _FAR_ _cdecl fflush(FILE _FAR_ *);
int _FAR_ _cdecl fgetc(FILE _FAR_ *);
int _FAR_ _cdecl fgetchar(void);
int _FAR_ _cdecl fgetpos(FILE _FAR_ *, fpos_t _FAR_ *);
char _FAR_ * _FAR_ _cdecl fgets(char _FAR_ *, int, FILE _FAR_ *);
int _FAR_ _cdecl fileno(FILE _FAR_ *);
int _FAR_ _cdecl flushall(void);
FILE _FAR_ * _FAR_ _cdecl fopen(const char _FAR_ *,
const char _FAR_ *);
int _FAR_ _cdecl fprintf(FILE _FAR_ *, const char _FAR_ *, ...);
int _FAR_ _cdecl fputc(int, FILE _FAR_ *);
int _FAR_ _cdecl fputchar(int);
int _FAR_ _cdecl fputs(const char _FAR_ *, FILE _FAR_ *);
size_t _FAR_ _cdecl fread(void _FAR_ *, size_t, size_t, FILE _FAR_ *);
FILE _FAR_ * _FAR_ _cdecl freopen(const char _FAR_ *,
const char _FAR_ *, FILE _FAR_ *);
int _FAR_ _cdecl fscanf(FILE _FAR_ *, const char _FAR_ *, ...);
int _FAR_ _cdecl fsetpos(FILE _FAR_ *, const fpos_t _FAR_ *);
int _FAR_ _cdecl fseek(FILE _FAR_ *, long, int);
long _FAR_ _cdecl ftell(FILE _FAR_ *);
size_t _FAR_ _cdecl fwrite(const void _FAR_ *, size_t, size_t,
FILE _FAR_ *);
int _FAR_ _cdecl getc(FILE _FAR_ *);
int _FAR_ _cdecl getchar(void);
char _FAR_ * _FAR_ _cdecl gets(char _FAR_ *);
int _FAR_ _cdecl getw(FILE _FAR_ *);
void _FAR_ _cdecl perror(const char _FAR_ *);
int _FAR_ _cdecl _pclose(FILE _FAR_ *);
FILE _FAR_ * _FAR_ _cdecl _popen(const char _FAR_ *,
const char _FAR_ *);
int _FAR_ _cdecl printf(const char _FAR_ *, ...);
int _FAR_ _cdecl putc(int, FILE _FAR_ *);
int _FAR_ _cdecl putchar(int);
int _FAR_ _cdecl puts(const char _FAR_ *);
int _FAR_ _cdecl putw(int, FILE _FAR_ *);
int _FAR_ _cdecl remove(const char _FAR_ *);
int _FAR_ _cdecl rename(const char _FAR_ *, const char _FAR_ *);
void _FAR_ _cdecl rewind(FILE _FAR_ *);
int _FAR_ _cdecl rmtmp(void);
int _FAR_ _cdecl scanf(const char _FAR_ *, ...);
void _FAR_ _cdecl setbuf(FILE _FAR_ *, char _FAR_ *);
int _FAR_ _cdecl setvbuf(FILE _FAR_ *, char _FAR_ *, int, size_t);
int _FAR_ _cdecl sprintf(char _FAR_ *, const char _FAR_ *, ...);
int _FAR_ _cdecl sscanf(const char _FAR_ *, const char _FAR_ *, ...);
char _FAR_ * _FAR_ _cdecl tempnam(char _FAR_ *, char _FAR_ *);
FILE _FAR_ * _FAR_ _cdecl tmpfile(void);
char _FAR_ * _FAR_ _cdecl tmpnam(char _FAR_ *);
int _FAR_ _cdecl ungetc(int, FILE _FAR_ *);
int _FAR_ _cdecl unlink(const char _FAR_ *);
int _FAR_ _cdecl vfprintf(FILE _FAR_ *, const char _FAR_ *, va_list);
int _FAR_ _cdecl vprintf(const char _FAR_ *, va_list);
int _FAR_ _cdecl vsprintf(char _FAR_ *, const char _FAR_ *, va_list);
#define _STDIO_DEFINED
#endif
/* macro definitions */
#define feof(_stream) ((_stream)->_flag & _IOEOF)
#define ferror(_stream) ((_stream)->_flag & _IOERR)
#define fileno(_stream) ((int)(unsigned char)(_stream)->_file)
#define getc(_stream) (--(_stream)->_cnt >= 0 ? 0xff & *(_stream)->_ptr++ \
: _filbuf(_stream))
#define putc(_c,_stream) (--(_stream)->_cnt >= 0 \
? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream)))
#define getchar() getc(stdin)
#define putchar(_c) putc((_c),stdout)
#ifdef _MT
#undef getc
#undef putc
#undef getchar
#undef putchar
#endif

View File

@ -0,0 +1,204 @@
/***
*stdlib.h - declarations/definitions for commonly used library functions
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This include file contains the function declarations for
* commonly used library functions which either don't fit somewhere
* else, or, like toupper/tolower, can't be declared in the normal
* place for other reasons.
* [ANSI]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#ifdef _DLL
#define _LOADDS_ _loadds
#else
#define _LOADDS_
#endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
/* define NULL pointer value */
#ifndef NULL
#if (_MSC_VER >= 600)
#define NULL ((void *)0)
#elif (defined(M_I86SM) || defined(M_I86MM))
#define NULL 0
#else
#define NULL 0L
#endif
#endif
/* definition of the return type for the onexit() function */
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
#ifndef _ONEXIT_T_DEFINED
typedef int (_FAR_ _cdecl _LOADDS_ * _cdecl onexit_t)();
#define _ONEXIT_T_DEFINED
#endif
/* data structure definitions for div and ldiv runtimes. */
#ifndef _DIV_T_DEFINED
typedef struct _div_t {
int quot;
int rem;
} div_t;
typedef struct _ldiv_t {
long quot;
long rem;
} ldiv_t;
#define _DIV_T_DEFINED
#endif
/* maximum value that can be returned by the rand function. */
#define RAND_MAX 0x7fff
/* min and max macros */
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))
/* sizes for buffers used by the _makepath() and _splitpath() functions.
* note that the sizes include space for 0-terminator
*/
#define _MAX_PATH 260 /* max. length of full pathname */
#define _MAX_DRIVE 3 /* max. length of drive component */
#define _MAX_DIR 256 /* max. length of path component */
#define _MAX_FNAME 256 /* max. length of file name component */
#define _MAX_EXT 256 /* max. length of extension component */
/* external variable declarations */
#ifdef _MT
extern int _far * _cdecl _far volatile _errno(void);
extern unsigned _far * _cdecl _far __doserrno(void);
#define errno (*_errno())
#define _doserrno (*__doserrno())
#else
extern int _near _cdecl volatile errno; /* XENIX style error number */
extern int _near _cdecl _doserrno; /* MS-DOS system error value */
#endif
extern char * _near _cdecl sys_errlist[]; /* perror error message table */
extern int _near _cdecl sys_nerr; /* # of entries in sys_errlist table */
#ifdef _DLL
extern char ** _FAR_ _cdecl environ; /* pointer to environment table */
extern int _FAR_ _cdecl _fmode; /* default file translation mode */
extern int _FAR_ _cdecl _fileinfo; /* open file info mode (for spawn) */
#else
extern char ** _near _cdecl environ; /* pointer to environment table */
extern int _near _cdecl _fmode; /* default file translation mode */
extern int _near _cdecl _fileinfo; /* open file info mode (for spawn) */
#endif
extern unsigned int _near _cdecl _psp; /* Program Segment Prefix */
/* OS major/minor version numbers */
extern unsigned char _near _cdecl _osmajor;
extern unsigned char _near _cdecl _osminor;
#define DOS_MODE 0 /* Real Address Mode */
#define OS2_MODE 1 /* Protected Address Mode */
extern unsigned char _near _cdecl _osmode;
/* function prototypes */
#ifdef _MT
double _FAR_ _pascal atof(const char _FAR_ *);
double _FAR_ _pascal strtod(const char _FAR_ *, char _FAR_ * _FAR_ *);
ldiv_t _FAR_ _pascal ldiv(long, long);
#else /* not _MT */
double _FAR_ _cdecl atof(const char _FAR_ *);
double _FAR_ _cdecl strtod(const char _FAR_ *, char _FAR_ * _FAR_ *);
ldiv_t _FAR_ _cdecl ldiv(long, long);
#endif
void _FAR_ _cdecl abort(void);
int _FAR_ _cdecl abs(int);
int _FAR_ _cdecl atexit(void (_cdecl _FAR_ _LOADDS_ *)(void));
int _FAR_ _cdecl atoi(const char _FAR_ *);
long _FAR_ _cdecl atol(const char _FAR_ *);
long double _FAR_ _cdecl _atold(const char _FAR_ *);
void _FAR_ * _FAR_ _cdecl bsearch(const void _FAR_ *, const void _FAR_ *,
size_t, size_t, int (_FAR_ _cdecl *)(const void _FAR_ *,
const void _FAR_ *));
void _FAR_ * _FAR_ _cdecl calloc(size_t, size_t);
div_t _FAR_ _cdecl div(int, int);
char _FAR_ * _FAR_ _cdecl ecvt(double, int, int _FAR_ *, int _FAR_ *);
void _FAR_ _cdecl exit(int);
void _FAR_ _cdecl _exit(int);
char _FAR_ * _FAR_ _cdecl fcvt(double, int, int _FAR_ *, int _FAR_ *);
void _FAR_ _cdecl free(void _FAR_ *);
char _FAR_ * _FAR_ _cdecl _fullpath(char _FAR_ *, const char _FAR_ *,
size_t);
char _FAR_ * _FAR_ _cdecl gcvt(double, int, char _FAR_ *);
char _FAR_ * _FAR_ _cdecl getenv(const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl itoa(int, char _FAR_ *, int);
long _FAR_ _cdecl labs(long);
unsigned long _FAR_ _cdecl _lrotl(unsigned long, int);
unsigned long _FAR_ _cdecl _lrotr(unsigned long, int);
char _FAR_ * _FAR_ _cdecl ltoa(long, char _FAR_ *, int);
void _FAR_ _cdecl _makepath(char _FAR_ *, const char _FAR_ *,
const char _FAR_ *, const char _FAR_ *, const char _FAR_ *);
void _FAR_ * _FAR_ _cdecl malloc(size_t);
onexit_t _FAR_ _cdecl onexit(onexit_t);
void _FAR_ _cdecl perror(const char _FAR_ *);
int _FAR_ _cdecl putenv(const char _FAR_ *);
void _FAR_ _cdecl qsort(void _FAR_ *, size_t, size_t, int (_FAR_ _cdecl *)
(const void _FAR_ *, const void _FAR_ *));
unsigned int _FAR_ _cdecl _rotl(unsigned int, int);
unsigned int _FAR_ _cdecl _rotr(unsigned int, int);
int _FAR_ _cdecl rand(void);
void _FAR_ * _FAR_ _cdecl realloc(void _FAR_ *, size_t);
void _FAR_ _cdecl _searchenv(const char _FAR_ *, const char _FAR_ *,
char _FAR_ *);
void _FAR_ _cdecl _splitpath(const char _FAR_ *, char _FAR_ *,
char _FAR_ *, char _FAR_ *, char _FAR_ *);
void _FAR_ _cdecl srand(unsigned int);
long _FAR_ _cdecl strtol(const char _FAR_ *, char _FAR_ * _FAR_ *,
int);
long double _FAR_ _cdecl _strtold(const char _FAR_ *,
char _FAR_ * _FAR_ *);
unsigned long _FAR_ _cdecl strtoul(const char _FAR_ *,
char _FAR_ * _FAR_ *, int);
void _FAR_ _cdecl swab(char _FAR_ *, char _FAR_ *, int);
int _FAR_ _cdecl system(const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl ultoa(unsigned long, char _FAR_ *, int);
#ifndef tolower /* tolower has been undefined - use function */
int _FAR_ _cdecl tolower(int);
#endif /* tolower */
#ifndef toupper /* toupper has been undefined - use function */
int _FAR_ _cdecl toupper(int);
#endif /* toupper */

View File

@ -0,0 +1,121 @@
/***
*string.h - declarations for string manipulation functions
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains the function declarations for the string
* manipulation functions.
* [ANSI/System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
/* function prototypes */
void _FAR_ * _FAR_ _cdecl memccpy(void _FAR_ *, const void _FAR_ *,
int, unsigned int);
void _FAR_ * _FAR_ _cdecl memchr(const void _FAR_ *, int, size_t);
int _FAR_ _cdecl memcmp(const void _FAR_ *, const void _FAR_ *,
size_t);
int _FAR_ _cdecl memicmp(const void _FAR_ *, const void _FAR_ *,
unsigned int);
void _FAR_ * _FAR_ _cdecl memcpy(void _FAR_ *, const void _FAR_ *,
size_t);
void _FAR_ * _FAR_ _cdecl memmove(void _FAR_ *, const void _FAR_ *,
size_t);
void _FAR_ * _FAR_ _cdecl memset(void _FAR_ *, int, size_t);
void _FAR_ _cdecl movedata(unsigned int, unsigned int, unsigned int,
unsigned int, unsigned int);
char _FAR_ * _FAR_ _cdecl strcat(char _FAR_ *, const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl strchr(const char _FAR_ *, int);
int _FAR_ _cdecl strcmp(const char _FAR_ *, const char _FAR_ *);
int _FAR_ _cdecl strcmpi(const char _FAR_ *, const char _FAR_ *);
int _FAR_ _cdecl strcoll(const char _FAR_ *, const char _FAR_ *);
int _FAR_ _cdecl stricmp(const char _FAR_ *, const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl strcpy(char _FAR_ *, const char _FAR_ *);
size_t _FAR_ _cdecl strcspn(const char _FAR_ *, const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl strdup(const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl _strerror(const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl strerror(int);
size_t _FAR_ _cdecl strlen(const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl strlwr(char _FAR_ *);
char _FAR_ * _FAR_ _cdecl strncat(char _FAR_ *, const char _FAR_ *,
size_t);
int _FAR_ _cdecl strncmp(const char _FAR_ *, const char _FAR_ *,
size_t);
int _FAR_ _cdecl strnicmp(const char _FAR_ *, const char _FAR_ *,
size_t);
char _FAR_ * _FAR_ _cdecl strncpy(char _FAR_ *, const char _FAR_ *,
size_t);
char _FAR_ * _FAR_ _cdecl strnset(char _FAR_ *, int, size_t);
char _FAR_ * _FAR_ _cdecl strpbrk(const char _FAR_ *,
const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl strrchr(const char _FAR_ *, int);
char _FAR_ * _FAR_ _cdecl strrev(char _FAR_ *);
char _FAR_ * _FAR_ _cdecl strset(char _FAR_ *, int);
size_t _FAR_ _cdecl strspn(const char _FAR_ *, const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl strstr(const char _FAR_ *,
const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl strtok(char _FAR_ *, const char _FAR_ *);
char _FAR_ * _FAR_ _cdecl strupr(char _FAR_ *);
size_t _FAR_ _cdecl strxfrm (char _FAR_ *, const char _FAR_ *,
size_t);
/* model independent function prototypes */
void _far * _far _cdecl _fmemccpy(void _far *, const void _far *,
int, unsigned int);
void _far * _far _cdecl _fmemchr(const void _far *, int, size_t);
int _far _cdecl _fmemcmp(const void _far *, const void _far *,
size_t);
void _far * _far _cdecl _fmemcpy(void _far *, const void _far *,
size_t);
int _far _cdecl _fmemicmp(const void _far *, const void _far *,
unsigned int);
void _far * _far _cdecl _fmemmove(void _far *, const void _far *,
size_t);
void _far * _far _cdecl _fmemset(void _far *, int, size_t);
char _far * _far _cdecl _fstrcat(char _far *, const char _far *);
char _far * _far _cdecl _fstrchr(const char _far *, int);
int _far _cdecl _fstrcmp(const char _far *, const char _far *);
int _far _cdecl _fstricmp(const char _far *, const char _far *);
char _far * _far _cdecl _fstrcpy(char _far *, const char _far *);
size_t _far _cdecl _fstrcspn(const char _far *, const char _far *);
char _far * _far _cdecl _fstrdup(const char _far *);
char _near * _far _cdecl _nstrdup(const char _far *);
size_t _far _cdecl _fstrlen(const char _far *);
char _far * _far _cdecl _fstrlwr(char _far *);
char _far * _far _cdecl _fstrncat(char _far *, const char _far *,
size_t);
int _far _cdecl _fstrncmp(const char _far *, const char _far *,
size_t);
int _far _cdecl _fstrnicmp(const char _far *, const char _far *,
size_t);
char _far * _far _cdecl _fstrncpy(char _far *, const char _far *,
size_t);
char _far * _far _cdecl _fstrnset(char _far *, int, size_t);
char _far * _far _cdecl _fstrpbrk(const char _far *,
const char _far *);
char _far * _far _cdecl _fstrrchr(const char _far *, int);
char _far * _far _cdecl _fstrrev(char _far *);
char _far * _far _cdecl _fstrset(char _far *, int);
size_t _far _cdecl _fstrspn(const char _far *, const char _far *);
char _far * _far _cdecl _fstrstr(const char _far *,
const char _far *);
char _far * _far _cdecl _fstrtok(char _far *, const char _far *);
char _far * _far _cdecl _fstrupr(char _far *);

View File

@ -0,0 +1,16 @@
/***
*sys\locking.h - flags for locking() function
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the flags for the locking() function.
* [System V]
*
****/
#define LK_UNLCK 0 /* unlock the file region */
#define LK_LOCK 1 /* lock the file region */
#define LK_NBLCK 2 /* non-blocking lock */
#define LK_RLCK 3 /* lock for writing */
#define LK_NBRLCK 4 /* non-blocking lock for writing */

View File

@ -0,0 +1,59 @@
/***
*sys\stat.h - defines structure used by stat() and fstat()
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the structure used by the stat() and fstat()
* routines.
* [System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#ifndef _TIME_T_DEFINED
typedef long time_t;
#define _TIME_T_DEFINED
#endif
/* define structure for returning status information */
#ifndef _STAT_DEFINED
struct stat {
dev_t st_dev;
ino_t st_ino;
unsigned short st_mode;
short st_nlink;
short st_uid;
short st_gid;
dev_t st_rdev;
off_t st_size;
time_t st_atime;
time_t st_mtime;
time_t st_ctime;
};
#define _STAT_DEFINED
#endif
#define S_IFMT 0170000 /* file type mask */
#define S_IFDIR 0040000 /* directory */
#define S_IFCHR 0020000 /* character special */
#define S_IFREG 0100000 /* regular */
#define S_IREAD 0000400 /* read permission, owner */
#define S_IWRITE 0000200 /* write permission, owner */
#define S_IEXEC 0000100 /* execute/search permission, owner */
/* function prototypes */
int _FAR_ _cdecl fstat(int, struct stat _FAR_ *);
int _FAR_ _cdecl stat(char _FAR_ *, struct stat _FAR_ *);

View File

@ -0,0 +1,42 @@
/***
*sys\timeb.h - definition/declarations for ftime()
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file define the ftime() function and the types it uses.
* [System V]
*
*******************************************************************************/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#ifndef _TIME_T_DEFINED
typedef long time_t;
#define _TIME_T_DEFINED
#endif
/* structure returned by ftime system call */
#ifndef _TIMEB_DEFINED
struct timeb {
time_t time;
unsigned short millitm;
short timezone;
short dstflag;
};
#define _TIMEB_DEFINED
#endif
/* function prototypes */
void _FAR_ _cdecl ftime(struct timeb _FAR_ *);

View File

@ -0,0 +1,31 @@
/***
*sys\types.h - types returned by system level calls for file and time info
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines types used in defining values returned by system
* level calls for file status and time information.
* [System V]
*
****/
#ifndef _INO_T_DEFINED
typedef unsigned short ino_t; /* i-node number (not used on DOS) */
#define _INO_T_DEFINED
#endif
#ifndef _TIME_T_DEFINED
typedef long time_t;
#define _TIME_T_DEFINED
#endif
#ifndef _DEV_T_DEFINED
typedef short dev_t; /* device code */
#define _DEV_T_DEFINED
#endif
#ifndef _OFF_T_DEFINED
typedef long off_t; /* file offset value */
#define _OFF_T_DEFINED
#endif

View File

@ -0,0 +1,43 @@
/***
*sys\utime.h - definitions/declarations for utime()
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the structure used by the utime routine to set
* new file access and modification times. NOTE - MS-DOS
* does not recognize access time, so this field will
* always be ignored and the modification time field will be
* used to set the new time.
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
#ifndef _TIME_T_DEFINED
typedef long time_t;
#define _TIME_T_DEFINED
#endif
/* define struct used by utime() function */
#ifndef _UTIMBUF_DEFINED
struct utimbuf {
time_t actime; /* access time */
time_t modtime; /* modification time */
};
#define _UTIMBUF_DEFINED
#endif
/* function prototypes */
int _FAR_ _cdecl utime(char _FAR_ *, struct utimbuf _FAR_ *);

View File

@ -0,0 +1,114 @@
/***
*time.h - definitions/declarations for time routines
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains the various declarations and definitions
* for the time routines.
* [ANSI/System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* implementation defined time types */
#ifndef _TIME_T_DEFINED
typedef long time_t;
#define _TIME_T_DEFINED
#endif
#ifndef _CLOCK_T_DEFINED
typedef long clock_t;
#define _CLOCK_T_DEFINED
#endif
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
/* structure for use with localtime(), gmtime(), etc. */
#ifndef _TM_DEFINED
struct tm {
int tm_sec; /* seconds after the minute - [0,59] */
int tm_min; /* minutes after the hour - [0,59] */
int tm_hour; /* hours since midnight - [0,23] */
int tm_mday; /* day of the month - [1,31] */
int tm_mon; /* months since January - [0,11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday - [0,6] */
int tm_yday; /* days since January 1 - [0,365] */
int tm_isdst; /* daylight savings time flag */
};
#define _TM_DEFINED
#endif
/* define NULL pointer value */
#ifndef NULL
#if (_MSC_VER >= 600)
#define NULL ((void *)0)
#elif (defined(M_I86SM) || defined(M_I86MM))
#define NULL 0
#else
#define NULL 0L
#endif
#endif
/* clock ticks macro - ANSI version */
#define CLOCKS_PER_SEC 1000
/* clock ticks macro - archaic version */
#define CLK_TCK 1000
/* extern declarations for the global variables used by the ctime family of
* routines.
*/
#ifdef _DLL
extern int _FAR_ _cdecl daylight; /* non-zero if daylight savings time is used */
extern long _FAR_ _cdecl timezone; /* difference in seconds between GMT and local time */
extern char _FAR_ * _FAR_ _cdecl tzname[2]; /* standard/daylight savings time zone names */
#else
extern int _near _cdecl daylight; /* non-zero if daylight savings time is used */
extern long _near _cdecl timezone; /* difference in seconds between GMT and local time */
extern char * _near _cdecl tzname[2]; /* standard/daylight savings time zone names */
#endif
/* function prototypes */
#ifdef _MT
double _FAR_ _pascal difftime(time_t, time_t);
#else
double _FAR_ _cdecl difftime(time_t, time_t);
#endif
char _FAR_ * _FAR_ _cdecl asctime(const struct tm _FAR_ *);
char _FAR_ * _FAR_ _cdecl ctime(const time_t _FAR_ *);
clock_t _FAR_ _cdecl clock(void);
struct tm _FAR_ * _FAR_ _cdecl gmtime(const time_t _FAR_ *);
struct tm _FAR_ * _FAR_ _cdecl localtime(const time_t _FAR_ *);
time_t _FAR_ _cdecl mktime(struct tm _FAR_ *);
size_t _FAR_ _cdecl strftime(char _FAR_ *, size_t, const char _FAR_ *,
const struct tm _FAR_ *);
char _FAR_ * _FAR_ _cdecl _strdate(char _FAR_ *);
char _FAR_ * _FAR_ _cdecl _strtime(char _FAR_ *);
time_t _FAR_ _cdecl time(time_t _FAR_ *);
void _FAR_ _cdecl tzset(void);

View File

@ -0,0 +1,43 @@
/***
*varargs.h - XENIX style macros for variable argument functions
*
* Copyright (c) 1985-1990, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines XENIX style macros for accessing arguments of a
* function which takes a variable number of arguments.
* [System V]
*
****/
#if defined(_DLL) && !defined(_MT)
#error Cannot define _DLL without _MT
#endif
#ifdef _MT
#define _FAR_ _far
#else
#define _FAR_
#endif
/* define NULL pointer value */
#ifndef NULL
#if (_MSC_VER >= 600)
#define NULL ((void *)0)
#elif (defined(M_I86SM) || defined(M_I86MM))
#define NULL 0
#else
#define NULL 0L
#endif
#endif
#ifndef _VA_LIST_DEFINED
typedef char _FAR_ *va_list;
#define _VA_LIST_DEFINED
#endif
#define va_dcl va_list va_alist;
#define va_start(ap) ap = (va_list)&va_alist
#define va_arg(ap,t) ((t _FAR_ *)(ap += sizeof(t)))[-1]
#define va_end(ap) ap = NULL

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More