Microsoft C v5

This commit is contained in:
davidly 2024-07-02 06:09:28 -07:00
parent f23632d0be
commit fc495a9ffd
182 changed files with 18623 additions and 0 deletions

334
Microsoft C v5/C1.ERR Normal file
View File

@ -0,0 +1,334 @@
/* SCCSWHAT( "@(#)c1.err 2.29 88/02/25 18:18:00 " ) */
/* fatals */
1001 "Internal Compiler Error\n\t\t(compiler file '%s', line %d)\n\t\tContact Microsoft Technical Support"
1002 "out of heap space"
1003 "error count exceeds %d; stopping compilation"
1004 "unexpected EOF"
1005 "string too big for buffer"
1006 "write error on compiler intermediate file"
1007 "unrecognized flag '%s' in '%s'"
1008 "no input file specified"
1009 "compiler limit : macros too deeply nested"
1010 "compiler limit : macro expansion too big"
1012 "bad parenthesis nesting - missing '%c'"
1013 "cannot open source file '%s'"
1014 "too many include files"
1015 "cannot open include file '%s'"
1016 "#if[n]def expected an identifier"
1017 "invalid integer constant expression"
1018 "unexpected '#elif'"
1019 "unexpected '#else'"
1020 "unexpected '#endif'"
1021 "bad preprocessor command '%s'"
1022 "expected '#endif'"
1023 "no int size specified"
1024 "no ptr size specified"
1025 "no function size specified"
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 too deeply nested" /* 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"
1047 "too many %s flags, '%s'"
1048 "unknown option '%c' in '%s'"
1049 "invalid numerical argument '%s'"
1052 "too many #if/#ifdef's"
1053 "compiler limit : struct/union nesting"
1054 "compiler limit : initializers too deeply nested"
1055 "compiler limit : out of keys"
1056 "compiler limit : out of macro expansion space"
1057 "unexpected EOF in macro expansion (missing ')'?)"
1059 "out of near heap space"
1060 "out of far heap space"
1061 "compiler limit : blocks too deeply nested" /* QC */
1062 "error writing to preprocessor output file"
1063 "compiler limit : compiler stack overflow" /* QC */
1064 "compiler limit : identifier overflowed internal buffer"
1065 "compiler limit : declarator too complex"
1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Technical Support"
/* errors */
2001 "newline in constant"
2002 "out of macro actual parameter space"
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 '%s'"
2010 "'%c' : unexpected in formal list"
2011 "'%s' : definition too big"
2012 "missing name following '<'"
2013 "missing '>'"
2014 "preprocessor command must start as first non-whitespace"
2015 "too many chars in constant"
2016 "no closing single quote"
2017 "illegal escape sequence"
2018 "unknown character '0x%x'"
2019 "expected preprocessor command, found '%c'"
2020 "bad octal number '%c'"
2021 "expected exponent value, not '%c'"
2022 "'%ld' : too big for char"
2023 "divide by 0"
2024 "mod by 0"
2025 "'%s' : enum/struct/union type redefinition"
2026 "'%s' : member of enum redefinition"
2028 "struct/union member needs to be inside a struct/union"
2029 "'%Fs' : bit-fields only allowed in structs"
2030 "'%Fs' : struct/union member redefinition"
2031 "'%Fs' : function cannot be struct/union member"
2032 "'%Fs' : base type with near/far/huge not allowed"
2033 "'%Fs' : bit-field cannot have indirection"
2034 "'%Fs' : bit-field type too small for number of bits"
2035 "enum/struct/union '%Fs' : unknown size"
2036 "left of '%s%s' must have a struct/union type"
2037 "left of '%s' specifies undefined struct/union '%Fs'"
2038 "'%s' : not struct/union member"
2039 "'->' requires struct/union pointer"
2040 "'.' requires struct/union name"
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"
2050 "non-integral switch expression"
2051 "case expression not constant"
2052 "case expression not integral"
2053 "case value %d already used"
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 : EOF"
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 returning . . . is illegal"
2067 "cast to array type is illegal"
2068 "illegal cast"
2069 "cast of 'void' term to non-void"
2070 "illegal sizeof operand"
2071 "'%Fs' : bad storage class"
2072 "'%Fs' : initialization of a function"
2073 "'%Fs' : cannot initialize array in function"
2074 "'%Fs' : cannot initialize struct/union in function"
2075 "'%Fs' : array initialization needs curly braces"
2076 "'%Fs' : struct/union initialization needs curly braces"
2077 "non-integral field initializer '%Fs'"
2078 "too many initializers"
2079 "'%Fs' uses undefined struct/union '%Fs'"
2082 "redefinition of formal parameter '%Fs'"
2083 "array '%Fs' already has a size"
2084 "function '%Fs' already has a body"
2085 "'%Fs' : not in formal parameter list"
2086 "'%Fs' : redefinition"
2087 "'%Fs' : missing subscript"
2088 "use of undefined enum/struct/union '%s'"
2089 "typedef specifies a near/far function"
2090 "function returns array"
2091 "function returns function"
2092 "array element type cannot be function"
2093 "cannot initialize a static or struct with address of automatic vars"
2094 "label '%Fs' was undefined"
2095 "'%Fs' : actual has type void : parameter %d"
2096 "struct/union comparison illegal"
2097 "illegal initialization"
2098 "non-address expression"
2099 "non-constant offset"
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 "non-integral index"
2109 "subscript on non-array"
2110 "'+' : 2 pointers"
2111 "pointer + non-integral value"
2112 "illegal pointer subtraction"
2113 "'-' : right operand pointer"
2114 "'%s' : pointer on left; needs integral right"
2115 "'%s' : incompatible types"
2116 "'%s' : bad %s operand"
2117 "'%s' : illegal for struct/union"
2118 "negative subscript"
2119 "'typedefs' both define indirection"
2120 "'void' illegal with all types"
2121 "typedef specifies different enum"
2122 "typedef specifies different struct"
2123 "typedef specifies different union"
2125 "%Fs : allocation exceeds 64K" /* QC, c23 */
2126 "%Fs : auto allocation exceeds %s" /* QC, c23 */
2127 "parameter allocation exceeds 32K" /* QC, c23 */
2130 "#line expected a string containing the file name, found '%s'"
2131 "attributes specify more than one near/far/huge"
2132 "syntax error : unexpected identifier"
2133 "array '%Fs' : unknown size"
2134 "'%Fs' : struct/union too large"
2135 "missing ')' in macro expansion"
2137 "empty character constant"
2138 "unmatched close comment '*/'"
2139 "type following '%s' is illegal"
2140 "argument type cannot be function returning . . ."
2141 "value out of range for enum constant"
2142 "ellipsis requires three periods"
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 cdecl/fortran/pascal attribute specified"
2152 "'%s' : pointers to functions with different attributes"
2153 "hex constants must have at least 1 hex digit"
2154 "'%s' : does not refer to a segment"
2155 "'%s' : already in a segment"
2156 "pragma must be at outer level"
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"
2164 "'%s' : intrinsic was not declared"
2165 "'%s' : cannot modify pointers to data"
2166 "lval specifies 'const' object"
2167 "'%Fs' : too many actual parameters for intrinsic"
2168 "'%Fs' : too few actual parameters for intrinsic"
2169 "'%Fs' : is an intrinsic, it cannot be defined"
2170 "'%s' : intrinsic not declared as a function"
2171 "'%s' : bad 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 far data not supported" /* 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'" /* QC */
2182 "'%Fs' : 'void' on variable"
2183 "'%Fs' : 'interrupt' function must be 'far'"
2184 "'%Fs' : '%s' function cannot be 'pascal/fortran'"
2186 "'%Fs' : 'saveregs/interrupt' modifiers mutually exclusive"
2187 "cast of near function pointer to far function pointer"
2188 "#error : %s"
2190 "'%s' : is a text segment"
2191 "'%s' : is a data segment"
2192 "'%s' : function has already been defined"
2000 "UNKNOWN ERROR\n\t\tContact Microsoft Technical Support"
/* warnings */
4001 "macro '%s' requires parameters"
4002 "too many actual parameters for macro '%s'"
4003 "not enough actual parameters for macro '%s'"
4004 "missing close parenthesis after 'defined'"
4005 "'%s' : redefinition"
4006 "#undef expected an identifier"
4009 "string too big, trailing chars truncated"
4011 "identifier truncated to '%s'"
4012 "float constant in a cross compilation"
4013 "constant too big"
4014 "'%Fs' : bit-field type must be unsigned"
4015 "'%Fs' : bit-field type must be integral"
4016 "'%s' : no function return type, using 'int' as default"
4017 "cast of int expression to far pointer"
4020 "'%Fs' : too many actual parameters"
4021 "'%Fs' : too few actual parameters"
4022 "'%Fs' : pointer mismatch : parameter %d"
4024 "'%Fs' : different types : parameter %d"
4025 "function declaration specified variable argument list"
4026 "function was declared with formal argument list"
4027 "function was declared without formal argument list"
4028 "parameter %d declaration different"
4029 "declared parameter list different from definition"
4030 "first parameter list is longer than the second"
4031 "second parameter list is 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"
4036 "unexpected formal parameter list"
4037 "'%Fs' : formal parameters ignored"
4038 "'%Fs' : formal parameter has bad storage class"
4039 "'%Fs' : function used as an argument"
4040 "near/far/huge on '%Fs' ignored"
4041 "formal parameter '%s' is redefined"
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"
4047 "'%s' : different levels of indirection"
4048 "array's declared subscripts different"
4049 "'%s' : indirection to different types"
4051 "data conversion"
4052 "different enum types"
4053 "at least one void operand"
4060 "conversion of long address to short address" /* QC, c23 */
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"
4071 "'%Fs' : no function prototype given"
4074 "non standard extension used - '%s'"
4075 "size of switch expression or case constant too large - converted to int"
4076 "'%s' : may be used on integral types only"
4077 "unknown check_stack option"
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 keyword, 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' attributes"
4091 "no symbols were declared"
4092 "untagged enum/struct/union declared no symbols"
4093 "unescaped newline in character constant in non-active code"
4094 "unexpected newline"
4095 "expected ')', found '%s'"
4096 "huge treated as far" /* QC */
4098 "void function returning a value"
4099 "expected ')', (too many arguments?)"
4100 "'%Fs' : unreferenced formal parameter"
4101 "'%Fs' : unreferenced local variable"
4102 "'%Fs' : unreferenced label"
4103 "'%Fs' : function definition used as prototype"
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"
4000 "UNKNOWN WARNING\n\t\tContact Microsoft Technical Support"

BIN
Microsoft C v5/C1.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/C1L.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/C2.EXE Normal file

Binary file not shown.

73
Microsoft C v5/C23.ERR Normal file
View File

@ -0,0 +1,73 @@
/* fatals */
1001 "Internal Compiler Error\n\t\t(compiler file '%s', line %d)\n\t\tContact Microsoft Technical Support"
1002 "out of heap space"
1003 "error count exceeds %d; stopping compilation"
1004 "unexpected EOF"
1005 "string too big for buffer"
1006 "write error on compiler intermediate file"
1007 "unrecognized flag '%s' in '%s'"
1027 "DGROUP data allocation exceeds 64K"
1028 "infinite recursion in cnstrpush"
1029 "there are > 512 bytes of arguments"
1030 "there are > 512 bytes of local variables"
1031 "limit exceeded for nesting function calls"
1032 "cannot open object listing file '%s'"
1033 "cannot open assembly language output file '%s'"
1034 "cannot open source file '%s'"
1035 "expression too complex, please simplify"
1036 "cannot open source listing file '%s'"
1037 "cannot open object file '%s'"
1038 "unexpected end of file in Pass 3"
1039 "unrecoverable heap overflow in Pass 3"
1040 "unexpected EOF in source file '%s'"
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"
1046 "bad %s flag, would overwrite '%s' with '%s'"
1047 "too many %s flags, '%s'"
1048 "unknown option '%c' in '%s'"
1049 "invalid numerical argument '%s'"
1050 "%s : code segment too large"
1051 "program too complex"
1058 "floating point expression too complex - would overflow NDP stack"
1064 "too many text segments"
1000 "UNKNOWN FATAL ERROR\n\t\tContact Microsoft Technical Support"
/* errors */
2023 "divide by 0"
2024 "mod by 0"
2125 "%s : allocation exceeds 64K"
2126 "%s : automatic allocation exceeds %s"
2127 "parameter allocation exceeds 32K"
2128 "%s : huge array cannot be aligned to segment boundary"
2129 "static function '%s' not found"
2189 "constant item, -Gm, and data_seg pragma are incompatible"
2000 "UNKNOWN ERROR\n\t\tContact Microsoft Technical Support"
/* warnings */
4054 "insufficient memory may affect optimization"
4055 "constant moved out of CONST even though -Gm specified"
4056 "overflow in constant arithmetic"
4057 "overflow in constant multiplication"
4058 "address of frame variable taken, DS != SS"
4059 "segment lost in conversion"
4060 "conversion of long address to short address"
4061 "long/short mismatch in argument : conversion supplied"
4062 "near/far mismatch in argument : conversion supplied"
4063 "%s : function too large for post-optimizer"
4064 "procedure too large, skipping %s optimization and continuing"
4065 "recoverable heap overflow in post-optimizer - some optimizations may be missed"
4066 "local symbol table overflow - some local symbols may be missing in listings"
4069 "conversion of near pointer to long integer"
4070 "function called as procedure"
4072 "Insufficient memory to process debugging information"
4073 "scoping too deep, deepest scoping merged when debugging"
4078 "loss of debugging information caused by optimization"
4185 "near call to %s in different segment"
4186 "string too long. Truncated to %d characters"
4000 "UNKNOWN WARNING\n\t\tContact Microsoft Technical Support"

BIN
Microsoft C v5/C3.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/CALLTREE.EXE Normal file

Binary file not shown.

52
Microsoft C v5/CL.ERR Normal file
View File

@ -0,0 +1,52 @@
/* fatal messages */
1001 "could not execute '%s'"
1002 "too many open files, cannot redirect '%s'"
1000 "UNKNOWN COMMAND LINE FATAL ERROR\n\t\tContact Microsoft Technical Support"
/* error messages */
2001 "too many symbols predefined with -D"
2002 "a previously defined model specification has been overridden"
2003 "missing source file name"
2007 "bad %s flag, would overwrite '%s' with '%s'"
2008 "too many %s flags, '%s'"
2009 "unknown option '%c' in '%s'"
2010 "unknown floating point option"
2011 "only one floating point model allowed"
2012 "too many linker flags on command line"
2013 "incomplete model specification"
/* 2014 "-ND not allowed with -Ad" */
2015 "assembly files are not handled"
2016 "-Gw and -ND %s are incompatible"
2017 "-Gw and -Au flags are incompatible"
2018 "cannot open linker cmd file"
2019 "cannot overwrite the source file, '%s'"
2020 "-Gc option requires extended keywords to be enabled (-Ze)"
2021 "invalid numerical argument '%s'"
2022 "cannot open help file, '%s'"
2023 "invalid model specification - small model only"
2024 "-Gm and -ND %s are incompatible"
2025 "missing argument"
2000 "UNKNOWN COMMAND LINE ERROR\n\t\tContact Microsoft Technical Support"
/* warning messages */
4001 "listing has precedence over assembly output"
4002 "ignoring unknown flag '%s'"
4003 "80186/286 selected over 8086 for code generation"
4004 "optimizing for time over space"
4005 "could not execute '%s';\nPlease enter new file name (full path) or Ctrl-C to quit: "
4006 "only one of -P/-E/-EP allowed, -P selected"
4007 "-C ignored (must also specify -P or -E or -EP)"
4008 "non-standard model -- defaulting to large model libraries"
4009 "threshold only for far/huge data, ignored"
4010 "-Gp not implemented, ignored"
4011 "preprocessing overrides source listing"
4012 "function declarations override source listing"
4013 "combined listing has precedence over object listing"
4014 "invalid value %d for '%s'. Default %d is used"
4015 "different default models - defaulting to %s model"
4017 "conflicting stack checking options - stack checking disabled"
4019 "string too long. Truncated to %d characters"
4000 "UNKNOWN COMMAND LINE WARNING\n\t\tContact Microsoft Technical Support"

BIN
Microsoft C v5/CL.EXE Normal file

Binary file not shown.

79
Microsoft C v5/CL.HLP Normal file
View File

@ -0,0 +1,79 @@
C COMPILER OPTIONS
-MEMORY MODEL-
/AS small model (default)
/AC compact model
/AM medium model
/AL large model
/AH huge model
-OPTIMIZATION-
/O enable optimization (same as /Ot)
/Oa ignore aliasing
/Od disable optimizations
/Oi enable intrinsic functions
/Ol enable loop optimizations
/On disable "unsafe" optimizations
/Op enable precision optimizations
/Or disable in_line return
/Os optimize for space
/Ot optimize for speed (default)
/Ox max. optimization (/Oailt /Gs)
-CODE GENERATION-
/G0 8086 instructions (default)
/G1 186 instructions
/G2 286 instructions
/Gm put strings in constant segment
/Gc Pascal style function calls
/Gs no stack checking
/Gt[number] data size threshold
-OUTPUT FILES-
/Fa[assembly listing file]
/Fb[bound executable file]
/Fc[mixed source/object listing file]
/Fe<executable file>
/Fl[object listing file]
/Fm[map file]
/Fo<object file>
/Fs[source listing 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)
/Zg generate declarations
/Zi symbolic debugging information
/Zl remove default library info
/Zp[n] pack structs on n-byte boundary
/Zs syntax check only
-FLOATING POINT-
/FPa calls with altmath
/FPc calls with emulator
/FPc87 calls with 8087 library
/FPi inline with emulator (default)
/FPi87 inline with 8087
-SOURCE LISTING-
/Sl<columns> set line width
/Sp<lines> set page length
/St<string> set title string
/Ss<string> set subtitle string
-MISCELLANEOUS-
/c compile only, no link
/H<number> external name length
/J default char type is unsigned
/Tc<file> compile file without .c
/V<string> set version string
/W<number> warning level
-LINKING-
/F<hex_number> stack size (hex. bytes)
/Lc link compatibility mode executable
/Lr link compatibility mode executable
/Lp link protect mode executable
/link [linker_options_and_libraries]

BIN
Microsoft C v5/CV.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/CV.HLP Normal file

Binary file not shown.

BIN
Microsoft C v5/CVPACK.EXE Normal file

Binary file not shown.

35
Microsoft C v5/E.C Normal file
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;
}

BIN
Microsoft C v5/ECH.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/ERROUT.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/EXEC.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/EXEHDR.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/EXEMOD.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/EXEPACK.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/EXP.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/FIXSHIFT.COM Normal file

Binary file not shown.

BIN
Microsoft C v5/ILINK.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/LIB.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/LINK.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/MAKE.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/MEGREP.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/MOUSE.COM Normal file

Binary file not shown.

BIN
Microsoft C v5/MSHERC.COM Normal file

Binary file not shown.

View File

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

View File

@ -0,0 +1,5 @@
PATH=C:\MSC5;%PATH%
set LIB=C:\MSC5\LIB;%LIB%
set INCLUDE=C:\MSC5\INC;%INCLUDE%
set TMP=%TMP%
set INIT=C:\MSC5\SRC\ME\INI;%INIT%

BIN
Microsoft C v5/QC.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/QC.HLP Normal file

Binary file not shown.

BIN
Microsoft C v5/QC.INI Normal file

Binary file not shown.

BIN
Microsoft C v5/QCL.EXE Normal file

Binary file not shown.

55
Microsoft C v5/QCL.HLP Normal file
View File

@ -0,0 +1,55 @@
QUICK C COMPILER OPTIONS
-MEMORY MODEL-
/AS small model (default)
/AC compact model
/AM medium model
/AL large model
-OPTIMIZATION-
/O enable optimization (same as /Ot)
/Od disable optimizations
/Ol enable loop optimizations
/Ox enable optimization (same as /Otl)
/Ot enable optimization
-CODE GENERATION-
/G0 8086 instructions (default)
/G2 286 instructions
/Gc Pascal style function calls
/Gs no stack checking
/Gt[number] data size threshold
-OUTPUT FILES-
/Fb[bound executable file]
/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 pack structures
/Zq enable debug interrupts
/Zr enable pointer checking
/Zs syntax check only
-FLOATING POINT-
/FPi inline with emulator (default)
/FPi87 inline with 8087
-MISCELLANEOUS-
/c compile only, no link
/W<number> warning level
-LINKING-
/F<hex_number> stack size (hex. bytes)
/Lc link compatibility mode executable
/Lr link compatibility mode executable
/Lp link protect mode executable
/link [linker_options_and_libraries]

278
Microsoft C v5/QLIB.DOC Normal file
View File

@ -0,0 +1,278 @@
(C) Copyright Microsoft Corporation, 1987
Microsoft (R) QuickC (TM) Compiler, Version 1.0
QLIB.DOC
This document describes the new QLIB utility, which builds Quick libraries
from existing C source files, existing object files, or standard-library
routines. This utility provides a method for building Quick libraries that is
simpler than the methods described in Sections 10.1.1 and 10.1.3 of the
Microsoft QuickC Compiler Programmer's Guide.
Installing QLIB
---------------
The files required to run QLIB are on Disk 3 of the package. If you want to be
able to run QLIB from any directory, install the QLIB files as shown below:
1. Copy the QLIB.EXE and QLIB.INI files to any directory or directories
given in the PATH environment variable.
2. Copy the QUICKLIB.OBJ file to the directory given in the LIB environment
variable.
Building Quick Libraries from Existing Files
--------------------------------------------
To build a Quick library containing existing C source or object files, simply
specify these files on the QLIB command line. Note that any object files must
have been compiled with the medium memory model (either created in the QuickC
environment or compiled with the /AM option on the QCL command line).
Example:
QLIB HELPER1.C HELPER2.OBJ
The example above compiles the HELPER1.C file and, if no errors occur,
links it with the HELPER2.OBJ file to produce a Quick library named
HELPER1.QLB.
You can give wild-card characters on the QLIB command line.
Example:
QLIB *.C
The example above compiles and links all C source files in the current
directory to produce a Quick library.
Searching for Standard-Library Routines: The /S Option
-------------------------------------------------------
QLIB can search any text file, including a C source file, for the names of
standard-library functions and build a Quick library containing these
functions. Simply give the /S option, followed by any files to be searched, on
the QLIB command line. QLIB finds any function names that do not appear in C
comment blocks and combines these functions in a Quick library. As QLIB
searches each file, it lists on the standard-output device any routines that
are not in the core library.
Example:
QLIB /S MOD1.C MOD2.C MOD3.C
If you enter the command line above, QLIB searches the C source files
MOD1.C, MOD2.C, and MOD3.C for any standard-library functions and
creates a Quick library named MOD1.QLB containing these functions.
QLIB can search files other than C source files, and it can find function names
even if the name does not appear as a function call.
Example:
If you have a file named ADDLIB.TXT with the contents
asin(); cabs [_dos_write] _arc() /* ceil(); floor(); */
and you enter the command line
QLIB /S ADDLIB.TXT
QLIB builds a Quick library containing the asin, cabs, _dos_write, and
_arc functions. It does not include the ceil and floor functions
because these functions appear in a comment block.
You can build Quick libraries containing both your own modules and standard-
library functions using the same QLIB command line.
Example:
QLIB HELPER1.C MOD?.OBJ HELPER2.C /S *.C
The command line above tells QLIB to compile HELPER1.C and HELPER2.C and
combine the resulting object files, the object files specified by
MOD?.OBJ, and any standard-library routines found in any C source file
in the current directory. The resulting Quick library is named
HELPER1.QLB.
Renaming the Quick Library: The /N Option
------------------------------------------
Ordinarily, the Quick library produced by QLIB has the same base name as the
first file on the command line, plus the extension .QLB. To rename the Quick
library, give the /N option, followed by the new file name, on the QLIB command
line. To use the default extension .QLB, simply give the base name after the
/N option.
Example:
QLIB /N MODULES MOD1.OBJ MOD2.OBJ MOD3.OBJ
The command line above combines the given object files into a Quick
library named MODULES.OBJ.
Using Additional Libraries: The /L Option
------------------------------------------
When QLIB finds the name of a standard-library function in a file, it pulls
that function into the Quick library from the standard C library MLIBCE.LIB.
To pull functions from libraries other than MLIBCE.LIB, give the /L option,
followed by the name of the other library or libraries, on the command line.
Example:
QLIB DRAWING.C /L GRAPHICS.LIB MYMATH.LIB
The example above compiles DRAWING.C and places the resulting object
file, along with any of the routines required by DRAWING.C from the
GRAPHICS.LIB and MYLIB.LIB libraries, in a Quick library named
DRAWING.QLB.
Turning Off Memory-Model Checking: The /O Option
-------------------------------------------------
Ordinarily, if any object file used for a Quick library is not a medium-model
file, QLIB cannot build the Quick library. However, in some cases (for
example, object files produced by the Microsoft Macro Assembler (MASM)), QLIB
cannot determine whether or not an object-file was created with the medium
model.
If you want to include object files without memory-model information in a Quick
library, or if you know that all of the object files you want to include were
compiled with medium model, give the /O option on the QLIB command line. This
option also speeds the library-building process. However, if you give this
option and include non-medium-model object files in a Quick library, the
results will be unpredictable.
Example:
QLIB /O /N TOTAL.QLB *.OBJ
The example above combines all object files in the current directory
into a Quick library named TOTAL.QLB. QLIB does not check the memory
model of any of the object files.
Identifying Standard-Library Functions: The QLIB.INI File
---------------------------------------------------------
When QLIB finds a function name in a file, it checks the QLIB.INI file to
determine whether or not the function is a standard-library function. The
QLIB.INI file lists all standard-library functions, as well as the names of the
libraries containing those functions.
The QLIB.INI file supplied in the package contains references only to the
standard C library, the standard C math functions, and the QuickC graphics
functions. You can add the names of routines or libraries to QLIB.INI to tell
QLIB to recognize them as "standard." You can also remove the names of
routines (for example, routines in the core library) or libraries from QLIB.INI
to reduce the number of routines that QLIB builds into a Quick library.
To add a new library to QLIB.INI, type a dollar sign ($) followed by the
library name and the names of any functions in the library. The function names
may be separated by any character that is not part of a valid C identifier
(typically, a space or a tab). QLIB can recognize up to 700 functions in
QLIB.INI. It can recognize up to 20 libraries between the command line and in
the QLIB.INI file.
Example:
$MYMATH.LIB
quadratic cubic biquadratic
If you add the example above to QLIB.INI, QLIB recognizes the quadratic,
cubic, and biquadratic functions. If it finds any of these names in the
files it searches, QLIB takes these files from the MYMATH.LIB library
and places them in the Quick library it builds.
QLIB Limits
-----------
The QLIB program has the following limits:
o QLIB spawns LINK to create the Quick library. Since this requires extra
memory, there may be times when the linker does not have enough memory to
create the Quick library. Usually, however, this is not a problem, since
the linker writes its temporary file to disk when it has insufficient memory.
o You may get linker error L1049, "too many segments," when you run QLIB.
QLIB allows a Quick library to have a maximum of either 10 times the number
of modules specified or 3072 segments, whichever is smaller. If you get
this error, create the Quick library with the LINK utility, as described in
Section 10.1.1, and give a larger value using the /SE linker option.
o QLIB does not expand macros or search include files. As a consequence, if a
module includes code from an include file, QLIB does not put this code in
the Quick library. Another consequence is that QLIB includes code "removed"
by #if directives. If an open comment appears in this code, QLIB may
generate unpredictable results.
o QLIB checks all strings that may be valid function names. This means that
QLIB may place unneeded functions in the Quick library it creates.
For example, if a program has an "#include <stat.h>" directive, QLIB
will place the stat function in the Quick library even if stat is never
called in the program.
QLIB Error Messages
-------------------
1 : Cannot open build file
QLIB could not open the default build file, QLIBBLD.OBJ. Check to see if
QLIBBLD.OBJ is read only or if the disk is full.
2 : Cannot open QLIB.INI
QLIB.INI was not found in the current directory or path.
3 : Not enough memory to process files
QLIB did not have enough memory to read in a file such as QLIB.INI. To solve
this problem, try removing memory-resident programs or removing functions from
QLIB.INI.
4 : Problem reading from initialization file
QLIB found the QLIB.INI file but could not read it.
5 : QLIB.INI contains too many key words
Too many function names are listed in QLIB.INI. Comment out some of the
function names.
6 : QLIB.INI contains too many libraries
More than 20 library names appear in QLIB.INI and on the QLIB command line.
7 : Unclosed comment in file
An unclosed comment appear in QLIB.INI or in a file that was being searched.
QLIB ignores text in C comments, but it does not recognize other preprocessor
directives. In particular QLIB has problems if sections of code with unclosed
comments are removed by #if directives, or if the comment symbol has been
redefined.
8 : Problems opening file to search
QLIB could not find a file given with the /S option in the current directory or
the specified directory.
9 : Problems reading file to search
QLIB found a file given with the /S option but could not read the file.
10 : The object file was not compiled medium model
An object file given on the command line was not compiled with the medium
memory model. This may be because
o The default memory model for QCL (small) or another memory model
other than medium model was used during compilation.
o The object file was created using MASM or a non-Microsoft compiler.
o The object file had an invalid format.
Specifying the source file on the QLIB command line may solve the problem.
To force QLIB to build the library anyway, use the /O option.
11 : Unable to locate QUICKLIB.OBJ
The QUICKLIB.OBJ file was neither in the current directory nor in the directory
specified by the LIB environment variable.
12 : Problem compiling source file
The compile phase of a source file failed because of errors in the source file
or because not enough memory was available for the compilation. Try compiling
the file with the QCL command and the /c option, then running QLIB on the
resulting object file to create the Quick library.
13 : Linking phase failed
The linker could not produce the Quick library. Unresolved functions and
missing libraries are common reasons for link failures.
14 : Unable to open link response file "QLIBBLD.LNK"
QLIB tried to create the file QLIBBLD.LNK, but could not open the file. This
error occurs if the QLIBBLD.LNK file is read-only or the disk is full.
15 : Problem writing to link response file "QLIBBLD.LNK"
QLIB opened the response file but could not write to it. This error occurs if
the disk is full.

BIN
Microsoft C v5/QLIB.EXE Normal file

Binary file not shown.

72
Microsoft C v5/QLIB.INI Normal file
View File

@ -0,0 +1,72 @@
/* The following functions are NOT in core */
/*
* Math and Standard library functions as of 9/2/87.
*/
_fheapchk _fheapset _fheapwalk
_nheapchk _nheapset _nheapwalk
_heapchk _heapset _heapwalk _lrotl _makepath
_lrotr _rotl _rotr _searchenv _splitpath
abs alloca asctime bsearch cgets
chsize clock cprintf cscanf ctime
daylight difftime div dup dup2
ecvt fcloseall fcvt fdopen fgetchar
fgetpos fputchar freopen fsetpos ftime
gcvt getpid getw gmtime inp
inpw labs ldiv lfind localtime
locking lsearch memicmp mktemp mktime
outp outpw perror putenv putw
qsort rand rename spawnlp spawnlpe
spawnvp srand stat strerror strnicmp
strtod strtol strtoul swab tempnam
umask ungetch utime
/*
* Floating point routines as of 7/2/87
*/
asin atan atan2 cabs
ceil cos cosh dieeetomsbin dmsbintoieee
exp fabs fieeetomsbin floor fmod
fmsbintoieee frexp hypot j0 j1
jn ldexp log log10 matherr
modf pow sin sinh sqrt
tan tanh y0 y1 yn
_clear87 _control87 _status87
/*
* New DOS Interface Functions as of 7/29/87
*/
_chain_intr _disable _dos_allocmem _dos_close _dos_creat
_dos_creatnew _dos_findfirst _dos_findnext _dos_freemem _dos_getdate
_dos_getdiskfree _dos_getdrive _dos_getfileattr
_dos_getftime _dos_getvect _dos_keep _dos_open
_dos_setblock _dos_setdate _dos_setdrive _dos_setfileattr
_dos_setftime _dos_settime _dos_setvect _enable
_harderr _hardresume _hardretn
/*
* New BIOS Interface Functions as of 7/29/87
*/
_bios_serialcom _bios_disk _bios_equiplist
_bios_keybrd _bios_memsize _bios_printer
_bios_timeofday
/*
* Graphics rouines as of 6/25/87
*/
$graphics
_arc _displaycursor _floodfill _getcolor _getfillmask
_getlinestyle _getphyscoord _gettextcolor _getvideoconfig _lineto
_outtext _putimage _remapallpalette _selectpalette _setbkcolor
_setcolor _setfillmask _setlogorg _settextcolor _settextwindow
_setviewport _wrapon _clearscreen _ellipse _getbkcolor
_getcurrentposition _getimage _getlogcoord _getpixel
_gettextposition _imagesize _moveto _pie
_rectangle _remappalette _setactivepage _setcliprgn
_setlinestyle _setpixel _settextposition _setvideomode _setvisualpage

BIN
Microsoft C v5/RM.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/SETENV.EXE Normal file

Binary file not shown.

BIN
Microsoft C v5/SETUP.EXE Normal file

Binary file not shown.

35
Microsoft C v5/SIEVE.C Normal file
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;
}

527
Microsoft C v5/TTT.C Normal file
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 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*/

BIN
Microsoft C v5/UNDEL.EXE Normal file

Binary file not shown.

View File

@ -0,0 +1,35 @@
/***
*assert.h - define the assert macro
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines the assert(exp) macro.
* [ANSI/System V]
*
*******************************************************************************/
#ifndef _ASSERT_DEFINED
#ifndef NDEBUG
static char _assertstring[] = "Assertion failed: %s, file %s, line %d\n";
#define assert(exp) { \
if (!(exp)) { \
fprintf(stderr, _assertstring, #exp, __FILE__, __LINE__); \
fflush(stderr); \
abort(); \
} \
}
#else
#define assert(exp)
#endif /* NDEBUG */
#define _ASSERT_DEFINED
#endif /* _ASSERT_DEFINED */

181
Microsoft C v5/inc/BIOS.H Normal file
View File

@ -0,0 +1,181 @@
/***
*bios.h - declarations for bios interface functions and supporting definitions
*
* Copyright (c) 1987-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file declares the constants, structures, and functions
* used for accessing and using various BIOS interfaces.
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
/* 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 NO_EXT_KEYS /* extensions must be enabled */
#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
#endif /* NO_EXT_KEYS */
/* 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 */
/* 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_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 *);
#ifndef NO_EXT_KEYS /* extensions must be enabled */
unsigned _CDECL _bios_disk(unsigned, struct diskinfo_t *);
#endif /* NO_EXT_KEYS */

View File

@ -0,0 +1,34 @@
/***
*conio.h - console and port I/O declarations
*
* Copyright (c) 1985-1988, 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.
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
/* function prototypes */
char * _CDECL cgets(char *);
int _CDECL cprintf(char *, ...);
int _CDECL cputs(char *);
int _CDECL cscanf(char *, ...);
int _CDECL getch(void);
int _CDECL getche(void);
int _CDECL inp(unsigned int);
unsigned _CDECL inpw(unsigned int);
int _CDECL kbhit(void);
int _CDECL outp(unsigned int, int);
unsigned _CDECL outpw(unsigned int, unsigned int);
int _CDECL putch(int);
int _CDECL ungetch(int);

View File

@ -0,0 +1,66 @@
/***
*ctype.h - character conversion macros and ctype macros
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines macros for character classification/conversion.
* [ANSI/System V]
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#define _NEAR near
#else /* extensions not enabled */
#define _CDECL
#define _NEAR
#endif /* NO_EXT_KEYS */
/*
* This declaration allows the user access to the ctype look-up
* array _ctype defined in ctype.obj by simply including ctype.h
*/
extern unsigned char _NEAR _CDECL _ctype[];
/* 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 */
/* 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 )
#define toupper(c) ( (islower(c)) ? _toupper(c) : (c) )
#define tolower(c) ( (isupper(c)) ? _tolower(c) : (c) )
#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,24 @@
/***
*direct.h - function declarations for directory handling/creation
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This include file contains the function declarations for the library
* functions related to directory handling and creation.
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
/* function prototypes */
int _CDECL chdir(char *);
char * _CDECL getcwd(char *, int);
int _CDECL mkdir(char *);
int _CDECL rmdir(char *);

220
Microsoft C v5/inc/DOS.H Normal file
View File

@ -0,0 +1,220 @@
/***
*dos.h - definitions for MS-DOS interface routines
*
* Copyright (c) 1985-1988, 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 NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#define _NEAR near
#else /* extensions not enabled */
#define _CDECL
#define _NEAR
#endif /* NO_EXT_KEYS */
#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 MS C "far" pointers into their segment and offset
* components
*/
#define FP_SEG(fp) (*((unsigned *)&(fp) + 1))
#define FP_OFF(fp) (*((unsigned *)&(fp)))
/* external variable declarations */
extern unsigned int _NEAR _CDECL _osversion;
/* function prototypes */
int _CDECL bdos(int, unsigned int, unsigned int);
void _CDECL _disable(void);
unsigned _CDECL _dos_allocmem(unsigned, unsigned *);
unsigned _CDECL _dos_close(int);
unsigned _CDECL _dos_creat(char *, unsigned, int *);
unsigned _CDECL _dos_creatnew(char *, unsigned, int *);
unsigned _CDECL _dos_findfirst(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(char *, unsigned *);
unsigned _CDECL _dos_getftime(int, unsigned *, unsigned *);
void _CDECL _dos_gettime(struct dostime_t *);
void _CDECL _dos_keep(unsigned, unsigned);
unsigned _CDECL _dos_open(char *, unsigned, int *);
unsigned _CDECL _dos_setblock(unsigned, unsigned, unsigned *);
unsigned _CDECL _dos_setdate(struct dosdate_t *);
void _CDECL _dos_setdrive(unsigned, unsigned *);
unsigned _CDECL _dos_setfileattr(char *, unsigned);
unsigned _CDECL _dos_setftime(int, unsigned, unsigned);
unsigned _CDECL _dos_settime(struct dostime_t *);
int _CDECL dosexterr(struct DOSERROR *);
void _CDECL _enable(void);
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 *);
void _CDECL segread(struct SREGS *);
#ifndef NO_EXT_KEYS /* extensions enabled */
void _CDECL _chain_intr(void (_CDECL interrupt far *)());
void (_CDECL interrupt far * _CDECL _dos_getvect(unsigned))();
unsigned _CDECL _dos_read(int, void far *, unsigned, unsigned *);
void _CDECL _dos_setvect(unsigned, void (_CDECL interrupt far *)());
unsigned _CDECL _dos_write(int, void far *, unsigned, unsigned *);
void _CDECL _harderr(void (far *)());
#endif /* NO_EXT_KEYS */

View File

@ -0,0 +1,50 @@
/***
*errno.h - system wide error numbers (set by system calls)
*
* Copyright (c) 1985-1988, 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.
* [System V]
*
*******************************************************************************/
#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-1988, 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 */

137
Microsoft C v5/inc/FLOAT.H Normal file
View File

@ -0,0 +1,137 @@
/***
*float.h - constants for floating point values
*
* Copyright (c) 1985-1988, 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]
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
#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 0 /* addition rounding: chops */
#define FLT_DIG 6 /* # of decimal digits of precision */
#define FLT_EPSILON 1.192092896e-07 /* 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+38 /* max value */
#define FLT_MAX_10_EXP 38 /* max decimal exponent */
#define FLT_MAX_EXP 128 /* max binary exponent */
#define FLT_MIN 1.175494351e-38 /* 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 0 /* addition rounding: chops */
#define LDBL_DIG DBL_DIG /* # of decimal digits of precision */
#define LDBL_EPSILON DBL_EPSILON /* smallest such that 1.0+LDBL_EPSILON != 1.0 */
#define LDBL_MANT_DIG DBL_MANT_DIG /* # of bits in mantissa */
#define LDBL_MAX DBL_MAX /* max value */
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP /* max decimal exponent */
#define LDBL_MAX_EXP DBL_MAX_EXP /* max binary exponent */
#define LDBL_MIN DBL_MIN /* min positive value */
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP /* min deimal exponent
#define LDBL_MIN_EXP DBL_MIN_EXP /* min binary exponent */
#define LDBL_RADIX DBL_RADIX /* exponent radix */
#define LDBL_ROUNDS DBL_ROUNDS /* addition rounding: chops */
/*
* 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 _CDECL _clear87(void);
unsigned int _CDECL _control87(unsigned int,unsigned int);
void _CDECL _fpreset(void);
unsigned int _CDECL _status87(void);

216
Microsoft C v5/inc/GRAPH.H Normal file
View File

@ -0,0 +1,216 @@
/***
*graph.h - declare constants and functions for graphics library
*
* Copyright (c) 1987-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file declares the graphics library functions and
* the manifest constants that are used with them.
*
*******************************************************************************/
/* user-visible declarations for Quick-C Graphics Library */
#ifndef _GRAPH_T_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 */
};
/* return value of _setlogorg(), etc. */
struct xycoord {
short xcoord;
short ycoord;
};
/* structure for text position */
struct rccoord {
short row;
short col;
};
#define _GRAPH_T_DEFINED
#endif
/* SETUP AND CONFIGURATION */
short far cdecl _setvideomode(short);
/* arguments to _setvideomode() */
#define _DEFAULTMODE -1 /* restore screen to original mode */
#define _TEXTBW40 0 /* 40 x 25 text, 16 grey */
#define _TEXTC40 1 /* 40 x 25 text, 16/8 color */
#define _TEXTBW80 2 /* 80 x 25 text, 16 grey */
#define _TEXTC80 3 /* 80 x 25 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 x 25 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 */
short far cdecl _setactivepage(short);
short far cdecl _setvisualpage(short);
/* videoconfig adapter 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 _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) */
/* videoconfig monitor 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 _MONO 0x0001 /* Monochrome */
#define _COLOR 0x0002 /* Color (or Enhanced emulating color) */
#define _ENHCOLOR 0x0004 /* Enhanced Color */
#define _ANALOG 0x0018 /* Analog */
struct videoconfig far * far cdecl _getvideoconfig(struct videoconfig far *);
/* COORDINATE SYSTEMS */
struct xycoord far cdecl _setlogorg(short, short);
struct xycoord far cdecl _getlogcoord(short, short);
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 Rectangle, Ellipse and Pie */
#define _GBORDER 2 /* draw outline only */
#define _GFILLINTERIOR 3 /* fill using current fill mask */
#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 _ellipse(short, short, short, short, short);
short far cdecl _arc(short, short, short, short, short, short, short, short);
short far cdecl _pie(short, short, short, short, short, short, short, short, short);
short far cdecl _setpixel(short, short);
short far cdecl _getpixel(short, short);
short far cdecl _floodfill(short, short, short);
/* PEN COLOR, LINE STYLE, FILL PATTERN */
short far cdecl _setcolor(short);
short far cdecl _getcolor(void);
void far cdecl _setlinestyle(unsigned short);
unsigned short far cdecl _getlinestyle(void);
void far cdecl _setfillmask(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(long far *);
short far cdecl _selectpalette(short);
/* TEXT */
#define _GCURSOROFF 0
#define _GCURSORON 1
#define _GWRAPOFF 0
#define _GWRAPON 1
void far cdecl _settextwindow(short, short, short, short);
void far cdecl _outtext(char far *);
short far cdecl _wrapon(short);
short far cdecl _displaycursor(short);
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 far *);
void far cdecl _putimage(short, short, char far *, short);
long far cdecl _imagesize(short, short, short, short);
/* "action verbs" for _putimage() */
#define _GPSET 3
#define _GPRESET 2
#define _GAND 1
#define _GOR 0
#define _GXOR 4
/* universal color values: */
#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 _LIGHTYELLOW 0x153f3fL
#define _BRIGHTWHITE 0x3f3f3fL
/* mono mode F 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 color values: */
#define _MODE7OFF 0L
#define _MODE7ON 1L
#define _MODE7HI 2L

43
Microsoft C v5/inc/IO.H Normal file
View File

@ -0,0 +1,43 @@
/***
*io.h - declarations for low-level file handling and I/O functions
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains the function declarations for the low-level
* file handling and I/O functions.
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
/* function prototypes */
int _CDECL access(char *, int);
int _CDECL chmod(char *, int);
int _CDECL chsize(int, long);
int _CDECL close(int);
int _CDECL creat(char *, int);
int _CDECL dup(int);
int _CDECL dup2(int, int);
int _CDECL eof(int);
long _CDECL filelength(int);
int _CDECL isatty(int);
int _CDECL locking(int, int, long);
long _CDECL lseek(int, long, int);
char * _CDECL mktemp(char *);
int _CDECL open(char *, int, ...);
int _CDECL read(int, char *, unsigned int);
int _CDECL remove(const char *);
int _CDECL rename(const char *, const char *);
int _CDECL setmode(int, int);
int _CDECL sopen(char *, int, int, ...);
long _CDECL tell(int);
int _CDECL umask(int);
int _CDECL unlink(const char *);
int _CDECL write(int, char *, unsigned int);

View File

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

124
Microsoft C v5/inc/MALLOC.H Normal file
View File

@ -0,0 +1,124 @@
/***
*malloc.h - declarations and definitions for memory allocation functions
*
* Copyright (c) 1985-1988, 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]
*
*******************************************************************************/
#define _HEAPEMPTY -1
#define _HEAPOK -2
#define _HEAPBADBEGIN -3
#define _HEAPBADNODE -4
#define _HEAPEND -5
#define _HEAPBADPTR -6
#define _FREEENTRY 0
#define _USEDENTRY 1
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#if (!defined(NO_EXT_KEYS))
#ifndef _HEAPINFO_DEFINED
typedef struct _heapinfo {
int far * _pentry;
size_t _size;
int _useflag;
} _HEAPINFO;
#define _HEAPINFO_DEFINED
#endif
#else /* NO_EXT_KEYS */
#if (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
#ifndef _HEAPINFO_DEFINED
typedef struct _heapinfo {
int * _pentry;
size_t _size;
int _useflag;
} _HEAPINFO;
#define _HEAPINFO_DEFINED
#endif
#endif /* M_I86CM || M_I86LM || M_I86HM */
#endif /* NO_EXT_KEYS */
#if (defined(M_I86SM) || defined(M_I86MM))
#define _heapchk _nheapchk
#define _heapset _nheapset
#define _heapwalk _nheapwalk
#endif
#if (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
#define _heapchk _fheapchk
#define _heapset _fheapset
#define _heapwalk _fheapwalk
#endif
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#define _NEAR near
#else /* extensions not enabled */
#define _CDECL
#define _NEAR
#endif /* NO_EXT_KEYS */
/* external variable declarations */
extern unsigned int _NEAR _CDECL _amblksiz;
/* function prototypes */
void * _CDECL alloca(size_t);
void * _CDECL calloc(size_t, size_t);
void * _CDECL _expand(void *, size_t);
int _CDECL _fheapchk(void);
int _CDECL _fheapset(unsigned int);
unsigned int _CDECL _freect(size_t);
void _CDECL free(void *);
void * _CDECL malloc(size_t);
size_t _CDECL _memavl(void);
size_t _CDECL _memmax(void);
size_t _CDECL _msize(void *);
int _CDECL _nheapchk(void);
int _CDECL _nheapset(unsigned int);
void * _CDECL realloc(void *, size_t);
void * _CDECL sbrk(int);
size_t _CDECL stackavail(void);
#ifndef NO_EXT_KEYS /* extensions enabled */
void cdecl _ffree(void far *);
void far * cdecl _fmalloc(size_t);
size_t cdecl _fmsize(void far *);
#ifndef _QC
void huge * cdecl halloc(long, size_t);
void cdecl hfree(void huge *);
#endif
void cdecl _nfree(void near *);
void near * cdecl _nmalloc(size_t);
size_t cdecl _nmsize(void near *);
int cdecl _nheapwalk(struct _heapinfo *);
int cdecl _fheapwalk(struct _heapinfo *);
#else
#if (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
int _nheapwalk(struct _heapinfo *);
int _fheapwalk(struct _heapinfo *);
#endif /* M_I86CM || M_I86LM || M_I86HM */
#endif /* NO_EXT_KEYS */

112
Microsoft C v5/inc/MATH.H Normal file
View File

@ -0,0 +1,112 @@
/***
*math.h - definitions and declarations for math library
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains constant definitions and external subroutine
* declarations for the math subroutine library.
* [ANSI/System V]
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
/* 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 *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
*/
extern double HUGE;
#define HUGE_VAL HUGE
/* function prototypes */
int _CDECL abs(int);
double _CDECL acos(double);
double _CDECL asin(double);
double _CDECL atan(double);
double _CDECL atan2(double, double);
double _CDECL atof(const char *);
double _CDECL cabs(struct complex);
double _CDECL ceil(double);
double _CDECL cos(double);
double _CDECL cosh(double);
int _CDECL dieeetomsbin(double *, double *);
int _CDECL dmsbintoieee(double *, double *);
double _CDECL exp(double);
double _CDECL fabs(double);
int _CDECL fieeetomsbin(float *, float *);
double _CDECL floor(double);
double _CDECL fmod(double, double);
int _CDECL fmsbintoieee(float *, float *);
double _CDECL frexp(double, int *);
double _CDECL hypot(double, double);
double _CDECL j0(double);
double _CDECL j1(double);
double _CDECL jn(int, double);
long _CDECL labs(long);
double _CDECL ldexp(double, int);
double _CDECL log(double);
double _CDECL log10(double);
int _CDECL matherr(struct exception *);
double _CDECL modf(double, double *);
double _CDECL pow(double, double);
double _CDECL sin(double);
double _CDECL sinh(double);
double _CDECL sqrt(double);
double _CDECL tan(double);
double _CDECL tanh(double);
double _CDECL y0(double);
double _CDECL y1(double);
double _CDECL yn(int, double);

View File

@ -0,0 +1,34 @@
/***
*memory.h - declarations for buffer (memory) manipulation routines
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This include file contains the function declarations for the
* buffer (memory) manipulation routines.
* [System V]
*
*******************************************************************************/
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
/* function prototypes */
void * _CDECL memccpy(void *, void *, int, unsigned int);
void * _CDECL memchr(const void *, int, size_t);
int _CDECL memcmp(const void *, const void *, size_t);
void * _CDECL memcpy(void *, const void *, size_t);
int _CDECL memicmp(void *, void *, unsigned int);
void * _CDECL memset(void *, int, size_t);
void _CDECL movedata(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);

View File

@ -0,0 +1,65 @@
/***
*process.h - definition and declarations for process control functions
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the modeflag values for spawnxx calls. Only
* P_WAIT and P_OVERLAY are currently implemented on DOS 2 & 3.
* P_NOWAIT is also enabled on DOS 4. Also contains the function
* argument declarations for all process control related routines.
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#define _NEAR near
#else /* extensions not enabled */
#define _CDECL
#define _NEAR
#endif /* NO_EXT_KEYS */
/* modeflag values for spawnxx routines */
extern int _NEAR _CDECL _p_overlay;
#define P_WAIT 0
#define P_NOWAIT 1
#define P_OVERLAY _p_overlay
#define OLD_P_OVERLAY 2
#define P_NOWAITO 3
/* Action Codes used with Cwait() */
#define WAIT_CHILD 0
#define WAIT_GRANDCHILD 1
/* function prototypes */
void _CDECL abort(void);
int _CDECL cwait(int *, int, int);
int _CDECL execl(char *, char *, ...);
int _CDECL execle(char *, char *, ...);
int _CDECL execlp(char *, char *, ...);
int _CDECL execlpe(char *, char *, ...);
int _CDECL execv(char *, char * *);
int _CDECL execve(char *, char * *, char * *);
int _CDECL execvp(char *, char * *);
int _CDECL execvpe(char *, char * *, char * *);
void _CDECL exit(int);
void _CDECL _exit(int);
int _CDECL getpid(void);
int _CDECL spawnl(int, char *, char *, ...);
int _CDECL spawnle(int, char *, char *, ...);
int _CDECL spawnlp(int, char *, char *, ...);
int _CDECL spawnlpe(int, char *, char *, ...);
int _CDECL spawnv(int, char *, char * *);
int _CDECL spawnve(int, char *, char * *, char * *);
int _CDECL spawnvp(int, char *, char * *);
int _CDECL spawnvpe(int, char *, char * *, char * *);
int _CDECL system(const char *);
int _CDECL wait(int *);

View File

@ -0,0 +1,31 @@
/***
*search.h - declarations for searcing/sorting routines
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains the declarations for the sorting and
* searching routines.
* [System V]
*
*******************************************************************************/
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
/* function prototypes */
char * _CDECL lsearch(char *, char *, unsigned int *, unsigned int, int (_CDECL *)(void *, void *));
char * _CDECL lfind(char *, char *, unsigned int *, unsigned int, int (_CDECL *)(void *, void *));
void * _CDECL bsearch(const void *, const void *, size_t, size_t, int (_CDECL *)(const void *, const void *));
void _CDECL qsort(void *, size_t, size_t, int (_CDECL *)(const void *, const void *));

View File

@ -0,0 +1,35 @@
/***
*setjmp.h - definitions/declarations for setjmp/longjmp routines
*
* Copyright (c) 1985-1988, 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]
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
/* 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 _CDECL setjmp(jmp_buf);
void _CDECL longjmp(jmp_buf, int);

View File

@ -0,0 +1,15 @@
/***
*share.h - defines file sharing modes for sopen
*
* Copyright (c) 1985-1988, 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,59 @@
/***
*signal.h - defines signal values and routines
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the signal values and declares the signal functions.
* [ANSI/System V]
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
#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 (*)())0 /* default signal action */
#define SIG_IGN (void (*)())1 /* ignore */
#define SIG_SGE (void (*)())3 /* signal gets error */
#define SIG_ACK (void (*)())4 /* error if handler not setup */
/* signal error value (returned by signal call on error) */
#define SIG_ERR (void (*)())-1 /* signal error value */
/* function prototypes */
void (_CDECL * _CDECL signal(int, void (_CDECL *)()))();
int _CDECL raise(int);

View File

@ -0,0 +1,20 @@
/***
*stdarg.h - defines ANSI-style macros for variable argument functions
*
* Copyright (c) 1985-1988, 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]
*
*******************************************************************************/
#ifndef _VA_LIST_DEFINED
typedef char *va_list;
#define _VA_LIST_DEFINED
#endif
#define va_start(ap,v) ap = (va_list)&v + sizeof(v)
#define va_arg(ap,t) ((t *)(ap += sizeof(t)))[-1]
#define va_end(ap) ap = NULL

View File

@ -0,0 +1,48 @@
/***
*stddef.h - definitions/declarations for common constants, types, variables
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains definitions and declarations for some commonly
* used constants, types, and variables.
* [ANSI]
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#define _NEAR near
#else /* extensions not enabled */
#define _CDECL
#define _NEAR
#endif /* NO_EXT_KEYS */
/* define NULL pointer value */
#if (defined(M_I86SM) || defined(M_I86MM))
#define NULL 0
#elif (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
#define NULL 0L
#endif
/* declare reference to errno */
extern int _NEAR _CDECL errno;
/* 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

165
Microsoft C v5/inc/STDIO.H Normal file
View File

@ -0,0 +1,165 @@
/***
*stdio.h - definitions/declarations for standard I/O routines
*
* Copyright (c) 1985-1988, 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]
*
*******************************************************************************/
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#ifndef _VA_LIST_DEFINED
typedef char *va_list;
#define _VA_LIST_DEFINED
#endif
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#define _NEAR near
#else /* extensions not enabled */
#define _CDECL
#define _NEAR
#endif /* NO_EXT_KEYS */
/* buffered I/O macros */
#define BUFSIZ 512
#define _NFILE 20
#define EOF (-1)
#ifndef _FILE_DEFINED
#define FILE struct _iobuf
#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
#define SEEK_CUR 1
#define SEEK_END 2
#define SEEK_SET 0
#define SYS_OPEN 20
#define TMP_MAX 32767
/* define NULL pointer value */
#if (defined(M_I86SM) || defined(M_I86MM))
#define NULL 0
#elif (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
#define NULL 0L
#endif
/* define file control block */
#ifndef _IOB_DEFINED
extern FILE {
char *_ptr;
int _cnt;
char *_base;
char _flag;
char _file;
} _NEAR _CDECL _iob[];
#define _IOB_DEFINED
#endif
#define fpos_t long /* file position variable */
#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
#define getc(f) (--(f)->_cnt >= 0 ? 0xff & *(f)->_ptr++ : _filbuf(f))
#define putc(c,f) (--(f)->_cnt >= 0 ? 0xff & (*(f)->_ptr++ = (char)(c)) \
: _flsbuf((c),(f)))
#define getchar() getc(stdin)
#define putchar(c) putc((c),stdout)
#define feof(f) ((f)->_flag & _IOEOF)
#define ferror(f) ((f)->_flag & _IOERR)
#define fileno(f) ((f)->_file)
/* function prototypes */
int _CDECL _filbuf(FILE *);
int _CDECL _flsbuf(int, FILE *);
void _CDECL clearerr(FILE *);
int _CDECL fclose(FILE *);
int _CDECL fcloseall(void);
FILE * _CDECL fdopen(int, char *);
int _CDECL fflush(FILE *);
int _CDECL fgetc(FILE *);
int _CDECL fgetchar(void);
int _CDECL fgetpos(FILE *, fpos_t *);
char * _CDECL fgets(char *, int, FILE *);
int _CDECL flushall(void);
FILE * _CDECL fopen(const char *, const char *);
int _CDECL fprintf(FILE *, const char *, ...);
int _CDECL fputc(int, FILE *);
int _CDECL fputchar(int);
int _CDECL fputs(const char *, FILE *);
size_t _CDECL fread(void *, size_t, size_t, FILE *);
FILE * _CDECL freopen(const char *, const char *, FILE *);
int _CDECL fscanf(FILE *, const char *, ...);
int _CDECL fsetpos(FILE *, const fpos_t *);
int _CDECL fseek(FILE *, long, int);
long _CDECL ftell(FILE *);
size_t _CDECL fwrite(const void *, size_t, size_t, FILE *);
char * _CDECL gets(char *);
int _CDECL getw(FILE *);
void _CDECL perror(const char *);
int _CDECL printf(const char *, ...);
int _CDECL puts(const char *);
int _CDECL putw(int, FILE *);
int _CDECL remove(const char *);
int _CDECL rename(const char *, const char *);
void _CDECL rewind(FILE *);
int _CDECL rmtmp(void);
int _CDECL scanf(const char *, ...);
void _CDECL setbuf(FILE *, char *);
int _CDECL setvbuf(FILE *, char *, int, size_t);
int _CDECL sprintf(char *, const char *, ...);
int _CDECL sscanf(const char *, const char *, ...);
char * _CDECL tempnam(char *, char *);
FILE * _CDECL tmpfile(void);
char * _CDECL tmpnam(char *);
int _CDECL ungetc(int, FILE *);
int _CDECL unlink(const char *);
int _CDECL vfprintf(FILE *, const char *, va_list);
int _CDECL vprintf(const char *, va_list);
int _CDECL vsprintf(char *, const char *, va_list);

151
Microsoft C v5/inc/STDLIB.H Normal file
View File

@ -0,0 +1,151 @@
/***
*stdlib.h - declarations/definitions for commonly used library functions
*
* Copyright (c) 1985-1988, 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 (ctype.h in the case of toupper/tolower) for other reasons.
* [ANSI]
*
*******************************************************************************/
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#define _NEAR near
#else /* extensions not enabled */
#define _CDECL
#define _NEAR
#endif /* NO_EXT_KEYS */
/* definition of the return type for the onexit() function */
#ifndef _ONEXIT_T_DEFINED
typedef int (_CDECL * _CDECL onexit_t)();
#define _ONEXIT_T_DEFINED
#endif
/* Data structure definitions for div and ldiv runtimes. */
#ifndef _DIV_T_DEFINED
typedef struct {
int quot;
int rem;
} div_t;
typedef struct {
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 144 /* max. length of full pathname */
#define _MAX_DRIVE 3 /* max. length of drive component */
#define _MAX_DIR 130 /* max. length of path component */
#define _MAX_FNAME 9 /* max. length of file name component */
#define _MAX_EXT 5 /* max. length of extension component */
/* external variable declarations */
extern int _NEAR _CDECL errno; /* XENIX style error number */
extern int _NEAR _CDECL _doserrno; /* MS-DOS system error value */
extern char * _NEAR _CDECL sys_errlist[]; /* perror error message table */
extern int _NEAR _CDECL sys_nerr; /* # of entries in sys_errlist table */
extern char ** _NEAR _CDECL environ; /* pointer to environment table */
extern unsigned int _NEAR _CDECL _psp; /* Program Segment Prefix */
extern int _NEAR _CDECL _fmode; /* default file translation mode */
/* DOS 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 */
double _CDECL atof(const char *);
double _CDECL strtod(const char *, char * *);
ldiv_t _CDECL ldiv(long, long);
void _CDECL abort(void);
int _CDECL abs(int);
int _CDECL atexit(void (_CDECL *)(void));
int _CDECL atoi(const char *);
long _CDECL atol(const char *);
void * _CDECL bsearch(const void *, const void *, size_t, size_t, int (_CDECL *)(const void *, const void *));
void * _CDECL calloc(size_t, size_t);
div_t _CDECL div(int, int);
char * _CDECL ecvt(double, int, int *, int *);
void _CDECL exit(int);
void _CDECL _exit(int);
char * _CDECL fcvt(double, int, int *, int *);
void _CDECL free(void *);
char * _CDECL gcvt(double, int, char *);
char * _CDECL getenv(const char *);
char * _CDECL itoa(int, char *, int);
long _CDECL labs(long);
unsigned long _CDECL _lrotl(unsigned long, int);
unsigned long _CDECL _lrotr(unsigned long, int);
char * _CDECL ltoa(long, char *, int);
void _CDECL _makepath(char *, char *, char *, char *, char *);
void * _CDECL malloc(size_t);
onexit_t _CDECL onexit(onexit_t);
void _CDECL perror(const char *);
int _CDECL putenv(char *);
void _CDECL qsort(void *, size_t, size_t, int (_CDECL *)(const void *, const void *));
unsigned int _CDECL _rotl(unsigned int, int);
unsigned int _CDECL _rotr(unsigned int, int);
int _CDECL rand(void);
void * _CDECL realloc(void *, size_t);
void _CDECL _searchenv(char *, char *, char *);
void _CDECL _splitpath(char *, char *, char *, char *, char *);
void _CDECL srand(unsigned int);
long _CDECL strtol(const char *, char * *, int);
unsigned long _CDECL strtoul(const char *, char * *, int);
void _CDECL swab(char *, char *, int);
int _CDECL system(const char *);
char * _CDECL ultoa(unsigned long, char *, int);
#ifndef tolower /* tolower has been undefined - use function */
int _CDECL tolower(int);
#endif /* tolower */
#ifndef toupper /* toupper has been undefined - use function */
int _CDECL toupper(int);
#endif /* toupper */

View File

@ -0,0 +1,61 @@
/***
*string.h - declarations for string manipulation functions
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file contains the function declarations for the string
* manipulation functions.
* [ANSI/System V]
*
*******************************************************************************/
#ifndef _SIZE_T_DEFINED
typedef unsigned int size_t;
#define _SIZE_T_DEFINED
#endif
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#else /* extensions not enabled */
#define _CDECL
#endif /* NO_EXT_KEYS */
/* function prototypes */
void * _CDECL memccpy(void *, void *, int, unsigned int);
void * _CDECL memchr(const void *, int, size_t);
int _CDECL memcmp(const void *, const void *, size_t);
int _CDECL memicmp(void *, void *, unsigned int);
void * _CDECL memcpy(void *, const void *, size_t);
void * _CDECL memmove(void *, const void *, size_t);
void * _CDECL memset(void *, int, size_t);
void _CDECL movedata(unsigned int, unsigned int, unsigned int, unsigned int, unsigned int);
char * _CDECL strcat(char *, const char *);
char * _CDECL strchr(const char *, int);
int _CDECL strcmp(const char *, const char *);
int _CDECL strcmpi(const char *, const char *);
int _CDECL stricmp(const char *, const char *);
char * _CDECL strcpy(char *, const char *);
size_t _CDECL strcspn(const char *, const char *);
char * _CDECL strdup(const char *);
char * _CDECL _strerror(char *);
char * _CDECL strerror(int);
size_t _CDECL strlen(const char *);
char * _CDECL strlwr(char *);
char * _CDECL strncat(char *, const char *, size_t);
int _CDECL strncmp(const char *, const char *, size_t);
int _CDECL strnicmp(const char *, const char *, size_t);
char * _CDECL strncpy(char *, const char *, size_t);
char * _CDECL strnset(char *, int, size_t);
char * _CDECL strpbrk(const char *, const char *);
char * _CDECL strrchr(const char *, int);
char * _CDECL strrev(char *);
char * _CDECL strset(char *, int);
size_t _CDECL strspn(const char *, const char *);
char * _CDECL strstr(const char *, const char *);
char * _CDECL strtok(char *, const char *);
char * _CDECL strupr(char *);

View File

@ -0,0 +1,16 @@
/***
*sys\locking.h - flags for locking() function
*
* Copyright (c) 1985-1988, 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,56 @@
/***
*sys\stat.h - defines structure used by stat() and fstat()
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file defines the structure used by the stat() and fstat()
* routines.
* [System V]
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define CDECL cdecl
#else /* extensions not enabled */
#define CDECL
#endif /* NO_EXT_KEYS */
#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 CDECL fstat(int, struct stat *);
int CDECL stat(char *, struct stat *);

View File

@ -0,0 +1,39 @@
/***
*sys\timeb.h - definition/declarations for ftime()
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file define the ftime() function and the types it uses.
* [System V]
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define CDECL cdecl
#else /* extensions not enabled */
#define CDECL
#endif /* NO_EXT_KEYS */
#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 CDECL ftime(struct timeb *);

View File

@ -0,0 +1,31 @@
/***
*sys\types.h - types returned by system level calls for file and time info
*
* Copyright (c) 1985-1988, 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,40 @@
/***
*sys\utime.h - definitions/declarations for utime()
*
* Copyright (c) 1985-1988, 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.
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define CDECL cdecl
#else /* extensions not enabled */
#define CDECL
#endif /* NO_EXT_KEYS */
#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 CDECL utime(char *, struct utimbuf *);

75
Microsoft C v5/inc/TIME.H Normal file
View File

@ -0,0 +1,75 @@
/***
*time.h - definitions/declarations for time routines
*
* Copyright (c) 1985-1988, Microsoft Corporation. All rights reserved.
*
*Purpose:
* This file has declarations of time routines and defines
* the structure returned by the localtime and gmtime routines and
* used by asctime.
* [ANSI/System V]
*
*******************************************************************************/
#ifndef NO_EXT_KEYS /* extensions enabled */
#define _CDECL cdecl
#define _NEAR near
#else /* extensions not enabled */
#define _CDECL
#define _NEAR
#endif /* NO_EXT_KEYS */
/* define the implementation defined time type */
#ifndef _TIME_T_DEFINED
typedef long time_t; /* time value */
#define _TIME_T_DEFINED /* avoid multiple def's of time_t */
#endif
#ifndef _CLOCK_T_DEFINED
typedef long clock_t;
#define _CLOCK_T_DEFINED
#endif
#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 CLK_TCK 1000
/* extern declarations for the global variables used by the ctime family of
* routines.
*/
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 */
/* function prototypes */
char * _CDECL asctime(const struct tm *);
char * _CDECL ctime(const time_t *);
clock_t _CDECL clock(void);
double _CDECL difftime(time_t, time_t);
struct tm * _CDECL gmtime(const time_t *);
struct tm * _CDECL localtime(const time_t *);
time_t _CDECL mktime(struct tm *);
char * _CDECL _strdate(char *);
char * _CDECL _strtime(char *);
time_t _CDECL time(time_t *);
void _CDECL tzset(void);

View File

@ -0,0 +1,21 @@
/***
*varargs.h - XENIX style macros for variable argument functions
*
* Copyright (c) 1985-1988, 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]
*
*******************************************************************************/
#ifndef _VA_LIST_DEFINED
typedef char *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 *)(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.

View File

@ -0,0 +1,92 @@
echo off
if not "%1" == "" goto moreprocessing
if not "%2" == "" goto moreprocessing
:usage
echo ! usage: F4COMPAT memory-model floating-point-model
echo !
echo ! where memory-model is one of M or L
echo ! and floating-point-model is one of 7, E, or A
echo !
echo ! (These two arguments are denoted x and y below.)
echo !
echo ! This batch file converts a Microsoft FORTRAN version
echo ! 4.00 or 4.01 run-time library xLIBFORy.LIB that has been
echo ! built with the C-compatibility setup option into one that is
echo ! C 5.1/QC 1.01 compatible. You don't need to run this batch file
echo ! for FORTRAN version 4.10, however.
echo !
echo ! Note that xDBGMSG.OBJ should be in the current directory.
echo ! xLIBFORy.LIB should be in the current directory.
echo ! LIB.EXE and ERROUT.EXE should be on the executable search PATH.
echo ! The old xLIBFORy.LIB will be saved in xLIBFORy.C40.
echo !
goto end
:moreprocessing
if "%1" == "L" goto okmemmodel
if "%1" == "l" goto okmemmodel
if "%1" == "M" goto okmemmodel
if "%1" == "m" goto okmemmodel
echo F4COMPAT : first argument (memory-model) should be M or L
echo !
goto usage
:okmemmodel
if "%2" == "7" goto okfltmodel
if "%2" == "E" goto okfltmodel
if "%2" == "e" goto okfltmodel
if "%2" == "A" goto okfltmodel
if "%2" == "a" goto okfltmodel
echo F4COMPAT : second argument (floating-point-model) should be 7, E, or A
echo !
goto usage
:okfltmodel
if exist %1libfor%2.lib goto 111
echo F4COMPAT: cannot find %1libfor%2.lib in the current directory
goto end
:111
echo F4COMPAT : assuming that %1libfor%2.lib was built by means of
echo the FORTRAN setup program from MS FORTRAN 4.00 or 4.01
echo and that the library was built with "C compatibility".
echo F4COMPAT : saving old copy as %1libfor%2.c40
copy %1libfor%2.lib %1libfor%2.c40
if exist %1dbgmsg.obj goto 222
echo F4COMPAT: cannot find %1dbgmsg.obj in the current directory
goto end
:222
if exist x.x del x.x
lib x.x;
if exist x.x goto 333
echo F4COMPAT : cannot find library manager (LIB.EXE) on executable search PATH
goto end
:333
del x.x
echo F4COMPAT : modifying %1libfor%2.lib for compatibility with C 5.1/QC 1.01
copy %1dbgmsg.obj dbgmsg.obj
errout errout > x.x
if exist x.x goto 444
echo F4COMPAT : cannot find ERROUT.EXE utility on executable search PATH
goto end
:444
del x.x
errout lib %1libfor%2.lib *onexit; > nul
:versioncheck
if not exist onexit.obj goto F401
del onexit.obj
:F400
lib %1libfor%2.lib -+dbgmsg-_chsize-_creat-onexit;
if errorlevel 1 goto error
goto cleanup
:F401
lib %1libfor%2.lib -+dbgmsg;
if errorlevel 1 goto error
goto cleanup
:error
echo F4COMPAT : %1libfor%2.lib: LIB manager encountered an error
goto end
:cleanup
echo F4COMPAT : The %1libfor%2.lib library should be used with
echo the %1libc%2.lib library from C 5.1/QC 1.01,
echo and the C library should be mentioned before
echo the FORTRAN library on the LINK line.
del dbgmsg.obj
del *.bak
:end

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