Zortech C++ v3.0r1
This commit is contained in:
parent
e16b4f4a34
commit
7a92a5f9cb
BIN
Zortech C++ v30r1/BIN/ARCHIVE.COM
Normal file
BIN
Zortech C++ v30r1/BIN/ARCHIVE.COM
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/BLINK.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/BLINK.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/BLINKR.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/BLINKR.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/BLINKX.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/BLINKX.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/DUMP.COM
Normal file
BIN
Zortech C++ v30r1/BIN/DUMP.COM
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/DUMPEXE.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/DUMPEXE.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/EXE2BIN.COM
Normal file
BIN
Zortech C++ v30r1/BIN/EXE2BIN.COM
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/LIBUNRES.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/LIBUNRES.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/MAKE.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/MAKE.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/MAKEDEP.COM
Normal file
BIN
Zortech C++ v30r1/BIN/MAKEDEP.COM
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/OBJTOASM.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/OBJTOASM.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/PATCHOBJ.COM
Normal file
BIN
Zortech C++ v30r1/BIN/PATCHOBJ.COM
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/TOUCH.COM
Normal file
BIN
Zortech C++ v30r1/BIN/TOUCH.COM
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/UM.COM
Normal file
BIN
Zortech C++ v30r1/BIN/UM.COM
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/UPDATE.COM
Normal file
BIN
Zortech C++ v30r1/BIN/UPDATE.COM
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/UPSHOT.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/UPSHOT.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZCV.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZCV.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZGREP.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZGREP.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZORLIB.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZORLIB.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZORLIBX.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZORLIBX.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTAG.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTAG.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTAGR.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTAGR.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTAGX.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTAGX.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTC.COM
Normal file
BIN
Zortech C++ v30r1/BIN/ZTC.COM
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTC1B.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTC1B.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTC1BR.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTC1BR.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTC1X.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTC1X.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTC2B.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTC2B.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTC2BR.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTC2BR.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTC2X.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTC2X.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTCPP1.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTCPP1.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTCPP1R.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTCPP1R.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTCPP1X.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTCPP1X.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTG.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTG.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTGR.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTGR.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZTGX.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZTGX.EXE
Normal file
Binary file not shown.
BIN
Zortech C++ v30r1/BIN/ZWB.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZWB.EXE
Normal file
Binary file not shown.
1197
Zortech C++ v30r1/BIN/ZWB.HLP
Normal file
1197
Zortech C++ v30r1/BIN/ZWB.HLP
Normal file
File diff suppressed because it is too large
Load Diff
215
Zortech C++ v30r1/BIN/ZWB.KBD
Normal file
215
Zortech C++ v30r1/BIN/ZWB.KBD
Normal file
@ -0,0 +1,215 @@
|
||||
1 ³File|Create ³ô^
|
||||
1 ³File|Create ³
|
||||
2 ³File|Open ³ëh
|
||||
2 ³File|Open ³
|
||||
3 ³File|Visit ³çn
|
||||
3 ³File|Visit ³
|
||||
4 ³File|Filename ³çf
|
||||
4 ³File|Filename ³
|
||||
5 ³File|Read ³çr
|
||||
5 ³File|Read ³
|
||||
6 ³File|Insert ³çi
|
||||
6 ³File|Insert ³
|
||||
7 ³File|Save ³çs
|
||||
7 ³File|Save ³
|
||||
8 ³File|Save As ³ça
|
||||
8 ³File|Save As ³
|
||||
9 ³File|Save All ³çk
|
||||
9 ³File|Save All ³
|
||||
12 ³File|Unmodify ³Â
|
||||
12 ³File|Unmodify ³
|
||||
14 ³File|Exit ³çx
|
||||
14 ³File|Exit ³
|
||||
15 ³File|Save&Exit ³çy
|
||||
15 ³File|Save&Exit ³Á
|
||||
15 ³File|Save&Exit ³
|
||||
16 ³File|Shell ³À
|
||||
16 ³File|Shell ³
|
||||
17 ³File|Spawn ³ô!
|
||||
17 ³File|Spawn ³
|
||||
18 ³Edit|Copy ³çc
|
||||
18 ³Edit|Copy ³ëw
|
||||
18 ³Edit|Copy ³
|
||||
19 ³Edit|Cut ³çt
|
||||
19 ³Edit|Cut ³
|
||||
20 ³Edit|Paste ³çp
|
||||
20 ³Edit|Paste ³
|
||||
21 ³Edit|Copy&Append ³ôa
|
||||
21 ³Edit|Copy&Append ³
|
||||
22 ³Edit|Cut&Append ³ôt
|
||||
22 ³Edit|Cut&Append ³
|
||||
23 ³Edit|Block Mode ³íb
|
||||
23 ³Edit|Block Mode ³
|
||||
24 ³Edit|Set Beg Mark ³Ü
|
||||
24 ³Edit|Set Beg Mark ³çb
|
||||
24 ³Edit|Set Beg Mark ³
|
||||
25 ³Edit|Remove Mark ³çh
|
||||
25 ³Edit|Remove Mark ³
|
||||
26 ³Edit|Swap Mark ³ôx
|
||||
26 ³Edit|Swap Mark ³
|
||||
27 ³Edit|Upper Case ³u
|
||||
27 ³Edit|Upper Case ³
|
||||
28 ³Edit|Lower Case ³l
|
||||
28 ³Edit|Lower Case ³
|
||||
29 ³Edit|Capitalize ³z
|
||||
29 ³Edit|Capitalize ³
|
||||
30 ³Search|Find ³íf
|
||||
30 ³Search|Find ³
|
||||
31 ³Search|Replace ³ír
|
||||
31 ³Search|Replace ³
|
||||
32 ³Search|Again ³è
|
||||
32 ³Search|Again ³
|
||||
33 ³Search|Goto Line ³æ
|
||||
33 ³Search|Goto Line ³
|
||||
34 ³Search|Pair Match ³m
|
||||
34 ³Search|Pair Match ³º
|
||||
34 ³Search|Pair Match ³
|
||||
35 ³Window|Only One ³ëo
|
||||
35 ³Window|Only One ³
|
||||
36 ³Window|Zoom ³ëz
|
||||
36 ³Window|Zoom ³
|
||||
37 ³Window|Maximize ³ëm
|
||||
37 ³Window|Maximize ³
|
||||
38 ³Window|Location ³ël
|
||||
38 ³Window|Location ³
|
||||
40 ³Window|Kill ³ëc
|
||||
40 ³Window|Kill ³
|
||||
41 ³Window|Split X ³ëx
|
||||
41 ³Window|Split X ³
|
||||
42 ³Window|Split Y ³ëv
|
||||
42 ³Window|Split Y ³
|
||||
43 ³Window|Resize ³ës
|
||||
43 ³Window|Resize ³
|
||||
44 ³Window|Next ³ën
|
||||
44 ³Window|Next ³
|
||||
45 ³Window|Prev ³ëp
|
||||
45 ³Window|Prev ³
|
||||
46 ³Window|Cascade ³êc
|
||||
46 ³Window|Cascade ³
|
||||
47 ³Window|Tile ³êt
|
||||
47 ³Window|Tile ³
|
||||
49 ³Window|Hi Res ³êh
|
||||
49 ³Window|Hi Res ³
|
||||
50 ³Compile|Compile ³àc
|
||||
50 ³Compile|Compile ³
|
||||
51 ³Compile|Make .obj ³
|
||||
52 ³Compile|Make ³àm
|
||||
52 ³Compile|Make ³
|
||||
53 ³Compile|Debug ³àd
|
||||
53 ³Compile|Debug ³
|
||||
54 ³Compile|Run Program ³àr
|
||||
54 ³Compile|Run Program ³
|
||||
55 ³Compile|Disassemble .obj ³
|
||||
56 ³Compile|Compile Options ³
|
||||
57 ³Compile|Make Options ³
|
||||
58 ³Compile|Debug Options ³
|
||||
59 ³Options|File Stats ³ês
|
||||
59 ³Options|File Stats ³
|
||||
60 ³Options|Begin Macro ³ô(
|
||||
60 ³Options|Begin Macro ³
|
||||
61 ³Options|End Macro ³ô)
|
||||
61 ³Options|End Macro ³
|
||||
62 ³Options|Execute Macro ³ôe
|
||||
62 ³Options|Execute Macro ³
|
||||
63 ³Options|Inc Indent ³êi
|
||||
63 ³Options|Inc Indent ³
|
||||
64 ³Options|Dec Indent ³êl
|
||||
64 ³Options|Dec Indent ³
|
||||
65 ³Options|Spaces to Tabs ³
|
||||
66 ³Options|Tabs to Spaces ³
|
||||
67 ³Options|Editor Config. ³
|
||||
68 ³Options|Edit Keybindings ³
|
||||
69 ³Options|Color Config. ³
|
||||
70 ³Browse|GREP Browse ³àg
|
||||
70 ³Browse|GREP Browse ³
|
||||
71 ³Browse|C Tag Browse ³àb
|
||||
71 ³Browse|C Tag Browse ³
|
||||
72 ³Browse|Browse Using ³
|
||||
83 ³Help|Help on Help ³
|
||||
84 ³Help|About ³
|
||||
85 ³Beg Of File ³<
|
||||
85 ³Beg Of File ³Ø
|
||||
85 ³Beg Of File ³
|
||||
86 ³End Of File ³>
|
||||
86 ³End Of File ³Ù
|
||||
86 ³End Of File ³
|
||||
87 ³Beg Of Page ³Ú
|
||||
87 ³Beg Of Page ³
|
||||
88 ³End Of Page ³Û
|
||||
88 ³End Of Page ³
|
||||
89 ³Beg Of Line ³Ò
|
||||
89 ³Beg Of Line ³
|
||||
90 ³End Of Line ³Ó
|
||||
90 ³End Of Line ³
|
||||
91 ³Fwd Page ³
|
||||
92 ³Bck Page ³
|
||||
93 ³Fwd Line ³ò
|
||||
93 ³Fwd Line ³
|
||||
94 ³Bck Line ³á
|
||||
94 ³Bck Line ³
|
||||
95 ³Fwd Char ³
|
||||
96 ³Bck Char ³
|
||||
97 ³Fwd Delete Char ³
|
||||
98 ³Bck Delete Char ³
|
||||
99 ³Fwd Word ³f
|
||||
99 ³Fwd Word ³â
|
||||
99 ³Fwd Word ³
|
||||
100 ³Bck Word ³b
|
||||
100 ³Bck Word ³Ý
|
||||
100 ³Bck Word ³
|
||||
101 ³Fwd Del Word ³d
|
||||
101 ³Fwd Del Word ³ð
|
||||
101 ³Fwd Del Word ³
|
||||
102 ³Bck Del Word ³î
|
||||
102 ³Bck Del Word ³
|
||||
103 ³Delete to End Of Line ³½
|
||||
103 ³Delete to End Of Line ³
|
||||
104 ³Open Line ³
|
||||
105 ³Twiddle ³êw
|
||||
105 ³Twiddle ³
|
||||
106 ³Search Forward ³í>
|
||||
106 ³Search Forward ³
|
||||
107 ³Search Backward ³í<
|
||||
107 ³Search Backward ³
|
||||
108 ³Search Always Replace ³
|
||||
109 ³Search Query Replace ³
|
||||
110 ³Home ³êb
|
||||
110 ³Home ³
|
||||
111 ³End ³êe
|
||||
111 ³End ³
|
||||
112 ³Refresh Window Display ³
|
||||
113 ³Scroll Up ³ó
|
||||
113 ³Scroll Up ³
|
||||
114 ³Scroll Down ³n
|
||||
114 ³Scroll Down ³ö
|
||||
114 ³Scroll Down ³
|
||||
115 ³Scroll Left ³ô<
|
||||
115 ³Scroll Left ³
|
||||
116 ³Scroll Right ³ô>
|
||||
116 ³Scroll Right ³
|
||||
117 ³Undelete Line ³j
|
||||
117 ³Undelete Line ³ñ
|
||||
117 ³Undelete Line ³
|
||||
118 ³Delete Line ³àl
|
||||
118 ³Delete Line ³
|
||||
119 ³Line Select ³
|
||||
120 ³Word Select ³s
|
||||
120 ³Word Select ³
|
||||
121 ³Word Capitalize ³ôc
|
||||
121 ³Word Capitalize ³
|
||||
122 ³Cursor is Top Line ³ô{
|
||||
122 ³Cursor is Top Line ³
|
||||
123 ³Cursor is Bottom Line ³ô}
|
||||
123 ³Cursor is Bottom Line ³
|
||||
124 ³Cursor is Middle Line ³ô-
|
||||
124 ³Cursor is Middle Line ³
|
||||
125 ³Spawn ³ô@
|
||||
125 ³Spawn ³
|
||||
126 ³Quote Char ³ê"
|
||||
126 ³Quote Char ³
|
||||
127 ³Remove blank lines ³
|
||||
128 ³Remove white space ³
|
||||
129 ³Toggle Insert Mode ³
|
||||
130 ³Compiler Code Options ³
|
||||
131 ³Compiler Source Options ³
|
||||
132 ³Compiler Output Options ³
|
180
Zortech C++ v30r1/BIN/ZWBEMACS.KBD
Normal file
180
Zortech C++ v30r1/BIN/ZWBEMACS.KBD
Normal file
@ -0,0 +1,180 @@
|
||||
1 ³File|Create ³
|
||||
2 ³File|Open ³
|
||||
3 ³File|Visit ³ôv
|
||||
3 ³File|Visit ³
|
||||
4 ³File|Filename ³
|
||||
5 ³File|Read ³ôr
|
||||
5 ³File|Read ³
|
||||
6 ³File|Insert ³ôi
|
||||
6 ³File|Insert ³
|
||||
7 ³File|Save ³ôs
|
||||
7 ³File|Save ³
|
||||
8 ³File|Save As ³ôw
|
||||
8 ³File|Save As ³
|
||||
9 ³File|Save All ³
|
||||
12 ³File|Unmodify ³
|
||||
14 ³File|Exit ³ß
|
||||
14 ³File|Exit ³
|
||||
15 ³File|Save&Exit ³
|
||||
16 ³File|Shell ³ö
|
||||
16 ³File|Shell ³
|
||||
17 ³File|Spawn ³ô!
|
||||
17 ³File|Spawn ³
|
||||
18 ³Edit|Copy ³w
|
||||
18 ³Edit|Copy ³ëw
|
||||
18 ³Edit|Copy ³
|
||||
19 ³Edit|Cut ³ó
|
||||
19 ³Edit|Cut ³
|
||||
20 ³Edit|Paste ³õ
|
||||
20 ³Edit|Paste ³
|
||||
21 ³Edit|Copy&Append ³
|
||||
22 ³Edit|Cut&Append ³
|
||||
23 ³Edit|Block Mode ³t
|
||||
23 ³Edit|Block Mode ³ët
|
||||
23 ³Edit|Block Mode ³
|
||||
24 ³Edit|Set Beg Mark ³Ü
|
||||
24 ³Edit|Set Beg Mark ³
|
||||
25 ³Edit|Remove Mark ³ô.
|
||||
25 ³Edit|Remove Mark ³
|
||||
26 ³Edit|Swap Mark ³ôx
|
||||
26 ³Edit|Swap Mark ³
|
||||
27 ³Edit|Upper Case ³u
|
||||
27 ³Edit|Upper Case ³ëu
|
||||
27 ³Edit|Upper Case ³
|
||||
28 ³Edit|Lower Case ³l
|
||||
28 ³Edit|Lower Case ³ël
|
||||
28 ³Edit|Lower Case ³
|
||||
29 ³Edit|Capitalize ³z
|
||||
29 ³Edit|Capitalize ³ëz
|
||||
29 ³Edit|Capitalize ³
|
||||
30 ³Search|Find ³
|
||||
31 ³Search|Replace ³
|
||||
32 ³Search|Again ³
|
||||
33 ³Search|Goto Line ³
|
||||
34 ³Search|Pair Match ³m
|
||||
34 ³Search|Pair Match ³ëm
|
||||
34 ³Search|Pair Match ³
|
||||
35 ³Window|Only One ³ô1
|
||||
35 ³Window|Only One ³
|
||||
36 ³Window|Zoom ³
|
||||
37 ³Window|Maximize ³
|
||||
38 ³Window|Location ³
|
||||
40 ³Window|Kill ³ô0
|
||||
40 ³Window|Kill ³
|
||||
41 ³Window|Split X ³ô5
|
||||
41 ³Window|Split X ³
|
||||
42 ³Window|Split Y ³ô2
|
||||
42 ³Window|Split Y ³
|
||||
43 ³Window|Resize ³
|
||||
44 ³Window|Next ³ôn
|
||||
44 ³Window|Next ³
|
||||
45 ³Window|Prev ³ôp
|
||||
45 ³Window|Prev ³
|
||||
46 ³Window|Cascade ³
|
||||
47 ³Window|Tile ³
|
||||
49 ³Window|Hi Res ³
|
||||
50 ³Compile|Compile ³
|
||||
51 ³Compile|Make .obj ³
|
||||
52 ³Compile|Make ³
|
||||
53 ³Compile|Debug ³
|
||||
54 ³Compile|Run Program ³
|
||||
55 ³Compile|Disassemble .obj ³
|
||||
56 ³Compile|Compile Options ³
|
||||
57 ³Compile|Make Options ³
|
||||
58 ³Compile|Debug Options ³
|
||||
59 ³Options|File Stats ³
|
||||
60 ³Options|Begin Macro ³ô(
|
||||
60 ³Options|Begin Macro ³
|
||||
61 ³Options|End Macro ³ô)
|
||||
61 ³Options|End Macro ³
|
||||
62 ³Options|Execute Macro ³ôe
|
||||
62 ³Options|Execute Macro ³
|
||||
63 ³Options|Inc Indent ³
|
||||
64 ³Options|Dec Indent ³
|
||||
65 ³Options|Spaces to Tabs ³
|
||||
66 ³Options|Tabs to Spaces ³
|
||||
67 ³Options|Editor Config. ³
|
||||
68 ³Options|Edit Keybindings ³
|
||||
69 ³Options|Color Config. ³
|
||||
70 ³Browse|GREP Browse ³
|
||||
71 ³Browse|C Tag Browse ³
|
||||
72 ³Browse|Browse Using ³
|
||||
83 ³Help|Help on Help ³
|
||||
84 ³Help|About ³
|
||||
85 ³Beg Of File ³<
|
||||
85 ³Beg Of File ³ë<
|
||||
85 ³Beg Of File ³
|
||||
86 ³End Of File ³>
|
||||
86 ³End Of File ³ë>
|
||||
86 ³End Of File ³
|
||||
87 ³Beg Of Page ³ô[
|
||||
87 ³Beg Of Page ³
|
||||
88 ³End Of Page ³ô]
|
||||
88 ³End Of Page ³
|
||||
89 ³Beg Of Line ³
|
||||
90 ³End Of Line ³
|
||||
91 ³Fwd Page ³
|
||||
92 ³Bck Page ³v
|
||||
92 ³Bck Page ³ëv
|
||||
92 ³Bck Page ³
|
||||
93 ³Fwd Line ³
|
||||
94 ³Bck Line ³
|
||||
95 ³Fwd Char ³
|
||||
96 ³Bck Char ³
|
||||
97 ³Fwd Delete Char ³
|
||||
98 ³Bck Delete Char ³
|
||||
99 ³Fwd Word ³f
|
||||
99 ³Fwd Word ³ëf
|
||||
99 ³Fwd Word ³
|
||||
100 ³Bck Word ³b
|
||||
100 ³Bck Word ³ëb
|
||||
100 ³Bck Word ³
|
||||
101 ³Fwd Del Word ³d
|
||||
101 ³Fwd Del Word ³ëd
|
||||
101 ³Fwd Del Word ³
|
||||
102 ³Bck Del Word ³h
|
||||
102 ³Bck Del Word ³ëh
|
||||
102 ³Bck Del Word ³
|
||||
103 ³Delete to End Of Line ³
|
||||
104 ³Open Line ³
|
||||
105 ³Twiddle ³
|
||||
106 ³Search Forward ³
|
||||
107 ³Search Backward ³
|
||||
108 ³Search Always Replace ³
|
||||
109 ³Search Query Replace ³
|
||||
110 ³Home ³
|
||||
111 ³End ³
|
||||
112 ³Refresh Window Display ³
|
||||
113 ³Scroll Up ³p
|
||||
113 ³Scroll Up ³ëp
|
||||
113 ³Scroll Up ³
|
||||
114 ³Scroll Down ³n
|
||||
114 ³Scroll Down ³ën
|
||||
114 ³Scroll Down ³
|
||||
115 ³Scroll Left ³ô<
|
||||
115 ³Scroll Left ³
|
||||
116 ³Scroll Right ³ô>
|
||||
116 ³Scroll Right ³
|
||||
117 ³Undelete Line ³j
|
||||
117 ³Undelete Line ³ëj
|
||||
117 ³Undelete Line ³
|
||||
118 ³Delete Line ³
|
||||
119 ³Line Select ³
|
||||
120 ³Word Select ³s
|
||||
120 ³Word Select ³ës
|
||||
120 ³Word Select ³
|
||||
121 ³Word Capitalize ³
|
||||
122 ³Cursor is Top Line ³ô{
|
||||
122 ³Cursor is Top Line ³
|
||||
123 ³Cursor is Bottom Line ³ô}
|
||||
123 ³Cursor is Bottom Line ³
|
||||
124 ³Cursor is Middle Line ³ô-
|
||||
124 ³Cursor is Middle Line ³
|
||||
125 ³Spawn ³
|
||||
126 ³Quote Char ³
|
||||
127 ³Remove blank lines ³
|
||||
128 ³Remove white space ³
|
||||
129 ³Toggle Insert Mode ³
|
||||
130 ³Compiler Code Options ³
|
||||
131 ³Compiler Source Options ³
|
||||
132 ³Compiler Output Options ³
|
BIN
Zortech C++ v30r1/BIN/ZWBR.EXE
Normal file
BIN
Zortech C++ v30r1/BIN/ZWBR.EXE
Normal file
Binary file not shown.
176
Zortech C++ v30r1/BIN/ZWBWS.KBD
Normal file
176
Zortech C++ v30r1/BIN/ZWBWS.KBD
Normal file
@ -0,0 +1,176 @@
|
||||
1 ³File|Create ³ç^
|
||||
1 ³File|Create ³
|
||||
2 ³File|Open ³çh
|
||||
2 ³File|Open ³
|
||||
3 ³File|Visit ³çê
|
||||
3 ³File|Visit ³
|
||||
4 ³File|Filename ³çâ
|
||||
4 ³File|Filename ³
|
||||
5 ³File|Read ³çë
|
||||
5 ³File|Read ³
|
||||
6 ³File|Insert ³çî
|
||||
6 ³File|Insert ³
|
||||
7 ³File|Save ³çï
|
||||
7 ³File|Save ³
|
||||
8 ³File|Save As ³çÝ
|
||||
8 ³File|Save As ³
|
||||
9 ³File|Save All ³çç
|
||||
9 ³File|Save All ³
|
||||
12 ³File|Unmodify ³
|
||||
14 ³File|Exit ³çà
|
||||
14 ³File|Exit ³çí
|
||||
14 ³File|Exit ³
|
||||
15 ³File|Save&Exit ³Á
|
||||
15 ³File|Save&Exit ³
|
||||
16 ³File|Shell ³À
|
||||
16 ³File|Shell ³
|
||||
17 ³File|Spawn ³
|
||||
18 ³Edit|Copy ³çß
|
||||
18 ³Edit|Copy ³
|
||||
19 ³Edit|Cut ³çò
|
||||
19 ³Edit|Cut ³çõ
|
||||
19 ³Edit|Cut ³
|
||||
20 ³Edit|Paste ³çì
|
||||
20 ³Edit|Paste ³
|
||||
21 ³Edit|Copy&Append ³
|
||||
22 ³Edit|Cut&Append ³
|
||||
23 ³Edit|Block Mode ³
|
||||
24 ³Edit|Set Beg Mark ³çÞ
|
||||
24 ³Edit|Set Beg Mark ³
|
||||
25 ³Edit|Remove Mark ³çä
|
||||
25 ³Edit|Remove Mark ³
|
||||
26 ³Edit|Swap Mark ³
|
||||
27 ³Edit|Upper Case ³
|
||||
28 ³Edit|Lower Case ³
|
||||
29 ³Edit|Capitalize ³
|
||||
30 ³Search|Find ³íâ
|
||||
30 ³Search|Find ³
|
||||
31 ³Search|Replace ³íÝ
|
||||
31 ³Search|Replace ³
|
||||
32 ³Search|Again ³è
|
||||
32 ³Search|Again ³
|
||||
33 ³Search|Goto Line ³
|
||||
34 ³Search|Pair Match ³í[
|
||||
34 ³Search|Pair Match ³í]
|
||||
34 ³Search|Pair Match ³
|
||||
35 ³Window|Only One ³
|
||||
36 ³Window|Zoom ³
|
||||
37 ³Window|Maximize ³
|
||||
38 ³Window|Location ³
|
||||
40 ³Window|Kill ³
|
||||
41 ³Window|Split X ³
|
||||
42 ³Window|Split Y ³
|
||||
43 ³Window|Resize ³
|
||||
44 ³Window|Next ³
|
||||
45 ³Window|Prev ³
|
||||
46 ³Window|Cascade ³
|
||||
47 ³Window|Tile ³
|
||||
49 ³Window|Hi Res ³
|
||||
50 ³Compile|Compile ³
|
||||
51 ³Compile|Make .obj ³
|
||||
52 ³Compile|Make ³
|
||||
53 ³Compile|Debug ³
|
||||
54 ³Compile|Run Program ³
|
||||
55 ³Compile|Disassemble .obj ³
|
||||
56 ³Compile|Compile Options ³
|
||||
57 ³Compile|Make Options ³
|
||||
58 ³Compile|Debug Options ³
|
||||
59 ³Options|File Stats ³
|
||||
60 ³Options|Begin Macro ³
|
||||
61 ³Options|End Macro ³
|
||||
62 ³Options|Execute Macro ³
|
||||
63 ³Options|Inc Indent ³çå
|
||||
63 ³Options|Inc Indent ³
|
||||
64 ³Options|Dec Indent ³çñ
|
||||
64 ³Options|Dec Indent ³
|
||||
65 ³Options|Spaces to Tabs ³
|
||||
66 ³Options|Tabs to Spaces ³
|
||||
67 ³Options|Editor Config. ³
|
||||
68 ³Options|Edit Keybindings ³
|
||||
69 ³Options|Color Config. ³
|
||||
70 ³Browse|GREP Browse ³
|
||||
71 ³Browse|C Tag Browse ³
|
||||
72 ³Browse|Browse Using ³
|
||||
83 ³Help|Help on Help ³
|
||||
84 ³Help|About ³
|
||||
85 ³Beg Of File ³íî
|
||||
85 ³Beg Of File ³Ø
|
||||
85 ³Beg Of File ³
|
||||
86 ³End Of File ³íß
|
||||
86 ³End Of File ³Ù
|
||||
86 ³End Of File ³
|
||||
87 ³Beg Of Page ³íá
|
||||
87 ³Beg Of Page ³Ú
|
||||
87 ³Beg Of Page ³
|
||||
88 ³End Of Page ³íô
|
||||
88 ³End Of Page ³Û
|
||||
88 ³End Of Page ³
|
||||
89 ³Beg Of Line ³íï
|
||||
89 ³Beg Of Line ³Ò
|
||||
89 ³Beg Of Line ³
|
||||
90 ³End Of Line ³íà
|
||||
90 ³End Of Line ³Ó
|
||||
90 ³End Of Line ³
|
||||
91 ³Fwd Page ³ß
|
||||
91 ³Fwd Page ³
|
||||
92 ³Bck Page ³î
|
||||
92 ³Bck Page ³
|
||||
93 ³Fwd Line ³ô
|
||||
93 ³Fwd Line ³
|
||||
94 ³Bck Line ³á
|
||||
94 ³Bck Line ³
|
||||
95 ³Fwd Char ³à
|
||||
95 ³Fwd Char ³
|
||||
96 ³Bck Char ³ï
|
||||
96 ³Bck Char ³
|
||||
97 ³Fwd Delete Char ³ã
|
||||
97 ³Fwd Delete Char ³
|
||||
98 ³Bck Delete Char ³
|
||||
99 ³Fwd Word ³â
|
||||
99 ³Fwd Word ³×
|
||||
99 ³Fwd Word ³
|
||||
100 ³Bck Word ³Ý
|
||||
100 ³Bck Word ³Ö
|
||||
100 ³Bck Word ³
|
||||
101 ³Fwd Del Word ³ð
|
||||
101 ³Fwd Del Word ³
|
||||
102 ³Bck Del Word ³
|
||||
103 ³Delete to End Of Line ³íõ
|
||||
103 ³Delete to End Of Line ³
|
||||
104 ³Open Line ³ê
|
||||
104 ³Open Line ³
|
||||
105 ³Twiddle ³
|
||||
106 ³Search Forward ³
|
||||
107 ³Search Backward ³
|
||||
108 ³Search Always Replace ³
|
||||
109 ³Search Query Replace ³
|
||||
110 ³Home ³
|
||||
111 ³End ³
|
||||
112 ³Refresh Window Display ³
|
||||
113 ³Scroll Up ³ó
|
||||
113 ³Scroll Up ³
|
||||
114 ³Scroll Down ³ö
|
||||
114 ³Scroll Down ³
|
||||
115 ³Scroll Left ³
|
||||
116 ³Scroll Right ³
|
||||
117 ³Undelete Line ³
|
||||
118 ³Delete Line ³õ
|
||||
118 ³Delete Line ³
|
||||
119 ³Line Select ³çè
|
||||
119 ³Line Select ³
|
||||
120 ³Word Select ³çð
|
||||
120 ³Word Select ³
|
||||
121 ³Word Capitalize ³
|
||||
122 ³Cursor is Top Line ³
|
||||
123 ³Cursor is Bottom Line ³
|
||||
124 ³Cursor is Middle Line ³
|
||||
125 ³Spawn ³
|
||||
126 ³Quote Char ³ì
|
||||
126 ³Quote Char ³
|
||||
127 ³Remove blank lines ³
|
||||
128 ³Remove white space ³
|
||||
129 ³Toggle Insert Mode ³ò
|
||||
129 ³Toggle Insert Mode ³
|
||||
130 ³Compiler Code Options ³
|
||||
131 ³Compiler Source Options ³
|
||||
132 ³Compiler Output Options ³
|
BIN
Zortech C++ v30r1/HELP/ZTFUNC.MNL
Normal file
BIN
Zortech C++ v30r1/HELP/ZTFUNC.MNL
Normal file
Binary file not shown.
23
Zortech C++ v30r1/INCLUDE/ASSERT.H
Normal file
23
Zortech C++ v30r1/INCLUDE/ASSERT.H
Normal file
@ -0,0 +1,23 @@
|
||||
/*_ assert.h Fri May 12 1989 Modified by: Walter Bright */
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef assert
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define assert(ignore) ((void) 0)
|
||||
#else
|
||||
#define assert(e) ((void)((e) || (_assert(#e,__FILE__,__LINE__),1)))
|
||||
extern void
|
||||
#ifndef __STDC__
|
||||
_cdecl
|
||||
#endif
|
||||
_assert(const char *,const char *,unsigned);
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
111
Zortech C++ v30r1/INCLUDE/BIOS.H
Normal file
111
Zortech C++ v30r1/INCLUDE/BIOS.H
Normal file
@ -0,0 +1,111 @@
|
||||
/*_ bios.h Tue Jul 25 1989 Modified by: Dave Mansell */
|
||||
|
||||
#ifndef __BIOS_H
|
||||
#define __BIOS_H
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* 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 */
|
||||
|
||||
unsigned short _cdecl _bios_keybrd(int);
|
||||
unsigned short _cdecl bioskey(int);
|
||||
|
||||
#if M_UNIX || M_XENIX
|
||||
|
||||
void _cdecl _bios_keybrd_close(void);
|
||||
int _cdecl _bios_keybrd_open(void);
|
||||
|
||||
#else /* M_UNIX || M_XENIX */
|
||||
/* struct used to send and receive information to and from */
|
||||
/* the BIOS (int 0x13) disk services */
|
||||
|
||||
struct diskinfo_t {
|
||||
unsigned drive;
|
||||
unsigned head;
|
||||
unsigned track;
|
||||
unsigned sector;
|
||||
unsigned nsectors;
|
||||
void _far *buffer;
|
||||
};
|
||||
|
||||
/* manifest constants for BIOS services */
|
||||
|
||||
/* 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 constant from each of the following */
|
||||
/* four groups must be specified in the initialization byte. */
|
||||
|
||||
/* character size */
|
||||
|
||||
#define _COM_CHR7 2 /* 7 bits characters */
|
||||
#define _COM_CHR8 3 /* 8 bits characters */
|
||||
|
||||
/* stop bit values */
|
||||
|
||||
#define _COM_STOP1 0 /* 1 stop bit */
|
||||
#define _COM_STOP2 4 /* 2 stop bits */
|
||||
|
||||
/* parity */
|
||||
|
||||
#define _COM_NOPARITY 0 /* no parity */
|
||||
#define _COM_ODDPARITY 8 /* odd parity */
|
||||
#define _COM_EVENPARITY 24 /* even parity */
|
||||
|
||||
/* baud rate */
|
||||
|
||||
#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 */
|
||||
|
||||
/* 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 3 /* format disk track */
|
||||
|
||||
/* printer services */
|
||||
|
||||
#define _PRINTER_WRITE 0 /* write character to printer */
|
||||
#define _PRINTER_INIT 1 /* intialize printer */
|
||||
#define _PRINTER_STATUS 2 /* get printer status */
|
||||
|
||||
/* time of day services */
|
||||
|
||||
#define _TIME_GETCLOCK 0 /* get current clock count */
|
||||
#define _TIME_SETCLOCK 1 /* set current clock count */
|
||||
|
||||
/* Function prototypes for Bios services */
|
||||
|
||||
int _cdecl _bios_equiplist(void);
|
||||
int _cdecl _bios_memsize(void);
|
||||
int _cdecl _bios_printer(unsigned, unsigned, unsigned);
|
||||
int _cdecl _bios_serialcom(unsigned, unsigned, unsigned);
|
||||
int _cdecl _bios_timeofday(unsigned, long *);
|
||||
int _cdecl _bios_disk(unsigned, struct diskinfo_t *);
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __BIOS_H */
|
||||
|
23
Zortech C++ v30r1/INCLUDE/CERROR.H
Normal file
23
Zortech C++ v30r1/INCLUDE/CERROR.H
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* cerror.h
|
||||
*
|
||||
* handles critical error interrupt under DOS and DOS16RM
|
||||
*
|
||||
* written by: G. Eric Engstrom
|
||||
*/
|
||||
|
||||
#ifndef __CERROR_H
|
||||
#define __CERROR_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
int _cdecl cerror_open(void); /* installs critical error handler */
|
||||
int _cdecl cerror_close(void); /* de installs critical error handler */
|
||||
int (_far _cdecl *_cerror_handler)(int *ax,int *di); /* user supplied function goes here */
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
1236
Zortech C++ v30r1/INCLUDE/CMACROS.INC
Normal file
1236
Zortech C++ v30r1/INCLUDE/CMACROS.INC
Normal file
File diff suppressed because it is too large
Load Diff
429
Zortech C++ v30r1/INCLUDE/COMPLEX.HPP
Normal file
429
Zortech C++ v30r1/INCLUDE/COMPLEX.HPP
Normal file
@ -0,0 +1,429 @@
|
||||
/*ident "@(#)complex.h 1.3 6/2/90" */
|
||||
|
||||
#ifndef __COMPLEX_H
|
||||
#define __COMPLEX_H 1
|
||||
|
||||
/*
|
||||
** (c) Copyright 1988-1990 by Dyad Software Corp.
|
||||
** All Rights Reserved
|
||||
**
|
||||
** Authors: lwd, geb
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
|
||||
class ostream;
|
||||
class istream;
|
||||
|
||||
|
||||
class complex
|
||||
{
|
||||
|
||||
public:
|
||||
friend double real ( const complex& );
|
||||
friend double imag ( const complex& );
|
||||
|
||||
friend complex cos ( const complex& );
|
||||
friend complex cosh ( const complex& );
|
||||
friend complex sin ( const complex& );
|
||||
friend complex sinh ( const complex& );
|
||||
friend complex tan ( const complex& );
|
||||
friend complex tanh ( const complex& );
|
||||
friend complex log ( const complex& );
|
||||
friend complex log10 ( const complex& );
|
||||
friend complex sqrt ( const complex& );
|
||||
friend double abs ( const complex& );
|
||||
friend complex conj ( const complex& );
|
||||
friend double norm ( const complex& );
|
||||
friend double modulus ( const complex& );
|
||||
friend double arg ( const complex& );
|
||||
friend complex asin ( const complex& );
|
||||
friend complex acos ( const complex& );
|
||||
friend complex atan ( const complex& );
|
||||
friend complex asinh ( const complex& );
|
||||
friend complex atanh ( const complex& );
|
||||
friend complex exp ( const complex& );
|
||||
friend complex polar ( double r, double theta = 0);
|
||||
|
||||
friend complex operator + ( const complex&, const complex& );
|
||||
friend complex operator + ( double, const complex& );
|
||||
friend complex operator + ( const complex&, double );
|
||||
|
||||
friend complex operator - ( const complex&, const complex& );
|
||||
friend complex operator - ( double, const complex& );
|
||||
friend complex operator - ( const complex&, double );
|
||||
|
||||
friend complex operator * ( const complex&, const complex& );
|
||||
friend complex operator * ( double, const complex& );
|
||||
friend complex operator * ( const complex&, double );
|
||||
|
||||
friend complex operator / ( const complex&, const complex& );
|
||||
friend complex operator / ( double, const complex& );
|
||||
friend complex operator / ( const complex&, double );
|
||||
|
||||
friend complex pow( const complex& lhs, double rhs );
|
||||
friend complex pow( const complex& lhs, const complex & rhs );
|
||||
friend complex pow( double lhs, const complex & rhs);
|
||||
friend complex pow( const complex& lhs, int rhs);
|
||||
|
||||
friend int operator && ( const complex&, const complex& );
|
||||
friend int operator && ( double, const complex& );
|
||||
friend int operator && ( const complex&, double );
|
||||
|
||||
friend int operator || ( const complex&, const complex& );
|
||||
friend int operator || ( double, const complex& );
|
||||
friend int operator || ( const complex&, double );
|
||||
|
||||
friend int operator != ( const complex&, const complex& );
|
||||
friend int operator != ( double, const complex& );
|
||||
friend int operator != ( const complex&, double );
|
||||
|
||||
friend int operator == ( const complex&, const complex& );
|
||||
friend int operator == ( double, const complex& );
|
||||
friend int operator == ( const complex&, double );
|
||||
|
||||
friend ostream& operator << ( ostream& s, const complex& x);
|
||||
friend istream& operator >> ( istream& s, complex& x);
|
||||
|
||||
public:
|
||||
|
||||
complex ( );
|
||||
complex ( double r, double i ); /* this is not declared (double r, double i = 0)
|
||||
to avoid implicit conversion. Binary operations
|
||||
are explicitly declared thus avoiding potential
|
||||
ambiguities. */
|
||||
complex ( const complex & );
|
||||
double& real ( );
|
||||
double& imag ( );
|
||||
|
||||
complex& operator = ( const complex& );
|
||||
complex& operator = ( double );
|
||||
|
||||
complex& operator += ( const complex& );
|
||||
complex& operator += ( double );
|
||||
|
||||
complex& operator -= ( const complex& );
|
||||
complex& operator -= ( double );
|
||||
|
||||
complex& operator *= ( const complex& );
|
||||
complex& operator *= ( double );
|
||||
|
||||
complex& operator /= ( const complex& );
|
||||
complex& operator /= ( double );
|
||||
|
||||
int operator ! () const;
|
||||
complex operator - () const;
|
||||
|
||||
private:
|
||||
double re;
|
||||
double im;
|
||||
};
|
||||
|
||||
inline complex::complex ( )
|
||||
{
|
||||
/* remove these comments for initialization to (0,0)
|
||||
re = im = 0;
|
||||
*/
|
||||
}
|
||||
|
||||
inline complex::complex ( double r, double i ): re(r), im(i) {}
|
||||
inline complex::complex( const complex& z)
|
||||
{
|
||||
re = z.re;
|
||||
im = z.im;
|
||||
}
|
||||
|
||||
inline double real ( const complex& z){ return z.re; }
|
||||
inline double imag ( const complex& z){ return z.im; }
|
||||
|
||||
inline double& complex::real (){ return re; }
|
||||
inline double& complex::imag (){ return im; }
|
||||
|
||||
/* operator + */
|
||||
inline complex operator + ( const complex& lhs, const complex& rhs )
|
||||
{
|
||||
return complex ( lhs.re + rhs.re, lhs.im + rhs.im );
|
||||
}
|
||||
inline complex operator + ( double lhs, const complex& rhs )
|
||||
{
|
||||
return complex ( lhs + rhs.re, rhs.im );
|
||||
}
|
||||
inline complex operator + ( const complex& lhs, double rhs )
|
||||
{
|
||||
return complex ( lhs.re + rhs, lhs.im );
|
||||
}
|
||||
|
||||
/* operator - */
|
||||
inline complex operator - ( const complex& lhs, const complex& rhs )
|
||||
{
|
||||
return complex ( lhs.re - rhs.re, lhs.im - rhs.im );
|
||||
}
|
||||
inline complex operator - ( double lhs, const complex& rhs )
|
||||
{
|
||||
return complex ( lhs - rhs.re, - rhs.im );
|
||||
}
|
||||
inline complex operator - ( const complex& lhs, double rhs )
|
||||
{
|
||||
return complex ( lhs.re - rhs, lhs.im );
|
||||
}
|
||||
|
||||
/* operator * */
|
||||
inline complex operator * ( const complex& lhs, const complex& rhs )
|
||||
{
|
||||
return complex ( lhs.re * rhs.re - lhs.im * rhs.im,
|
||||
lhs.re * rhs.im + lhs.im*rhs.re );
|
||||
}
|
||||
inline complex operator * ( double lhs, const complex& rhs )
|
||||
{
|
||||
return complex ( lhs * rhs.re, lhs * rhs.im );
|
||||
}
|
||||
inline complex operator * ( const complex& lhs, double rhs )
|
||||
{
|
||||
return complex ( lhs.re * rhs, lhs.im*rhs );
|
||||
}
|
||||
|
||||
/* operator / */
|
||||
|
||||
inline complex operator / ( const complex& lhs, double rhs )
|
||||
{
|
||||
return complex( lhs.re / rhs, lhs.im /rhs );
|
||||
}
|
||||
|
||||
/* unary operators */
|
||||
inline complex complex::operator - ( ) const
|
||||
{
|
||||
return complex ( -re, -im );
|
||||
}
|
||||
|
||||
inline int complex::operator ! ( ) const
|
||||
{
|
||||
return ( re == 0 ) && ( im == 0 ) ;
|
||||
}
|
||||
|
||||
|
||||
inline complex & complex::operator = ( const complex& z)
|
||||
{
|
||||
re = z.re;
|
||||
im = z.im;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline complex & complex::operator = ( double x)
|
||||
{
|
||||
re = x;
|
||||
im = 0;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/* operator *= */
|
||||
inline complex & complex::operator *= ( const complex& z)
|
||||
{
|
||||
*this = *this * z;
|
||||
return *this;
|
||||
}
|
||||
inline complex & complex::operator *= ( double x )
|
||||
{
|
||||
re *= x;
|
||||
im *= x;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline complex & complex::operator /= ( const complex& z)
|
||||
{
|
||||
*this = *this / z;
|
||||
return *this;
|
||||
}
|
||||
inline complex & complex::operator /= ( double x)
|
||||
{
|
||||
re /= x;
|
||||
im /= x;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline complex & complex::operator += ( const complex& z)
|
||||
{
|
||||
re += z.re;
|
||||
im += z.im;
|
||||
return *this;
|
||||
}
|
||||
inline complex & complex::operator += ( double x)
|
||||
{
|
||||
re += x;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline complex & complex::operator -= ( const complex& z)
|
||||
{
|
||||
re -= z.re;
|
||||
im -= z.im;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline complex & complex::operator -= ( double x)
|
||||
{
|
||||
re -= x;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/* operator && */
|
||||
inline int operator && ( const complex & lhs, const complex & rhs )
|
||||
{
|
||||
return (( lhs.re != 0 ) || ( lhs.im != 0 )) &&
|
||||
(( rhs.re != 0 ) || ( rhs.im != 0 )) ;
|
||||
}
|
||||
inline int operator && ( double lhs, const complex & rhs )
|
||||
{
|
||||
return ( lhs != 0 ) && (( rhs.re != 0 ) || ( rhs.im != 0 )) ;
|
||||
}
|
||||
inline int operator && ( const complex & lhs, double rhs )
|
||||
{
|
||||
return (( lhs.re != 0 ) || ( lhs.im != 0 )) && ( rhs != 0 ) ;
|
||||
}
|
||||
|
||||
/* operator || */
|
||||
inline int operator || ( const complex & lhs, const complex & rhs )
|
||||
{
|
||||
return (( lhs.re != 0 ) || ( lhs.im != 0 )) ||
|
||||
(( rhs.re != 0 ) || ( rhs.im != 0 )) ;
|
||||
}
|
||||
inline int operator || ( double lhs, const complex & rhs )
|
||||
{
|
||||
return ( lhs != 0 ) || (( rhs.re != 0 ) || ( rhs.im != 0 )) ;
|
||||
}
|
||||
inline int operator || ( const complex & lhs, double rhs )
|
||||
{
|
||||
return (( lhs.re != 0 ) || ( lhs.im != 0 )) || ( rhs != 0 );
|
||||
}
|
||||
|
||||
/* operator != */
|
||||
inline int operator != ( const complex& lhs, const complex& rhs )
|
||||
{
|
||||
return ( lhs.re != rhs.re ) || ( lhs.im != rhs.im );
|
||||
}
|
||||
inline int operator != ( double lhs, const complex& rhs )
|
||||
{
|
||||
return ( lhs != rhs.re ) || ( 0 != rhs.im );
|
||||
}
|
||||
inline int operator != ( const complex& lhs, double rhs )
|
||||
{
|
||||
return ( lhs.re != rhs ) || ( lhs.im != 0 );
|
||||
}
|
||||
|
||||
/* operator == */
|
||||
inline int operator == ( const complex& lhs, const complex& rhs )
|
||||
{
|
||||
return ( lhs.re == rhs.re ) && ( lhs.im == rhs.im );
|
||||
}
|
||||
inline int operator == ( double lhs, const complex& rhs )
|
||||
{
|
||||
return ( lhs == rhs.re ) && ( 0 == rhs.im );
|
||||
}
|
||||
inline int operator == ( const complex& lhs, double rhs )
|
||||
{
|
||||
return ( lhs.re == rhs ) && ( lhs.im == 0 );
|
||||
}
|
||||
|
||||
inline double arg( const complex& z)
|
||||
{
|
||||
return atan2(z.im,z.re);
|
||||
}
|
||||
|
||||
inline complex atanh( const complex& z)
|
||||
{
|
||||
complex iz(-z.im, z.re);
|
||||
complex ix = atan(iz);
|
||||
return complex ( ix.im, -ix.re);
|
||||
}
|
||||
|
||||
inline complex asinh( const complex& z)
|
||||
{
|
||||
complex iz(-z.im, z.re);
|
||||
complex ix = asin(iz);
|
||||
return complex ( ix.im, -ix.re);
|
||||
}
|
||||
|
||||
inline double norm( const complex& z)
|
||||
{
|
||||
return z.re*z.re + z.im*z.im;
|
||||
}
|
||||
|
||||
inline double modulus( const complex& z)
|
||||
{
|
||||
return abs(z);
|
||||
}
|
||||
|
||||
inline complex conj( const complex& z)
|
||||
{
|
||||
return complex( z.re, -z.im );
|
||||
}
|
||||
|
||||
inline complex cos( const complex& z )
|
||||
{
|
||||
return complex( cos(z.re) * cosh( z.im ), -( sin( z.re) * sinh(z.im)));
|
||||
}
|
||||
|
||||
inline complex cosh( const complex& z )
|
||||
{
|
||||
return complex ( cosh(z.re) * cos(z.im), sinh(z.re) * sin(z.im) );
|
||||
}
|
||||
|
||||
inline complex sin( const complex& z )
|
||||
{
|
||||
return complex ( sin(z.re) * cosh(z.im), cos(z.re) * sinh(z.im) );
|
||||
}
|
||||
|
||||
inline complex sinh( const complex& z )
|
||||
{
|
||||
return complex ( sinh(z.re) * cos(z.im), cosh(z.re) * sin(z.im) );
|
||||
}
|
||||
|
||||
inline complex tan( const complex& z )
|
||||
{
|
||||
double x = 2*z.re;
|
||||
double y = 2*z.im;
|
||||
double t = 1.0/(cos(x) +cosh(y));
|
||||
|
||||
return complex( t*sin(x), t*sinh(y) );
|
||||
}
|
||||
|
||||
inline complex tanh( const complex& z )
|
||||
{
|
||||
double x = 2*z.re;
|
||||
double y = 2*z.im;
|
||||
double t = 1.0/(cosh(x) +cos(y));
|
||||
|
||||
return complex( t*sinh(x), t*sin(y) );
|
||||
}
|
||||
|
||||
inline complex exp( const complex& z )
|
||||
{
|
||||
double x = exp(z.re);
|
||||
return complex( x*cos(z.im), x*sin(z.im) );
|
||||
}
|
||||
|
||||
inline complex log( const complex& z )
|
||||
{
|
||||
return complex( log( abs(z) ), arg( z ) );
|
||||
}
|
||||
|
||||
inline complex log10( const complex& z )
|
||||
{
|
||||
return complex( 0.2171472409516259*log( norm(z) ), arg( z ) );
|
||||
}
|
||||
|
||||
inline complex polar ( double r, double theta )
|
||||
{
|
||||
return complex ( r * cos(theta), r * sin(theta));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
281
Zortech C++ v30r1/INCLUDE/CONIO.H
Normal file
281
Zortech C++ v30r1/INCLUDE/CONIO.H
Normal file
@ -0,0 +1,281 @@
|
||||
/*_ CONIO.H Modified by Joe Huffman October 19, 1990 */
|
||||
/* Copyright (C) 1988-1989 by Walter Bright */
|
||||
/* All Rights Reserved */
|
||||
/* Written by Walter Bright */
|
||||
|
||||
#ifndef __CONIO_H
|
||||
#define __CONIO_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _cdecl getche(void);
|
||||
int _cdecl getch(void);
|
||||
int _cdecl kbhit(void);
|
||||
|
||||
/****************************************************************************
|
||||
The return value from getch() and getche() for the second byte if the first
|
||||
byte is 0.
|
||||
****************************************************************************/
|
||||
#define _KB_F1 59 /* Function key F1. */
|
||||
#define _KB_F2 60
|
||||
#define _KB_F3 61
|
||||
#define _KB_F4 62
|
||||
#define _KB_F5 63
|
||||
#define _KB_F6 64
|
||||
#define _KB_F7 65
|
||||
#define _KB_F8 66
|
||||
#define _KB_F9 67
|
||||
#define _KB_F10 68
|
||||
|
||||
#define _KB_HOME 71
|
||||
#define _KB_UP 72
|
||||
#define _KB_PGUP 73
|
||||
#define _KB_LEFT 75
|
||||
#define _KB_RIGHT 77
|
||||
#define _KB_END 79
|
||||
#define _KB_DOWN 80
|
||||
#define _KB_PGDN 81
|
||||
#define _KB_INS 82
|
||||
#define _KB_BACK_TAB 15
|
||||
|
||||
#define _KB_SF1 84 /* Shift F1. */
|
||||
#define _KB_SF2 85
|
||||
#define _KB_SF3 86
|
||||
#define _KB_SF4 87
|
||||
#define _KB_SF5 88
|
||||
#define _KB_SF6 89
|
||||
#define _KB_SF7 90
|
||||
#define _KB_SF8 91
|
||||
#define _KB_SF9 92
|
||||
#define _KB_SF10 93
|
||||
|
||||
#define _KB_CF1 94 /* Control F1. */
|
||||
#define _KB_CF2 95
|
||||
#define _KB_CF3 96
|
||||
#define _KB_CF4 97
|
||||
#define _KB_CF5 98
|
||||
#define _KB_CF6 99
|
||||
#define _KB_CF7 100
|
||||
#define _KB_CF8 101
|
||||
#define _KB_CF9 102
|
||||
#define _KB_CF10 103
|
||||
|
||||
#define _KB_AF1 104 /* Alt F1. */
|
||||
#define _KB_AF2 105
|
||||
#define _KB_AF3 106
|
||||
#define _KB_AF4 107
|
||||
#define _KB_AF5 108
|
||||
#define _KB_AF6 109
|
||||
#define _KB_AF7 110
|
||||
#define _KB_AF8 111
|
||||
#define _KB_AF9 112
|
||||
#define _KB_AF10 113
|
||||
|
||||
#define _KB_DEL 83
|
||||
#define _KB_CPGUP 132 /* Control PgUp */
|
||||
#define _KB_CLEFT 115 /* Control left cursor key. */
|
||||
#define _KB_CRIGHT 116 /* Control right cursor key. */
|
||||
#define _KB_CEND 117 /* Control End */
|
||||
#define _KB_CPGDN 118 /* Control PgDn */
|
||||
#define _KB_CHOME 119 /* Control Home */
|
||||
#define _KB_A1 120 /* Alt 1 */
|
||||
#define _KB_A2 121
|
||||
#define _KB_A3 122
|
||||
#define _KB_A4 123
|
||||
#define _KB_A5 124
|
||||
#define _KB_A6 125
|
||||
#define _KB_A7 126
|
||||
#define _KB_A8 127
|
||||
#define _KB_A9 128
|
||||
#define _KB_A0 129 /* Alt 0 */
|
||||
#define _KB_AMINUS 130 /* Alt keypad '-'. */
|
||||
#define _KB_APLUS 131 /* Alt keypad '+'. */
|
||||
|
||||
#if M_UNIX || M_XENIX
|
||||
extern char *ttyname(int file_handle);
|
||||
|
||||
/* Array of '\0' terminated strings for mapping function keys to strings. */
|
||||
/* See KEYBOARD(HW) in UNIX manual. */
|
||||
typedef char _strmap_t[512];
|
||||
extern int _cdecl _kb_getmapstr(_strmap_t dest_map);
|
||||
extern int _cdecl _kb_setmapstr(_strmap_t new_map);
|
||||
|
||||
#define MIOC ('k'<<8)
|
||||
|
||||
#define KBIO_SETMODE (13|MIOC) /* Put AT keyboard into XT | AT mode */
|
||||
#define KBIO_GETMODE (14|MIOC) /* Get the AT/XT keyboard mode */
|
||||
|
||||
/* keyboard mode -- set by KBIO_{S | G}ETMODE */
|
||||
#define KBM_XT 0 /* XT keyboard mode */
|
||||
#define KBM_AT 1 /* AT keyboard mode */
|
||||
|
||||
|
||||
#define KIOC ('K' << 8)
|
||||
#define KDDISPTYPE (KIOC | 1) /* return display type to user */
|
||||
#define KDMAPDISP (KIOC | 2) /* map display into user space */
|
||||
#define KDUNMAPDISP (KIOC | 3) /* unmap display from user space*/
|
||||
#define KDGKBMODE (KIOC | 6) /* get keyboard translation mode*/
|
||||
#define KDSKBMODE (KIOC | 7) /* set keyboard translation mode*/
|
||||
|
||||
/* Used with KD{G | S}ETMODE */
|
||||
#define K_RAW 0 /* send raw scan codes */
|
||||
#define K_XLATE 1 /* translates scan codes to ascii*/
|
||||
|
||||
#define KDADDIO (KIOC | 11) /* add I/O address to list */
|
||||
#define KDDELIO (KIOC | 12) /* delete I/O address from list */
|
||||
|
||||
#define KDDISPINFO (KIOC | 18) /* Get display start and size. */
|
||||
|
||||
#define KIOCSOUND (KIOC | 63) /* start sound generation */
|
||||
#define KDGKBTYPE (KIOC | 64) /* get keyboard type */
|
||||
#define KDGETLED (KIOC | 65) /* get current led states */
|
||||
#define KDSETLED (KIOC | 66) /* set current led states */
|
||||
|
||||
/* Use with ioctl(0,KDDISPINFO,&buf) */
|
||||
struct kd_dispinfo
|
||||
{ char *vaddr;
|
||||
unsigned long physaddr;
|
||||
unsigned long size;
|
||||
};
|
||||
|
||||
/* Use with ioctl(0,KDDISPTYPE,&buf) */
|
||||
struct kd_disparam
|
||||
{ long type;
|
||||
#define KD_MONO 1 /* Possible values for type. */
|
||||
#define KD_HERCULES 2
|
||||
#define KD_CGA 3
|
||||
#define KD_EGA 4
|
||||
#define KD_VGA 5
|
||||
char *addr;
|
||||
};
|
||||
|
||||
/* EGA control */
|
||||
#define EGAIOC ('E' << 8)
|
||||
#define EGAMODE (EGAIOC | 1)
|
||||
#define EGAIO (EGAIOC | 2)
|
||||
#define EGA_GET (EGAIOC | 3)
|
||||
#define EGA_IOPRIVL (EGAIOC | 4)
|
||||
|
||||
/* VGA control */
|
||||
#define VGAIOC ('E' << 8)
|
||||
#define VGAMODE (VGAIOC | 65)
|
||||
#define VGAIO (VGAIOC | 66)
|
||||
#define VGA_GET (VGAIOC | 67)
|
||||
#define VGA_IOPRIVL (VGAIOC | 68)
|
||||
|
||||
/****************************************************************************
|
||||
These strings are returned by default from the function keys under SCO UNIX
|
||||
with fgetc(stdin). If you use getch(), getche(), or kbhit() the keyboard
|
||||
is put into raw mode and fgetc(stdin) should not be used.
|
||||
|
||||
getch() and getche() return DOS compatible sequences. I.e. if a function
|
||||
key the first byte will be 0 and the next will be a number corresponding
|
||||
to actual key pressed.
|
||||
****************************************************************************/
|
||||
|
||||
#define _KB_F1_STR "\033[M" /* Key F1 */
|
||||
#define _KB_F2_STR "\033[N"
|
||||
#define _KB_F3_STR "\033[O"
|
||||
#define _KB_F4_STR "\033[P"
|
||||
#define _KB_F5_STR "\033[Q"
|
||||
#define _KB_F6_STR "\033[R"
|
||||
#define _KB_F7_STR "\033[S"
|
||||
#define _KB_F8_STR "\033[T"
|
||||
#define _KB_F9_STR "\033[U"
|
||||
#define _KB_F10_STR "\033[V"
|
||||
#define _KB_F11_STR "\033[W"
|
||||
#define _KB_F12_STR "\033[X"
|
||||
|
||||
#define _KB_SF1_STR "\033[Y" /* Shifted Key F1 */
|
||||
#define _KB_SF2_STR "\033[Z"
|
||||
#define _KB_SF3_STR "\033[a"
|
||||
#define _KB_SF4_STR "\033[b"
|
||||
#define _KB_SF5_STR "\033[c"
|
||||
#define _KB_SF6_STR "\033[d"
|
||||
#define _KB_SF7_STR "\033[e"
|
||||
#define _KB_SF8_STR "\033[f"
|
||||
#define _KB_SF9_STR "\033[g"
|
||||
#define _KB_SF10_STR "\033[h"
|
||||
#define _KB_SF11_STR "\033[i"
|
||||
#define _KB_SF12_STR "\033[j"
|
||||
|
||||
#define _KB_CF1_STR "\033[k" /* Control key F1 */
|
||||
#define _KB_CF2_STR "\033[l"
|
||||
#define _KB_CF3_STR "\033[m"
|
||||
#define _KB_CF4_STR "\033[n"
|
||||
#define _KB_CF5_STR "\033[o"
|
||||
#define _KB_CF6_STR "\033[p"
|
||||
#define _KB_CF7_STR "\033[q"
|
||||
#define _KB_CF8_STR "\033[r"
|
||||
#define _KB_CF9_STR "\033[s"
|
||||
#define _KB_CF10_STR "\033[t"
|
||||
#define _KB_CF11_STR "\033[u"
|
||||
#define _KB_CF12_STR "\033[v"
|
||||
|
||||
#define _KB_CSF1_STR "\033[w" /* Control and shifted key F1 */
|
||||
#define _KB_CSF2_STR "\033[x"
|
||||
#define _KB_CSF3_STR "\033[y"
|
||||
#define _KB_CSF4_STR "\033[z"
|
||||
#define _KB_CSF5_STR "\033[@"
|
||||
#define _KB_CSF6_STR "\033[["
|
||||
#define _KB_CSF7_STR "\033[\\"
|
||||
#define _KB_CSF8_STR "\033[]"
|
||||
#define _KB_CSF9_STR "\033[^"
|
||||
#define _KB_CSF10_STR "\033[_"
|
||||
#define _KB_CSF11_STR "\033[`"
|
||||
#define _KB_CSF12_STR "\033[{"
|
||||
#define _KB_HOME_STR "\033[H"
|
||||
|
||||
#define _KB_UP_STR "\033[A" /* Cursor key up arrow */
|
||||
#define _KB_PGUP_STR "\033[I" /* PgUp. */
|
||||
#define _KB_MINUS_STR "-" /* Keypad '-' key. */
|
||||
#define _KB_LEFT_STR "\033[D" /* Cursor key left arrow */
|
||||
#define _KB_5_STR "\033[E" /* Keypad '5' key. */
|
||||
#define _KB_RIGHT_STR "\033[C" /* Cursor key right arrow */
|
||||
#define _KB_PLUS_STR "+" /* Keypad '+' key. */
|
||||
#define _KB_END_STR "\033[F"
|
||||
#define _KB_DOWN_STR "\033[B" /* Cursor key down arrow */
|
||||
#define _KB_PGDN_STR "\033[G" /* PgDn. */
|
||||
#define _KB_INS_STR "\033[L"
|
||||
|
||||
#define _KB_5 76 /* Keypad 5. */
|
||||
#define _KB_PLUS 78 /* Keypad '+'. */
|
||||
#define _KB_MINUS 74 /* Keypad '-'. */
|
||||
|
||||
#define _KB_CSF1 104 /* Control Shift F1. */
|
||||
#define _KB_CSF2 105
|
||||
#define _KB_CSF3 106
|
||||
#define _KB_CSF4 107
|
||||
#define _KB_CSF5 108
|
||||
#define _KB_CSF6 109
|
||||
#define _KB_CSF7 110
|
||||
#define _KB_CSF8 111
|
||||
#define _KB_CSF9 112
|
||||
#define _KB_CSF10 113
|
||||
|
||||
#define _KB_F11 133 /* F11 for Extended keyboards (101-104 keys). */
|
||||
#define _KB_F12 134
|
||||
#define _KB_SF11 135 /* Shift F11 for Extended keyboards. */
|
||||
#define _KB_SF12 136
|
||||
#define _KB_CF11 137 /* Control F11 for Extended keyboards. */
|
||||
#define _KB_CF12 138
|
||||
#define _KB_CSF11 139 /* Control Shift F11 for Extended keyboards. */
|
||||
#define _KB_CSF12 140
|
||||
|
||||
#else /* M_UNIX || M_XENIX */
|
||||
|
||||
/* DOS only */
|
||||
unsigned char _cdecl inp(unsigned);
|
||||
unsigned char _cdecl outp(unsigned,char);
|
||||
int _cdecl inpw(unsigned);
|
||||
int _cdecl outpw(unsigned,unsigned);
|
||||
|
||||
#endif /* M_UNIX || M_XENIX */
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __CONIO_H */
|
||||
|
25
Zortech C++ v30r1/INCLUDE/CONTROLC.H
Normal file
25
Zortech C++ v30r1/INCLUDE/CONTROLC.H
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* controlc.h
|
||||
*
|
||||
* handles control C/Break under DOS and DOS16RM
|
||||
* and OS/2 and DOS386
|
||||
*
|
||||
* written by: G. Eric Engstrom
|
||||
*/
|
||||
|
||||
#ifndef __CONTROLC_H
|
||||
#define __CONTROLC_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
int _cdecl controlc_open(void); /* installs controlC/Break handler */
|
||||
int _cdecl controlc_close(void); /* de installs controlC/Break handler */
|
||||
|
||||
void (_cdecl *_controlc_handler)(void); /* user supplied function goes here */
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
64
Zortech C++ v30r1/INCLUDE/CTYPE.H
Normal file
64
Zortech C++ v30r1/INCLUDE/CTYPE.H
Normal file
@ -0,0 +1,64 @@
|
||||
/*_ ctype.h Fri Apr 28 1989 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __CTYPE_H
|
||||
#define __CTYPE_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#define __CDECL
|
||||
#else
|
||||
#define __CDECL _cdecl
|
||||
#endif
|
||||
|
||||
#define _SPC 8 /* white space */
|
||||
#define _CTL 0x20 /* control char */
|
||||
#define _BLK 0x40 /* ' ' */
|
||||
#define _HEX 0x80 /* hex digit */
|
||||
#define _UC 1 /* upper case letter */
|
||||
#define _LC 2 /* lower case letter */
|
||||
#define _PNC 0x10 /* punctuation */
|
||||
#define _DIG 4 /* dig */
|
||||
|
||||
extern const char __CDECL _ctype[];
|
||||
|
||||
int __CDECL isalnum(int);
|
||||
int __CDECL isalpha(int);
|
||||
int __CDECL iscntrl(int);
|
||||
int __CDECL isdigit(int);
|
||||
int __CDECL isgraph(int);
|
||||
int __CDECL islower(int);
|
||||
int __CDECL isprint(int);
|
||||
int __CDECL ispunct(int);
|
||||
int __CDECL isspace(int);
|
||||
int __CDECL isupper(int);
|
||||
int __CDECL isxdigit(int);
|
||||
int __CDECL toupper(int);
|
||||
int __CDECL tolower(int);
|
||||
|
||||
#define isalnum(c) (_ctype[(c)+1]&(_UC|_LC|_DIG))
|
||||
#define isalpha(c) (_ctype[(c)+1]&(_UC|_LC))
|
||||
#define iscntrl(c) (_ctype[(c)+1]&_CTL)
|
||||
#define isdigit(c) (_ctype[(c)+1]&_DIG)
|
||||
#define isgraph(c) (_ctype[(c)+1]&(_UC|_LC|_DIG|_PNC))
|
||||
#define islower(c) (_ctype[(c)+1]&_LC)
|
||||
#define isprint(c) (_ctype[(c)+1]&(_UC|_LC|_DIG|_PNC|_BLK))
|
||||
#define ispunct(c) (_ctype[(c)+1]&_PNC)
|
||||
#define isspace(c) (_ctype[(c)+1]&_SPC)
|
||||
#define isupper(c) (_ctype[(c)+1]&_UC)
|
||||
#define isxdigit(c) (_ctype[(c)+1]&_HEX)
|
||||
|
||||
#ifndef __STDC__
|
||||
|
||||
#define isascii(c) ((unsigned)(c)<0200)
|
||||
#define toascii(c) ((c)&0x7F)
|
||||
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __CTYPE_H */
|
81
Zortech C++ v30r1/INCLUDE/CUSTCNTL.H
Normal file
81
Zortech C++ v30r1/INCLUDE/CUSTCNTL.H
Normal file
@ -0,0 +1,81 @@
|
||||
/*
|
||||
* CUSTOM CONTROL LIBRARY - HEADER FILE
|
||||
*
|
||||
*/
|
||||
|
||||
/* general size definitions */
|
||||
#define CTLTYPES 12 /* number of control types */
|
||||
#define CTLDESCR 22 /* size of control menu name */
|
||||
#define CTLCLASS 20 /* max size of class name */
|
||||
#define CTLTITLE 94 /* max size of control text */
|
||||
|
||||
/**/
|
||||
|
||||
/*
|
||||
* CONTROL STYLE DATA STRUCTURE
|
||||
*
|
||||
* This data structure is used by the class style dialog function
|
||||
* to set and/or reset various control attributes.
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
WORD wX; /* x origin of control */
|
||||
WORD wY; /* y origin of control */
|
||||
WORD wCx; /* width of control */
|
||||
WORD wCy; /* height of control */
|
||||
WORD wId; /* control child id */
|
||||
DWORD dwStyle; /* control style */
|
||||
char szClass[CTLCLASS]; /* name of control class */
|
||||
char szTitle[CTLTITLE]; /* control text */
|
||||
} CTLSTYLE;
|
||||
|
||||
typedef CTLSTYLE * PCTLSTYLE;
|
||||
typedef CTLSTYLE FAR * LPCTLSTYLE;
|
||||
|
||||
/**/
|
||||
|
||||
/*
|
||||
* CONTROL DATA STRUCTURE
|
||||
*
|
||||
* This data structure is returned by the control options function
|
||||
* when enquiring about the capabilities of a particular control.
|
||||
* Each control may contain various types (with predefined style
|
||||
* bits) under one general class.
|
||||
*
|
||||
* The width and height fields are used to provide the host
|
||||
* application with a suggested size. The values in these fields
|
||||
* could be either in pixels or in rc coordinates. If it is in pixel,
|
||||
* the most sigificant bit(MSB) is on. If the MSB is off, it is in rc
|
||||
* coordinates.
|
||||
*
|
||||
* The cursor and bitmap handles reference objects which can be
|
||||
* used by the dialog editor in the placement and definition of
|
||||
* new, user-defined control classes. However, dialog editor in win30
|
||||
* does not use these fields.
|
||||
*
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
WORD wType; /* type style */
|
||||
WORD wWidth; /* suggested width */
|
||||
WORD wHeight; /* suggested height */
|
||||
DWORD dwStyle; /* default style */
|
||||
char szDescr[CTLDESCR]; /* menu name */
|
||||
} CTLTYPE;
|
||||
|
||||
typedef struct {
|
||||
WORD wVersion; /* control version */
|
||||
WORD wCtlTypes; /* control types */
|
||||
char szClass[CTLCLASS]; /* control class name */
|
||||
char szTitle[CTLTITLE]; /* control title */
|
||||
char szReserved[10]; /* reserved for future use */
|
||||
CTLTYPE Type[CTLTYPES]; /* control type list */
|
||||
} CTLINFO;
|
||||
|
||||
typedef CTLINFO * PCTLINFO;
|
||||
typedef CTLINFO FAR * LPCTLINFO;
|
||||
|
||||
/* These two function prototypes are used by dialog editor */
|
||||
typedef DWORD (FAR PASCAL *LPFNSTRTOID)( LPSTR );
|
||||
typedef WORD (FAR PASCAL *LPFNIDTOSTR)( WORD, LPSTR, WORD );
|
115
Zortech C++ v30r1/INCLUDE/DDE.H
Normal file
115
Zortech C++ v30r1/INCLUDE/DDE.H
Normal file
@ -0,0 +1,115 @@
|
||||
|
||||
/* DDE window messages */
|
||||
|
||||
#define WM_DDE_FIRST 0x03E0
|
||||
#define WM_DDE_INITIATE (WM_DDE_FIRST)
|
||||
#define WM_DDE_TERMINATE (WM_DDE_FIRST+1)
|
||||
#define WM_DDE_ADVISE (WM_DDE_FIRST+2)
|
||||
#define WM_DDE_UNADVISE (WM_DDE_FIRST+3)
|
||||
#define WM_DDE_ACK (WM_DDE_FIRST+4)
|
||||
#define WM_DDE_DATA (WM_DDE_FIRST+5)
|
||||
#define WM_DDE_REQUEST (WM_DDE_FIRST+6)
|
||||
#define WM_DDE_POKE (WM_DDE_FIRST+7)
|
||||
#define WM_DDE_EXECUTE (WM_DDE_FIRST+8)
|
||||
#define WM_DDE_LAST (WM_DDE_FIRST+8)
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| DDEACK structure
|
||||
|
|
||||
| Structure of wStatus (LOWORD(lParam)) in WM_DDE_ACK message
|
||||
| sent in response to a WM_DDE_DATA, WM_DDE_REQUEST, WM_DDE_POKE,
|
||||
| WM_DDE_ADVISE, or WM_DDE_UNADVISE message.
|
||||
|
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
typedef struct {
|
||||
unsigned bAppReturnCode:8,
|
||||
reserved:6,
|
||||
fBusy:1,
|
||||
fAck:1;
|
||||
} DDEACK;
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| DDEADVISE structure
|
||||
|
|
||||
| WM_DDE_ADVISE parameter structure for hOptions (LOWORD(lParam))
|
||||
|
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
typedef struct {
|
||||
unsigned reserved:14,
|
||||
fDeferUpd:1,
|
||||
fAckReq:1;
|
||||
int cfFormat;
|
||||
} DDEADVISE;
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| DDEDATA structure
|
||||
|
|
||||
| WM_DDE_DATA parameter structure for hData (LOWORD(lParam)).
|
||||
| The actual size of this structure depends on the size of
|
||||
| the Value array.
|
||||
|
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
typedef struct {
|
||||
unsigned unused:12,
|
||||
fResponse:1,
|
||||
fRelease:1,
|
||||
reserved:1,
|
||||
fAckReq:1;
|
||||
int cfFormat;
|
||||
BYTE Value[1];
|
||||
} DDEDATA;
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| DDEPOKE structure
|
||||
|
|
||||
| WM_DDE_POKE parameter structure for hData (LOWORD(lParam)).
|
||||
| The actual size of this structure depends on the size of
|
||||
| the Value array.
|
||||
|
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
typedef struct {
|
||||
unsigned unused:13, /* Earlier versions of DDE.H incorrectly */
|
||||
/* 12 unused bits. */
|
||||
fRelease:1,
|
||||
fReserved:2;
|
||||
int cfFormat;
|
||||
BYTE Value[1]; /* This member was named rgb[1] in previous */
|
||||
/* versions of DDE.H */
|
||||
|
||||
} DDEPOKE;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
The following typedef's were used in previous versions of the Windows SDK.
|
||||
They are still valid. The above typedef's define exactly the same structures
|
||||
as those below. The above typedef names are recommended, however, as they
|
||||
are more meaningful.
|
||||
|
||||
Note that the DDEPOKE structure typedef'ed in earlier versions of DDE.H did
|
||||
not correctly define the bit positions.
|
||||
----------------------------------------------------------------------------*/
|
||||
|
||||
typedef struct {
|
||||
unsigned unused:13,
|
||||
fRelease:1,
|
||||
fDeferUpd:1,
|
||||
fAckReq:1;
|
||||
int cfFormat;
|
||||
} DDELN;
|
||||
|
||||
typedef struct {
|
||||
unsigned unused:12,
|
||||
fAck:1,
|
||||
fRelease:1,
|
||||
fReserved:1,
|
||||
fAckReq:1;
|
||||
int cfFormat;
|
||||
BYTE rgb[1];
|
||||
} DDEUP;
|
||||
|
18
Zortech C++ v30r1/INCLUDE/DIRECT.H
Normal file
18
Zortech C++ v30r1/INCLUDE/DIRECT.H
Normal file
@ -0,0 +1,18 @@
|
||||
/*_ direct.h Mon Jun 4 1990 Modified by: Walter Bright */
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef unsigned size_t;
|
||||
|
||||
char * _cdecl getcwd(char *,size_t);
|
||||
int _cdecl _chdrive(int);
|
||||
int _cdecl _getdrive(void);
|
||||
int _cdecl chdir(char *);
|
||||
int _cdecl mkdir(char *);
|
||||
int _cdecl rmdir(char *);
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
92
Zortech C++ v30r1/INCLUDE/DISP.H
Normal file
92
Zortech C++ v30r1/INCLUDE/DISP.H
Normal file
@ -0,0 +1,92 @@
|
||||
/*_ disp.h Thu Dec 6 1990 */
|
||||
/* Copyright (C) 1985-1990 by Walter Bright */
|
||||
/* All rights reserved */
|
||||
/* Written by Walter Bright */
|
||||
|
||||
#ifndef __DISP_H
|
||||
#define __DISP_H 1 /* prevent multiple #include's */
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int
|
||||
_cdecl disp_numrows,
|
||||
_cdecl disp_numcols,
|
||||
_cdecl disp_cursorrow,
|
||||
_cdecl disp_cursorcol;
|
||||
|
||||
extern int
|
||||
_cdecl disp_printf(char *,...),
|
||||
_cdecl disp_getmode(void),
|
||||
_cdecl disp_getattr(void),
|
||||
_cdecl disp_putc(int);
|
||||
extern void
|
||||
_cdecl disp_levelblockpoke(int,int,int,int,unsigned,unsigned *,unsigned,unsigned *,unsigned),
|
||||
_cdecl disp_open(void),
|
||||
_cdecl disp_puts(const char *),
|
||||
_cdecl disp_box(int,int,unsigned,unsigned,unsigned,unsigned),
|
||||
_cdecl disp_close(void),
|
||||
_cdecl disp_usebios(void),
|
||||
_cdecl disp_move(int,int),
|
||||
_cdecl disp_flush(void),
|
||||
_cdecl disp_eeol(void),
|
||||
_cdecl disp_eeop(void),
|
||||
_cdecl disp_startstand(void),
|
||||
_cdecl disp_endstand(void),
|
||||
_cdecl disp_setattr(int),
|
||||
_cdecl disp_setcursortype(int),
|
||||
_cdecl disp_pokew(int,int,unsigned short),
|
||||
_cdecl disp_scroll(int,unsigned,unsigned,unsigned,unsigned,unsigned),
|
||||
_cdecl disp_setmode(unsigned char),
|
||||
_cdecl disp_peekbox(unsigned short *,unsigned,unsigned,unsigned,unsigned),
|
||||
_cdecl disp_pokebox(unsigned short *,unsigned,unsigned,unsigned,unsigned),
|
||||
_cdecl disp_set43(void),
|
||||
_cdecl disp_reset43(void),
|
||||
_cdecl disp_fillbox(unsigned,unsigned,unsigned,unsigned,unsigned),
|
||||
_cdecl disp_hidecursor(void),
|
||||
_cdecl disp_showcursor(void);
|
||||
extern unsigned short _cdecl disp_peekw(int,int);
|
||||
|
||||
/* Globals for IBM PC displays (read only): */
|
||||
extern unsigned char
|
||||
_cdecl disp_mono,
|
||||
_cdecl disp_mode,
|
||||
_cdecl disp_inited,
|
||||
_cdecl disp_ega;
|
||||
extern unsigned _cdecl disp_base;
|
||||
|
||||
#if M_UNIX || M_XENIX
|
||||
extern unsigned char _cdecl disp_scomode, _cdecl disp_captured;
|
||||
extern int _cdecl disp_vt_number;
|
||||
extern char _cdecl *disp_offset;
|
||||
#else
|
||||
extern unsigned char _cdecl disp_snowycga;
|
||||
#endif
|
||||
|
||||
/***************************
|
||||
* Some attributes for the text display adapters for disp_setattr():
|
||||
*/
|
||||
|
||||
#define DISP_REVERSEVIDEO 0x70
|
||||
#define DISP_NORMAL 0x07
|
||||
#define DISP_UNDERLINE 0x01
|
||||
#define DISP_NONDISPLAY 0x00
|
||||
|
||||
/* The following attribute bits should be OR'ed in: */
|
||||
#define DISP_INTENSITY 0x08
|
||||
#define DISP_BLINK 0x80
|
||||
|
||||
/*****************************
|
||||
* Values for disp_setcursortype():
|
||||
*/
|
||||
|
||||
#define DISP_CURSORBLOCK (disp_mono ? 0x000C : 0x0007) /* block cursor */
|
||||
#define DISP_CURSORHALF (disp_mono ? 0x060C : 0x0307) /* half-size cursor */
|
||||
#define DISP_CURSORUL (disp_mono ? 0x0B0C : 0x0707) /* underline cursor */
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DISP_H */
|
412
Zortech C++ v30r1/INCLUDE/DOS.H
Normal file
412
Zortech C++ v30r1/INCLUDE/DOS.H
Normal file
@ -0,0 +1,412 @@
|
||||
/*_ dos.h Sat Aug 19 1989 Modified by: Walter Bright */
|
||||
/* Copyright (C) 1985-1991 by Walter Bright */
|
||||
/* All rights reserved */
|
||||
/* Written by Walter Bright */
|
||||
|
||||
#ifndef __DOS_H
|
||||
#define __DOS_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !(M_XENIX || M_UNIX)
|
||||
#pragma ZTC align 1 /* no alignment for DOS structs */
|
||||
#endif
|
||||
|
||||
typedef unsigned size_t;
|
||||
|
||||
/* DOS and IBM PC specific declarations */
|
||||
|
||||
#if DOS386
|
||||
/* Valid for both Pharlap and x386. */
|
||||
extern unsigned short _x386_zero_base_selector;
|
||||
|
||||
/* The following is actually only for X386, not Pharlap. */
|
||||
/***************
|
||||
Absolute address is given. Selector is returned in dx, offset in eax. A
|
||||
selector is normally allocated so the offset will normally be zero. If all
|
||||
selectors are being used, the offset is returned in eax with
|
||||
_x386_zero_base_selector in dx. This should provide working long pointers to
|
||||
most applications even if we have insufficient selectors. Return of zero in
|
||||
eax indicates allocation of a selector unless the requested base was zero in
|
||||
which case it is ambiguous. Nonzero indicates all selectors have been
|
||||
allocated and _x386_zero_base_selector is in dx, requested absolute address
|
||||
is in eax. In all cases the descriptor has a 4 gbyte limit.
|
||||
****************/
|
||||
extern void _far *(*_x386_mk_protected_ptr)(unsigned long abs_address);
|
||||
|
||||
/***************
|
||||
Pass a far pointer. Offset portion of pointer is ignored, selector is
|
||||
examined to see if it matches pointers previously allocated. If the selector
|
||||
is indeed a user definable selector then it is deactivated and a 0 is
|
||||
returned. Any attempt to use the selector after it has been freed will
|
||||
result in a general protection fault.
|
||||
|
||||
If the pointer does not contain a selector created through a call to
|
||||
mk_protected_ptr then it returns a -1 with no action taken. This also
|
||||
happens if mk_protected_ptr returns nonzero in eax and an attempt is made to
|
||||
free the associated selector.
|
||||
****************/
|
||||
extern int (*_x386_free_protected_ptr)(void _far *);
|
||||
|
||||
/***************
|
||||
Function is called with a far pointer. It determines the absolute address
|
||||
of that pointer and returns the address in eax.
|
||||
****************/
|
||||
extern unsigned long(*_x386_get_abs_address)(void _far *ptr);
|
||||
#endif
|
||||
|
||||
/* Register structure required for functions int86() and intdos() */
|
||||
|
||||
#if M_I386 || M_I486
|
||||
|
||||
struct DWORDREGS
|
||||
{ unsigned eax,ebx,ecx,edx,esi,edi,cflag,flags;
|
||||
};
|
||||
struct WORDREGS
|
||||
{ unsigned short ax,eaxmsw,bx,ebxmsw,cx,ecxmsw,dx,edxmsw,
|
||||
si,esimsw,di,edimsw;
|
||||
unsigned cflag,flags;
|
||||
};
|
||||
struct BYTEREGS
|
||||
{ unsigned char al,ah,ax2,ax3,bl,bh,bx2,bx3,
|
||||
cl,ch,cx2,cx3,dl,dh,dx2,dx3;
|
||||
};
|
||||
union REGS { struct DWORDREGS e; struct WORDREGS x; struct BYTEREGS h; };
|
||||
|
||||
struct SREGS { unsigned short es,cs,ss,ds,fs,gs; };
|
||||
|
||||
#else
|
||||
|
||||
struct WORDREGS { unsigned ax,bx,cx,dx,si,di,cflag,flags; };
|
||||
struct BYTEREGS {unsigned char al,ah,bl,bh,cl,ch,dl,dh; };
|
||||
union REGS { struct WORDREGS x; struct BYTEREGS h; };
|
||||
struct SREGS { unsigned es,cs,ss,ds; };
|
||||
|
||||
#endif
|
||||
|
||||
int _cdecl int86(int,union REGS *,union REGS *);
|
||||
int _cdecl int86x(int,union REGS *,union REGS *,struct SREGS *);
|
||||
int _cdecl intdos(union REGS *,union REGS *);
|
||||
int _cdecl intdosx(union REGS *,union REGS *,struct SREGS *);
|
||||
void _cdecl segread(struct SREGS *);
|
||||
|
||||
#if DOS386
|
||||
int _cdecl int86_real(int,union REGS *,union REGS *);
|
||||
int _cdecl int86x_real(int,union REGS *,union REGS *,struct SREGS *);
|
||||
#endif
|
||||
|
||||
#if (M_UNIX || M_XENIX)
|
||||
|
||||
/***************
|
||||
The _vt_ functions help support the use of virtural terminals. See SCREEN(HW)
|
||||
for the basics of the ioctl()'s which are hidden by this set of functions.
|
||||
Use _vt_add() to add functions to be called at time when requests are made
|
||||
to switch screens. Your function will be passed either VT_RELDISP or
|
||||
VT_ACTIVATE to identify which action is being taken. If you do not wish to
|
||||
release the screen return VT_FALSE for relsig (VT_TRUE if you are ready to
|
||||
release it). The return value for acqsig is ignored.
|
||||
|
||||
You may add as many functions to be notified as you wish -- the only memory
|
||||
constraints are governed by malloc(). Remove functions with _vt_remove.
|
||||
|
||||
If you wish to switch to another screen use _vt_activate(). Screen numbers
|
||||
are normally 1 -> 12. To find your screen number use _vt_get_num().
|
||||
****************/
|
||||
|
||||
/***************
|
||||
ioctls supported by the VT
|
||||
****************/
|
||||
#define VTIOC ('v' << 8)
|
||||
#define VT_OPENQRY (VTIOC | 1)
|
||||
#define VT_SETMODE (VTIOC | 2)
|
||||
#define VT_GETMODE (VTIOC | 3)
|
||||
#define VT_RELDISP (VTIOC | 4)
|
||||
#define VT_ACTIVATE (VTIOC | 5)
|
||||
|
||||
/***************
|
||||
Modes of VT_RELDISP
|
||||
****************/
|
||||
#define VT_FALSE 0 /* user will not release display */
|
||||
#define VT_TRUE 1 /* user releases display */
|
||||
#define VT_ACKACQ 2 /* user acknowleges the acquire signal */
|
||||
|
||||
/***************
|
||||
Modes of struct vt_mode.mode
|
||||
****************/
|
||||
#define VT_AUTO 0 /* this vt switching is automatic */
|
||||
#define VT_PROCESS 1 /* this vt switching controlled by a process */
|
||||
|
||||
struct vt_mode {char mode, waitv; short relsig, acqsig, frsig;};
|
||||
|
||||
typedef int (*_vt_sig_func_t)(int);
|
||||
|
||||
/***************
|
||||
Return the mode the VT handler is in.
|
||||
****************/
|
||||
void _vt_get_mode(struct vt_mode *p);
|
||||
|
||||
/***************
|
||||
Set the new mode to use with this VT. Return -1 if failure.
|
||||
****************/
|
||||
int _vt_set_mode(struct vt_mode *p);
|
||||
|
||||
/***************
|
||||
Get this processes VT screen number.
|
||||
Return -1 if failure or screen number if successful.
|
||||
****************/
|
||||
int _vt_get_num(void);
|
||||
|
||||
/***************
|
||||
Set this VT to be the active one. Return -1 if failure.
|
||||
****************/
|
||||
int _vt_activate(int vt_num);
|
||||
|
||||
/***************
|
||||
Adds a another function to the list to be notified in the event of a
|
||||
release/acquire request. Returns -1 if failed.
|
||||
****************/
|
||||
int _vt_add(_vt_sig_func_t func);
|
||||
|
||||
/***************
|
||||
Remove this function from the list of functions to be notified in the event
|
||||
of a release/acquire request. Returns -1 if failure to remove it.
|
||||
****************/
|
||||
int _vt_remove(_vt_sig_func_t func);
|
||||
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
struct FIND /* struct used by findfirst() and findnext() */
|
||||
{
|
||||
struct stat stat;
|
||||
unsigned short attribute;/* attribute found (FA_XXXX) */
|
||||
unsigned short time,date;/* file's time and date */
|
||||
unsigned long size; /* file's size */
|
||||
char name[16]; /* filename followed by 0 byte */
|
||||
};
|
||||
|
||||
/* Directory entry attributes */
|
||||
/* Use S_XXXX bit masks in sys/stat.h. */
|
||||
|
||||
#define FA_NORMAL 0x00
|
||||
#define FA_DIREC S_IFDIR
|
||||
#else
|
||||
struct FIND /* struct used by findfirst() and findnext() */
|
||||
{ char reserved[21]; /* reserved by DOS */
|
||||
char attribute; /* attribute found (FA_XXXX) */
|
||||
unsigned short time,date; /* file's time and date */
|
||||
unsigned long size; /* file's size */
|
||||
char name[13]; /* filename followed by 0 byte */
|
||||
};
|
||||
|
||||
struct find_t /* used by _dos_findfirst() and _dos_findnext() */
|
||||
{ char reserved[21]; /* reserved by DOS */
|
||||
char attrib; /* attribute found (FA_XXXX) */
|
||||
unsigned short wr_time,wr_date; /* file's last write */
|
||||
unsigned long size; /* file's size */
|
||||
char name[13]; /* filename followed by 0 byte */
|
||||
};
|
||||
/* Directory entry attributes */
|
||||
#define FA_NORMAL 0x00
|
||||
#define FA_RDONLY 0x01
|
||||
#define FA_HIDDEN 0x02
|
||||
#define FA_SYSTEM 0x04
|
||||
#define FA_LABEL 0x08
|
||||
#define FA_DIREC 0x10
|
||||
#define FA_ARCH 0x20
|
||||
|
||||
#define _A_NORMAL 0x00
|
||||
#define _A_RDONLY 0x01
|
||||
#define _A_HIDDEN 0x02
|
||||
#define _A_SYSTEM 0x04
|
||||
#define _A_VOLID 0x08
|
||||
#define _A_SUBDIR 0x10
|
||||
#define _A_ARCH 0x20
|
||||
|
||||
#endif
|
||||
|
||||
struct FIND * _cdecl findfirst(const char *,int),* _cdecl findnext(void);
|
||||
|
||||
#if MSDOS || _WINDOWS
|
||||
int _cdecl _dos_findfirst(char *, unsigned, struct find_t *);
|
||||
int _cdecl _dos_findnext(struct find_t *);
|
||||
#endif
|
||||
|
||||
extern unsigned short _cdecl _psp;
|
||||
extern unsigned char _cdecl _osmajor;
|
||||
extern unsigned char _cdecl _osminor;
|
||||
extern unsigned char _cdecl _osmode;
|
||||
extern volatile int _cdecl _doserrno; /* MS-DOS error codes. Refer to the */
|
||||
/* ERROR RETURN TABLE in your MS-DOS */
|
||||
/* manual. */
|
||||
|
||||
/***************************
|
||||
* Define macros to get at the segment and offset of a far pointer.
|
||||
*/
|
||||
|
||||
#define FP_OFF(fp) ((unsigned)(fp))
|
||||
#if M_I386 || M_I486
|
||||
extern unsigned _cdecl FP_SEG(void _far *);
|
||||
#else
|
||||
#define FP_SEG(fp) ((unsigned)((unsigned long)(fp) >> 16))
|
||||
#endif
|
||||
|
||||
/* Generate a far pointer from a segment and an offset */
|
||||
#if M_I386 || M_I486
|
||||
extern void _far * _cdecl MK_FP(unsigned short,unsigned);
|
||||
#define MK_FP(seg,offset) MK_FP((seg),(unsigned)(offset))
|
||||
#else
|
||||
#define MK_FP(seg,offset) \
|
||||
((void _far *)(((unsigned long)(seg)<<16) | (unsigned)(offset)))
|
||||
#endif
|
||||
|
||||
void _far * _cdecl _farptr_norm(void _far *);
|
||||
void _far * _cdecl _farptr_fromlong(long);
|
||||
long _cdecl _farptr_tolong(void _far *);
|
||||
long _cdecl _farptr_diff(void _far *,void _far *);
|
||||
|
||||
/***********************************
|
||||
* Far storage allocation functions
|
||||
*/
|
||||
|
||||
void _far * _cdecl farmalloc(unsigned long size);
|
||||
void _far * _cdecl farcalloc(unsigned long numelems,unsigned long elemsize);
|
||||
void _far * _cdecl farrealloc(void _far *oldptr,unsigned long newsize);
|
||||
int _cdecl farfree(void _far *ptr);
|
||||
unsigned long _cdecl farcoreleft(void);
|
||||
|
||||
/*******************************
|
||||
* File modes for open().
|
||||
*/
|
||||
|
||||
#define O_RDONLY 0
|
||||
#define O_WRONLY 1
|
||||
#define O_RDWR 2
|
||||
|
||||
#define O_APPEND 8
|
||||
#define O_NOINHERIT 0x80
|
||||
#define O_CREAT 0x100
|
||||
#define O_TRUNC 0x200
|
||||
#define O_EXCL 0x400
|
||||
|
||||
/* structure for dos_exterr */
|
||||
|
||||
struct DOSERROR
|
||||
{
|
||||
int exterror; /* extended error code */
|
||||
char eclass; /* error class */
|
||||
char action; /* recommended action */
|
||||
char locus; /* error locus */
|
||||
};
|
||||
|
||||
/* structure for dos_setdate/dos_getdate */
|
||||
|
||||
struct dos_date_t
|
||||
{
|
||||
char day;
|
||||
char month;
|
||||
short year;
|
||||
char dayofweek;
|
||||
};
|
||||
|
||||
/* structure for dos_settime/dos_gettime */
|
||||
|
||||
struct dos_time_t
|
||||
{
|
||||
char hour;
|
||||
char minute;
|
||||
char second;
|
||||
char hsecond;
|
||||
};
|
||||
|
||||
/* DOS specific functions: */
|
||||
int _cdecl dos_creat(char *,int);
|
||||
void _cdecl dos_set_verify(int);
|
||||
void _cdecl dos_set_ctrl_break(int);
|
||||
int _cdecl dos_get_verify(void);
|
||||
int _cdecl dos_get_ctrl_break(void);
|
||||
long _cdecl dos_getdiskfreespace(int);
|
||||
int _cdecl dos_abs_disk_read(int,int,int,char *);
|
||||
int _cdecl dos_abs_disk_write(int,int,int,char *);
|
||||
void _cdecl dos_setdrive(unsigned, unsigned *);
|
||||
void _cdecl dos_getdrive(unsigned *);
|
||||
int _cdecl dos_setftime(int, unsigned, unsigned);
|
||||
int _cdecl dos_getftime(int, unsigned *, unsigned *);
|
||||
int _cdecl dos_setfileattr(char *, unsigned);
|
||||
int _cdecl dos_getfileattr(char *, unsigned *);
|
||||
int _cdecl dos_exterror(struct DOSERROR *);
|
||||
int _cdecl dosexterror(struct DOSERROR *);
|
||||
int _cdecl dos_setdate(struct dos_date_t *);
|
||||
int _cdecl dos_getdate(struct dos_date_t *);
|
||||
int _cdecl dos_settime(struct dos_time_t *);
|
||||
int _cdecl dos_gettime(struct dos_time_t *);
|
||||
|
||||
/* For inline code generation for inp(), inpw(), outp() and outpw() functions */
|
||||
unsigned char _cdecl _inline_inp(unsigned);
|
||||
int _cdecl _inline_inpw(unsigned);
|
||||
unsigned char _cdecl _inline_outp(unsigned,char);
|
||||
int _cdecl _inline_outpw(unsigned,unsigned);
|
||||
|
||||
#define inp _inline_inp
|
||||
#define inpw _inline_inpw
|
||||
#define outp _inline_outp
|
||||
#define outpw _inline_outpw
|
||||
|
||||
#if M_I386 || M_I486
|
||||
long _cdecl inpl(unsigned);
|
||||
long _cdecl outpl(unsigned,unsigned long);
|
||||
#endif
|
||||
|
||||
#if _WINDOWS
|
||||
#define _chkstack()
|
||||
#else
|
||||
size_t _cdecl _chkstack(void);
|
||||
#endif
|
||||
void _cdecl peek(unsigned,unsigned,void *,size_t);
|
||||
void _cdecl poke(unsigned,unsigned,const void *,size_t);
|
||||
int _cdecl bdos(char,...);
|
||||
int _cdecl bdosx(char,void *,char);
|
||||
|
||||
/* From parall.asm */
|
||||
unsigned _cdecl dos_alloc(unsigned);
|
||||
unsigned _cdecl dos_calloc(unsigned);
|
||||
int _cdecl dos_free(unsigned);
|
||||
void _cdecl _copy(unsigned,unsigned,unsigned);
|
||||
unsigned long _cdecl dos_avail(void);
|
||||
unsigned _cdecl dos_setblock(unsigned,unsigned);
|
||||
|
||||
/* From response.c */
|
||||
int _pascal response_expand(int *,char ***);
|
||||
|
||||
int _cdecl cputype(void);
|
||||
|
||||
/* Use this macro if you wish to cause wildcard expansion */
|
||||
#if MSDOS || _WINDOWS || __OS2__
|
||||
#define WILDCARDS extern int _cdecl __wildcard; int *__wild = &__wildcard;
|
||||
#else
|
||||
#define WILDCARDS
|
||||
#endif
|
||||
|
||||
/* Executable type */
|
||||
#define EXE_DOS 1 /* MSDOS */
|
||||
#define EXE_DOS16RM 2 /* Rational 286 DOS Extender */
|
||||
#define EXE_ZPM 4 /* ZPM 286 DOS Extender */
|
||||
#define EXE_PHAR386 8 /* Pharlap 386 DOS Extender */
|
||||
#define EXE_DOSX 0x10 /* DOSX 386 DOS Extender */
|
||||
#define EXE_WINDOWS 0x20 /* Windows 3 */
|
||||
#define EXE_OS2 0x40 /* OS/2 1.x */
|
||||
#define EXE_SCOUNIX 0x80 /* SCO Unix */
|
||||
|
||||
extern unsigned short _cdecl _exe_type; /* EXE_XXXX */
|
||||
|
||||
#if !(M_UNIX || M_XENIX)
|
||||
#pragma ZTC align
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __DOS_H */
|
149
Zortech C++ v30r1/INCLUDE/DPMI.H
Normal file
149
Zortech C++ v30r1/INCLUDE/DPMI.H
Normal file
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* dpmi.h
|
||||
*
|
||||
* high level interface to dpmi
|
||||
*
|
||||
* written by: G. Eric Engstrom
|
||||
*/
|
||||
|
||||
#if __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#pragma ZTC align 1
|
||||
|
||||
typedef struct TINFO
|
||||
{
|
||||
unsigned short BufferSize;
|
||||
void _far * (*RealModeSaveFunction)(unsigned short Operation,void _far *Buffer);
|
||||
void _far * (*PModeSaveFunction)(unsigned short Operation,void _far *Buffer);
|
||||
}
|
||||
Info_t;
|
||||
|
||||
typedef struct TMEMINFO
|
||||
{
|
||||
unsigned long LargestContiguousBlock;
|
||||
unsigned long MaxunloackedPageAllocation;
|
||||
unsigned long MaxLoackedPageAllocation;
|
||||
unsigned long PagesOfLinearSpace;
|
||||
unsigned long TotalUnlockedPages;
|
||||
unsigned long TotalFreePages;
|
||||
unsigned long TotalPhysicalPages;
|
||||
unsigned long FreePagesOfLinearSpace;
|
||||
unsigned long SizeOfPagingPartition;
|
||||
unsigned long Reserved[3];
|
||||
}
|
||||
MemInfo_t;
|
||||
|
||||
typedef struct TSWITCHTABLE
|
||||
{
|
||||
unsigned short newDS;
|
||||
unsigned short newES;
|
||||
unsigned short newSS;
|
||||
unsigned short newCS;
|
||||
unsigned long newIP; /* upper 16 bits invalid in 16-bit mode */
|
||||
unsigned long newSP; /* upper 16 bits invalid in 16-bit mode */
|
||||
}
|
||||
SwitchTable_t;
|
||||
|
||||
typedef struct TSWITCHFUNCTION
|
||||
{
|
||||
void _far * (*RealModeSwitchFunction)(void _far *SwitchTable);
|
||||
void _far * (*PModeSwitchFunction)(void _far *SwitchTable);
|
||||
}
|
||||
SwitchFunction_t;
|
||||
|
||||
typedef struct TENVIRON
|
||||
{
|
||||
unsigned char MajorVersion;
|
||||
unsigned char MinorVersion;
|
||||
unsigned short Flags;
|
||||
unsigned char ProcessorType;
|
||||
unsigned char MasterPICInterrupt;
|
||||
unsigned char SlavePICInterrupt;
|
||||
}
|
||||
Environ_t;
|
||||
|
||||
typedef struct TLINEAR
|
||||
{
|
||||
unsigned long Handle;
|
||||
unsigned long LinearAddress;
|
||||
}
|
||||
Linear_T;
|
||||
|
||||
#pragma ZTC align
|
||||
|
||||
/* descriptor management services */
|
||||
short dpmi_IsRealMode(void);
|
||||
short dpmi_AllocLDTDescriptors(unsigned short count);
|
||||
short dpmi_SegToDescriptor(unsigned short segment);
|
||||
short dpmi_FreeDescriptor(unsigned short segment);
|
||||
short dpmi_GetNextDescriptorIncrement(void);
|
||||
void _far * dpmi_GetBaseAddress(unsigned short segment);
|
||||
short dpmi_SetBaseAddress(unsigned short segment,void _far *linearaddr);
|
||||
short dpmi_SetSegLimit(unsigned short segment,unsigned long linearlen);
|
||||
short dpmi_SetDescriptorRights(unsigned short segment,unsigned short rights);
|
||||
short dpmi_CreateCodeSegAlias(unsigned short segment);
|
||||
void _far * dpmi_GetDescriptor(unsigned short segment,void _far *descriptortable);
|
||||
void _far * dpmi_SetDescriptor(unsigned short segment,void _far *descriptortable);
|
||||
short dpmi_AllocThisLDTDescriptor(unsigned short segment);
|
||||
|
||||
/* dos memory management services */
|
||||
short dpmi_DOSAlloc(unsigned short paragraphs,void _far *results);
|
||||
short dpmi_DOSFree(unsigned short segment);
|
||||
short dpmi_DOSRealloc(unsigned short segment,unsigned short paragraphs,void _far *results);
|
||||
|
||||
/* interrupt services */
|
||||
void _far * dpmi_GetRealModeVector(unsigned short vector);
|
||||
short dpmi_SetRealModeVector(unsigned short vector,void _far *handler);
|
||||
void _far * dpmi_GetExceptionHandler(unsigned short exception);
|
||||
short dpmi_SetExceptionHandler(unsigned short exception,void _far *handler);
|
||||
void _far * dpmi_GetProtectedModeVector(unsigned short exception);
|
||||
short dpmi_SetProtectedModeVector(unsigned short exception,void _far *handler);
|
||||
|
||||
/* translation services */
|
||||
void _far * dpmi_SimRealModeInterrupt(unsigned short vector,unsigned short flags,unsigned short commonstack,void _far *callstruct);
|
||||
void _far * dpmi_CallRealModeProcWithFarRet(unsigned short flags,unsigned short commonstack,void _far *callstruct);
|
||||
void _far * dpmi_CallRealModeProcWithIRet(unsigned short flags,unsigned short commonstack,void _far *callstruct);
|
||||
void _far * dpmi_RealModeCallBackAlloc(void _far *funcptr,void _far *callstruct);
|
||||
short dpmi_RealModeCallBackFree(void _far *realmodefuncptr);
|
||||
short dpmi_GetStateSaveRestoreInfo(void _far *statesavestruct);
|
||||
short dpmi_GetRawModeSwitchInfo(void _far *switchstruct);
|
||||
short dpmi_GetVersionInfo(void _far *versionstruct);
|
||||
short dpmi_GetFreeMemInfo(void _far *freememstruct);
|
||||
short dpmi_MemBlockAlloc(unsigned long size,void _far *newmemstruct);
|
||||
short dpmi_MemBlockFree(unsigned long memhandle);
|
||||
short dpmi_MemBlockRealloc(unsigned long size,unsigned long memhandle,void _far *newmemstruct);
|
||||
|
||||
/* page locking services */
|
||||
short dpmi_LockLinearRegion(void _far *regionptr,unsigned long regionsize);
|
||||
short dpmi_UnlockLinearRegion(void _far *regionptr,unsigned long regionsize);
|
||||
short dpmi_LockRealModeRegion(void _far *regionptr,unsigned long regionsize);
|
||||
short dpmi_UnlockRealModeRegion(void _far *regionptr,unsigned long regionsize);
|
||||
unsigned long dpmi_IsPageSize(void);
|
||||
|
||||
/* demand paging performance tuning */
|
||||
short dpmi_MarkAsDemandPage(void _far *regionptr,unsigned long regionsize);
|
||||
short dpmi_DiscardPage(void _far *regionptr,unsigned long regionsize);
|
||||
|
||||
/* physical address mapping */
|
||||
short dpmi_IsLinearAddress(void _far *physicalptr,unsigned long regionsize);
|
||||
|
||||
/* virtual interrupt state functions */
|
||||
short dpmi_DisableVirtualInterruptState(void);
|
||||
short dpmi_EnableVirtualInterruptState(void);
|
||||
short dpmi_IsVirtualIntteruptState(void);
|
||||
|
||||
/* vendor specific extensions */
|
||||
void _far * dpmi_GetVendorAPI(char _far *zstringvendorname);
|
||||
|
||||
/* debug support */
|
||||
short dpmi_SetDebugWatchPoint(void _far *regionptr,short watchpointsize,short watchpointtype);
|
||||
short dpmi_ClearDebugWatchPoint(short watchpointhandle);
|
||||
short dpmi_IsDebugWatchPointState(short watchpointhandle);
|
||||
short dpmi_ResetDebugWatchPoint(short watchpointhandle);
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
157
Zortech C++ v30r1/INCLUDE/DRIVINIT.H
Normal file
157
Zortech C++ v30r1/INCLUDE/DRIVINIT.H
Normal file
@ -0,0 +1,157 @@
|
||||
/*
|
||||
* drivinit.h
|
||||
*
|
||||
* Header file for printer driver initialization using ExtDeviceMode()
|
||||
* and DeviceCapabilities().
|
||||
*
|
||||
*/
|
||||
|
||||
/* size of a device name string */
|
||||
#define CCHDEVICENAME 32
|
||||
|
||||
/* current version of specification */
|
||||
#define DM_SPECVERSION 0x300
|
||||
|
||||
/* field selection bits */
|
||||
#define DM_ORIENTATION 0x0000001L
|
||||
#define DM_PAPERSIZE 0x0000002L
|
||||
#define DM_PAPERLENGTH 0x0000004L
|
||||
#define DM_PAPERWIDTH 0x0000008L
|
||||
#define DM_SCALE 0x0000010L
|
||||
#define DM_COPIES 0x0000100L
|
||||
#define DM_DEFAULTSOURCE 0x0000200L
|
||||
#define DM_PRINTQUALITY 0x0000400L
|
||||
#define DM_COLOR 0x0000800L
|
||||
#define DM_DUPLEX 0x0001000L
|
||||
|
||||
/* orientation selections */
|
||||
#define DMORIENT_PORTRAIT 1
|
||||
#define DMORIENT_LANDSCAPE 2
|
||||
|
||||
/* paper selections */
|
||||
#define DMPAPER_FIRST DMPAPER_LETTER
|
||||
#define DMPAPER_LETTER 1 // Letter 8 1/2 x 11 in
|
||||
#define DMPAPER_LETTERSMALL 2 // Letter Small 8 1/2 x 11 in
|
||||
#define DMPAPER_TABLOID 3 // Tabloid 11 x 17 in
|
||||
#define DMPAPER_LEDGER 4 // Ledger 17 x 11 in
|
||||
#define DMPAPER_LEGAL 5 // Legal 8 1/2 x 14 in
|
||||
#define DMPAPER_STATEMENT 6 // Statement 5 1/2 x 8 1/2 in
|
||||
#define DMPAPER_EXECUTIVE 7 // Executive"7 1/2 x 10 in
|
||||
#define DMPAPER_A3 8 // A3 297 x 420 mm
|
||||
#define DMPAPER_A4 9 // A4 210 x 297 mm
|
||||
#define DMPAPER_A4SMALL 10 // A4 Small 210 x 297 mm
|
||||
#define DMPAPER_A5 11 // A5 148 x 210 mm
|
||||
#define DMPAPER_B4 12 // B4 250 x 354
|
||||
#define DMPAPER_B5 13 // B5 182 x 257 mm
|
||||
#define DMPAPER_FOLIO 14 // Folio 8 1/2 x 13 in
|
||||
#define DMPAPER_QUARTO 15 // Quarto 215 x 275 mm
|
||||
#define DMPAPER_10X14 16 // 10x14 in
|
||||
#define DMPAPER_11X17 17 // 11x17 in
|
||||
#define DMPAPER_NOTE 18 // Note 8 1/2 x 11 in
|
||||
#define DMPAPER_ENV_9 19 // Envelope #9 3 7/8 x 8 7/8
|
||||
#define DMPAPER_ENV_10 20 // Envelope #10 4 1/8 x 9 1/2
|
||||
#define DMPAPER_ENV_11 21 // Envelope #11 4 1/2 x 10 3/8
|
||||
#define DMPAPER_ENV_12 22 // Envelope #12 4 \276 x 11
|
||||
#define DMPAPER_ENV_14 23 // Envelope #14 5 x 11 1/2
|
||||
#define DMPAPER_CSHEET 24 // C size sheet
|
||||
#define DMPAPER_DSHEET 25 // D size sheet
|
||||
#define DMPAPER_ESHEET 26 // E size sheet
|
||||
#define DMPAPER_LAST DMPAPER_ESHEET
|
||||
|
||||
#define DMPAPER_USER 256
|
||||
|
||||
/* bin selections */
|
||||
#define DMBIN_FIRST DMBIN_UPPER
|
||||
#define DMBIN_UPPER 1
|
||||
#define DMBIN_ONLYONE 1
|
||||
#define DMBIN_LOWER 2
|
||||
#define DMBIN_MIDDLE 3
|
||||
#define DMBIN_MANUAL 4
|
||||
#define DMBIN_ENVELOPE 5
|
||||
#define DMBIN_ENVMANUAL 6
|
||||
#define DMBIN_AUTO 7
|
||||
#define DMBIN_TRACTOR 8
|
||||
#define DMBIN_SMALLFMT 9
|
||||
#define DMBIN_LARGEFMT 10
|
||||
#define DMBIN_LARGECAPACITY 11
|
||||
#define DMBIN_CASSETTE 14
|
||||
#define DMBIN_LAST DMBIN_CASSETTE
|
||||
|
||||
#define DMBIN_USER 256 /* device specific bins start here */
|
||||
|
||||
/* print qualities */
|
||||
#define DMRES_DRAFT (-1)
|
||||
#define DMRES_LOW (-2)
|
||||
#define DMRES_MEDIUM (-3)
|
||||
#define DMRES_HIGH (-4)
|
||||
|
||||
/* color enable/disable for color printers */
|
||||
#define DMCOLOR_MONOCHROME 1
|
||||
#define DMCOLOR_COLOR 2
|
||||
|
||||
/* duplex enable */
|
||||
#define DMDUP_SIMPLEX 1
|
||||
#define DMDUP_VERTICAL 2
|
||||
#define DMDUP_HORIZONTAL 3
|
||||
|
||||
typedef struct _devicemode {
|
||||
char dmDeviceName[CCHDEVICENAME];
|
||||
WORD dmSpecVersion;
|
||||
WORD dmDriverVersion;
|
||||
WORD dmSize;
|
||||
WORD dmDriverExtra;
|
||||
DWORD dmFields;
|
||||
short dmOrientation;
|
||||
short dmPaperSize;
|
||||
short dmPaperLength;
|
||||
short dmPaperWidth;
|
||||
short dmScale;
|
||||
short dmCopies;
|
||||
short dmDefaultSource;
|
||||
short dmPrintQuality;
|
||||
short dmColor;
|
||||
short dmDuplex;
|
||||
} DEVMODE;
|
||||
|
||||
typedef DEVMODE * PDEVMODE, NEAR * NPDEVMODE, FAR * LPDEVMODE;
|
||||
|
||||
/* mode selections for the device mode function */
|
||||
#define DM_UPDATE 1
|
||||
#define DM_COPY 2
|
||||
#define DM_PROMPT 4
|
||||
#define DM_MODIFY 8
|
||||
|
||||
#define DM_IN_BUFFER DM_MODIFY
|
||||
#define DM_IN_PROMPT DM_PROMPT
|
||||
#define DM_OUT_BUFFER DM_COPY
|
||||
#define DM_OUT_DEFAULT DM_UPDATE
|
||||
|
||||
/* device capabilities indices */
|
||||
#define DC_FIELDS 1
|
||||
#define DC_PAPERS 2
|
||||
#define DC_PAPERSIZE 3
|
||||
#define DC_MINEXTENT 4
|
||||
#define DC_MAXEXTENT 5
|
||||
#define DC_BINS 6
|
||||
#define DC_DUPLEX 7
|
||||
#define DC_SIZE 8
|
||||
#define DC_EXTRA 9
|
||||
#define DC_VERSION 10
|
||||
#define DC_DRIVER 11
|
||||
|
||||
/* export ordinal definitions */
|
||||
#define PROC_EXTDEVICEMODE MAKEINTRESOURCE(90)
|
||||
#define PROC_DEVICECAPABILITIES MAKEINTRESOURCE(91)
|
||||
#define PROC_OLDDEVICEMODE MAKEINTRESOURCE(13)
|
||||
|
||||
/* define types of pointers to ExtDeviceMode() and DeviceCapabilities()
|
||||
* functions
|
||||
*/
|
||||
typedef WORD FAR PASCAL FNDEVMODE(HWND, HANDLE, LPDEVMODE, LPSTR, LPSTR,
|
||||
LPDEVMODE, LPSTR, WORD);
|
||||
|
||||
typedef FNDEVMODE FAR * LPFNDEVMODE;
|
||||
|
||||
typedef DWORD FAR PASCAL FNDEVCAPS(LPSTR, LPSTR, WORD, LPSTR, LPDEVMODE);
|
||||
|
||||
typedef FNDEVCAPS FAR * LPFNDEVCAPS;
|
179
Zortech C++ v30r1/INCLUDE/EMM.H
Normal file
179
Zortech C++ v30r1/INCLUDE/EMM.H
Normal file
@ -0,0 +1,179 @@
|
||||
/*_ emm.h Thu Dec 6 1990 */
|
||||
/* Expanded (LIM EMS) Memory Interface */
|
||||
|
||||
/* References:
|
||||
* Lotus/Intel/Microsoft
|
||||
* Expanded Memory Specification
|
||||
* Version 4.0
|
||||
* Available from Intel at 800-538-3373
|
||||
*/
|
||||
|
||||
#ifndef __EMM_H
|
||||
#define __EMM_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define EMM_PAGESIZE 0x4000 /* 16K page size */
|
||||
|
||||
extern int _cdecl emm_inited; /* != 0 if emm handler is initialized */
|
||||
|
||||
/********************************
|
||||
* Initialize EMM handler.
|
||||
* Returns:
|
||||
* 0 EMS installed and operating
|
||||
* !=0 No EMS detected, or it isn't functioning properly
|
||||
*/
|
||||
|
||||
int _cdecl emm_init(void);
|
||||
|
||||
/************************************
|
||||
* Get number of unallocated pages.
|
||||
* Use this function to determine how many pages available before
|
||||
* you attempt to allocate them with emm_allocpages().
|
||||
*/
|
||||
|
||||
unsigned _cdecl emm_getunalloc(void);
|
||||
|
||||
/************************************
|
||||
* Get total number of pages in EMM system.
|
||||
*/
|
||||
|
||||
unsigned _cdecl emm_gettotal(void);
|
||||
|
||||
/**********************************
|
||||
* Allocate pages.
|
||||
* It is a fatal error if there are no emm handles available.
|
||||
* Input:
|
||||
* n number of pages to allocate, 0 < n <= emm_getunalloc()
|
||||
* Returns:
|
||||
* handle that refers to these pages
|
||||
*/
|
||||
|
||||
int _cdecl emm_allocpages(unsigned);
|
||||
|
||||
/****************************
|
||||
* Map page from logical page to physical page.
|
||||
*/
|
||||
|
||||
void _cdecl emm_maphandle(int handle,unsigned logical,unsigned physical);
|
||||
|
||||
/*****************************
|
||||
* Save the state of the page mapping registers associated with
|
||||
* the handle. The state is restored by emm_restorepagemap().
|
||||
* You cannot nest emm_savepagemap()/emm_restorepagemap() calls for
|
||||
* a single handle.
|
||||
* There is a limited number of handles that can be saved with this
|
||||
* function, fixed by the particular EMM handler. The application should
|
||||
* strive to never require more than 1. This function will abort the
|
||||
* program if there is no more handle space.
|
||||
*/
|
||||
|
||||
void _cdecl emm_savepagemap(int handle);
|
||||
|
||||
void _cdecl emm_restorepagemap(int handle);
|
||||
|
||||
/********************************
|
||||
* Get physical page address of EMM frame page.
|
||||
* Input:
|
||||
* pagenum EMM page number (0..3)
|
||||
* Returns:
|
||||
* pointer to base of that page
|
||||
* NULL if error
|
||||
*/
|
||||
|
||||
void far * _cdecl emm_physpage(int);
|
||||
|
||||
/********************************
|
||||
* Terminate use of EMM handler.
|
||||
*/
|
||||
|
||||
void _cdecl emm_term(void);
|
||||
|
||||
/*******************************
|
||||
* Get all handles pages.
|
||||
* Input:
|
||||
* *p points to array to be filled in. The number of entries
|
||||
* needed is returned by emm_gethandlecount();
|
||||
* Output:
|
||||
* *p data filled in
|
||||
* Returns:
|
||||
* 0 success
|
||||
* !=0 error code
|
||||
*/
|
||||
|
||||
struct emm_handle_s
|
||||
{ int handle; /* active handle */
|
||||
int pages; /* number of pages alloc'd to that handle */
|
||||
};
|
||||
|
||||
int _cdecl emm_gethandlespages(struct emm_handle_s *p);
|
||||
|
||||
/*******************************
|
||||
* Get number of active emm handles.
|
||||
* Returns:
|
||||
* number of active handles
|
||||
*/
|
||||
|
||||
int _cdecl emm_gethandlecount(void);
|
||||
|
||||
/****************************
|
||||
* Deallocate pages allocated for a handle by emm_allocpages().
|
||||
* The program needs to deallocate its handles before exiting the program,
|
||||
* else the pages will remain allocated and unavailable for use
|
||||
* by other programs.
|
||||
*/
|
||||
|
||||
void _cdecl emm_deallocpages(int handle);
|
||||
|
||||
/****************************
|
||||
* Return version number of EMM.
|
||||
* Returns 0 if not initialized.
|
||||
* The number is in the form of 2 hex digits, the most significant
|
||||
* being the major version and the least the minor.
|
||||
* For example, 0x32 means version 3.2.
|
||||
*/
|
||||
|
||||
int _cdecl emm_getversion(void);
|
||||
|
||||
/************************************
|
||||
* The following four functions allow a program to save and restore
|
||||
* the state of the EMM mapping registers. These are used in place
|
||||
* of emm_savepagemap() and emm_restorepagemap() when you don't
|
||||
* want to use a handle.
|
||||
*/
|
||||
|
||||
/************************************
|
||||
* Get and return size in bytes of buffer needed by the functions
|
||||
* emm_getpagemap(), emm_setpagemap() and emm_getsetpagemap().
|
||||
*/
|
||||
|
||||
unsigned _cdecl emm_getpagemapsize(void);
|
||||
|
||||
/*******************************
|
||||
* Write state of mapping registers into *dst.
|
||||
*/
|
||||
|
||||
void _cdecl emm_getpagemap(void *dst);
|
||||
|
||||
/*******************************
|
||||
* Set state of mapping registers from values previously saved by
|
||||
* emm_getpagemap() into *src.
|
||||
*/
|
||||
|
||||
void _cdecl emm_setpagemap(void *src);
|
||||
|
||||
/**********************************
|
||||
* Equivalent to:
|
||||
* emm_getpagemap(dst);
|
||||
* emm_setpagemap(src);
|
||||
*/
|
||||
|
||||
void _cdecl emm_getsetpagemap(void *dst,void *src);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __EMM_H */
|
93
Zortech C++ v30r1/INCLUDE/ERRNO.H
Normal file
93
Zortech C++ v30r1/INCLUDE/ERRNO.H
Normal file
@ -0,0 +1,93 @@
|
||||
/*_ errno.h October 3, 1990 Modified by Joe Huffman October 3, 1990 */
|
||||
|
||||
#ifndef __ERRNO_H
|
||||
#define __ERRNO_H 1
|
||||
|
||||
#ifdef __STDC__
|
||||
extern volatile int errno;
|
||||
#else
|
||||
extern volatile int _cdecl errno;
|
||||
#endif
|
||||
|
||||
#if M_UNIX || M_XENIX
|
||||
#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
|
||||
#ifndef ERANGE
|
||||
#define ERANGE 34
|
||||
#endif
|
||||
#define ENOMSG 35
|
||||
#define EIDRM 36
|
||||
#define ECHRNG 37
|
||||
#define EL2NSYNC 38
|
||||
#define EL3HLT 39
|
||||
#define EL3RST 40
|
||||
#define ELNRNG 41
|
||||
#define EUNATCH 42
|
||||
#define ENOCSI 43
|
||||
#define EL2HLT 44
|
||||
#define EDEADLK 45
|
||||
#define ENOLCK 46
|
||||
|
||||
/* XENIX error numbers */
|
||||
#define EUCLEAN 135
|
||||
#define ENOTNAM 137
|
||||
#define ENAVAIL 138
|
||||
#define EISNAM 139
|
||||
#define EREMOTEIO 140
|
||||
#define EREMDEV 142
|
||||
#define ENOTEMPTY 145
|
||||
|
||||
#else
|
||||
/* Values for errno corresponding to MS-DOS error numbers: */
|
||||
|
||||
#define ENOENT 2
|
||||
#define ENOTDIR 3
|
||||
#define EMFILE 4
|
||||
#define EACCES 5
|
||||
#define EBADF 6
|
||||
#define ENOMEM 8
|
||||
#define EINVAL 22
|
||||
#define EEXIST 80
|
||||
|
||||
/* Our own values for errno: */
|
||||
#define E2BIG 1000
|
||||
#define ENOEXEC 1001
|
||||
#define EDOM 1002
|
||||
#ifndef ERANGE
|
||||
#define ERANGE 1003
|
||||
#endif
|
||||
#endif /* M_UNIX || M_XENIX */
|
||||
|
||||
#endif /* __ERRNO_H */
|
||||
|
56
Zortech C++ v30r1/INCLUDE/EXITSTAT.H
Normal file
56
Zortech C++ v30r1/INCLUDE/EXITSTAT.H
Normal file
@ -0,0 +1,56 @@
|
||||
/* exitstate.h
|
||||
* pushs and pops exit frame, so exit & atexit return points can
|
||||
* be controlled. Useful in Windows and for turning a standalone
|
||||
* program into a subroutine. A maximum of 16 states can be saved.
|
||||
*
|
||||
* Written by: G. Eric Engstrom
|
||||
*/
|
||||
|
||||
#ifndef __EXITSTAT_H
|
||||
#define __EXITSTAT_H
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#ifndef __STDC__
|
||||
int _cdecl exit_PUSHSTATE(void);
|
||||
int _cdecl exit_popstate(void);
|
||||
#else
|
||||
int exit_PUSHSTATE(void);
|
||||
int exit_popstate(void);
|
||||
#endif
|
||||
|
||||
extern jmp_buf _exit_state;
|
||||
|
||||
#define exit_pushstate(RESULT) \
|
||||
((exit_PUSHSTATE()!=0)?RESULT=2:\
|
||||
(((RESULT=setjmp(_exit_state))!=0)?exit_popstate(),RESULT:RESULT))
|
||||
|
||||
/* example usage:
|
||||
* int a;
|
||||
* if (exit_pushstate(a) == 0)
|
||||
* {
|
||||
* sub(); // your functions that may call exit
|
||||
* exit_popstate(); // only call if exit_pushstate returns 0
|
||||
* }
|
||||
* else
|
||||
* {
|
||||
* --a; // a == return value now,
|
||||
* } // exit_pushstate always returns exit value + 1
|
||||
*
|
||||
* ...
|
||||
*
|
||||
* void sub()
|
||||
* {
|
||||
* ...
|
||||
* exit(2); // rather than exit program,
|
||||
* } // this will 'call up' to exit_pushstate
|
||||
* // and then drop down to the else case with a == 3
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
114
Zortech C++ v30r1/INCLUDE/FCNTL.H
Normal file
114
Zortech C++ v30r1/INCLUDE/FCNTL.H
Normal file
@ -0,0 +1,114 @@
|
||||
/*_ fcntl.h Tue Dec 19 1989 Modified by: Walter Bright */
|
||||
/* Copyright (C) 1985-1989 by Walter Bright */
|
||||
/* All rights reserved */
|
||||
/* Written by Walter Bright */
|
||||
|
||||
#ifndef __FCNTL_H
|
||||
#define __FCNTL_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#define __CDECL
|
||||
#else
|
||||
#define __CDECL _cdecl
|
||||
#endif
|
||||
|
||||
/*******************************
|
||||
* File modes for open() and fcnt().
|
||||
*/
|
||||
|
||||
#define O_RDONLY 0
|
||||
#define O_WRONLY 1
|
||||
#define O_RDWR 2
|
||||
#define O_APPEND 8
|
||||
#define O_CREAT 0x100
|
||||
#define O_TRUNC 0x200
|
||||
#define O_EXCL 0x400
|
||||
|
||||
#if M_UNIX || M_XENIX
|
||||
|
||||
#if M_XOUT
|
||||
|
||||
#define CF_RDLCK 1
|
||||
#define CF_WRLCK 2
|
||||
#define CF_UNLCK 3
|
||||
|
||||
#define CMN_RDLCK 3
|
||||
#define CMN_WRLCK 1
|
||||
#define CMN_UNLCK 0
|
||||
#define F_RDLCK CMN_RDLCK
|
||||
#define F_WRLCK CMN_WRLCK
|
||||
#define F_UNLCK CMN_UNLCK
|
||||
|
||||
#define O_ACCMODE 3
|
||||
#define O_NDELAY 4
|
||||
#define O_NONBLOCK 4
|
||||
|
||||
#define O_SYNCW 0020
|
||||
#define O_SYNC O_SYNCW
|
||||
|
||||
#else /* M_XOUT */
|
||||
|
||||
#define F_RDLCK 01
|
||||
#define F_WRLCK 02
|
||||
#define F_UNLCK 03
|
||||
|
||||
#endif /* M_XOUT */
|
||||
|
||||
/* Values for open() */
|
||||
#define O_NOCTTY 0x800
|
||||
|
||||
/* Values for fcntl() */
|
||||
#define F_DUPFD 0
|
||||
#define F_GETFD 1
|
||||
#define F_SETFD 2
|
||||
#define F_GETFL 3
|
||||
#define F_SETFL 4
|
||||
#define F_GETLK 5
|
||||
#define F_SETLK 6
|
||||
#define F_SETLKW 7
|
||||
#define F_CHKFL 8
|
||||
#define F_ALLOCSP 10
|
||||
#define F_FREESP 11
|
||||
#define F_CHSIZE 0x6000
|
||||
#define F_RDCHK 0x6001
|
||||
|
||||
/* Value for F_SETFD */
|
||||
#define FD_CLOEXEC 0x01
|
||||
|
||||
#define F_LK_NBRLCK 0x6100
|
||||
#define F_LK_NBLCK 0x6200
|
||||
#define F_LK_UNLCK 0x6300
|
||||
#define F_LK_RLCK 0x7100
|
||||
#define F_LK_LOCK 0x7200
|
||||
|
||||
#define LK_LCKTYPE(a) ((a>>8)&7)
|
||||
#define LK_CMDTYPE(a) ((a>>12)&7)
|
||||
|
||||
struct flock {
|
||||
short l_type;
|
||||
short l_whence;
|
||||
long l_start;
|
||||
long l_len;
|
||||
short l_sysid;
|
||||
short l_pid;
|
||||
};
|
||||
|
||||
int __CDECL rdchk(int filedes);
|
||||
int __CDECL fcntl(int filedes, int cmd, int arg);
|
||||
|
||||
#else /* M_XENIX || M_UNIX */
|
||||
#define O_NOINHERIT 0x80
|
||||
#define O_BINARY 0 /* MSC compatible mode (files are ALWAYS O_BINARY anyway) */
|
||||
#define O_TEXT 0x4000
|
||||
#endif /* M_UNIX || M_XENIX */
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __FCNTL_H */
|
||||
|
529
Zortech C++ v30r1/INCLUDE/FG.H
Normal file
529
Zortech C++ v30r1/INCLUDE/FG.H
Normal file
@ -0,0 +1,529 @@
|
||||
/* Copyright Prototronics */
|
||||
/* 6490 Kaniksu Shores Circle */
|
||||
/* Sandpoint, ID 83864-9445 */
|
||||
/* Joe Huffman */
|
||||
/* September 18, 1990 */
|
||||
/* FAX: 208-263-8772 */
|
||||
/* email: fg@proto.com */
|
||||
/* All Rights Reserved */
|
||||
|
||||
/* Modified by Joe Huffman December 10, 1990
|
||||
*/
|
||||
|
||||
#ifndef __FG_H
|
||||
#define __FG_H 1
|
||||
|
||||
#ifdef M_I386
|
||||
#define _FAR
|
||||
#else
|
||||
#define _FAR _far
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Definition of basic coordinate system */
|
||||
|
||||
/************************************
|
||||
* Coordinate system (right-handed):
|
||||
*
|
||||
* Y2 +
|
||||
* |
|
||||
* |
|
||||
* |
|
||||
* Y1 +-----------+
|
||||
* X1 X2
|
||||
*
|
||||
* Where:
|
||||
* X1 <= X2
|
||||
* Y1 <= Y2
|
||||
*/
|
||||
|
||||
typedef int fg_coord_t; /* data type for all coordinates */
|
||||
|
||||
/*****************************
|
||||
* Coordinate box.
|
||||
* box[FG_X1] = x coordinate of left edge
|
||||
* box[FG_Y1] = y coordinate of bottom edge
|
||||
* box[FG_X2] = x coordinate of right edge
|
||||
* box[FG_Y2] = y coordinate of top edge
|
||||
*/
|
||||
|
||||
typedef fg_coord_t fg_box_t[4];
|
||||
typedef fg_coord_t _FAR *fg_pbox_t; /* pointer to a box */
|
||||
typedef fg_coord_t const _FAR *fg_const_pbox_t; /* pointer to a const box */
|
||||
typedef fg_coord_t fg_line_t[4];
|
||||
typedef fg_coord_t _FAR *fg_pline_t; /* pointer to a line */
|
||||
typedef fg_coord_t const _FAR *fg_const_pline_t;/* pointer to a const line */
|
||||
typedef unsigned short fg_pattern_t[16]; /* fill pattern data */
|
||||
typedef unsigned short _FAR *fg_ppattern_t; /* Pointer to a pattern type*/
|
||||
|
||||
#define FG_X1 0
|
||||
#define FG_Y1 1
|
||||
#define FG_X2 2
|
||||
#define FG_Y2 3
|
||||
|
||||
/* Midpoint of 2 coordinates */
|
||||
#define fg_coord_midpoint(x1,x2) (((x1) + (x2)) / 2)
|
||||
|
||||
/* Determine # of pixels high a box is */
|
||||
#define fg_box_height(b) ((b)[FG_Y2] - (b)[FG_Y1] + 1)
|
||||
|
||||
/* Determine # of pixels wide a box is */
|
||||
#define fg_box_width(b) ((b)[FG_X2] - (b)[FG_X1] + 1)
|
||||
|
||||
/* The number of bytes to allocate for a matrix with a bounding box 'b'. */
|
||||
#define fg_matrix_size(b) (sizeof(char)*((b)[FG_X2]+1+7)/8*((b)[FG_Y2]+1))
|
||||
|
||||
/* The number of pixels in a box 'b'. Helpful for calculating memory for
|
||||
a fg_readbox. */
|
||||
#define fg_box_area(b) (((long)fg_box_width(b))*((long)fg_box_height(b)))
|
||||
|
||||
/* Fill in the coordinates of a line. */
|
||||
#define fg_make_line(l,x1,y1,x2,y2) ((l)[FG_X1]=(x1),(l)[FG_Y1]=(y1),\
|
||||
(l)[FG_X2]=(x2),(l)[FG_Y2]=(y2))
|
||||
|
||||
/* Fill in the coordinates of a box. */
|
||||
#define fg_make_box(b,x1,y1,x2,y2) ((b)[FG_X1]=(x1),(b)[FG_Y1]=(y1),\
|
||||
(b)[FG_X2]=(x2),(b)[FG_Y2]=(y2))
|
||||
|
||||
/****** Return TRUE if line is horizontal ******/
|
||||
#define fg_line_horiz(line) ((line)[FG_Y1] == (line)[FG_Y2])
|
||||
|
||||
/****** Return TRUE if line is vertical ******/
|
||||
#define fg_line_vert(line) ((line)[FG_X1] == (line)[FG_X2])
|
||||
|
||||
/* Determine if line is 0 length */
|
||||
#define fg_line_zerolength(ln)\
|
||||
((ln)[FG_X1] == (ln)[FG_X2] && (ln)[FG_Y1] == (ln)[FG_Y2])
|
||||
|
||||
/* Copy boxes. */
|
||||
#define fg_box_cpy(to,from) ((fg_pbox_t)fg_line_cpy((to),(from)))
|
||||
|
||||
/* Change the definition of a FG_COLOR. */
|
||||
/* As in 'fg_setcolornum(FG_WHITE, 7);' */
|
||||
#define fg_setcolornum(old_color,new_num) ((old_color) = (new_num))
|
||||
|
||||
/* Change the motion algorithm. */
|
||||
/* 0 is linear, 1 is non-linear. All other values reserved. */
|
||||
#define fg_msm_motion(a) (fg.msm_motion = a)
|
||||
|
||||
/* Change the mouse output function. */
|
||||
#define fg_msm_setoutput(a) (fg.msm_output_p = a)
|
||||
|
||||
/*************************
|
||||
* Rotation values:
|
||||
*/
|
||||
|
||||
#define FG_ROT0 0
|
||||
#define FG_ROT90 1
|
||||
#define FG_ROT180 2
|
||||
#define FG_ROT270 3
|
||||
|
||||
/*************************
|
||||
* Mouse button defines.
|
||||
* Status of mouse has these bits set if that button is depressed.
|
||||
* 1 if down 0 if up.
|
||||
*/
|
||||
|
||||
#define FG_MSM_LEFT 1
|
||||
#define FG_MSM_RIGHT 2
|
||||
#define FG_MSM_MIDDLE 4
|
||||
|
||||
typedef struct fg_msm_cursor
|
||||
{
|
||||
char _FAR *matrix;
|
||||
fg_box_t box;
|
||||
fg_coord_t hot_x, hot_y;
|
||||
} fg_msm_cursor_t;
|
||||
|
||||
typedef struct fg_font
|
||||
{
|
||||
char _far * fontptr; /* First 128 characters. */
|
||||
char _far * fontptr2; /* Second 128 characters. */
|
||||
fg_box_t charbox;
|
||||
fg_coord_t baseline; /* Distance from bottom of char to baseline. */
|
||||
} fg_font_t;
|
||||
|
||||
typedef unsigned char fg_color_t;
|
||||
|
||||
typedef struct FG_HANDLE _FAR *fg_handle_t;
|
||||
|
||||
/* Defines for the type of display encountered */
|
||||
#define FG_NULL 0 /* all graphics are routed to bit bucket */
|
||||
|
||||
/* The following correspond to BIOS video modes: */
|
||||
#ifndef __OS2__
|
||||
#define FG_CGAMEDRES 4 /* IBM CGA in 320*200 color (mode 0x04) */
|
||||
#endif
|
||||
|
||||
#define FG_CGAHIRES 6 /* IBM CGA in 640*200 (mode 0x06) */
|
||||
#define FG_EGALOWRES 0x0D /* EGA in 320 x 200 x 16 colors (mode 0x0D) */
|
||||
#define FG_EGACOLOR 0x0E /* EGA with regular color display (mode 0x0E) */
|
||||
#define FG_EGAMONO 0x0F /* EGA with IBM monochrome monitor (mode 0x0F) */
|
||||
#define FG_EGAECD 0x10 /* EGA with enhanced color display (mode 0x10) */
|
||||
#define FG_VGA11 0x11 /* IBM VGA in 640*480, 1 color */
|
||||
#define FG_VGA12 0x12 /* IBM VGA in 640*480, 16 colors */
|
||||
|
||||
#if !(M_UNIX || __OS2__)
|
||||
#define FG_ORCHIDPROHIRES 0x29 /* ORCHID PRO DESIGNER VGA 800*600, 16 colors */
|
||||
#define FG_PARADISEHIRES 0x58 /* PARADISE VGA 800*600, 16 colors */
|
||||
#define FG_TRIDENTHIRES 0x5B /* TRIDENT VGA 800*600, 16 colors */
|
||||
#define FG_ATI61 0xA61/* ATI 640 x 400, 256 colors. */
|
||||
#define FG_ATI62 0xA62/* ATI 640 x 480, 256 colors. */
|
||||
#define FG_ATI63 0xA63/* ATI 800 x 600, 256 colors. */
|
||||
#define FG_VEGAVGAHIRES 0x62 /* VIDEO 7 VEGA VGA in 800 x 600, 16 colors */
|
||||
#define FG_DFIHIRES 0x64 /* Diamond Flower Instruments 800 x 600 x 16 */
|
||||
#define FG_VESA6A 0x6A /* VESA mode 0x6A, 800 x 600, 16 colors. */
|
||||
#define FG_EVGAHIRES 0x70 /* Everex EVGA in 800 x 600, 16 colors */
|
||||
#define FG_TOSHIBA 0x74 /* Toshiba J-3100 */
|
||||
|
||||
#define FG_VESA0 0x100/* VESA mode 0x100, 640 x 400, 256 colors. */
|
||||
#define FG_VESA1 0x101/* VESA mode 0x101, 640 x 480, 256 colors. */
|
||||
#define FG_VESA2 0x102/* VESA mode 0x102, 800 x 600, 16 colors. */
|
||||
#define FG_VESA3 0x103/* VESA mode 0x103, 800 x 600, 256 colors. */
|
||||
#define FG_VESA5 0x105/* VESA mode 0x105, 1024 x 768, 256 colors. */
|
||||
#define FG_VESA7 0x107/* VESA mode 0x107, 1280 x 1024, 256 colors. */
|
||||
|
||||
/* VESA modes not implemented. */
|
||||
#define FG_VESA4 0x104/* VESA mode 0x104, 1024 x 768, 16 colors. */
|
||||
#define FG_VESA6 0x106/* VESA mode 0x106, 1280 x 1024, 16 colors. */
|
||||
|
||||
#define FG_HERCHALF 2 /* Hercules monochrome, 1 display page */
|
||||
#define FG_HERCFULL 3 /* Hercules monochrome, 2 display pages */
|
||||
#define FG_8514A -10 /* IBM 8514A */
|
||||
#define FG_TIGA 0x340/* Texas Instruments TMS340 Family - TIGA 2.0 */
|
||||
#endif
|
||||
|
||||
#ifndef __OS2__
|
||||
/* Other values for fg_display: */
|
||||
#define FG_VGA13 0x13 /* IBM VGA in 320*200, 256 colors */
|
||||
#endif /* __OS2__ */
|
||||
|
||||
/* Used for filling outlines of pixels, see fg_outlinefill(). */
|
||||
#define FG_FILL_ON_RIGHT 1 /* Don't change these without careful */
|
||||
#define FG_FILL_ON_LEFT 0 /* consideration of the source code. See */
|
||||
/* the static function delete_excess. */
|
||||
|
||||
/* Collect global variables into a single structure. */
|
||||
struct fg_state
|
||||
{
|
||||
char _FAR *version;
|
||||
int (_cdecl _FAR *init_p)(void);
|
||||
void (_cdecl _FAR *term_p)(void);
|
||||
void (_cdecl _FAR *msm_flush_p)(void);
|
||||
void (_cdecl _FAR *msm_hidecursor_p)(void);
|
||||
void (_cdecl _FAR *msm_init_p)(void);
|
||||
void (_cdecl _FAR *msm_output_p)(fg_coord_t x, fg_coord_t y);
|
||||
void (_cdecl _FAR *msm_showcursor_p)(void);
|
||||
void (_cdecl _FAR *msm_term_p)(void);
|
||||
|
||||
#define FG_LINE_MAX 12
|
||||
unsigned short int linetype[FG_LINE_MAX];
|
||||
|
||||
#define FG_COLOR_MAX 21
|
||||
int color[FG_COLOR_MAX];
|
||||
|
||||
short int saddr;
|
||||
char _far *fontptr, _far *fontptr2;
|
||||
int activepage;
|
||||
int displaypage;
|
||||
fg_box_t charbox;
|
||||
int display; /* FGxxxxx */
|
||||
fg_box_t displaybox;
|
||||
long ncolormap;
|
||||
int nsimulcolor;
|
||||
int numpages;
|
||||
int pixelx, pixely;
|
||||
/* Function pointers (initialized by fg_init_xxxx()) */
|
||||
void (_cdecl _FAR *blit_p)(fg_const_pbox_t, fg_coord_t, fg_coord_t,int,int);
|
||||
void (_cdecl _FAR *drawarc_p) (fg_color_t,int,int,fg_coord_t,fg_coord_t,
|
||||
fg_coord_t,int,int,fg_const_pbox_t);
|
||||
void (_cdecl _FAR *drawdot_p) (fg_color_t,int,int,fg_coord_t,fg_coord_t);
|
||||
void (_cdecl _FAR *drawline_p)(fg_color_t,int,int,int,fg_const_pline_t);
|
||||
void (_cdecl _FAR *drawlinep_p)(fg_color_t,int,int,int,fg_const_pline_t);
|
||||
void (_cdecl _FAR *drawmatrix_p) (fg_color_t,int,int,int,fg_coord_t,
|
||||
fg_coord_t,char _FAR *, fg_const_pbox_t,fg_const_pbox_t);
|
||||
void (_cdecl _FAR *fillbox_p) (fg_color_t, int, int, fg_const_pbox_t);
|
||||
void (_cdecl _FAR *flush_p)(void);
|
||||
void (_cdecl _FAR *putc_p)(fg_color_t,int,int,int,fg_coord_t,
|
||||
fg_coord_t,char,fg_const_pbox_t);
|
||||
void (_cdecl _FAR *readbox_p) (fg_const_pbox_t, fg_color_t _FAR *);
|
||||
fg_color_t (_cdecl _FAR *readdot_p)(fg_coord_t,fg_coord_t);
|
||||
void (_cdecl _FAR *setdisplaypage_p)(unsigned int);
|
||||
void (_cdecl _FAR *setactivepage_p)(unsigned int);
|
||||
void (_cdecl _FAR *setlinepattern_p)(int, int);
|
||||
void (_cdecl _FAR *writebox_p)(fg_const_pbox_t, const fg_color_t _FAR *);
|
||||
void (_cdecl _FAR *setpalette_p)(fg_color_t color_num, fg_color_t red,
|
||||
fg_color_t green, fg_color_t blue);
|
||||
|
||||
char text_rows, attribute, text_mode;
|
||||
unsigned char msm; /* Mouse present flag. */
|
||||
unsigned char msm_motion; /* Mouse motion translation algorithm. */
|
||||
unsigned char palette[17]; /* Only valid for some modes. */
|
||||
unsigned char captured; /* UNIX only. Non-zero if screen is active. */
|
||||
unsigned char adapter_class;/* UNIX only. EGA/VGA flag. */
|
||||
#define FG_FILL_SOLID 0
|
||||
#define FG_FILL_BSLASH 1
|
||||
#define FG_FILL_SLASH 2
|
||||
#define FG_FILL_HATCH 3
|
||||
#define FG_FILL_LINE 4
|
||||
#define FG_FILL_THICK_X 5
|
||||
#define FG_FILL_THIN_X 6
|
||||
#define FG_FILL_SCALE 7
|
||||
#define FG_FILL_WIDEDOT 8
|
||||
#define FG_FILL_CLOSEDOT 9
|
||||
#define FG_FILL_DIAMOND 10
|
||||
#define FG_FILL_USER_DEFINED 11
|
||||
#define FG_FILL_PATTERN_MAX 12
|
||||
fg_pattern_t filltype[FG_FILL_PATTERN_MAX];
|
||||
fg_handle_t saved_screen; /* UNIX only. Image is stored here while */
|
||||
/* screen is not active. */
|
||||
fg_coord_t font_baseline;
|
||||
fg_handle_t (_cdecl _FAR *save_p)(fg_const_pbox_t);
|
||||
void (_cdecl _FAR *put_handle_p)(fg_handle_t);
|
||||
void (_cdecl _FAR *getpalette_p)(fg_color_t color_num, fg_color_t _FAR *red,
|
||||
fg_color_t _FAR *green, fg_color_t _FAR *blue);
|
||||
void (_cdecl _FAR *drawellipse_p)(fg_color_t,int,int,fg_coord_t,fg_coord_t,
|
||||
fg_coord_t, fg_coord_t,int,int,fg_const_pbox_t);
|
||||
void (_cdecl _FAR *fill_p)(fg_coord_t,fg_coord_t,fg_color_t,fg_color_t);
|
||||
void (_cdecl _FAR *fillpattern_p)(fg_coord_t,fg_coord_t,fg_color_t,fg_color_t,
|
||||
int);
|
||||
void (_cdecl _FAR *free_handle_p)(fg_handle_t);
|
||||
unsigned int mallocs_outstanding;
|
||||
unsigned short int window_io_address; /* FG private. */
|
||||
unsigned short int window_num; /* FG private. */
|
||||
void (_cdecl _FAR *window_set_p)(void); /* FG private. */
|
||||
unsigned int window_size; /* FG private. */
|
||||
};
|
||||
|
||||
extern struct fg_state _cdecl fg;
|
||||
|
||||
/* For backward compatibility. */
|
||||
#define fg_activepage fg.activepage
|
||||
#define fg_charbox fg.charbox
|
||||
#define fg_color fg.color
|
||||
#define fg_display fg.display
|
||||
#define fg_displaybox fg.displaybox
|
||||
#define fg_displaypage fg.displaypage
|
||||
#define fg_linetype fg.linetype
|
||||
#define fg_ncolormap fg.ncolormap
|
||||
#define fg_nsimulcolor fg.nsimulcolor
|
||||
#define fg_numpages fg.numpages
|
||||
#define fg_pixelx fg.pixelx
|
||||
#define fg_pixely fg.pixely
|
||||
|
||||
void _cdecl _FAR fg_assert(const char _FAR *,const char _FAR *,unsigned);
|
||||
int _cdecl _FAR fg_get_type(void);
|
||||
int _cdecl _FAR fg_init_all(void);
|
||||
int _cdecl _FAR fg_init_cga(void);
|
||||
int _cdecl _FAR fg_init_egaecd(void);
|
||||
int _cdecl _FAR fg_init_egamono(void);
|
||||
int _cdecl _FAR fg_init_egacolor(void);
|
||||
int _cdecl _FAR fg_init_vga11(void);
|
||||
int _cdecl _FAR fg_init_vga12(void);
|
||||
|
||||
#if !(M_UNIX || __OS2__)
|
||||
int _cdecl _FAR fg_init_ati61();
|
||||
int _cdecl _FAR fg_init_ati62();
|
||||
int _cdecl _FAR fg_init_ati63();
|
||||
#endif
|
||||
|
||||
#ifndef __OS2__
|
||||
int _cdecl _FAR fg_init_egalowres(void);
|
||||
int _cdecl _FAR fg_init_cgamedres(void);
|
||||
int _cdecl _FAR fg_init_vga13(void);
|
||||
int _cdecl _FAR fg_init_herc(void);
|
||||
int _cdecl _FAR fg_init_herchalf(void);
|
||||
int _cdecl _FAR fg_init_hercfull(void);
|
||||
int _cdecl _FAR fg_init_paradisehires(void);
|
||||
int _cdecl _FAR fg_init_tridenthires(void);
|
||||
int _cdecl _FAR fg_init_orchidprohires(void);
|
||||
int _cdecl _FAR fg_init_dfihires(void);
|
||||
int _cdecl _FAR fg_init_evgahires(void);
|
||||
int _cdecl _FAR fg_init_vegavgahires(void);
|
||||
int _cdecl _FAR fg_init_tiga(void);
|
||||
int _cdecl _FAR fg_init_toshiba(void);
|
||||
int _cdecl _FAR fg_init_8514a(void);
|
||||
int _cdecl _FAR fg_init_vesa0(void);
|
||||
int _cdecl _FAR fg_init_vesa1(void);
|
||||
int _cdecl _FAR fg_init_vesa2(void);
|
||||
int _cdecl _FAR fg_init_vesa3(void);
|
||||
int _cdecl _FAR fg_init_vesa5(void);
|
||||
int _cdecl _FAR fg_init_vesa7(void);
|
||||
int _cdecl _FAR fg_init_vesa6A(void);
|
||||
|
||||
#if 0 /* Not implemented */
|
||||
int _cdecl _FAR fg_init_vesa4(void);
|
||||
int _cdecl _FAR fg_init_vesa6(void);
|
||||
#endif
|
||||
|
||||
unsigned _cdecl _FAR fg_msm_getpress(unsigned _FAR *,fg_coord_t _FAR *,
|
||||
fg_coord_t _FAR *);
|
||||
unsigned _cdecl _FAR fg_msm_getrelease(unsigned _FAR *,fg_coord_t _FAR *,
|
||||
fg_coord_t _FAR *);
|
||||
unsigned _cdecl _FAR fg_msm_getstatus(fg_coord_t _FAR *,fg_coord_t _FAR *);
|
||||
void _cdecl _FAR fg_msm_setarea(fg_const_pbox_t);
|
||||
void _cdecl _FAR fg_msm_setcurpos(fg_coord_t,fg_coord_t);
|
||||
void _cdecl _FAR fg_msm_setcursor(fg_msm_cursor_t cursor);
|
||||
void _cdecl _FAR fg_msm_setratio(unsigned,unsigned);
|
||||
|
||||
#endif /* __OS2__ */
|
||||
int _cdecl _FAR fg_box_enclose(fg_const_pbox_t b1, fg_const_pbox_t b2);
|
||||
int _cdecl _FAR fg_pt_inbox(fg_const_pbox_t clip,fg_coord_t x,fg_coord_t y);
|
||||
int _cdecl _FAR fg_getfillside(const fg_coord_t _FAR *p,unsigned int vertices);
|
||||
unsigned _cdecl _FAR fg_linepixels (fg_const_pline_t line);
|
||||
fg_pline_t _cdecl _FAR fg_line_cpy(fg_pline_t to, fg_const_pline_t from);
|
||||
int _cdecl _FAR fg_lineclip(fg_const_pbox_t clip, fg_const_pline_t fline,
|
||||
fg_pline_t lin);
|
||||
void _cdecl _FAR fg_setenv_variable (const char _FAR *new_string);
|
||||
void _cdecl _FAR fg_fillboxdissolve(fg_color_t color, int mode, int mask,
|
||||
fg_const_pbox_t box, unsigned int count,
|
||||
int (_cdecl _FAR *func_p)(void));
|
||||
void _cdecl _FAR fg_writeboxdissolve(fg_const_pbox_t box,
|
||||
const fg_color_t _FAR *p, unsigned int count,
|
||||
int (_cdecl _FAR *func_p)(void));
|
||||
void _cdecl _FAR fg_fillboxpattern(fg_color_t color, int mode, int mask,
|
||||
fg_const_pbox_t b,int pattern);
|
||||
void _cdecl _FAR fg_drawdotpattern(fg_color_t color,int mode,int mask,
|
||||
fg_coord_t x, fg_coord_t y, int pattern);
|
||||
int _cdecl _FAR fg_fillpolygonpattern (fg_color_t color, int mode, int mask,
|
||||
unsigned int vertices, const fg_coord_t _FAR *polygon,
|
||||
fg_const_pbox_t clipbox,int pattern);
|
||||
int _cdecl _FAR fg_fillpolygon (fg_color_t color, int mode, int mask,
|
||||
unsigned int vertices, const fg_coord_t _FAR *polygon,
|
||||
fg_const_pbox_t clipbox);
|
||||
void _cdecl _FAR fg_restore (fg_handle_t);
|
||||
void _cdecl _FAR fg_free_handle (fg_handle_t);
|
||||
void _cdecl _FAR fg_setfillpattern(int, fg_ppattern_t);
|
||||
void _cdecl _FAR fg_drawlinepattern(fg_color_t,int,int,int,fg_const_pline_t);
|
||||
void _cdecl _FAR fg_drawlineclip (fg_color_t color, int mode, int mask,
|
||||
int fg_line_type, fg_const_pline_t line,
|
||||
fg_const_pbox_t clip);
|
||||
void _cdecl _FAR fg_drawlinepatternclip (fg_color_t color, int mode, int mask,
|
||||
int pattern, fg_const_pline_t line, fg_const_pbox_t clip);
|
||||
void _cdecl _FAR fg_drawlinepclip (fg_color_t color, int mode, int mask,
|
||||
int fg_line_type, fg_const_pline_t line,
|
||||
fg_const_pbox_t clip);
|
||||
void _cdecl _FAR fg_drawbox (fg_color_t, int, int, int, fg_const_pbox_t,
|
||||
fg_const_pbox_t);
|
||||
void _cdecl _FAR fg_drawpolygon (fg_color_t color, int mode, int mask, int
|
||||
line_type, unsigned int vertices, const fg_coord_t _FAR
|
||||
*polygon, fg_const_pbox_t clipbox);
|
||||
void _cdecl _FAR fg_filloutline (fg_color_t color, int mode, int mask,
|
||||
const fg_coord_t _FAR *out_line, fg_coord_t _FAR *buffer,
|
||||
unsigned int pixels, int fill_side, fg_const_pbox_t clipbox);
|
||||
void _cdecl _FAR fg_filloutlinepattern(fg_color_t color, int mode, int mask,
|
||||
const fg_coord_t _FAR *out_line, fg_coord_t _FAR *buffer,
|
||||
unsigned int pixels, int fill_side, fg_const_pbox_t clipbox,
|
||||
int pattern);
|
||||
void _cdecl _FAR fg_puts (fg_color_t,int,int,int,fg_coord_t,fg_coord_t,
|
||||
char _FAR *, fg_const_pbox_t);
|
||||
void _cdecl _FAR fg_adjustxy (int, int, fg_coord_t _FAR *, fg_coord_t _FAR *,
|
||||
fg_const_pbox_t);
|
||||
void _cdecl _FAR fg_traverseline (int line_type, fg_const_pline_t ln_ptr,
|
||||
fg_coord_t _FAR *pt_pairs);
|
||||
void _cdecl _FAR fg_drawthickline (fg_color_t,int,int,int,fg_const_pline_t,
|
||||
fg_const_pbox_t,int);
|
||||
void _cdecl _FAR fg_set_font(const fg_font_t _FAR *newfont_p);
|
||||
void _cdecl _FAR fg_get_font(fg_font_t _FAR *dest_p);
|
||||
int _cdecl _FAR fg_boxclip(fg_const_pbox_t clip, fg_const_pbox_t box_in,
|
||||
fg_pline_t box_out);
|
||||
void _cdecl _FAR * _FAR fg_malloc(unsigned bytes);
|
||||
void _cdecl _FAR fg_free(void _FAR *p);
|
||||
|
||||
/* Use function pointers for lowest level routines */
|
||||
#define fg_blit (*fg.blit_p)
|
||||
#define fg_drawarc (*fg.drawarc_p)
|
||||
#define fg_drawellipse (*fg.drawellipse_p)
|
||||
#define fg_drawdot (*fg.drawdot_p)
|
||||
#define fg_drawline (*fg.drawline_p)
|
||||
#define fg_drawlinep (*fg.drawlinep_p)
|
||||
#define fg_drawmatrix (*fg.drawmatrix_p)
|
||||
#define fg_fillbox (*fg.fillbox_p)
|
||||
#define fg_fill (*fg.fill_p)
|
||||
#define fg_fillpattern (*fg.fillpattern_p)
|
||||
#define fg_flush (*fg.flush_p)
|
||||
#define fg_init (*fg.init_p)
|
||||
#define fg_msm_flush (*fg.msm_flush_p)
|
||||
#define fg_msm_hidecursor (*fg.msm_hidecursor_p)
|
||||
#define fg_msm_init (*fg.msm_init_p)
|
||||
#define fg_msm_showcursor (*fg.msm_showcursor_p)
|
||||
#define fg_msm_term (*fg.msm_term_p)
|
||||
#define fg_put_handle (*fg.put_handle_p)
|
||||
#define fg_putc (*fg.putc_p)
|
||||
#define fg_readbox (*fg.readbox_p)
|
||||
#define fg_readdot (*fg.readdot_p)
|
||||
#define fg_save (*fg.save_p)
|
||||
#define fg_free_handle (*fg.free_handle_p)
|
||||
#define fg_setdisplaypage (*fg.setdisplaypage_p)
|
||||
#define fg_setactivepage (*fg.setactivepage_p)
|
||||
#define fg_setlinepattern (*fg.setlinepattern_p)
|
||||
#define fg_setpalette (*fg.setpalette_p)
|
||||
#define fg_getpalette (*fg.getpalette_p)
|
||||
#define fg_term (*fg.term_p)
|
||||
#define fg_writebox (*fg.writebox_p)
|
||||
|
||||
/* Writing modes */
|
||||
#define FG_MODE_XOR 3
|
||||
#define FG_MODE_SET 0
|
||||
|
||||
/* Line types */
|
||||
#define FG_LINE_SOLID 0
|
||||
#define FG_LINE_LONG_DASH 1
|
||||
#define FG_LINE_MEDIUM_DOTTED 2
|
||||
#define FG_LINE_DASH_DOTTED 3
|
||||
#define FG_LINE_MEDIUM_DASHED 4
|
||||
#define FG_LINE_DASH_W_2_DOTS 5
|
||||
#define FG_LINE_SHORT_DASH 6
|
||||
#define FG_LINE_DENSE_DOTTED 7
|
||||
#define FG_LINE_SPARSE_DOTTED 8
|
||||
#define FG_LINE_USER_DEFINED 9
|
||||
#define FG_LINE_FG_RESERVED1 10
|
||||
#define FG_LINE_FG_RESERVED2 11
|
||||
|
||||
/* Values for color */
|
||||
#define FG_BLACK fg.color[0]
|
||||
#define FG_BLUE fg.color[1]
|
||||
#define FG_GREEN fg.color[2]
|
||||
#define FG_CYAN fg.color[3]
|
||||
/* Cyan is the same as BLUE_GREEN. */
|
||||
#define FG_BLUE_GREEN fg.color[3]
|
||||
#define FG_RED fg.color[4]
|
||||
#define FG_MAGENTA fg.color[5]
|
||||
/* Purple is the same as magenta. */
|
||||
#define FG_PURPLE fg.color[5]
|
||||
#define FG_YELLOW fg.color[6]
|
||||
#define FG_WHITE fg.color[7]
|
||||
#define FG_GRAY fg.color[8]
|
||||
#define FG_LIGHT_BLUE fg.color[9]
|
||||
#define FG_LIGHT_GREEN fg.color[10]
|
||||
#define FG_LIGHT_CYAN fg.color[11]
|
||||
/* Light blue-green is the same as light_cyan. */
|
||||
#define FG_LIGHT_BLUE_GREEN fg.color[11]
|
||||
#define FG_LIGHT_RED fg.color[12]
|
||||
#define FG_LIGHT_MAGENTA fg.color[13]
|
||||
#define FG_BROWN fg.color[14]
|
||||
/* normally an intense white */
|
||||
#define FG_LIGHT_WHITE fg.color[15]
|
||||
/* Same as LIGHT_WHITE */
|
||||
#define FG_HIGHLIGHT fg.color[15]
|
||||
/* blinking white */
|
||||
#define FG_BLINK fg.color[16]
|
||||
|
||||
/* Used to guarantee the header file matches the libraries. */
|
||||
#ifndef FG_SYNCHRONIZED
|
||||
static void _near _cdecl fg_version_sync(void)
|
||||
{
|
||||
extern char fg_version_sync_May_22_1991;
|
||||
fg_version_sync_May_22_1991 = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ifndef __FG_H */
|
||||
|
393
Zortech C++ v30r1/INCLUDE/FG.HPP
Normal file
393
Zortech C++ v30r1/INCLUDE/FG.HPP
Normal file
@ -0,0 +1,393 @@
|
||||
//_ fg.hpp Thu Sep 21 1989 Modified by: Walter Bright */
|
||||
// Copyright (C) 1989 by Zortech, All Rights Reserved
|
||||
// Written by Walter Bright
|
||||
// Modified by Joe Huffman October 8, 1989
|
||||
// Modified by Samuel Druker/Steve Teale October 14 1989
|
||||
|
||||
#ifndef __FG_HPP
|
||||
#define __FG_HPP
|
||||
|
||||
#ifndef __FG_H
|
||||
#include <fg.h>
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////////
|
||||
// Class representing the display itself.
|
||||
|
||||
class FgDisp
|
||||
{
|
||||
public:
|
||||
// Get pointer to a box describing the edges of the display
|
||||
static fg_const_pbox_t box() { return fg.displaybox; }
|
||||
|
||||
// Inquire about the coordinates of the edges of the display
|
||||
static fg_coord_t left() { return fg.displaybox[FG_X1]; }
|
||||
static fg_coord_t right() { return fg.displaybox[FG_X2]; }
|
||||
static fg_coord_t bottom() { return fg.displaybox[FG_Y1]; }
|
||||
static fg_coord_t top() { return fg.displaybox[FG_Y2]; }
|
||||
|
||||
// Inquire about the height and width of the display
|
||||
static int height() { return fg.displaybox[FG_Y2] + 1; }
|
||||
static int width() { return fg.displaybox[FG_X2] + 1; }
|
||||
|
||||
// Determine if point x,y is inside the display
|
||||
static int inside(fg_coord_t x, fg_coord_t y);
|
||||
|
||||
// Inquire about the display type (FG_EGAECD, etc.)
|
||||
static int type() { return fg.display; }
|
||||
|
||||
// Clear the display (set it to color)
|
||||
static void clear(fg_color_t color = FG_BLACK);
|
||||
};
|
||||
|
||||
//////////////////////////////////////////
|
||||
// Root of all drawing objects
|
||||
|
||||
class Fg
|
||||
{
|
||||
public:
|
||||
|
||||
// Drawing modes
|
||||
enum MODE { SET = FG_MODE_SET, XOR = FG_MODE_XOR };
|
||||
|
||||
///////////////////////////////////
|
||||
// Access functions.
|
||||
|
||||
static int mode() { return _mode; }
|
||||
static int setmode(enum MODE newmode) { return _mode = newmode; }
|
||||
|
||||
static int mask() { return _mask; }
|
||||
static int setmask(int newmask) { return _mask = newmask; }
|
||||
|
||||
fg_color_t foreg() const { return curfg; }
|
||||
fg_color_t setdefforeg(fg_color_t dfg)
|
||||
{ curfg = dfg; return _setdefforeg(dfg); }
|
||||
fg_color_t setforeg(fg_color_t fg) { return curfg = fg; }
|
||||
|
||||
static fg_color_t backg() { return attrbg; }
|
||||
static fg_color_t setbackg(fg_color_t bg) { return attrbg = bg; }
|
||||
|
||||
///////////////////////////////////
|
||||
// Draw the object.
|
||||
// The drawing is not guaranteed to be complete until
|
||||
// fg_flush() is called.
|
||||
// Input:
|
||||
// clip Box against which to clip all output
|
||||
|
||||
virtual void drawc(fg_const_pbox_t clip) = 0;
|
||||
virtual void draw(); // clip against edge of screen
|
||||
|
||||
///////////////////////////////////
|
||||
// Erase the object.
|
||||
|
||||
virtual void erasec(fg_const_pbox_t clip) = 0;
|
||||
virtual void erase(); // clip against edge of screen
|
||||
|
||||
///////////////////////////////////
|
||||
// Translate the object, that is, move it by xoffset, yoffset.
|
||||
|
||||
virtual void translate(fg_coord_t xoffset, fg_coord_t yoffset) = 0;
|
||||
|
||||
// Constructors and destructors
|
||||
Fg();
|
||||
virtual ~Fg();
|
||||
|
||||
private:
|
||||
|
||||
static int display;
|
||||
static MODE _mode; // drawing mode
|
||||
static int _mask; // drawing mask
|
||||
fg_color_t curfg; // color for this instance
|
||||
static fg_color_t deffg; // default color
|
||||
static fg_color_t attrbg; // background color
|
||||
static fg_color_t _setdefforeg(fg_color_t dfg)
|
||||
{ return deffg = dfg; }
|
||||
};
|
||||
|
||||
//////////////////// Dot //////////////////
|
||||
|
||||
class FgDot : public Fg
|
||||
{
|
||||
public:
|
||||
fg_coord_t setx(fg_coord_t x) { return _x = x; }
|
||||
fg_coord_t sety(fg_coord_t y) { return _y = y; }
|
||||
fg_coord_t x() const { return _x; }
|
||||
fg_coord_t y() const { return _y; }
|
||||
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
virtual void translate(fg_coord_t xoffset, fg_coord_t yoffset);
|
||||
|
||||
FgDot(fg_coord_t x, fg_coord_t y);
|
||||
|
||||
private:
|
||||
fg_coord_t _x,_y;
|
||||
};
|
||||
|
||||
//////////////////// Line //////////////////
|
||||
|
||||
class FgLine : public Fg
|
||||
{
|
||||
public:
|
||||
fg_const_pline_t line() const { return _line; }
|
||||
|
||||
fg_coord_t setx1(fg_coord_t x) { return _line[FG_X1] = x; }
|
||||
fg_coord_t sety1(fg_coord_t y) { return _line[FG_Y1] = y; }
|
||||
fg_coord_t setx2(fg_coord_t x) { return _line[FG_X2] = x; }
|
||||
fg_coord_t sety2(fg_coord_t y) { return _line[FG_Y2] = y; }
|
||||
fg_coord_t x1() { return _line[FG_X1]; }
|
||||
fg_coord_t y1() { return _line[FG_Y1]; }
|
||||
fg_coord_t x2() { return _line[FG_X2]; }
|
||||
fg_coord_t y2() { return _line[FG_Y2]; }
|
||||
|
||||
static int type() { return _type; }
|
||||
static int settype(int type) { return _type = type; }
|
||||
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
virtual void translate(fg_coord_t xoffset, fg_coord_t yoffset);
|
||||
|
||||
FgLine(fg_coord_t x1, fg_coord_t y1, fg_coord_t x2, fg_coord_t y2);
|
||||
FgLine(fg_const_pline_t pline);
|
||||
|
||||
protected:
|
||||
fg_line_t _line;
|
||||
static int _type; // line style (FG_LINE_XXXX)
|
||||
};
|
||||
|
||||
class FgThickLine : public FgLine {
|
||||
public:
|
||||
int thickness() const { return _thickness; }
|
||||
int setthickness(int t) { return _thickness = t; }
|
||||
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
virtual void translate(fg_coord_t xoffset, fg_coord_t yoffset);
|
||||
FgThickLine(fg_coord_t x1, fg_coord_t y1,
|
||||
fg_coord_t x2, fg_coord_t y2, int t);
|
||||
FgThickLine(fg_const_pline_t pline, int t);
|
||||
private:
|
||||
int _thickness;
|
||||
};
|
||||
|
||||
//////////////////// Box //////////////////
|
||||
|
||||
class FgBox : public FgLine
|
||||
{
|
||||
// This is nearly identical to the FgLine class, mostly we
|
||||
// just need to redefine the drawing functions.
|
||||
public:
|
||||
fg_const_pbox_t box() const { return FgLine::line(); }
|
||||
|
||||
fg_coord_t setleft(fg_coord_t x) { return setx1(x); }
|
||||
fg_coord_t setbottom(fg_coord_t y) { return sety1(y); }
|
||||
fg_coord_t setright(fg_coord_t x) { return setx2(x); }
|
||||
fg_coord_t settop(fg_coord_t y) { return sety2(y); }
|
||||
fg_coord_t left() { return x1(); }
|
||||
fg_coord_t bottom() { return y1(); }
|
||||
fg_coord_t right() { return x2(); }
|
||||
fg_coord_t top() { return y2(); }
|
||||
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
|
||||
FgBox(fg_coord_t left, fg_coord_t bottom, fg_coord_t right, fg_coord_t top);
|
||||
FgBox(fg_const_pbox_t pbox);
|
||||
};
|
||||
|
||||
//////////////////// FillBox //////////////////
|
||||
|
||||
class FgFillBox : public FgBox
|
||||
{
|
||||
// This is nearly identical to the FgBox class, mostly we
|
||||
// just need to redefine the drawing functions.
|
||||
public:
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
|
||||
FgFillBox(fg_coord_t left, fg_coord_t bottom, fg_coord_t right, fg_coord_t top);
|
||||
FgFillBox(fg_const_pbox_t pbox);
|
||||
|
||||
private:
|
||||
void drawfb(fg_const_pbox_t clip, fg_color_t color);
|
||||
};
|
||||
|
||||
//////////////////// Char //////////////////
|
||||
|
||||
class FgChar : public FgDot // FgDot is the position of the lower left corner
|
||||
{
|
||||
public:
|
||||
char ch() const { return _ch; }
|
||||
char setch(char ch) { return _ch = ch; }
|
||||
char rot() const { return _rot; }
|
||||
char setrot(int rot){ return _rot = rot; }
|
||||
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
|
||||
FgChar(fg_coord_t x, fg_coord_t y, char ch, int rot = FG_ROT0);
|
||||
|
||||
private:
|
||||
int _rot; // rotation (FG_ROT_XXX)
|
||||
char _ch; // the char itself
|
||||
};
|
||||
|
||||
//////////////////// Matrix //////////////////
|
||||
|
||||
class FgMatrix : public FgBox // FgBox encloses the matrix
|
||||
{
|
||||
public:
|
||||
const char *matrix() const { return _matrix; }
|
||||
const char *setmatrix(const char *matrix);
|
||||
char rot() const { return _rot; }
|
||||
char setrot(int rot) { return _rot = rot; }
|
||||
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
|
||||
FgMatrix(fg_coord_t x, fg_coord_t y, fg_const_pbox_t box, char *matrix,
|
||||
int rot = FG_ROT0);
|
||||
FgMatrix(const FgMatrix&);
|
||||
FgMatrix& operator=(const FgMatrix&);
|
||||
~FgMatrix();
|
||||
|
||||
private:
|
||||
int _rot; // rotation (FG_ROT_XXX)
|
||||
char *_matrix; // the matrix data
|
||||
};
|
||||
|
||||
//////////////////// String //////////////////
|
||||
|
||||
class FgString : public FgDot // FgDot is the position of the lower left corner
|
||||
{
|
||||
public:
|
||||
char *string() const { return _string; }
|
||||
char *setstring(char *string);
|
||||
char rot() const { return _rot; }
|
||||
char setrot(int rot) { return _rot = rot; }
|
||||
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
|
||||
FgString(fg_coord_t x, fg_coord_t y, char *string, int rot = FG_ROT0);
|
||||
FgString(const FgString&);
|
||||
FgString& operator=(const FgString&);
|
||||
~FgString();
|
||||
|
||||
private:
|
||||
int _rot; // rotation (FG_ROT_XXX)
|
||||
char *_string; // the string data
|
||||
};
|
||||
|
||||
|
||||
//////////////////// Circle //////////////////
|
||||
|
||||
class FgCircle : public FgDot
|
||||
{
|
||||
public:
|
||||
fg_coord_t setradius(fg_coord_t radius) {return _radius = radius;}
|
||||
fg_coord_t radius() const {return _radius;}
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
|
||||
FgCircle(fg_coord_t x, fg_coord_t y, fg_coord_t radius):FgDot(x,y)
|
||||
{
|
||||
setradius(radius);
|
||||
}
|
||||
|
||||
private:
|
||||
fg_coord_t _radius;
|
||||
};
|
||||
|
||||
|
||||
//////////////////// Arc //////////////////
|
||||
|
||||
class FgArc : public FgCircle
|
||||
{
|
||||
public:
|
||||
fg_coord_t setstart(fg_coord_t start) {return start_angle = start;}
|
||||
fg_coord_t setend(fg_coord_t end) {return end_angle = end;}
|
||||
fg_coord_t start() const {return start_angle;}
|
||||
fg_coord_t end() const {return end_angle;}
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
|
||||
FgArc(fg_coord_t x, fg_coord_t y, fg_coord_t radius,
|
||||
fg_coord_t start, fg_coord_t end):FgCircle(x,y,radius)
|
||||
{
|
||||
setstart(start);
|
||||
setend(end);
|
||||
}
|
||||
|
||||
private:
|
||||
fg_coord_t start_angle, end_angle;
|
||||
};
|
||||
|
||||
|
||||
//////////////////// Ellipse //////////////////
|
||||
|
||||
class FgEllipse : public FgArc
|
||||
{
|
||||
public:
|
||||
fg_coord_t setxradius(fg_coord_t xrad) {return setradius(xrad);}
|
||||
fg_coord_t setyradius(fg_coord_t yrad) {return y_radius = yrad;}
|
||||
fg_coord_t xradius() const {return radius();}
|
||||
fg_coord_t yradius() const {return y_radius;}
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
|
||||
FgEllipse(fg_coord_t x, fg_coord_t y, fg_coord_t xradius,
|
||||
fg_coord_t yradius, fg_coord_t start, fg_coord_t end)
|
||||
:FgArc(x,y,xradius,start,end)
|
||||
{
|
||||
setyradius(yradius);
|
||||
}
|
||||
|
||||
private:
|
||||
fg_coord_t y_radius;
|
||||
};
|
||||
|
||||
//////////////////// Polygon //////////////////
|
||||
|
||||
class FgPolygon : public Fg
|
||||
{
|
||||
public:
|
||||
unsigned int vertices() const {return _vertices;}
|
||||
const fg_coord_t *polygon() const {return _poly;}
|
||||
const fg_coord_t *setpolygon(unsigned int vertices,const fg_coord_t *poly);
|
||||
void setvertex (unsigned int vertex,fg_coord_t x,fg_coord_t y);
|
||||
int type() const {return _type;} // Line type to draw with.
|
||||
int settype(int type) {return _type = type;}
|
||||
virtual void drawc(fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
virtual void translate(fg_coord_t xoffset, fg_coord_t yoffset);
|
||||
|
||||
FgPolygon(unsigned int vertices, const fg_coord_t *poly = 0,
|
||||
int type = FG_LINE_SOLID);
|
||||
FgPolygon(const FgPolygon&);
|
||||
virtual FgPolygon& operator=(const FgPolygon&);
|
||||
~FgPolygon();
|
||||
|
||||
private:
|
||||
fg_coord_t *_poly;
|
||||
unsigned int _vertices;
|
||||
static int _type;
|
||||
};
|
||||
|
||||
|
||||
//////////////////// Filled Polygon //////////////////
|
||||
|
||||
class FgFilledPolygon : public FgPolygon
|
||||
{
|
||||
public:
|
||||
|
||||
virtual void drawc (fg_const_pbox_t clip);
|
||||
virtual void erasec(fg_const_pbox_t clip);
|
||||
FgFilledPolygon (unsigned int vertices, const fg_coord_t *poly)
|
||||
: FgPolygon (vertices, poly) {}
|
||||
FgFilledPolygon(const FgFilledPolygon &a)
|
||||
: FgPolygon(a) {}
|
||||
};
|
||||
|
||||
#endif /* __FG_HPP */
|
||||
|
75
Zortech C++ v30r1/INCLUDE/FLOAT.H
Normal file
75
Zortech C++ v30r1/INCLUDE/FLOAT.H
Normal file
@ -0,0 +1,75 @@
|
||||
/*_ float.h Thu Dec 6 1990 */
|
||||
/* Implementation limits */
|
||||
|
||||
#ifndef __FLOAT_H
|
||||
#define __FLOAT_H 1
|
||||
|
||||
#ifdef __STDC__
|
||||
#define __CDECL
|
||||
#else
|
||||
#define __CDECL _cdecl
|
||||
#endif
|
||||
|
||||
#define DBL_DIG 15
|
||||
#define DBL_EPSILON 2.2204460492503131e-16
|
||||
#define DBL_MANT_DIG 53
|
||||
#define DBL_MAX_10_EXP 308
|
||||
#define DBL_MAX_EXP 1024
|
||||
#define DBL_MIN_10_EXP -307
|
||||
#define DBL_MIN_EXP -1021
|
||||
|
||||
#if 1
|
||||
#if __ZTC__ < 0x220
|
||||
#define DBL_MAX 1.7976931348623157e+308
|
||||
#else
|
||||
#define DBL_MAX 0x1.FFFFFFFFFFFFFp1023
|
||||
#endif
|
||||
#define DBL_MIN 2.2250738585072014e-308
|
||||
#define FLT_MAX 3.402823466e+38F
|
||||
#define FLT_MIN 1.175494351e-38F
|
||||
#else
|
||||
extern double __CDECL DBL_MAX;
|
||||
extern double __CDECL DBL_MIN;
|
||||
extern float __CDECL FLT_MAX;
|
||||
extern float __CDECL FLT_MIN;
|
||||
#endif
|
||||
|
||||
#define FLT_DIG 6
|
||||
#define FLT_EPSILON 1.19209290e-7f
|
||||
#define FLT_MANT_DIG 24
|
||||
#define FLT_MAX_10_EXP 38
|
||||
#define FLT_MAX_EXP 128
|
||||
#define FLT_MIN_10_EXP -37
|
||||
#define FLT_MIN_EXP -125
|
||||
#define FLT_RADIX 2
|
||||
|
||||
extern int __CDECL __flt_rounds(void);
|
||||
#define FLT_ROUNDS (__flt_rounds())
|
||||
|
||||
#define LDBL_DIG DBL_DIG
|
||||
#define LDBL_EPSILON DBL_EPSILON
|
||||
#define LDBL_MANT_DIG DBL_MANT_DIG
|
||||
#define LDBL_MAX DBL_MAX
|
||||
#define LDBL_MAX_10_EXP DBL_MAX_10_EXP
|
||||
#define LDBL_MAX_EXP DBL_MAX_EXP
|
||||
#define LDBL_MIN DBL_MIN
|
||||
#define LDBL_MIN_10_EXP DBL_MIN_10_EXP
|
||||
#define LDBL_MIN_EXP DBL_MIN_EXP
|
||||
|
||||
#ifndef __STDC__
|
||||
|
||||
/* Non-ANSI functions to support the 8087 */
|
||||
|
||||
extern int _8087;
|
||||
unsigned _cdecl _status87(void);
|
||||
unsigned _cdecl _clear87(void);
|
||||
unsigned _cdecl _control87(unsigned, unsigned);
|
||||
void _cdecl _fpreset(void);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __FPCE__
|
||||
#define DECIMAL_DIG 17
|
||||
#endif
|
||||
|
||||
#endif /* __FLOAT_H */
|
69
Zortech C++ v30r1/INCLUDE/FLTENV.H
Normal file
69
Zortech C++ v30r1/INCLUDE/FLTENV.H
Normal file
@ -0,0 +1,69 @@
|
||||
/*_ fltenv.h Sat Mar 30 1991 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __FLTENV_H
|
||||
#define __FLTENV_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#define __CDECL
|
||||
#else
|
||||
#define __CDECL _cdecl
|
||||
#endif
|
||||
|
||||
/* floating point environment */
|
||||
typedef struct __fenv_t
|
||||
{ /* mimic 8087 status */
|
||||
unsigned short status;
|
||||
unsigned short control;
|
||||
unsigned short round; /* copy of just the rounding bits */
|
||||
unsigned short reserved[2]; /* for future expansion */
|
||||
} fenv_t;
|
||||
|
||||
typedef int fexcept_t; /* exception flag */
|
||||
|
||||
/* Exceptions */
|
||||
#define FE_INVALID 1
|
||||
#define FE_DENORMAL 2
|
||||
#define FE_DIVBYZERO 4
|
||||
#define FE_OVERFLOW 8
|
||||
#define FE_UNDERFLOW 0x10
|
||||
#define FE_INEXACT 0x20
|
||||
#define FE_ALL_EXCEPT 0x3F /* OR of all exceptions */
|
||||
|
||||
/* Rounding directions */
|
||||
#define FE_TONEAREST 0
|
||||
#define FE_UPWARD 0x800
|
||||
#define FE_DOWNWARD 0x400
|
||||
#define FE_TOWARDZERO 0xC00
|
||||
|
||||
extern fenv_t __CDECL FE_DFL_ENV; /* default floating point environment */
|
||||
|
||||
/* Rounding precision */
|
||||
#define FE_FLTPREC 0
|
||||
#define FE_DBLPREC 0x200
|
||||
#define FE_LDBLPREC 0x300
|
||||
|
||||
int __CDECL fetestexcept(int excepts);
|
||||
int __CDECL feraiseexcept(int excepts);
|
||||
int __CDECL feclearexcept(int excepts);
|
||||
int __CDECL fegetexcept(fexcept_t *flagp,int except);
|
||||
int __CDECL fesetexcept(const fexcept_t *flagp,int except);
|
||||
int __CDECL fegetround(void);
|
||||
int __CDECL fesetround(int round);
|
||||
int __CDECL fegetprec(void);
|
||||
int __CDECL fesetprec(int prec);
|
||||
void __CDECL fegetenv(fenv_t *envp);
|
||||
void __CDECL fesetenv(const fenv_t *envp);
|
||||
void __CDECL feprocentry(fenv_t *envp);
|
||||
void __CDECL feprocexit(const fenv_t *envp);
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __FLTENV_H */
|
||||
|
||||
|
116
Zortech C++ v30r1/INCLUDE/FLTPNT.H
Normal file
116
Zortech C++ v30r1/INCLUDE/FLTPNT.H
Normal file
@ -0,0 +1,116 @@
|
||||
/*_ fltpnt.h Sat Mar 30 1991 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __FLTPNT_H
|
||||
#define __FLTPNT_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#define __CDECL
|
||||
#else
|
||||
#define __CDECL _cdecl
|
||||
#endif
|
||||
|
||||
typedef float float_t;
|
||||
typedef double double_t;
|
||||
|
||||
#if __ZTC__ >= 0x300
|
||||
#define INFINITY __inf
|
||||
#define NAN __nan
|
||||
#define NANS __nans
|
||||
#endif
|
||||
|
||||
#define FP_NANS 0
|
||||
#define FP_NANQ 1
|
||||
#define FP_INFINITE 2
|
||||
#define FP_NORMAL 3
|
||||
#define FP_SUBNORMAL 4
|
||||
#define FP_ZERO 5
|
||||
|
||||
#define fpclassify(fe) (sizeof(fe) == sizeof(float) ? \
|
||||
__fpclassify_f(fe) : \
|
||||
__fpclassify_d(fe))
|
||||
#define signbit(fe) (sizeof(fe) == sizeof(float) ? \
|
||||
(int)(((short *)&(fe))[1] & 0x8000) : \
|
||||
(int)(((short *)&(fe))[3] & 0x8000))
|
||||
#define isfinite(fe) (fpclassify(fe) >= FP_NORMAL)
|
||||
#define isnormal(fe) (fpclassify(fe) == FP_NORMAL)
|
||||
#define isnan(fe) (fpclassify(fe) <= FP_NANQ)
|
||||
|
||||
unsigned __CDECL __fpclassify_f(float);
|
||||
unsigned __CDECL __fpclassify_d(double);
|
||||
|
||||
double __CDECL copysign(double x,double y);
|
||||
float __CDECL copysignf(float x,float y);
|
||||
long double __CDECL copysignl(long double x,long double y);
|
||||
|
||||
double __CDECL logb(double x);
|
||||
float __CDECL logbf(float x);
|
||||
long double __CDECL logbl(long double x);
|
||||
|
||||
double __CDECL nextafter(double x,double y);
|
||||
float __CDECL nextafterf(float x,float y);
|
||||
long double __CDECL nextafterl(long double x,long double y);
|
||||
|
||||
double __CDECL scalb(double x,long int n);
|
||||
float __CDECL scalbf(float x,long int n);
|
||||
long double __CDECL scalbl(long double x,long int n);
|
||||
|
||||
double __CDECL nan(const char *tagp);
|
||||
float __CDECL nanf(const char *tagp);
|
||||
long double __CDECL nanl(const char *tagp);
|
||||
|
||||
double __CDECL nans(const char *tagp);
|
||||
float __CDECL nansf(const char *tagp);
|
||||
long double __CDECL nansl(const char *tagp);
|
||||
|
||||
double __CDECL remainder(double x,double y);
|
||||
float __CDECL remainderf(float x,float y);
|
||||
long double __CDECL remainderl(long double x,long double y);
|
||||
|
||||
double __CDECL remquo(double x,double y,int *quo);
|
||||
float __CDECL remquof(float x,float y,int *quo);
|
||||
long double __CDECL remquol(long double x,long double y,int *quo);
|
||||
|
||||
double __CDECL rint(double x);
|
||||
float __CDECL rintf(float x);
|
||||
long double __CDECL rintl(long double x);
|
||||
|
||||
double __CDECL round(double x);
|
||||
float __CDECL roundf(float x);
|
||||
long double __CDECL roundl(long double x);
|
||||
|
||||
double __CDECL nearbyint(double x);
|
||||
float __CDECL nearbyintf(float x);
|
||||
long double __CDECL nearbyintl(long double x);
|
||||
|
||||
double __CDECL trunc(double x);
|
||||
float __CDECL truncf(float x);
|
||||
long double __CDECL truncl(long double x);
|
||||
|
||||
long int __CDECL rndtol(long double x);
|
||||
long int __CDECL rndtonl(long double x);
|
||||
|
||||
/* long double is same as double */
|
||||
#define copysignl copysign
|
||||
#define logbl logb
|
||||
#define nextafterl nextafter
|
||||
#define scalbl scalb
|
||||
#define nanl nan
|
||||
#define nansl nans
|
||||
#define remainderl remainder
|
||||
#define remquol remquo
|
||||
#define rintl rint
|
||||
#define roundl round
|
||||
#define nearbyintl nearbyint
|
||||
#define truncl trunc
|
||||
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __FLTPNT_H */
|
||||
|
341
Zortech C++ v30r1/INCLUDE/FSTREAM.HPP
Normal file
341
Zortech C++ v30r1/INCLUDE/FSTREAM.HPP
Normal file
@ -0,0 +1,341 @@
|
||||
#ifndef __FSTREAM_HPP
|
||||
#define __FSTREAM_HPP
|
||||
|
||||
// Iostreams Package
|
||||
// Bruce Perens, July-August 1990
|
||||
//
|
||||
// Modified Steve Teale April 1991
|
||||
// Copyright Zortech 1990-1991. All Rights Reserved.
|
||||
|
||||
#include <iostream.hpp>
|
||||
|
||||
class filebuf : public streambuf {
|
||||
|
||||
// This is a streambuf class specialized for handling files.
|
||||
// The get and put pointers are locked together so that reads and writes
|
||||
// happen at the same offset into the file.
|
||||
|
||||
public:
|
||||
enum { openprot = 0644 };
|
||||
|
||||
filebuf();
|
||||
// The default constructor. Creats a filebuf that is not associated
|
||||
// with any file. open() or attach() can then be used to connect
|
||||
// to a file.
|
||||
|
||||
filebuf(int file_descriptor, int io_mode = ios::in|ios::out
|
||||
#ifndef __UNIX__
|
||||
|ios::translated
|
||||
#endif
|
||||
);
|
||||
// Constructs a filebuf for the open file attached to the argument
|
||||
// file descriptor. More comprehensive io_mode information can
|
||||
// be specified e.g. ios::app, if required
|
||||
|
||||
filebuf(int descriptor, char *memory, int length,
|
||||
int io_mode = ios::in|ios::out
|
||||
#ifndef __UNIX__
|
||||
|ios::translated
|
||||
#endif
|
||||
);
|
||||
// Constructs a filebuf for the open file attached to the
|
||||
// file_descriptor, and sets the buffer to "memory", which is of
|
||||
// "length" bytes in size. If memory is 0 or length is <= 0,
|
||||
// it is taken as a request that the file be unbuffered.
|
||||
|
||||
~filebuf();
|
||||
|
||||
filebuf *attach(int file_descriptor,
|
||||
int io_mode = ios::in|ios::out
|
||||
#ifndef __UNIX__
|
||||
|ios::translated
|
||||
#endif
|
||||
);
|
||||
// Attaches an open file to a filebuf. Returns "this" if successful,
|
||||
// 0 if the filebuf is already attached to a file.
|
||||
|
||||
filebuf *close();
|
||||
// Flushes output, closes the file, and detaches the file from this
|
||||
// filebuf. Clears the error state unless there is an error flushing
|
||||
// the output. Will always close the file and detach it from the
|
||||
// filebuf, even if there are errors.
|
||||
|
||||
int fd() const { return file; };
|
||||
// Returns the file descriptor for the connected file. If the
|
||||
// filebuf is closed or not attached to a file, returns EOF.
|
||||
|
||||
int is_open() const { return file != EOF; };
|
||||
// Returns non-zero when this filebuf is attached to a file,
|
||||
// otherwise returns zero.
|
||||
|
||||
filebuf *open(const char *name, int io_mode,
|
||||
int protection = openprot);
|
||||
// Opens the file "name", and connects it to this filebuf.
|
||||
// io_mode is a bit-mask containing one or more of the values of
|
||||
// enum open_mode:
|
||||
// ios::in Open for reading.
|
||||
// ios::out Open for writing.
|
||||
// ios::ate Position to the end-of-file.
|
||||
// ios::app Open the file in append mode.
|
||||
// ios::trunc Truncate the file on open.
|
||||
// ios::nocreate Do not attempt to create the file if it
|
||||
// does not exist.
|
||||
// ios::noreplace Cause the open to fail if the file exists.
|
||||
// ios::translate Convert CR/LF to newline on input and
|
||||
// vice versa on output
|
||||
|
||||
streampos seekoff(streamoff offset, seek_dir direction,
|
||||
int which);
|
||||
// Relative seek the get and put pointers within the file.
|
||||
// The get and put pointers of a filebuf always point to the
|
||||
// same byte of the file.
|
||||
|
||||
streambuf *setbuf(char *memory, int length);
|
||||
// Set the buffer to use "memory", of "length" bytes.
|
||||
// If memory == 0 or length <= 0, it is taken as a request that
|
||||
// I/O to the file be unbuffered.
|
||||
|
||||
int sync();
|
||||
// Flush any bytes in the get buffer, and re-position the file so
|
||||
// that is appears they were never read. Write any bytes in the
|
||||
// put buffer to the file.
|
||||
|
||||
#if __ZTC__ > 0x214
|
||||
int overflow(int c);
|
||||
#else
|
||||
int overflow(int c = EOF);
|
||||
#endif
|
||||
// Flush bytes in the put area to the file.
|
||||
|
||||
int underflow();
|
||||
// Get more bytes for reading.
|
||||
|
||||
protected:
|
||||
int doallocate();
|
||||
|
||||
int pbackfail(int c);
|
||||
// Called to atempt recovery if putback attempted at
|
||||
// start of get buffer
|
||||
|
||||
private:
|
||||
int file; // File descriptor for the associated file.
|
||||
short mode; // I/O mode from the argument to open().
|
||||
char unbuf[2];
|
||||
// pseudo buffer for unbuffered operation
|
||||
char *gptr_;
|
||||
char *egptr_;
|
||||
// Save old gptr() & egptr() while using the
|
||||
// pushback buffer.
|
||||
char pushback_buf[4];
|
||||
// Reserve buffer for pushback.
|
||||
// Only used if there is no room for pushback in
|
||||
// the regular buffer.
|
||||
char do_not_seek;
|
||||
// Set if the file (device) does not support seeks.
|
||||
// This is set for a TTY, or a Unix pipe.
|
||||
char own_file_descriptor;
|
||||
// Set if the file descriptor is from open, and
|
||||
// the file should be closed by the destructor.
|
||||
static const int lseek_consts[3];
|
||||
// A look up table for the lseek constants from
|
||||
// the appropriate C header file
|
||||
|
||||
void buffer_setup();
|
||||
// Internal. Set up I/O buffer.
|
||||
int newlines();
|
||||
// count newline chars in the get buffer
|
||||
int syncin();
|
||||
int syncout();
|
||||
// two halves of sync() function
|
||||
int fillbuf();
|
||||
int flushbuf();
|
||||
// Functions which actually transfer to/from
|
||||
// the file
|
||||
};
|
||||
|
||||
class fstream_common : virtual public ios {
|
||||
|
||||
// Features common to ifstream, ofstream, and fstream.
|
||||
|
||||
public:
|
||||
|
||||
void attach(int file_descriptor, int io_mode);
|
||||
// Attach the filebuf to the argument file descriptor, error state
|
||||
// set to ios::failbit|ios::badbit on failure.
|
||||
|
||||
void close();
|
||||
// Flush the filebuf, and close the file attached to it. Error state
|
||||
// set ios::failbit|ios::badbit if rdbuf()->sync() fails. File closed
|
||||
// regardless.
|
||||
|
||||
void open(const char *name, int io_mode,
|
||||
int protection = filebuf::openprot);
|
||||
// Open a file, and attach it to the filebuf. Error state set to
|
||||
// ios::failbit|ios::badbit on failure
|
||||
|
||||
void setbuf(char *memory, int length)
|
||||
{
|
||||
buffer.setbuf(memory, length);
|
||||
}
|
||||
// Use the argument memory, of the given length, as the I/O buffer.
|
||||
filebuf *rdbuf() { return &buffer; }
|
||||
// Note that fstream_common::rdbuf returns a filebuf*
|
||||
// instead of a streambuf*.
|
||||
|
||||
protected:
|
||||
fstream_common();
|
||||
filebuf buffer;
|
||||
};
|
||||
|
||||
class ifstream : public fstream_common, public istream {
|
||||
public:
|
||||
ifstream();
|
||||
// Create an ifstream not attached to any file.
|
||||
|
||||
ifstream(const char *name, int io_mode = ios::in | ios::nocreate
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
,int protection = filebuf::openprot);
|
||||
// Open the argument file and create an ifstream attached to it.
|
||||
|
||||
ifstream(int file_descriptor, int io_mode = ios::in
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
);
|
||||
// Create an ifstream attached to the argument file descriptor.
|
||||
|
||||
ifstream(int file_descriptor, char *memory, int length,
|
||||
int io_mode = ios::in
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
);
|
||||
// Create an ifstream attached to the argument file descriptor, and
|
||||
// using the argument memory as the I/O buffer.
|
||||
|
||||
~ifstream();
|
||||
|
||||
void attach(int file_descriptor, int io_mode = ios::in
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
)
|
||||
{
|
||||
fstream_common::attach(file_descriptor, io_mode);
|
||||
}
|
||||
|
||||
void open(const char *name, int io_mode = ios::in
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
,int protection = filebuf::openprot)
|
||||
{
|
||||
fstream_common::open(name, io_mode, protection);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
class ofstream : public fstream_common, public ostream {
|
||||
public:
|
||||
ofstream();
|
||||
// Create an ofstream not attached to any file.
|
||||
|
||||
ofstream(const char *name, int io_mode = ios::out
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
,int protection = filebuf::openprot);
|
||||
// Open the argument file and create an ofstream attached to it.
|
||||
|
||||
ofstream(int file_descriptor, int io_mode = ios::out
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
);
|
||||
// Create an ofstream attached to the argument file descriptor.
|
||||
|
||||
ofstream(int file_descriptor, char *memory, int length,
|
||||
int io_mode = ios::out
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
);
|
||||
// Create an ofstream attached to the argument file descriptor, and
|
||||
// using the argument memory as the I/O buffer.
|
||||
|
||||
~ofstream();
|
||||
|
||||
void attach(int file_descriptor, int io_mode = ios::out
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
)
|
||||
{
|
||||
fstream_common::attach(file_descriptor, io_mode);
|
||||
}
|
||||
|
||||
void open(const char *name, int io_mode = ios::out
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
,int protection = filebuf::openprot)
|
||||
{
|
||||
fstream_common::open(name, io_mode, protection);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
class fstream : public fstream_common, public iostream {
|
||||
public:
|
||||
fstream();
|
||||
// Create an fstream not attached to any file.
|
||||
|
||||
fstream(const char *name, int io_mode = ios::in|ios::out
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
,int protection = filebuf::openprot);
|
||||
// Open the argument file and create an fstream attached to it.
|
||||
|
||||
fstream(int file_descriptor, int io_mode = ios::in | ios::out
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
);
|
||||
// Create an fstream attached to the argument file descriptor.
|
||||
|
||||
fstream(int file_descriptor, char *memory, int length,
|
||||
int io_mode = ios::in | ios::out
|
||||
#ifndef __UNIX
|
||||
| ios::translated
|
||||
#endif
|
||||
);
|
||||
// Create an fstream attached to the argument file descriptor, and
|
||||
// using the argument memory as the I/O buffer.
|
||||
|
||||
~fstream();
|
||||
|
||||
void attach(int file_descriptor, int io_mode = ios::in | ios::out
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
)
|
||||
{
|
||||
fstream_common::attach(file_descriptor, io_mode);
|
||||
}
|
||||
|
||||
void open(const char *name, int io_mode = ios::in | ios::out
|
||||
#ifndef __UNIX__
|
||||
| ios::translated
|
||||
#endif
|
||||
,int protection = filebuf::openprot)
|
||||
{
|
||||
fstream_common::open(name, io_mode, protection);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif // __FSTREAM_HPP
|
23
Zortech C++ v30r1/INCLUDE/GENERIC.HPP
Normal file
23
Zortech C++ v30r1/INCLUDE/GENERIC.HPP
Normal file
@ -0,0 +1,23 @@
|
||||
/*_ generic.hpp Tue Jul 5 1988 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __GENERIC_H
|
||||
#define __GENERIC_H 1
|
||||
|
||||
/* Name concatenator functions */
|
||||
#define name2(n1,n2) n1 ## n2
|
||||
#define name3(n1,n2,n3) n1 ## n2 ## n3
|
||||
#define name4(n1,n2,n3,n4) n1 ## n2 ## n3 ## n4
|
||||
|
||||
typedef int (*GPT) (int,char *);
|
||||
extern int genericerror(int,char *);
|
||||
|
||||
#define set_handler(generic,type,x) set_##type##generic##_handler(x)
|
||||
#define errorhandler(generic,type) type##generic##handler
|
||||
#define callerror(generic,type,a,b) (*errorhandler(generic,type))(a,b)
|
||||
|
||||
#define declare(a,type) a##declare(type)
|
||||
#define implement(a,type) a##implement(type)
|
||||
#define declare2(a,type1,type2) a##declare2(type1,type2)
|
||||
#define implement2(a,type1,type2) a##implement2(type1,type2)
|
||||
|
||||
#endif /* __GENERIC_H */
|
62
Zortech C++ v30r1/INCLUDE/HANDLE.H
Normal file
62
Zortech C++ v30r1/INCLUDE/HANDLE.H
Normal file
@ -0,0 +1,62 @@
|
||||
/*_ handle.h Thu May 4 1989 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __HANDLE_H
|
||||
#define __HANDLE_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Values above this are handles, below this are far pointers */
|
||||
#define HANDLE_BASE 0xFE000000
|
||||
|
||||
/* Maximum number of handles possible */
|
||||
#define HANDLE_MAX ((int)(0x10000 - (HANDLE_BASE >> 16)))
|
||||
|
||||
/* Size of pages (for EMM implementations, must match EMM_PAGESIZE) */
|
||||
#define HANDLE_PAGESIZE (16*1024)
|
||||
|
||||
/*********************************
|
||||
* Determine if handle is a real handle or a far pointer.
|
||||
* Returns:
|
||||
* !=0 if handle
|
||||
* 0 if far pointer
|
||||
*/
|
||||
|
||||
int handle_ishandle(void __handle *h);
|
||||
|
||||
#define handle_ishandle(h) ((int)(((unsigned long) (h) >= HANDLE_BASE) != 0))
|
||||
|
||||
void __handle * _cdecl handle_malloc(unsigned);
|
||||
void __handle * _cdecl handle_calloc(unsigned);
|
||||
void __handle * _cdecl handle_realloc(void __handle *,unsigned);
|
||||
char __handle * _cdecl handle_strdup(char __handle *);
|
||||
void _cdecl handle_free(void __handle *);
|
||||
int _cdecl handle_usingemm(void);
|
||||
void _cdecl handle_remap(void);
|
||||
|
||||
/* Enable these to lock out using handle memory */
|
||||
#if NO_HANDLE || DOS16RM || M_I386 || M_I486 || __OS2__
|
||||
#define __handle
|
||||
#define handle_malloc(n) malloc(n)
|
||||
#define handle_calloc(n) calloc((n),1)
|
||||
#define handle_realloc(h,n) realloc((h),(n))
|
||||
#define handle_free(h) free(h)
|
||||
#define handle_strdup(h) strdup(h)
|
||||
#define handle_usingemm() 0
|
||||
#define handle_remap()
|
||||
|
||||
#undef handle_ishandle
|
||||
#define handle_ishandle(h) 0
|
||||
|
||||
#ifndef __STDLIB_H
|
||||
#include <stdlib.h> /* get definitions of malloc, etc. */
|
||||
#endif
|
||||
char * _cdecl strdup(const char *);
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __HANDLE_H */
|
31
Zortech C++ v30r1/INCLUDE/HUGEPTR.H
Normal file
31
Zortech C++ v30r1/INCLUDE/HUGEPTR.H
Normal file
@ -0,0 +1,31 @@
|
||||
/*_ hugeptr.h Sun Dec 23 1990 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __HUGEPTR_H
|
||||
#define __HUGEPTR_H
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if M_I386 || M_I486
|
||||
|
||||
#define hugeptr_cmp(h1,h2) ((h1) - (h2))
|
||||
#define hugeptr_diff(h1,h2) ((h1) - (h2))
|
||||
#define hugeptr_add(h,offset) ((h1) + (offset))
|
||||
|
||||
#else
|
||||
|
||||
long _pascal hugeptr_diff(void _far *h1,void _far *h2);
|
||||
void _far * _pascal hugeptr_add(void _far *h1,long offset);
|
||||
|
||||
#define hugeptr_cmp(h1,h2) ((long)(h1) - (long)(h2))
|
||||
#define hugeptr_diff(h1,h2) (hugeptr_diff((h1),(h2)) / sizeof(*h1))
|
||||
#define hugeptr_add(h,offset) (hugeptr_add(h,(long)offset * sizeof(*h)))
|
||||
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __HUGEPTR_H */
|
71
Zortech C++ v30r1/INCLUDE/INT.H
Normal file
71
Zortech C++ v30r1/INCLUDE/INT.H
Normal file
@ -0,0 +1,71 @@
|
||||
/*_ int.h Tue Apr 24 1990 Modified by: Walter Bright */
|
||||
/* Copyright (C) 1985-1990 by Walter Bright */
|
||||
/* All rights reserved */
|
||||
/* Written by Walter Bright */
|
||||
|
||||
/* Header for int package */
|
||||
|
||||
#ifndef __INT_H
|
||||
#define __INT_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __DOS_H
|
||||
#include <dos.h>
|
||||
#endif
|
||||
|
||||
/* Structure passed to interrupt service routine (see int_xxx()) */
|
||||
|
||||
#pragma ZTC align 1 /* no alignment for DOS structs */
|
||||
|
||||
struct INT_DATA
|
||||
{
|
||||
#if M_I386 || M_I486
|
||||
char align; /* dword align remainder */
|
||||
#endif
|
||||
unsigned prevvec_off; /* previous interrupt vector */
|
||||
unsigned short prevvec_seg;
|
||||
#if M_I386 || M_I486
|
||||
unsigned short prevvecr_off; /* previous real interrupt vector */
|
||||
unsigned short prevvecr_seg;
|
||||
#endif
|
||||
unsigned stacksize; /* size of ISR stack */
|
||||
unsigned newstack_off; /* ptr to ISR stack */
|
||||
unsigned short newstack_seg;
|
||||
unsigned oldstack_off; /* ptr to interrupted stack */
|
||||
unsigned short oldstack_seg;
|
||||
#if __COMPACT__ || __LARGE__ || __VCM__ /* sizeof(void *) > sizeof(int) */
|
||||
unsigned short staticseg; /* value for DS */
|
||||
#endif
|
||||
int (_cdecl *funcptr)();
|
||||
union REGS regs; /* passed/returned register and flag values */
|
||||
/* (the _cflag member is garbage and is ignored) */
|
||||
struct SREGS sregs; /* passed/returned segment register values */
|
||||
};
|
||||
|
||||
#pragma ZTC align
|
||||
|
||||
#if M_I386 || M_I486
|
||||
void _cdecl int_setvector(unsigned,unsigned,unsigned);
|
||||
#else
|
||||
void _cdecl int_getvector(unsigned,unsigned *,unsigned *);
|
||||
void _cdecl int_setvector(unsigned,unsigned,unsigned);
|
||||
#endif
|
||||
int _cdecl int_intercept(unsigned,int (_cdecl *funcptr)(struct INT_DATA *),unsigned);
|
||||
void _cdecl int_restore(unsigned);
|
||||
void _cdecl int_off(void);
|
||||
void _cdecl int_on(void);
|
||||
long _cdecl int_prev(struct INT_DATA *);
|
||||
|
||||
/* Inline versions of interrupt functions */
|
||||
#define int_on() asm(0xFB) /* STI */
|
||||
#define int_off() asm(0xFA) /* CLI */
|
||||
#define int_gen(i) asm(0xCD,i) /* INT i */
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __INT_H */
|
68
Zortech C++ v30r1/INCLUDE/IO.H
Normal file
68
Zortech C++ v30r1/INCLUDE/IO.H
Normal file
@ -0,0 +1,68 @@
|
||||
/*_ io.h Sat Aug 19 1989 Modified by: Walter Bright */
|
||||
/* Copyright (C) 1987-1990 by Walter Bright */
|
||||
/* All Rights Reserved */
|
||||
/* Written by Walter Bright */
|
||||
|
||||
/* Declarations for low level I/O functions */
|
||||
|
||||
#ifndef __IO_H
|
||||
#define __IO_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int _cdecl read(int,void *,unsigned);
|
||||
int _cdecl write(int,const void *,unsigned);
|
||||
|
||||
#if !(M_I386)
|
||||
int _cdecl _readx(int,void *,unsigned,unsigned);
|
||||
int _cdecl _writex(int,void *,unsigned,unsigned);
|
||||
#endif
|
||||
|
||||
#if M_UNIX || M_XENIX
|
||||
char _cdecl *ttyname(int filedes);
|
||||
int _cdecl rdchk(int filedes);
|
||||
int _cdecl fcntl(int filedes, int cmd, int arg);
|
||||
int _cdecl ioctl(int filedes, int cmd,...);
|
||||
#else
|
||||
int _cdecl dos_open(const char *,int,...);
|
||||
int _cdecl sopen(const char *, int, int, ...);
|
||||
int _cdecl setmode(int,int);
|
||||
#endif
|
||||
|
||||
int _cdecl open(const char *,int,...);
|
||||
int _cdecl creat(const char *,int);
|
||||
int _cdecl close(int);
|
||||
int _cdecl locking(int, int, long);
|
||||
int _cdecl unlink(const char *);
|
||||
int _cdecl remove(const char *);
|
||||
int _cdecl chsize(int, long);
|
||||
int _cdecl chmod(const char *,int);
|
||||
int _cdecl dup(int);
|
||||
int _cdecl dup2(int, int);
|
||||
|
||||
int _cdecl access(const char *,int);
|
||||
#define F_OK 0 /* does file exist? */
|
||||
#define X_OK 1 /* execute permission? */
|
||||
#define W_OK 2 /* write permission? */
|
||||
#define R_OK 4 /* read permission? */
|
||||
|
||||
long _cdecl lseek(int,long,int);
|
||||
#define SEEK_SET 0 /* seek from start of file */
|
||||
#define SEEK_CUR 1 /* relative to current position */
|
||||
#define SEEK_END 2 /* relative to end of file */
|
||||
|
||||
long _cdecl filesize(const char *);
|
||||
long _cdecl filelength(int);
|
||||
int _cdecl isatty(int);
|
||||
|
||||
unsigned short _cdecl getDS(void);
|
||||
#define getDS() ((unsigned short)asm(0x8C,0xD8))
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __IO_H */
|
||||
|
93
Zortech C++ v30r1/INCLUDE/IOMANIP.HPP
Normal file
93
Zortech C++ v30r1/INCLUDE/IOMANIP.HPP
Normal file
@ -0,0 +1,93 @@
|
||||
#ifndef __IOMANIP_HPP
|
||||
#define __IOMANIP_HPP
|
||||
|
||||
#include <generic.hpp>
|
||||
#include <iostream.hpp>
|
||||
|
||||
#define SMANIP(T) name2(SMANIP,T)
|
||||
#define SAPP(T) name2(SAPP,T)
|
||||
#define IMANIP(T) name2(IMANIP,T)
|
||||
#define IAPP(T) name2(IAPP,T)
|
||||
#define OMANIP(T) name2(OMANIP,T)
|
||||
#define OAPP(T) name2(OAPP,T)
|
||||
#define IOMANIP(T) name2(IOMANIP,T)
|
||||
#define IOAPP(T) name2(IOAPP,T)
|
||||
|
||||
#define IOMANIPdeclare(T) \
|
||||
struct SMANIP(T) { \
|
||||
SMANIP(T)(ios &(*f)(ios&, T), T v) : func(f), val(v) {} \
|
||||
friend istream &operator>>(istream&, SMANIP(T)&); \
|
||||
friend ostream &operator<<(ostream&, SMANIP(T)&); \
|
||||
private: \
|
||||
ios &(*func)(ios&, T); \
|
||||
T val; \
|
||||
}; \
|
||||
struct IMANIP(T) { \
|
||||
IMANIP(T)(istream &(*f)(istream&, T), T v) : func(f), val(v) {} \
|
||||
friend istream &operator>>(istream&, IMANIP(T)&); \
|
||||
private: \
|
||||
istream &(*func)(istream&, T); \
|
||||
T val; \
|
||||
}; \
|
||||
struct OMANIP(T) { \
|
||||
OMANIP(T)(ostream &(*f)(ostream&, T), T v) : func(f), val(v) {} \
|
||||
friend ostream &operator<<(ostream&, OMANIP(T)&); \
|
||||
private: \
|
||||
ostream &(*func)(ostream&, T); \
|
||||
T val; \
|
||||
}; \
|
||||
struct IOMANIP(T) { \
|
||||
IOMANIP(T)(iostream &(*f)(iostream&, T), T v) : func(f), val(v) {} \
|
||||
friend istream &operator>>(iostream&, IOMANIP(T)&); \
|
||||
friend ostream &operator<<(iostream&, IOMANIP(T)&); \
|
||||
private: \
|
||||
iostream &(*func)(iostream&, T); \
|
||||
T val; \
|
||||
}; \
|
||||
struct SAPP(T) { \
|
||||
SAPP(T)(ios &(*f)(ios&, T)) : func(f) {} \
|
||||
SMANIP(T) operator()(T v) { return SMANIP(T)(func, v); } \
|
||||
private: \
|
||||
ios &(*func)(ios&, T); \
|
||||
}; \
|
||||
struct IAPP(T) { \
|
||||
IAPP(T)(istream &(*f)(istream&, T)) : func(f) {} \
|
||||
IMANIP(T) operator()(T v) { return IMANIP(T)(func, v); } \
|
||||
private: \
|
||||
istream &(*func)(istream&, T); \
|
||||
}; \
|
||||
struct OAPP(T) { \
|
||||
OAPP(T)(ostream &(*f)(ostream&, T)) : func(f) {} \
|
||||
OMANIP(T) operator()(T v) { return OMANIP(T)(func, v); } \
|
||||
private: \
|
||||
ostream &(*func)(ostream&, T); \
|
||||
}; \
|
||||
struct IOAPP(T) { \
|
||||
IOAPP(T)(iostream &(*f)(iostream&, T)) : func(f) {} \
|
||||
IOMANIP(T) operator()(T v) { return IOMANIP(T)(func, v); } \
|
||||
private: \
|
||||
iostream &(*func)(iostream&, T); \
|
||||
}; \
|
||||
static istream &operator>>(istream &s, SMANIP(T) &m) \
|
||||
{ (*m.func)(s, m.val); return s; } \
|
||||
static ostream &operator<<(ostream &s, SMANIP(T) &m) \
|
||||
{ (*m.func)(s, m.val); return s; } \
|
||||
static istream &operator>>(istream &s, IMANIP(T) &m) \
|
||||
{ return (*m.func)(s, m.val); } \
|
||||
static ostream &operator<<(ostream &s, OMANIP(T) &m) \
|
||||
{ return (*m.func)(s, m.val); } \
|
||||
static istream &operator>>(iostream &s, IOMANIP(T) &m) \
|
||||
{ return (*m.func)(s, m.val); } \
|
||||
static ostream &operator<<(iostream &s, IOMANIP(T) &m) \
|
||||
{ return (*m.func)(s, m.val); }
|
||||
|
||||
IOMANIPdeclare(int);
|
||||
IOMANIPdeclare(long);
|
||||
|
||||
SMANIP(long) resetiosflags(long);
|
||||
SMANIP(int) setfill(int);
|
||||
SMANIP(long) setiosflags(long);
|
||||
SMANIP(int) setprecision(int);
|
||||
SMANIP(int) setw(int);
|
||||
|
||||
#endif // __IOMANIP_HPP
|
1178
Zortech C++ v30r1/INCLUDE/IOSTREAM.HPP
Normal file
1178
Zortech C++ v30r1/INCLUDE/IOSTREAM.HPP
Normal file
File diff suppressed because it is too large
Load Diff
39
Zortech C++ v30r1/INCLUDE/LIMITS.H
Normal file
39
Zortech C++ v30r1/INCLUDE/LIMITS.H
Normal file
@ -0,0 +1,39 @@
|
||||
/*_ limits.h Sat May 20 1989 Modified by: Walter Bright */
|
||||
/* Implementation limits */
|
||||
|
||||
#ifndef __LIMITS_H
|
||||
#define __LIMITS_H 1
|
||||
|
||||
#define CHAR_BIT 8 /* # of bits in a char */
|
||||
#define SCHAR_MAX 127
|
||||
#define SCHAR_MIN (-127-1)
|
||||
#define UCHAR_MAX 255
|
||||
#if _CHAR_UNSIGNED
|
||||
#define CHAR_MAX UCHAR_MAX /* max value of a char */
|
||||
#define CHAR_MIN 0 /* min value of a char */
|
||||
#else
|
||||
#define CHAR_MAX SCHAR_MAX /* max value of a char */
|
||||
#define CHAR_MIN SCHAR_MIN /* min value of a char */
|
||||
#endif
|
||||
|
||||
#define SHRT_MAX 32767 /* max value of short */
|
||||
#define SHRT_MIN (-32767-1)
|
||||
#define USHRT_MAX 0xFFFF
|
||||
|
||||
#define LONG_MAX ((long)0x7FFFFFFF)
|
||||
#define LONG_MIN ((long)0x80000000)
|
||||
#define ULONG_MAX 0xFFFFFFFF
|
||||
|
||||
#if __I86__ <= 2 /* sizeof(int) == sizeof(short) */
|
||||
#define INT_MAX SHRT_MAX
|
||||
#define INT_MIN SHRT_MIN
|
||||
#define UINT_MAX USHRT_MAX
|
||||
#else
|
||||
#define INT_MAX LONG_MAX
|
||||
#define INT_MIN LONG_MIN
|
||||
#define UINT_MAX ULONG_MAX
|
||||
#endif
|
||||
|
||||
#define MB_LEN_MAX 1
|
||||
|
||||
#endif /* __LIMITS_H */
|
66
Zortech C++ v30r1/INCLUDE/LOCALE.H
Normal file
66
Zortech C++ v30r1/INCLUDE/LOCALE.H
Normal file
@ -0,0 +1,66 @@
|
||||
/*_ locale.h Thu Sep 8 1988 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __LOCALE_H
|
||||
#define __LOCALE_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#define __CDECL
|
||||
#else
|
||||
#define __CDECL _cdecl
|
||||
#endif
|
||||
|
||||
/* Supported locales */
|
||||
enum _LOCALE
|
||||
{ _LOCALE_C, /* minimal environment for C translation */
|
||||
_LOCALE_USA, /* implementation-defined native (USA) */
|
||||
_LOCALE_ITALY,
|
||||
_LOCALE_NETHERLANDS,
|
||||
_LOCALE_NORWAY,
|
||||
_LOCALE_SWITZERLAND,
|
||||
_LOCALE_UK, /* United Kingdom */
|
||||
_LOCALE_JAPAN,
|
||||
_LOCALE_KOREA,
|
||||
_LOCALE_CHINA, /* and Taiwan */
|
||||
_LOCALE_MAX
|
||||
};
|
||||
|
||||
#define _LOCALE_NATIVE _LOCALE_USA
|
||||
|
||||
struct lconv
|
||||
{
|
||||
char *decimal_point;
|
||||
char *thousands_sep;
|
||||
char *int_curr_symbol;
|
||||
char *currency_symbol;
|
||||
char *mon_decimal_point;
|
||||
char *mon_thousands_sep;
|
||||
char *negative_sign;
|
||||
char frac_digits;
|
||||
char p_cs_precedes;
|
||||
char p_sep_by_space;
|
||||
char n_sc_precedes;
|
||||
char n_sep_by_space;
|
||||
char n_sign_posn;
|
||||
char lc[6]; /* index is LC_XXX, values are _LOCALE_XXX */
|
||||
};
|
||||
|
||||
#define LC_ALL 0
|
||||
#define LC_COLLATE 1
|
||||
#define LC_CTYPE 2
|
||||
#define LC_MONETARY 3
|
||||
#define LC_NUMERIC 4
|
||||
#define LC_TIME 5
|
||||
|
||||
char * __CDECL setlocale(int category, const char *locale);
|
||||
struct lconv * __CDECL localeconv(void);
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
1199
Zortech C++ v30r1/INCLUDE/MACROS.ASM
Normal file
1199
Zortech C++ v30r1/INCLUDE/MACROS.ASM
Normal file
File diff suppressed because it is too large
Load Diff
176
Zortech C++ v30r1/INCLUDE/MATH.H
Normal file
176
Zortech C++ v30r1/INCLUDE/MATH.H
Normal file
@ -0,0 +1,176 @@
|
||||
/*_ math.h Fri Jan 20 1989 Modified by: Walter Bright */
|
||||
/* Copyright (C) 1985-1989 by Walter Bright */
|
||||
/* All Rights Reserved */
|
||||
|
||||
#ifndef __MATH_H
|
||||
#define __MATH_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if __ZTC__ < 0x220
|
||||
#define HUGE_VAL 1.797693134862315e+308
|
||||
#else
|
||||
#define HUGE_VAL __inf
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#define __CDECL
|
||||
#else
|
||||
#define __CDECL _cdecl
|
||||
#endif
|
||||
|
||||
double __CDECL acos(double);
|
||||
double __CDECL asin(double);
|
||||
double __CDECL atan(double);
|
||||
double __CDECL atan2(double,double);
|
||||
double __CDECL cos(double);
|
||||
double __CDECL sin(double);
|
||||
double __CDECL tan(double);
|
||||
double __CDECL cosh(double);
|
||||
double __CDECL sinh(double);
|
||||
double __CDECL tanh(double);
|
||||
double __CDECL exp(double);
|
||||
double __CDECL frexp(double,int *);
|
||||
double __CDECL ldexp(double,int);
|
||||
double __CDECL log(double);
|
||||
double __CDECL log10(double);
|
||||
double __CDECL modf(double,double *);
|
||||
double __CDECL pow(double,double);
|
||||
double __CDECL sqrt(double);
|
||||
double __CDECL ceil(double);
|
||||
double __CDECL fabs(double);
|
||||
double __CDECL floor(double);
|
||||
double __CDECL fmod(double,double);
|
||||
|
||||
/* Built-in versions */
|
||||
#if __ZTC__ >= 0x302
|
||||
double __CDECL _inline_fabs(double);
|
||||
#define fabs _inline_fabs
|
||||
|
||||
#if __INLINE_8087
|
||||
double __CDECL _inline_sqrt(double);
|
||||
#define sqrt _inline_sqrt
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __STDC__ /* non-ANSI stuff */
|
||||
|
||||
double __CDECL log1p(double);
|
||||
double __CDECL expm1(double);
|
||||
|
||||
float __CDECL acosf(float);
|
||||
float __CDECL asinf(float);
|
||||
float __CDECL atanf(float);
|
||||
float __CDECL atan2f(float,float);
|
||||
float __CDECL cosf(float);
|
||||
float __CDECL sinf(float);
|
||||
float __CDECL tanf(float);
|
||||
float __CDECL coshf(float);
|
||||
float __CDECL sinhf(float);
|
||||
float __CDECL tanhf(float);
|
||||
float __CDECL expf(float);
|
||||
float __CDECL frexpf(float,int *);
|
||||
float __CDECL ldexpf(float,int);
|
||||
float __CDECL logf(float);
|
||||
float __CDECL log10f(float);
|
||||
float __CDECL modff(float,float *);
|
||||
float __CDECL powf(float,float);
|
||||
float __CDECL sqrtf(float);
|
||||
float __CDECL ceilf(float);
|
||||
float __CDECL fabsf(float);
|
||||
float __CDECL floorf(float);
|
||||
float __CDECL fmodf(float,float);
|
||||
float __CDECL log1pf(float);
|
||||
float __CDECL expm1f(float);
|
||||
|
||||
/* Built-in versions */
|
||||
#if __ZTC__ >= 0x302
|
||||
float __CDECL _inline_fabsf(float);
|
||||
#define fabsf _inline_fabsf
|
||||
|
||||
#if __INLINE_8087
|
||||
float __CDECL _inline_sqrtf(float);
|
||||
#define sqrtf _inline_sqrtf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define acosl acos
|
||||
#define asinl asin
|
||||
#define atanl atan
|
||||
#define atan2l atan2
|
||||
#define cosl cos
|
||||
#define sinl sin
|
||||
#define tanl tan
|
||||
#define coshl cosh
|
||||
#define sinhl sinh
|
||||
#define tanhl tanh
|
||||
#define expl exp
|
||||
#define frexpl frexp
|
||||
#define ldexpl ldexp
|
||||
#define logl log
|
||||
#define log10l log10
|
||||
#define modfl modf
|
||||
#define powl pow
|
||||
#define sqrtl sqrt
|
||||
#define ceill ceil
|
||||
#define fabsl fabs
|
||||
#define floorl floor
|
||||
#define fmodl fmod
|
||||
#define log1pl log1p
|
||||
#define expm1l expm1
|
||||
|
||||
/* Constants that the 8087 supports directly */
|
||||
#define PI 3.14159265358979323846
|
||||
#define LOG2 0.30102999566398119521
|
||||
#define LN2 0.6931471805599453094172321
|
||||
#define LOG2T 3.32192809488736234787
|
||||
#define LOG2E 1.4426950408889634074 /* 1/LN2 */
|
||||
|
||||
/* For unix compatibility */
|
||||
#define M_LOG2E LOG2E
|
||||
#define M_LN2 LN2
|
||||
#define M_PI PI
|
||||
#define M_E 2.7182818284590452354
|
||||
#define M_LOG10E 0.43429448190325182765
|
||||
#define M_LN10 2.30258509299404568402
|
||||
#define M_PI_2 1.57079632679489661923
|
||||
#define M_PI_4 0.78539816339744830962
|
||||
#define M_1_PI 0.31830988618379067154
|
||||
#define M_2_PI 0.63661977236758134308
|
||||
#define M_2_SQRTPI 1.12837916709551257390
|
||||
#define M_SQRT2 1.41421356237309504880
|
||||
#define M_SQRT1_2 0.70710678118654752440
|
||||
|
||||
/* Struct used with matherr() when a floating point exception occurs */
|
||||
struct exception
|
||||
{ int type; /* DOMAIN,SING,... */
|
||||
char *name; /* pointer to string defining the name of the */
|
||||
/* function that detected the error */
|
||||
double arg1; /* first argument to function */
|
||||
double arg2; /* second argument (if defined) to function */
|
||||
double retval; /* default return value */
|
||||
};
|
||||
|
||||
/* Values for exception.type */
|
||||
#define DOMAIN 1 /* arguments are out of range for the function */
|
||||
#define SING 2 /* argument is a singularity */
|
||||
#define OVERFLOW 3
|
||||
#define UNDERFLOW 4
|
||||
#define TLOSS 5 /* total loss of significant digits */
|
||||
#define PLOSS 6 /* partial loss of significant digits */
|
||||
#define DIVIDE_BY_ZERO 7
|
||||
|
||||
int __CDECL matherr(struct exception *);
|
||||
double __CDECL atof(const char *);
|
||||
double __CDECL hypot(double,double);
|
||||
double __CDECL poly(double,int,double []);
|
||||
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MATH_H */
|
103
Zortech C++ v30r1/INCLUDE/MSMOUSE.H
Normal file
103
Zortech C++ v30r1/INCLUDE/MSMOUSE.H
Normal file
@ -0,0 +1,103 @@
|
||||
/*_ msmouse.h Sat Jun 3 1989 Modified by: Walter Bright */
|
||||
/* Copyright (C) 1986-1991 by Walter Bright */
|
||||
/* All Rights Reserved */
|
||||
/* Written by Walter Bright */
|
||||
/* Interface to Microsoft mouse driver */
|
||||
|
||||
#ifndef __MSMOUSE_H
|
||||
#define __MSMOUSE_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* signal interrupt mask constants */
|
||||
#define MSM_SIGNALMOVE 1
|
||||
#define MSM_SIGNALBUTTONDOWNL 2
|
||||
#define MSM_SIGNALBUTTONUPL 4
|
||||
#define MSM_SIGNALBUTTONDOWNR 8
|
||||
#define MSM_SIGNALBUTTONUPR 16
|
||||
#define MSM_SIGNALBUTTONDOWNM 32
|
||||
#define MSM_SIGNALBUTTONUPM 64
|
||||
|
||||
/* preferred button masks, replacements for LEFT_,RIGHT_, and MIDDLE_ */
|
||||
#define MSM_BUTTONL 1
|
||||
#define MSM_BUTTONR 2
|
||||
#define MSM_BUTTONM 4
|
||||
|
||||
/* old style button masks, included for compatibility only */
|
||||
#define LEFT_BUTTON 1
|
||||
#define RIGHT_BUTTON 2
|
||||
#define MIDDLE_BUTTON 0 /* so middle button is never turned on */
|
||||
|
||||
#ifndef _WINDOWS
|
||||
/* Masks for mouse buttons */
|
||||
|
||||
int _cdecl msm_init(void);
|
||||
void _cdecl msm_term(void);
|
||||
void _cdecl msm_showcursor(void);
|
||||
void _cdecl msm_hidecursor(void);
|
||||
int _cdecl msm_getstatus(unsigned *,unsigned *);
|
||||
void _cdecl msm_setcurpos(unsigned,unsigned);
|
||||
int _cdecl msm_getpress(unsigned *,unsigned *,unsigned *);
|
||||
int _cdecl msm_getrelease(unsigned *,unsigned *,unsigned *);
|
||||
void _cdecl msm_setareax(unsigned,unsigned);
|
||||
void _cdecl msm_setareay(unsigned,unsigned);
|
||||
void _cdecl msm_setgraphcur(int,int,int *);
|
||||
void _cdecl msm_settextcur(int,int,int);
|
||||
void _cdecl msm_readcounters(int *,int *);
|
||||
void _cdecl msm_signal(unsigned,
|
||||
void (_cdecl *)(unsigned,unsigned,unsigned,unsigned),void *);
|
||||
void _cdecl msm_lightpenon(void);
|
||||
void _cdecl msm_lightpenoff(void);
|
||||
void _cdecl msm_setratio(unsigned,unsigned);
|
||||
void _cdecl msm_condoff(unsigned,unsigned,unsigned,unsigned);
|
||||
void _cdecl msm_setthreshhold(unsigned);
|
||||
void _cdecl msm_reversebuttonon(void); /* turns reversebutton feature on, can be nested */
|
||||
void _cdecl msm_reversebuttonoff(void); /* turns reversebutton feature off, can be nested */
|
||||
int _cdecl msm_reversebuttonis(void); /* returns the status of the reversebutton feature, >0 is on, <=0 is off */
|
||||
int _cdecl msm_reversebutton(int); /* used inside mouse signal handlers to reverse buttons if required */
|
||||
#else
|
||||
|
||||
#define MSM_SCROLLUP 120
|
||||
#define MSM_SCROLLDOWN 121
|
||||
|
||||
#define msm_setcurpos(A,B)
|
||||
#define msm_setareax(A,B)
|
||||
#define msm_setareay(A,B)
|
||||
#define msm_setgraphcur(A,B,C)
|
||||
#define msm_settextcur(A,B,C)
|
||||
#define msm_setratio(A,B)
|
||||
#define msm_condoff(A,B,C,D)
|
||||
#define msm_setthreshhold(A)
|
||||
#define msm_lightpenon()
|
||||
#define msm_lightpenoff()
|
||||
#define msm_showcursor() ShowCursor(1)
|
||||
#define msm_hidecursor() ShowCursor(0)
|
||||
short _cdecl msm_init(void);
|
||||
void _cdecl msm_term(void);
|
||||
unsigned short _cdecl msm_hwndget(void); /* returns the window handle referenced by the last mouse event */
|
||||
/* msm_messagemonitor is placed in the window message handling procedure
|
||||
* and converts windows mouse message into the msm format
|
||||
* this is only valid in Windows, and must be installed for the other
|
||||
* functions to work.
|
||||
*/
|
||||
unsigned short _cdecl msm_messagemonitor(unsigned short,unsigned short,unsigned short,unsigned long,short,short);
|
||||
unsigned short _cdecl msm_getstatus(unsigned short *,unsigned short *);
|
||||
void _cdecl msm_readcounters(short *,short *);
|
||||
short _cdecl msm_getpress(unsigned short *,unsigned short *,unsigned short *);
|
||||
short _cdecl msm_getrelease(unsigned short *,unsigned short *,unsigned short *);
|
||||
void _cdecl msm_signal(unsigned short,
|
||||
void (_cdecl *)(unsigned short,unsigned short,short,short),void *);
|
||||
void _cdecl msm_reversebuttonon(void); /* turns reversebutton feature on, can be nested */
|
||||
void _cdecl msm_reversebuttonoff(void); /* turns reversebutton feature off, can be nested */
|
||||
short _cdecl msm_reversebuttonis(void); /* returns the status of the reversebutton feature, >0 is on, <=0 is off */
|
||||
short _cdecl msm_reversebutton(short); /* used inside mouse signal handlers to reverse buttons if required */
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __MSMOUSE_H */
|
||||
|
16
Zortech C++ v30r1/INCLUDE/NEW.HPP
Normal file
16
Zortech C++ v30r1/INCLUDE/NEW.HPP
Normal file
@ -0,0 +1,16 @@
|
||||
/*_ new.hpp Fri Aug 10 1990 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __NEW_HPP
|
||||
#define __NEW_HPP 1
|
||||
|
||||
extern "C++" {
|
||||
|
||||
#if !__STDDEF_H
|
||||
inline void *operator new(unsigned, void *p) { return p; }
|
||||
#endif
|
||||
|
||||
void (*set_new_handler (void (*)()))();
|
||||
|
||||
}
|
||||
|
||||
#endif
|
98
Zortech C++ v30r1/INCLUDE/PAGE.H
Normal file
98
Zortech C++ v30r1/INCLUDE/PAGE.H
Normal file
@ -0,0 +1,98 @@
|
||||
/*_ page.h Mon May 1 1989 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __PAGE_H
|
||||
#define __PAGE_H 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#if M_I386 || M_I486
|
||||
#define __BF
|
||||
#else
|
||||
#define __BF far
|
||||
#endif
|
||||
|
||||
#define PAGEOVERHEAD 10
|
||||
|
||||
/*****************************************
|
||||
* Allocate a block of data and clear it.
|
||||
* Use:
|
||||
* unsigned page_calloc(void __BF *baseptr,unsigned size);
|
||||
* Returns:
|
||||
* offset of allocated data else 0
|
||||
*/
|
||||
|
||||
unsigned _cdecl page_calloc(void __BF *baseptr,unsigned size);
|
||||
|
||||
/*****************************************
|
||||
* Allocate a block of data.
|
||||
* unsigned page_malloc(void __BF *baseptr,unsigned size);
|
||||
* Returns:
|
||||
* offset of allocated data else 0
|
||||
*/
|
||||
|
||||
unsigned _cdecl page_malloc(void __BF *baseptr,unsigned size);
|
||||
|
||||
/*****************************************
|
||||
* Reallocate memory that was allocated by page_malloc() or page_calloc().
|
||||
* Use:
|
||||
* unsigned page_realloc(void __BF *baseptr,unsigned p, unsigned nbytes)
|
||||
* Returns:
|
||||
* 0 error
|
||||
* else offset of reallocated memory
|
||||
*/
|
||||
|
||||
unsigned _cdecl page_realloc(void __BF *baseptr,unsigned p, unsigned nbytes);
|
||||
|
||||
/*****************************************
|
||||
* Free memory that was allocated by page_malloc() or page_calloc().
|
||||
* Use:
|
||||
* int page_free(void __BF *baseptr,unsigned p);
|
||||
* Returns:
|
||||
* 0 success
|
||||
* -1 error (baseptr is bad, or memory is corrupted)
|
||||
*/
|
||||
|
||||
int _cdecl page_free(void __BF *baseptr,unsigned p);
|
||||
|
||||
/*****************************************
|
||||
* Determine size of largest free block in page.
|
||||
* unsigned page_maxfree(void __BF *baseptr);
|
||||
*/
|
||||
|
||||
unsigned _cdecl page_maxfree(void __BF *baseptr);
|
||||
|
||||
/*****************************************
|
||||
* Initialize memory allocation system in a page.
|
||||
* unsigned page_initialize(void __BF *baseptr,unsigned pagesize);
|
||||
* Returns:
|
||||
* size of largest allocatable block
|
||||
*/
|
||||
|
||||
unsigned _cdecl page_initialize(void __BF *baseptr,unsigned pagesize);
|
||||
|
||||
/*****************************************
|
||||
* Return number of bytes allocated for chunk of memory that was
|
||||
* allocated by page_malloc, page_calloc or page_realloc.
|
||||
*/
|
||||
|
||||
/*unsigned _cdecl page_size(void __BF *baseptr,unsigned p);*/
|
||||
|
||||
#define page_size(baseptr,p) \
|
||||
(*(unsigned short __BF *)((char __BF *)(baseptr) + (p) - 2) - 2)
|
||||
|
||||
/****************************************
|
||||
* Convert pointer to page and offset into that page into a void * pointer.
|
||||
*/
|
||||
|
||||
/*void __BF * near page_toptr(void __BF *baseptr,unsigned p);*/
|
||||
|
||||
#define page_toptr(baseptr,p) (void __BF *)((char __BF *)(baseptr) + (p))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __PAGE_H */
|
56
Zortech C++ v30r1/INCLUDE/PROCESS.H
Normal file
56
Zortech C++ v30r1/INCLUDE/PROCESS.H
Normal file
@ -0,0 +1,56 @@
|
||||
/*_ process.h Tue May 29 1990 Modified by: Walter Bright */
|
||||
/* OS2 support added by Nikki Locke May 1989 */
|
||||
/* Copyright (C) 1988-1990 by Walter Bright */
|
||||
/* All Rights Reserved */
|
||||
/* Written by Walter Bright */
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef _WINDOWS
|
||||
void _cdecl exec_showset(unsigned short style); /* set client window SHOW style used be spawn, system, etc. */
|
||||
void _cdecl exec_showreset(void); /* reset SHOW style to default (SW_SHOW) */
|
||||
unsigned short _cdecl exec_showget(void); /* get current SHOW style setting */
|
||||
#endif
|
||||
|
||||
void _cdecl _exit(int);
|
||||
void _cdecl _dodtors(void);
|
||||
|
||||
int _cdecl spawnl(int,char *,char *,...);
|
||||
int _cdecl spawnv(int,char *,char **);
|
||||
int _cdecl spawnlp(int,char *,char *,...);
|
||||
int _cdecl spawnvp(int,char *,char **);
|
||||
|
||||
/* mode values for spawn?? */
|
||||
#define P_WAIT 0
|
||||
#define P_NOWAIT 1
|
||||
#define P_SAVEEXIT 2
|
||||
#define P_DETACHED 4
|
||||
|
||||
int _cdecl execl(const char *,const char *,...);
|
||||
int _cdecl execv(const char *,const char **);
|
||||
int _cdecl execlp(const char *,const char *,...);
|
||||
int _cdecl execvp(const char *,const char **);
|
||||
|
||||
#if defined(M_UNIX) || defined(M_XENIX)
|
||||
int _cdecl getpid(void);
|
||||
int _cdecl fork(void);
|
||||
int _cdecl execle(const char *path,const char *arg1,...);
|
||||
int _cdecl execve(const char *command, const char *command_line[],
|
||||
const char *environment[]);
|
||||
#endif
|
||||
|
||||
/* action codes used with cwait() */
|
||||
|
||||
#define WAIT_CHILD 0
|
||||
#define WAIT_GRANDCHILD 1
|
||||
|
||||
int _cdecl cwait(int *,int,int);
|
||||
int _cdecl wait(int *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
36
Zortech C++ v30r1/INCLUDE/SETJMP.H
Normal file
36
Zortech C++ v30r1/INCLUDE/SETJMP.H
Normal file
@ -0,0 +1,36 @@
|
||||
/*_ setjmp.h Fri Apr 28 1989 Modified by: Walter Bright */
|
||||
/* Copyright (C) 1985-1989 by Walter Bright */
|
||||
/* All Rights Reserved */
|
||||
|
||||
#ifndef __SETJMP_H
|
||||
#define __SETJMP_H 1
|
||||
|
||||
#if M_I386 || __I86__ >= 3
|
||||
typedef int jmp_buf[10];
|
||||
#elif _WINDOWS
|
||||
typedef short jmp_buf[9];
|
||||
#else
|
||||
typedef int jmp_buf[9];
|
||||
#endif
|
||||
|
||||
#ifdef _WINDOWS
|
||||
short _far _pascal Catch(short _far *);
|
||||
void _far _pascal Throw(short _far *,short);
|
||||
#define setjmp(A) Catch(A)
|
||||
#define longjmp(A,B) Throw(A,B)
|
||||
#else
|
||||
#if __cplusplus
|
||||
extern "C" int setjmp(jmp_buf);
|
||||
extern "C" void longjmp(jmp_buf,int);
|
||||
#else
|
||||
#ifndef __STDC__
|
||||
int _cdecl setjmp(jmp_buf);
|
||||
void _cdecl longjmp(jmp_buf,int);
|
||||
#else
|
||||
int setjmp(jmp_buf);
|
||||
void longjmp(jmp_buf,int);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __SETJMP_H */
|
5
Zortech C++ v30r1/INCLUDE/SHARE.H
Normal file
5
Zortech C++ v30r1/INCLUDE/SHARE.H
Normal file
@ -0,0 +1,5 @@
|
||||
#define SH_COMPAT 0x00
|
||||
#define SH_DENYRW 0x10
|
||||
#define SH_DENYWR 0x20
|
||||
#define SH_DENYRD 0x30
|
||||
#define SH_DENYNO 0x40
|
113
Zortech C++ v30r1/INCLUDE/SIGNAL.H
Normal file
113
Zortech C++ v30r1/INCLUDE/SIGNAL.H
Normal file
@ -0,0 +1,113 @@
|
||||
/*_ signal.h Mon Dec 25 1989 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __SIGNAL_H
|
||||
#define __SIGNAL_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#define __CDECL
|
||||
#else
|
||||
#define __CDECL _cdecl
|
||||
#endif
|
||||
|
||||
typedef volatile int sig_atomic_t;
|
||||
|
||||
void (__CDECL *signal(int,void (__CDECL *)(int)))(int);
|
||||
|
||||
#if M_UNIX || M_XENIX
|
||||
#define SIGHUP 1
|
||||
#define SIGINT 2
|
||||
#define SIGQUIT 3
|
||||
#define SIGILL 4
|
||||
#define SIGTRAP 5
|
||||
#define SIGIOT 6
|
||||
#define SIGABRT 6
|
||||
#define SIGEMT 7
|
||||
#define SIGFPE 8
|
||||
#define SIGKILL 9
|
||||
#define SIGBUS 10
|
||||
#define SIGSEGV 11
|
||||
#define SIGSYS 12
|
||||
#define SIGPIPE 13
|
||||
#define SIGALRM 14
|
||||
#define SIGTERM 15
|
||||
#define SIGUSR1 16
|
||||
#define SIGUSR2 17
|
||||
#define SIGCLD 18
|
||||
#define SIGPWR 19
|
||||
#define SIGWINCH 20
|
||||
|
||||
#if M_XOUT
|
||||
#define SIGPOLL 20
|
||||
#else
|
||||
#define SIGPOLL 22
|
||||
#endif
|
||||
|
||||
#define SIGCHLD SIGCLD /* compatibility */
|
||||
|
||||
#if M_UNIX
|
||||
#define SIGSTOP 23
|
||||
#define SIGTSTP 24
|
||||
#define SIGCONT 25
|
||||
#define SIGTTIN 26
|
||||
#define SIGTTOU 27
|
||||
|
||||
#define SIGALL (~(sigset_t)0L) /* All signals. */
|
||||
#endif /* M_UNIX */
|
||||
|
||||
typedef long sigset_t;
|
||||
|
||||
#define sigbit(n) (1L << ((n) - 1))
|
||||
#define sigemptyset(s) *(s) = ~SIGALL
|
||||
#define sigfillset(s) *(s) = SIGALL
|
||||
#define sigaddset(s,n) *(s) |= sigbit(n)
|
||||
#define sigdelset(s,n) *(s) &= ~sigbit(n)
|
||||
#define sigismember(set,n) ((*(set) & sigbit(n)) == sigbit(n))
|
||||
|
||||
/*
|
||||
* Signal vector "template" used in sigaction call.
|
||||
*/
|
||||
struct sigaction {
|
||||
void (*sa_handler)(); /* signal handler */
|
||||
sigset_t sa_mask; /* signal mask to apply */
|
||||
int sa_flags; /* see signal options below */
|
||||
};
|
||||
#define SA_NOCLDSTOP 1 /* ignore SIGCHLD */
|
||||
|
||||
#define SIG_ERR (void(*)(int))-1
|
||||
#define SIG_DFL (void(*)(int))0
|
||||
#define SIG_IGN (void(*)(int))1
|
||||
#define SIG_HOLD (void(*)(int))2
|
||||
|
||||
extern int __CDECL kill(int,int), __CDECL getpid(void);
|
||||
extern int __CDECL pause(void);
|
||||
extern unsigned int __CDECL alarm(unsigned int seconds);
|
||||
#define raise(s) kill(getpid(),s)
|
||||
|
||||
#else /* M_UNIX || M_XENIX */
|
||||
|
||||
#define SIGABRT 0 /* abort */
|
||||
#define SIGFPE 1 /* floating point error */
|
||||
#define SIGILL 2 /* illegal instruction */
|
||||
#define SIGINT 3 /* interrupt */
|
||||
#define SIGSEGV 4 /* segment violation */
|
||||
#define SIGTERM 5 /* terminate */
|
||||
#define SIGBREAK 6 /* ctrl-break */
|
||||
|
||||
int __CDECL raise(int);
|
||||
|
||||
#define SIG_DFL (void (__CDECL *)(int)) 0
|
||||
#define SIG_ERR (void (__CDECL *)(int)) 1
|
||||
#define SIG_IGN (void (__CDECL *)(int)) 2
|
||||
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __SIGNAL_H */
|
||||
|
23
Zortech C++ v30r1/INCLUDE/SOUND.H
Normal file
23
Zortech C++ v30r1/INCLUDE/SOUND.H
Normal file
@ -0,0 +1,23 @@
|
||||
/*_ sound.h Sat Jun 3 1989 Modified by: Walter Bright */
|
||||
/* Copyright (C) 1988-1989 by Walter Bright */
|
||||
/* All Rights Reserved */
|
||||
/* Written by Walter Bright */
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if __OS2__
|
||||
void _cdecl sound_note(int frequency,int duration);
|
||||
#else
|
||||
void _cdecl sound_tone(int cycles,int uptime,int dntime);
|
||||
#endif
|
||||
|
||||
void _cdecl sound_beep(int freq);
|
||||
void _cdecl sound_click(void);
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
209
Zortech C++ v30r1/INCLUDE/SSTREAM.HPP
Normal file
209
Zortech C++ v30r1/INCLUDE/SSTREAM.HPP
Normal file
@ -0,0 +1,209 @@
|
||||
#ifndef __SSTREAM_HPP
|
||||
#define __SSTREAM_HPP
|
||||
|
||||
// Iostreams Package
|
||||
// Bruce Perens, July-August 1990
|
||||
//
|
||||
// Modified Steve Teale April 1991
|
||||
// Copyright Zortech 1990-1991. All Rights Reserved.
|
||||
|
||||
#include <iostream.hpp>
|
||||
|
||||
const int default_allocation = 32;
|
||||
|
||||
class strstreambuf : public streambuf {
|
||||
|
||||
// This is a streambuf that holds a character array, and I/O is to that
|
||||
// character array instead of a file or some external character stream.
|
||||
// There is a dynamic-allocation mode that allocates space for characters
|
||||
// as needed. Get, put, and seeks are supported within the character array.
|
||||
// The call freeze() returns a pointer to the array, so that the data may
|
||||
// be read by conventional string-handling routines.
|
||||
|
||||
public:
|
||||
|
||||
// state flags
|
||||
enum sstream_flags {
|
||||
statmem = 1,
|
||||
// Set if the buffer was set with an argument to the constructor or
|
||||
// setbuf, and I should not do dynamic allocation if it runs out of
|
||||
// space.
|
||||
|
||||
frozen = 2,
|
||||
// Set when the buffer is frozen.
|
||||
merged = 4,
|
||||
// Set if the get and put areas are considered to be overlapped. This
|
||||
// will be the case if the strstreambuf is dynamic, or if a simultaneous
|
||||
// seek of both the get and put pointers has been done.
|
||||
rdonly = 0x10
|
||||
// Puts are not allowed.
|
||||
};
|
||||
|
||||
strstreambuf(int chunksize = default_allocation);
|
||||
// Create a strstreambuf in dynamic-allocation mode, with the initial
|
||||
// allocation at least "chunksize" bytes long, defaulted to default
|
||||
// allocation
|
||||
|
||||
strstreambuf(char *memory, int length = 0,
|
||||
char *start_of_put_area = 0);
|
||||
// Create a strstreambuf using the static buffer at "memory".
|
||||
// If "length" is positive, that is taken as the length of the
|
||||
// buffer. If it is zero, the length is taken from strlen(memory).
|
||||
// If "length" is negative, the buffer is assumed to be of infinite
|
||||
// length.
|
||||
//
|
||||
// The get pointer is initialized to "memory". If "start_of_put_area"
|
||||
// is zero, the get area covers the entire buffer and a put will be
|
||||
// considered an error. If "start_of_put_area" is non-zero, the
|
||||
// get area consists of the bytes between "memory" and
|
||||
// "start_of_put_area" - 1, and the put area consists of the bytes
|
||||
// between "start_of_put_area" and the end of the buffer.
|
||||
|
||||
strstreambuf(unsigned char *memory, int length = 0,
|
||||
unsigned char *start_of_put_area = 0);
|
||||
// Same as above, but for an unsigned character buffer.
|
||||
|
||||
strstreambuf(void * (*allocate_function)(size_t),
|
||||
void (*free_function)(void *),
|
||||
int chunksize = default_allocation);
|
||||
// Create a streambuf in dynamic allocation mode. Use
|
||||
// void * allocate_function(size_t length) to allocate memory,
|
||||
// and void free_function(void * memory) to free it. Allocation
|
||||
// chunk size can be specified.
|
||||
|
||||
~strstreambuf();
|
||||
|
||||
void freeze(int on = 1);
|
||||
void unfreeze() { freeze(0); }
|
||||
// If the argument is non-zero, "freeze" the strstreambuf. This
|
||||
// inhibits automatic deletion of the current character buffer.
|
||||
// This is only important in dynamic-allocation mode. Stores into
|
||||
// the buffer are invalid when it is "frozen". Calling this with
|
||||
// a zero argument "un-freezes" the buffer. Deleting a strstreambuf
|
||||
// will not de-allocate a frozen buffer - you must delete it yourself.
|
||||
|
||||
int pcount() const { return pptr()-pbase(); }
|
||||
// Return the number of characters inserted. Not accurate after
|
||||
// a seek.
|
||||
|
||||
char *str();
|
||||
// Freeze the buffer and return a pointer to its first byte.
|
||||
// The pointer may be null if no bytes have been stored and the
|
||||
// buffer is in dynamic-allocation mode. The buffer may be "un-frozen"
|
||||
// by calling freeze(0). Deleting a strstreambuf will not de-allocate
|
||||
// a frozen buffer - you must delete it yourself.
|
||||
|
||||
streambuf *setbuf(char *memory, int length);
|
||||
// The memory argument is not used. The next time the streambuf
|
||||
// does dynamic allocation, it will allocate at least "length" bytes.
|
||||
// This function in fact sets the allocation granularity.
|
||||
|
||||
int doallocate();
|
||||
#if __ZTC__ > 0x214
|
||||
int overflow(int c = EOF);
|
||||
#else
|
||||
int overflow(int c);
|
||||
#endif
|
||||
|
||||
int underflow();
|
||||
streampos seekoff(streampos offset, seek_dir direction,
|
||||
int which =ios::in|ios::out);
|
||||
int sync();
|
||||
// All of these are virtual functions derived from streambuf.
|
||||
// There's more documentation on them in iostream.h .
|
||||
|
||||
private:
|
||||
short sflags;
|
||||
int chunk;
|
||||
// The minimum amount to allocate when doing dynamic allocation.
|
||||
|
||||
void *(*allocate_function)(size_t size);
|
||||
// Points to the function used to allocate memory.
|
||||
|
||||
void (*free_function)(void *memory);
|
||||
// Points to the function used to free memory.
|
||||
|
||||
void buffer_setup(char *memory, int length,
|
||||
char *start_of_put_area);
|
||||
};
|
||||
|
||||
class istrstream : public istream {
|
||||
|
||||
// A class of istream that takes as input a character array, and extracts
|
||||
// information from it.
|
||||
|
||||
public:
|
||||
istrstream(char *memory, int length = 0);
|
||||
// Create an istrstream attached to the character array at "memory",
|
||||
// of length "length". If length is negative or zero, strlen() is used.
|
||||
|
||||
~istrstream();
|
||||
strstreambuf *rdbuf() { return &buffer; }
|
||||
|
||||
private:
|
||||
strstreambuf buffer;
|
||||
};
|
||||
|
||||
class ostrstream : public ostream {
|
||||
|
||||
// A class of ostream that inserts information into a character array.
|
||||
|
||||
public:
|
||||
ostrstream();
|
||||
// Create an ostrstream in dynamic-allocation mode.
|
||||
|
||||
ostrstream(char *memory, int length, int mode=ios::out);
|
||||
// Create an ostrstream attached to the character array at "memory",
|
||||
// of length "length". If ios::ate or ios::app is set in "mode",
|
||||
// the buffer is assumed to contain a null-terminated string, and
|
||||
// the put area begins at the null character. Otherwise the put
|
||||
// area will begin at "memory".
|
||||
|
||||
~ostrstream();
|
||||
|
||||
int pcount() const { return buffer.pcount(); }
|
||||
// Returns the number of bytes that have been put into the buffer.
|
||||
|
||||
char *str();
|
||||
// Freezes the buffer, and returns a pointer to the first byte of the
|
||||
// buffer. Once the buffer is frozen it will not be deleted by
|
||||
// the destructor of the stream: it becomes the user's responsibility
|
||||
// to delete it.
|
||||
|
||||
strstreambuf *rdbuf() { return &buffer; }
|
||||
private:
|
||||
strstreambuf buffer;
|
||||
};
|
||||
|
||||
|
||||
class strstream : public iostream {
|
||||
|
||||
// A class of iostream that inserts and extracts information in a character
|
||||
// array.
|
||||
|
||||
public:
|
||||
strstream();
|
||||
// Create a strstream in dynamic-allocation mode.
|
||||
|
||||
strstream(char *memory, int length = 0, int mode = ios::in|ios::out);
|
||||
// Create a strstream attached to the character array at "memory",
|
||||
// of length "length". If length is zero, then "memory" is assumed to
|
||||
// contain a null terminated string, and the langth is taken from
|
||||
// strlen. If ios::ate or ios::app is set in "mode", the buffer is
|
||||
// assumed to contain a null-terminated string, and the put area begins
|
||||
// at the null character. Otherwise the put area will begin at "memory".
|
||||
|
||||
~strstream();
|
||||
|
||||
char *str();
|
||||
// Freezes the buffer, and returns a pointer to the first byte of the
|
||||
// buffer. Once the buffer is frozen it will not be deleted by
|
||||
// the destructor of the stream: it becomes the user's responsibility
|
||||
// to delete it.
|
||||
strstreambuf *rdbuf() { return &buffer; }
|
||||
|
||||
private:
|
||||
strstreambuf buffer;
|
||||
};
|
||||
|
||||
#endif // __SSTREAM_HPP
|
22
Zortech C++ v30r1/INCLUDE/STDARG.H
Normal file
22
Zortech C++ v30r1/INCLUDE/STDARG.H
Normal file
@ -0,0 +1,22 @@
|
||||
/*_ stdarg.h Tue Feb 20 1990 Modified by: Walter Bright */
|
||||
/* ANSI C style variable arguments */
|
||||
|
||||
#ifndef __STDARG_H
|
||||
#define __STDARG_H 1
|
||||
|
||||
#if M_I386 || M_I486
|
||||
#define __VA_ALIGN 3
|
||||
#else
|
||||
#define __VA_ALIGN 1
|
||||
#endif
|
||||
|
||||
/* Aligned size on stack */
|
||||
#define __va_size(type) ((sizeof(type) + __VA_ALIGN) & ~__VA_ALIGN)
|
||||
|
||||
typedef char __ss *va_list;
|
||||
#define va_start(ap,parmn) ((void)((ap) = (va_list)&(parmn)+__va_size(parmn)))
|
||||
/* #define va_arg(ap,type) (*((type __ss *)(ap))++) */
|
||||
#define va_arg(ap,type) (*(type __ss *)(((ap)+=__va_size(type))-(__va_size(type))))
|
||||
#define va_end(ap) ((void)0)
|
||||
|
||||
#endif /* __STDARG_H */
|
34
Zortech C++ v30r1/INCLUDE/STDDEF.H
Normal file
34
Zortech C++ v30r1/INCLUDE/STDDEF.H
Normal file
@ -0,0 +1,34 @@
|
||||
/*_ stddef.h Tue May 9 1989 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __STDDEF_H
|
||||
#define __STDDEF_H 1
|
||||
|
||||
#ifdef __STDC__
|
||||
extern volatile int errno;
|
||||
#else
|
||||
extern volatile int _cdecl errno;
|
||||
#endif
|
||||
|
||||
typedef int ptrdiff_t;
|
||||
typedef unsigned size_t;
|
||||
typedef char wchar_t;
|
||||
|
||||
#define offsetof(t,i) ((size_t)((char *)&((t *)0)->i - (char *)0))
|
||||
|
||||
#ifndef NULL
|
||||
#if __COMPACT__ || __LARGE__ || __VCM__
|
||||
#define NULL 0L
|
||||
#else
|
||||
#define NULL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if __cplusplus && !__NEW_HPP
|
||||
extern "C++" {
|
||||
inline void *operator new(size_t s, void *at)
|
||||
{ return at; }
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
68
Zortech C++ v30r1/INCLUDE/STDIO.ASM
Normal file
68
Zortech C++ v30r1/INCLUDE/STDIO.ASM
Normal file
@ -0,0 +1,68 @@
|
||||
;_ stdio.asm Modified by Joe Huffman October 21, 1990
|
||||
; Copyright (C) 1985-1990 by Walter Bright */
|
||||
; All rights reserved. */
|
||||
|
||||
; Standard I/O header file */
|
||||
|
||||
EOF equ -1
|
||||
|
||||
ifdef M_I386
|
||||
|
||||
BUFSIZ equ 4096
|
||||
|
||||
ifdef DOS386
|
||||
_ptr equ 0
|
||||
_cnt equ _ptr + SIZEPTR
|
||||
_base equ _cnt + 4
|
||||
_flag equ _base + SIZEPTR
|
||||
_file equ _flag + 4
|
||||
_bufsiz equ _file + 4
|
||||
else ; M_UNIX and M_XENIX
|
||||
_cnt equ 0
|
||||
_ptr equ _cnt + 4
|
||||
_base equ _ptr + SIZEPTR
|
||||
_flag equ _base + SIZEPTR
|
||||
_file equ _flag + 1
|
||||
endif
|
||||
|
||||
_IOREAD equ 1
|
||||
_IOWRT equ 2
|
||||
_IONBF equ 4
|
||||
_IOMYBUF equ 8
|
||||
_IOEOF equ 10h
|
||||
_IOERR equ 20h
|
||||
_IOLBF equ 40h
|
||||
_IORW equ 80h
|
||||
_IOTRAN equ 100h
|
||||
|
||||
else ;M_I386
|
||||
|
||||
BUFSIZ equ 1024
|
||||
IF SPTR
|
||||
BIGBUF equ 20 * 1024
|
||||
ENDIF
|
||||
|
||||
_ptr equ 0
|
||||
_cnt equ _ptr + SIZEPTR
|
||||
_base equ _cnt + 2
|
||||
_flag equ _base + SIZEPTR
|
||||
_file equ _flag + 2
|
||||
_bufsiz equ _file + 2
|
||||
IFDEF BIGBUF
|
||||
_seg equ _bufsiz + 2
|
||||
ENDIF
|
||||
|
||||
_IOREAD equ 1
|
||||
_IOWRT equ 2
|
||||
_IONBF equ 4
|
||||
_IOMYBUF equ 8
|
||||
_IOEOF equ 10h
|
||||
_IOERR equ 20h
|
||||
_IOLBF equ 40h
|
||||
_IORW equ 80h
|
||||
_IOTRAN equ 100h
|
||||
IFDEF BIGBUF
|
||||
_IOBIGBUF equ 400h
|
||||
ENDIF
|
||||
|
||||
endif ;M_I386
|
192
Zortech C++ v30r1/INCLUDE/STDIO.H
Normal file
192
Zortech C++ v30r1/INCLUDE/STDIO.H
Normal file
@ -0,0 +1,192 @@
|
||||
/*_ stdio.h Fri Nov 24 1989 Modified by: Walter Bright */
|
||||
/* Standard I/O header file */
|
||||
|
||||
#ifndef __STDIO_H
|
||||
#define __STDIO_H
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#define __CDECL
|
||||
#else
|
||||
#define __CDECL _cdecl
|
||||
#endif
|
||||
|
||||
#if M_UNIX || M_XENIX
|
||||
#define _NFILE 60 /* # of files we can have open at once */
|
||||
#else
|
||||
#define _NFILE 20 /* # of files we can have open at once */
|
||||
#endif
|
||||
#define EOF (-1)
|
||||
|
||||
#define SEEK_SET 0 /* seek from start of file */
|
||||
#define SEEK_CUR 1 /* relative to current position */
|
||||
#define SEEK_END 2 /* relative to end of file */
|
||||
|
||||
#ifndef NULL
|
||||
#if __COMPACT__ || __LARGE__ || __VCM__
|
||||
#define NULL 0L
|
||||
#else
|
||||
#define NULL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* I/O buffer size */
|
||||
#if M_UNIX || M_XENIX
|
||||
#define BUFSIZ 4096
|
||||
extern char * __CDECL _bufendtab[];
|
||||
#elif __I86__ >= 3
|
||||
#define BUFSIZ 0x4000
|
||||
#else
|
||||
#define BUFSIZ 1024
|
||||
#endif
|
||||
|
||||
#if __I86__ <= 2 && (__SMALL__ || __MEDIUM__)
|
||||
#define BIGBUF (20 * 1024)
|
||||
#endif
|
||||
|
||||
typedef unsigned size_t;
|
||||
|
||||
/**** structure for high level file I/O ********/
|
||||
|
||||
typedef struct _iobuf
|
||||
{
|
||||
#if M_UNIX || M_XENIX
|
||||
int _cnt; /* number of characters left in buffer */
|
||||
char *_ptr; /* pointer to next character position */
|
||||
char *_base; /* pointer to start of buffer */
|
||||
char _flag; /* various info about this channel */
|
||||
char _file; /* file "handle" */
|
||||
#define _bufsize(f) (_bufendtab[(f)->_file] - (f)->_base)
|
||||
#else
|
||||
char *_ptr; /* pointer to next character position */
|
||||
int _cnt; /* number of characters left in buffer */
|
||||
char *_base; /* pointer to start of buffer */
|
||||
int _flag; /* various info about this channel */
|
||||
int _file; /* file "handle" */
|
||||
unsigned _bufsiz; /* size of buffer being used */
|
||||
#ifdef BIGBUF
|
||||
int _seg; /* segment of buffer if _IOBIGBUF */
|
||||
#endif
|
||||
#define _bufsize(f) ((f)->_bufsiz)
|
||||
#endif /* M_UNIX || M_XENIX */
|
||||
} FILE;
|
||||
|
||||
extern FILE __CDECL _iob[_NFILE];
|
||||
|
||||
#define _IOREAD 1 /* file is opened for read */
|
||||
#define _IOWRT 2 /* file is opened for write */
|
||||
#define _IONBF 4 /* file I/O is not buffered */
|
||||
#define _IOMYBUF 8 /* buffer allocated by setvbuf() */
|
||||
#define _IOEOF 0x10 /* end of file has occurred */
|
||||
#define _IOERR 0x20 /* error has occurred */
|
||||
#define _IOLBF 0x40 /* file is line buffered */
|
||||
#define _IORW 0x80 /* file is opened for reading and writing */
|
||||
#define _IOFBF 0 /* file is fully buffered */
|
||||
#if M_UNIX || M_XENIX
|
||||
#define _IOTRAN 0 /* I/O is never translated under UNIX */
|
||||
#else
|
||||
#define _IOTRAN 0x100 /* I/O is translated (not binary) */
|
||||
#ifdef BIGBUF
|
||||
#define _IOBIGBUF 0x400 /* the buffer is outside the data segment */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define stdin (&_iob[0])
|
||||
#define stdout (&_iob[1])
|
||||
#define stderr (&_iob[2])
|
||||
|
||||
#if M_UNIX || M_XENIX
|
||||
#define FOPEN_MAX 60
|
||||
#define FILENAME_MAX 255
|
||||
#else
|
||||
#ifndef __STDC__
|
||||
#define stdaux (&_iob[3])
|
||||
#define stdprn (&_iob[4])
|
||||
#endif
|
||||
#define FOPEN_MAX 20
|
||||
#define FILENAME_MAX (3+64+8+1+3)
|
||||
#endif
|
||||
|
||||
#define L_tmpnam 7
|
||||
#define TMP_MAX 32767
|
||||
|
||||
typedef long fpos_t;
|
||||
|
||||
char * __CDECL tmpnam(char *);
|
||||
FILE * __CDECL fopen(const char *,const char *);
|
||||
FILE * __CDECL freopen(const char *,const char *,FILE *);
|
||||
int __CDECL fseek(FILE *,long,int);
|
||||
long __CDECL ftell(FILE *);
|
||||
char * __CDECL fgets(char *,int,FILE *);
|
||||
int __CDECL fgetc(FILE *);
|
||||
int __CDECL fflush(FILE *);
|
||||
int __CDECL fclose(FILE *);
|
||||
int __CDECL fputs(const char *,FILE *);
|
||||
int __CDECL getc(FILE *);
|
||||
int __CDECL getchar(void);
|
||||
char * __CDECL gets(char *);
|
||||
int __CDECL fputc(int,FILE *);
|
||||
int __CDECL putc(int,FILE *);
|
||||
int __CDECL putchar(int);
|
||||
int __CDECL puts(const char *);
|
||||
int __CDECL ungetc(int,FILE *);
|
||||
size_t __CDECL fread(void *,size_t,size_t,FILE *);
|
||||
size_t __CDECL fwrite(const void *,size_t,size_t,FILE *);
|
||||
int __CDECL printf(const char *,...);
|
||||
int __CDECL fprintf(FILE *,const char *,...);
|
||||
int __CDECL vfprintf(FILE *,const char *,char __ss *);
|
||||
int __CDECL vprintf(const char *,char __ss *);
|
||||
int __CDECL sprintf(char *,const char *,...);
|
||||
int __CDECL vsprintf(char *,const char *,char __ss *);
|
||||
int __CDECL scanf(const char *,...);
|
||||
int __CDECL fscanf(FILE *,const char *,...);
|
||||
int __CDECL sscanf(char *,const char *,...);
|
||||
void __CDECL setbuf(FILE *,char *);
|
||||
int __CDECL setvbuf(FILE *,char *,int,size_t);
|
||||
int __CDECL remove(const char *);
|
||||
int __CDECL rename(const char *,const char *);
|
||||
void __CDECL rewind(FILE *);
|
||||
void __CDECL clearerr(FILE *);
|
||||
int __CDECL feof(FILE *);
|
||||
int __CDECL ferror(FILE *);
|
||||
void __CDECL perror(const char *);
|
||||
int __CDECL fgetpos(FILE *,fpos_t *);
|
||||
int __CDECL fsetpos(FILE *,const fpos_t *);
|
||||
FILE * __CDECL tmpfile(void);
|
||||
|
||||
#define getchar() getc(stdin)
|
||||
#define putchar(c) putc((c),stdout)
|
||||
#define getc(fp) fgetc(fp)
|
||||
#define putc(c,fp) fputc((c),(fp))
|
||||
#define ferror(fp) ((fp)->_flag&_IOERR)
|
||||
#define feof(fp) ((fp)->_flag&_IOEOF)
|
||||
#define clearerr(fp) ((void)((fp)->_flag&=~(_IOERR|_IOEOF)))
|
||||
#define rewind(fp) ((void)(fseek(fp,0L,SEEK_SET),((fp)->_flag&=~_IOERR)))
|
||||
|
||||
#ifndef __STDC__ /* non-ANSI functions */
|
||||
#define fileno(fp) ((fp)->_file)
|
||||
|
||||
#if M_UNIX || M_XENIX
|
||||
int __CDECL pclose(FILE *fp);
|
||||
FILE * __CDECL popen(const char *command,const char *t);
|
||||
#endif
|
||||
|
||||
FILE * __CDECL fdopen(int, const char *);
|
||||
int __CDECL fcloseall(void);
|
||||
long __CDECL filesize(const char *);
|
||||
int __CDECL flushall(void);
|
||||
int __CDECL getch(void);
|
||||
int __CDECL getche(void);
|
||||
char * __CDECL tempnam (const char *dir, const char *pfx);
|
||||
int __CDECL unlink(const char *);
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __STDIO_H */
|
||||
|
41
Zortech C++ v30r1/INCLUDE/STDIOBUF.HPP
Normal file
41
Zortech C++ v30r1/INCLUDE/STDIOBUF.HPP
Normal file
@ -0,0 +1,41 @@
|
||||
#ifndef __STDIOSTR_HPP
|
||||
#define __STDIOSTR_HPP
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream.hpp>
|
||||
|
||||
class stdiobuf : public streambuf {
|
||||
public:
|
||||
stdiobuf(FILE*);
|
||||
FILE* stdiofile() { return fp; }
|
||||
~stdiobuf();
|
||||
|
||||
int underflow();
|
||||
#if __ZTC__ > 0x214
|
||||
int overflow(int=EOF);
|
||||
#else
|
||||
int overflow(int);
|
||||
#endif
|
||||
int pbackfail(int);
|
||||
|
||||
private:
|
||||
FILE* fp;
|
||||
char *gptr_;
|
||||
char *egptr_;
|
||||
// Save old gptr() & egptr() while using the
|
||||
// pushback buffer.
|
||||
char pushback_buf[4];
|
||||
int fillbuf();
|
||||
};
|
||||
|
||||
class stdiostream : public ios {
|
||||
public:
|
||||
stdiostream(FILE*);
|
||||
~stdiostream();
|
||||
stdiobuf* rdbuf() { return &buffer; }
|
||||
|
||||
private:
|
||||
stdiobuf buffer;
|
||||
};
|
||||
|
||||
#endif
|
41
Zortech C++ v30r1/INCLUDE/STDIOSTR.HPP
Normal file
41
Zortech C++ v30r1/INCLUDE/STDIOSTR.HPP
Normal file
@ -0,0 +1,41 @@
|
||||
#ifndef __STDIOSTR_HPP
|
||||
#define __STDIOSTR_HPP
|
||||
|
||||
#include <stdio.h>
|
||||
#include <iostream.hpp>
|
||||
|
||||
class stdiobuf : public streambuf {
|
||||
public:
|
||||
stdiobuf(FILE*);
|
||||
FILE* stdiofile() { return fp; }
|
||||
~stdiobuf();
|
||||
|
||||
int underflow();
|
||||
#if __ZTC__ > 0x214
|
||||
int overflow(int=EOF);
|
||||
#else
|
||||
int overflow(int);
|
||||
#endif
|
||||
int pbackfail(int);
|
||||
|
||||
private:
|
||||
FILE* fp;
|
||||
char *gptr_;
|
||||
char *egptr_;
|
||||
// Save old gptr() & egptr() while using the
|
||||
// pushback buffer.
|
||||
char pushback_buf[4];
|
||||
int fillbuf();
|
||||
};
|
||||
|
||||
class stdiostream : public ios {
|
||||
public:
|
||||
stdiostream(FILE*);
|
||||
~stdiostream();
|
||||
stdiobuf* rdbuf() { return &buffer; }
|
||||
|
||||
private:
|
||||
stdiobuf buffer;
|
||||
};
|
||||
|
||||
#endif
|
119
Zortech C++ v30r1/INCLUDE/STDLIB.H
Normal file
119
Zortech C++ v30r1/INCLUDE/STDLIB.H
Normal file
@ -0,0 +1,119 @@
|
||||
/*_ stdlib.h Thu May 24 1990 Modified by: Walter Bright */
|
||||
/* Copyright (C) 1986-1990 by Walter Bright */
|
||||
/* All Rights Reserved */
|
||||
|
||||
#ifndef __STDLIB_H
|
||||
#define __STDLIB_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* status for exit() or _exit() */
|
||||
#define EXIT_SUCCESS 0
|
||||
#define EXIT_FAILURE 1
|
||||
|
||||
#ifndef NULL
|
||||
#if __COMPACT__ || __LARGE__ || __VCM__
|
||||
#define NULL 0L
|
||||
#else
|
||||
#define NULL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef unsigned size_t;
|
||||
typedef char wchar_t;
|
||||
#ifndef ERANGE
|
||||
#if M_UNIX || M_XENIX
|
||||
#define ERANGE 34
|
||||
#else
|
||||
#define ERANGE 1003
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if __ZTC__ < 0x220
|
||||
#define HUGE_VAL 1.797693134862315e+308
|
||||
#else
|
||||
#define HUGE_VAL __inf
|
||||
#endif
|
||||
|
||||
#define RAND_MAX 32767
|
||||
#define MB_CUR_MAX 1
|
||||
typedef struct _DIV { int quot,rem; } div_t;
|
||||
typedef struct _LDIV { long quot,rem; } ldiv_t;
|
||||
|
||||
/* typedef wchar_t; */
|
||||
|
||||
#ifdef __STDC__
|
||||
#define __CDECL
|
||||
#else
|
||||
#define __CDECL _cdecl
|
||||
#endif
|
||||
|
||||
extern volatile int __CDECL errno;
|
||||
|
||||
double __CDECL atof(const char *);
|
||||
int __CDECL atoi(const char *);
|
||||
long __CDECL atol(const char *);
|
||||
double __CDECL strtod(const char *,char **);
|
||||
long __CDECL strtol(const char *,char **,int);
|
||||
unsigned long __CDECL strtoul(const char *,char **,int);
|
||||
int __CDECL rand(void);
|
||||
void __CDECL srand(unsigned);
|
||||
void * __CDECL calloc(size_t,size_t);
|
||||
void __CDECL free(void *);
|
||||
void * __CDECL malloc(size_t);
|
||||
void * __CDECL realloc(void *,size_t);
|
||||
void __CDECL abort(void);
|
||||
int __CDECL atexit(void (*)(void));
|
||||
void __CDECL exit(int);
|
||||
char * __CDECL getenv(const char *);
|
||||
int __CDECL system(const char *);
|
||||
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 *));
|
||||
int __CDECL abs(int);
|
||||
div_t __CDECL div(int,int);
|
||||
long __CDECL labs(long);
|
||||
ldiv_t __CDECL ldiv(long,long);
|
||||
int __CDECL mblen(const char *,size_t);
|
||||
int __CDECL mbtowc(wchar_t *,const char *,size_t);
|
||||
int __CDECL wctomb(char *,wchar_t);
|
||||
size_t __CDECL mbstowcs(wchar_t *, const char *, size_t);
|
||||
size_t __CDECL wcstombs(char *, const wchar_t *, size_t);
|
||||
|
||||
#ifndef __STDC__
|
||||
/* Non-ANSI functions */
|
||||
char * __CDECL itoa(int,char *,int);
|
||||
char * __CDECL ltoa(long, char *, int);
|
||||
char * __CDECL ecvt(double,int,int *,int *);
|
||||
char * __CDECL fcvt(double,int,int *,int *);
|
||||
void * __CDECL sbrk(size_t);
|
||||
float __CDECL strtof(const char *,char **);
|
||||
#define strtold strtod
|
||||
unsigned __CDECL _rotl(unsigned,unsigned);
|
||||
unsigned __CDECL _rotr(unsigned,unsigned);
|
||||
unsigned long __CDECL _lrotl(unsigned long,unsigned);
|
||||
unsigned long __CDECL _lrotr(unsigned long,unsigned);
|
||||
void __ss * __CDECL alloca(size_t);
|
||||
#if __I86__ <= 2
|
||||
void _far * __CDECL __mallocf(size_t);
|
||||
void __CDECL __freef(void _far *);
|
||||
#endif
|
||||
int __CDECL putenv(const char *);
|
||||
|
||||
extern int (_far __CDECL *_malloc_handler)(void);
|
||||
extern char * __CDECL _envptr;
|
||||
|
||||
#if M_UNIX || M_XENIX
|
||||
extern char ** __CDECL _environ[];
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __STDLIB_H */
|
290
Zortech C++ v30r1/INCLUDE/STREAM.HPP
Normal file
290
Zortech C++ v30r1/INCLUDE/STREAM.HPP
Normal file
@ -0,0 +1,290 @@
|
||||
//_ stream.hpp Thu Mar 1 1990 Modified by: Walter Bright */
|
||||
// Fri Aug 18 1989 Modified by: Steve Teale
|
||||
|
||||
#ifndef __STREAM_H
|
||||
#define __STREAM_H
|
||||
|
||||
extern "C++" {
|
||||
|
||||
#ifndef __STDIO_H
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifndef BUFSIZE
|
||||
#define BUFSIZE 1024
|
||||
#endif
|
||||
|
||||
///////////////////////////// STREAMBUF //////////////////////
|
||||
|
||||
// Class for dealing with a stream buffer
|
||||
struct streambuf
|
||||
{
|
||||
protected:
|
||||
char *base; // buffer, NULL if no buffer
|
||||
char *pptr; // write pointer (1 past end of data in buffer)
|
||||
char *gptr; // read pointer (next char to read), gptr chases pptr
|
||||
char *eptr; // 1 past end of buffer
|
||||
char alloc; // 1 if base was allocated using new
|
||||
char dummy; // for alignment
|
||||
FILE *fp; // in case streambuf is just a layer over stdio
|
||||
|
||||
int doallocate();
|
||||
int allocate() { return base ? 0 : doallocate(); }
|
||||
streambuf *setbuf(char *buf, int buflen,
|
||||
int written = 0, int wasalloc = 0);
|
||||
|
||||
friend class ostream;
|
||||
friend class istream;
|
||||
|
||||
public:
|
||||
|
||||
// Functions for buffer full and empty respectively
|
||||
virtual int overflow(int c = EOF);
|
||||
virtual int underflow();
|
||||
|
||||
// Constructors
|
||||
streambuf();
|
||||
streambuf(char* buf, int buflen);
|
||||
|
||||
// Destructor
|
||||
virtual ~streambuf();
|
||||
|
||||
// Character by character functions
|
||||
int snextc()
|
||||
{ return (gptr + 1 < pptr)
|
||||
? (unsigned char) *++gptr
|
||||
: underflow();
|
||||
}
|
||||
|
||||
int sgetc()
|
||||
{ return (gptr < pptr)
|
||||
? (unsigned char) *gptr
|
||||
: underflow();
|
||||
}
|
||||
|
||||
void stossc()
|
||||
{ (++gptr > pptr) && underflow(); }
|
||||
|
||||
int sputc(int c = EOF)
|
||||
{
|
||||
return fp
|
||||
? putc(c,fp)
|
||||
: (pptr < eptr)
|
||||
? (unsigned char) (*pptr++ = c)
|
||||
: overflow(c);
|
||||
}
|
||||
|
||||
void sputbackc(char c)
|
||||
{ (gptr > base) && (*--gptr = c) != 0; }
|
||||
|
||||
// Access to buffer
|
||||
char *bufptr() { return base; }
|
||||
};
|
||||
|
||||
/////////////////////// FILEBUF ///////////////////////
|
||||
|
||||
extern "C" int close(int); // should match io.h
|
||||
|
||||
// a stream buffer for files
|
||||
|
||||
enum open_mode { input = 0, output = 1, append = 2 };
|
||||
|
||||
struct filebuf : public streambuf
|
||||
{
|
||||
int fd;
|
||||
char opened;
|
||||
char dummy; // for alignment
|
||||
|
||||
public:
|
||||
|
||||
int overflow(int c = EOF);
|
||||
int underflow();
|
||||
|
||||
filebuf* open(char *name,open_mode om);
|
||||
int close();
|
||||
|
||||
filebuf();
|
||||
filebuf(int _fd); // file descriptor
|
||||
filebuf(FILE* p);
|
||||
filebuf(int _fd, char *buf, int buflen);
|
||||
|
||||
~filebuf();
|
||||
};
|
||||
|
||||
///////////////////////// CIRCBUF //////////////////////
|
||||
// Circular stream buffer
|
||||
|
||||
struct circbuf : public streambuf
|
||||
{
|
||||
int overflow(int c = EOF);
|
||||
int underflow();
|
||||
|
||||
circbuf();
|
||||
~circbuf();
|
||||
};
|
||||
|
||||
///////////////////// Input and Output ///////////////////
|
||||
|
||||
struct whitespace { int dummy; };
|
||||
|
||||
// State for each istream or ostream
|
||||
enum state_value
|
||||
{ _good = 0, // previous input operation succeeded. state must
|
||||
// be _good for subsequent input operations to succeed
|
||||
_eof = 1, // reached end of file
|
||||
_fail = 2, // error, no characters lost
|
||||
_bad = 4 // the stream is all messed up
|
||||
};
|
||||
|
||||
// Output formatting routines
|
||||
|
||||
extern char *dec(long, int = 0);
|
||||
extern char *oct(long, int = 0);
|
||||
extern char *hex(long, int = 0);
|
||||
extern char *str(const char *, int = 0);
|
||||
extern char *chr(int, int = 0);
|
||||
extern char *form(const char * ...);
|
||||
|
||||
|
||||
///////////////////////// OSTREAM //////////////////////
|
||||
|
||||
class ostream
|
||||
{
|
||||
streambuf *bp;
|
||||
state_value state;
|
||||
int alloc;
|
||||
|
||||
friend class istream;
|
||||
|
||||
public:
|
||||
|
||||
// Overloads of <<
|
||||
ostream& operator<<(streambuf&);
|
||||
ostream& operator<<(const whitespace&);
|
||||
ostream& operator<<(const char*);
|
||||
ostream& operator<<(const signed char *psc)
|
||||
{ return *this << (const char *) psc; }
|
||||
ostream& operator<<(const unsigned char *puc)
|
||||
{ return *this << (const char *) puc; }
|
||||
ostream& operator<<(long);
|
||||
ostream& operator<<(unsigned long ul);
|
||||
ostream& operator<<(int a) { return *this << (long) a; }
|
||||
ostream& operator<<(unsigned a) { return *this << (long) a; }
|
||||
ostream& operator<<(char c);
|
||||
ostream& operator<<(signed char c) { return *this << (char) c; }
|
||||
ostream& operator<<(unsigned char c) { return *this << (char) c; }
|
||||
ostream& operator<<(short s) { return *this << (int) s; }
|
||||
ostream& operator<<(unsigned short us) { return *this << (unsigned) us; }
|
||||
ostream& operator<<(double);
|
||||
ostream& operator<<(const void *);
|
||||
|
||||
// Other output functions
|
||||
ostream& flush()
|
||||
{ bp->overflow(); return *this; }
|
||||
ostream& put(char);
|
||||
|
||||
// Stream state access functions
|
||||
int good() { return state == _good; }
|
||||
int eof() { return state & _eof; }
|
||||
int fail() { return state & (_fail | _bad); }
|
||||
int bad() { return state & _bad; }
|
||||
|
||||
operator void *() { return fail() ? NULL : this; }
|
||||
int operator !() { return fail(); }
|
||||
int rdstate() { return state; }
|
||||
|
||||
// State set function
|
||||
void clear(state_value v = _good) { state = v; }
|
||||
|
||||
// Access to associated buffer
|
||||
char *bufptr() { return bp->bufptr(); }
|
||||
|
||||
// Constructors
|
||||
ostream(streambuf *sb);
|
||||
ostream(int fd);
|
||||
ostream(int buflen, char *buf);
|
||||
|
||||
// Destructor
|
||||
~ostream() { flush(); if (alloc) delete bp; }
|
||||
};
|
||||
|
||||
///////////////////////// ISTREAM ///////////////////////////
|
||||
|
||||
class istream
|
||||
{
|
||||
streambuf *bp;
|
||||
ostream *tied_to;
|
||||
state_value state;
|
||||
char skipws;
|
||||
char alloc;
|
||||
|
||||
void eatwhite();
|
||||
|
||||
public:
|
||||
|
||||
// Overloads of operator>>
|
||||
istream& operator>>(streambuf&);
|
||||
istream& operator>>(whitespace&);
|
||||
istream& operator>>(char&);
|
||||
istream& operator>>(char*);
|
||||
istream& operator>>(signed char &sc) { return *this >> (char ) sc; }
|
||||
istream& operator>>(signed char *p) { return *this >> (char *) p; }
|
||||
istream& operator>>(unsigned char &uc) { return *this >> (char ) uc; }
|
||||
istream& operator>>(unsigned char *p) { return *this >> (char *) p; }
|
||||
istream& operator>>(int&);
|
||||
istream& operator>>(unsigned &u) { return *this >> (int) u; }
|
||||
istream& operator>>(short &s) { return *this >> (int) s; }
|
||||
istream& operator>>(unsigned short &us) { return *this >> (int) us; }
|
||||
istream& operator>>(long&);
|
||||
istream& operator>>(unsigned long &ul) { return *this >> (long) ul; }
|
||||
istream& operator>>(float&);
|
||||
istream& operator>>(double&);
|
||||
|
||||
// Other input functions
|
||||
istream& get(char *, int, char = '\n');
|
||||
istream& get(streambuf&, char = '\n');
|
||||
istream& get(char& c);
|
||||
istream& putback(char);
|
||||
|
||||
// Istream control functions
|
||||
ostream* tie(ostream *os);
|
||||
int skip(int s);
|
||||
|
||||
// Stream state access functions
|
||||
int good() { return state == _good; }
|
||||
int eof() { return state & _eof; }
|
||||
int fail() { return state & (_fail | _bad); }
|
||||
int bad() { return state & _bad; }
|
||||
|
||||
int operator!() { return fail(); }
|
||||
operator void*() { return fail() ? 0 : this; }
|
||||
int rdstate() { return state; }
|
||||
|
||||
// Stream state set function
|
||||
void clear(state_value v = _good) { state = v; }
|
||||
|
||||
char *bufptr() { return bp->bufptr(); }
|
||||
|
||||
// Constructors
|
||||
istream(int len, char *string, int s = 1);
|
||||
istream(streambuf *sb, int s = 1, ostream *os = NULL);
|
||||
istream(int fd, int s = 1, ostream *os = NULL);
|
||||
|
||||
// Destructor
|
||||
~istream();
|
||||
};
|
||||
|
||||
|
||||
/////////////////////
|
||||
// Predefined I/O streams.
|
||||
// These are tied to stdin, stdout, stderr, stdprn, stdaux
|
||||
|
||||
extern istream cin;
|
||||
extern ostream cout;
|
||||
extern ostream cerr;
|
||||
extern ostream cprn;
|
||||
extern ostream caux;
|
||||
|
||||
} // extern "C++"
|
||||
|
||||
#endif /* __STREAM_H */
|
76
Zortech C++ v30r1/INCLUDE/STRING.H
Normal file
76
Zortech C++ v30r1/INCLUDE/STRING.H
Normal file
@ -0,0 +1,76 @@
|
||||
/*_ string.h Sun Apr 2 1989 Modified by: Walter Bright */
|
||||
|
||||
#ifndef __STRING_H
|
||||
#define __STRING_H 1
|
||||
|
||||
#if __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef unsigned size_t;
|
||||
|
||||
#ifndef NULL
|
||||
#if __COMPACT__ || __LARGE__ || __VCM__
|
||||
#define NULL 0L
|
||||
#else
|
||||
#define NULL 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __STDC__
|
||||
#define __CDECL
|
||||
#else
|
||||
#define __CDECL _cdecl
|
||||
#endif
|
||||
|
||||
void * __CDECL memcpy(void *,const void *,size_t);
|
||||
void * __CDECL memmove(void *,const void *,size_t);
|
||||
char * __CDECL strcpy(char *,const char *);
|
||||
char * __CDECL strncpy(char *,const char *,size_t);
|
||||
char * __CDECL strcat(char *,const char *);
|
||||
char * __CDECL strncat(char *,const char *,size_t);
|
||||
int __CDECL memcmp(const void *,const void *,size_t);
|
||||
int __CDECL strcmp(const char *,const char *);
|
||||
int __CDECL strcoll(const char *,const char *);
|
||||
int __CDECL strncmp(const char *,const char *,size_t);
|
||||
size_t __CDECL strxfrm(char *,const char *,size_t);
|
||||
void * __CDECL memchr(const void *,int,size_t);
|
||||
char * __CDECL strchr(const char *,int);
|
||||
size_t __CDECL strcspn(const char *,const char *);
|
||||
char * __CDECL strpbrk(const char *,const char *);
|
||||
char * __CDECL strrchr(const char *,int);
|
||||
size_t __CDECL strspn(const char *,const char *);
|
||||
char * __CDECL strstr(const char *,const char *);
|
||||
char * __CDECL strtok(char *,const char *);
|
||||
void * __CDECL memset(void *,int,size_t);
|
||||
char * __CDECL strerror(int);
|
||||
size_t __CDECL strlen(const char *);
|
||||
|
||||
#if !__STDC__
|
||||
int __CDECL *_memintset(int *, int, size_t);
|
||||
int __CDECL memicmp(const void *,const void *,size_t);
|
||||
char * __CDECL stpcpy(char *,const char *);
|
||||
int __CDECL strcmpl(const char *,const char *);
|
||||
int __CDECL strnicmp(const char *, const char *, size_t);
|
||||
char * __CDECL strdup(const char *);
|
||||
char * __CDECL strlwr(char *);
|
||||
char * __CDECL strupr(char *);
|
||||
char * __CDECL strnset(char *,int,size_t);
|
||||
char * __CDECL strrev(char *);
|
||||
char * __CDECL strset(char *,int);
|
||||
void __CDECL swab(char *,char *,size_t);
|
||||
void __CDECL movedata(unsigned short srcseg,unsigned srcoff,unsigned short destseg,unsigned destoff,size_t nbytes);
|
||||
extern int __CDECL sys_nerr;
|
||||
extern char * __CDECL sys_errlist[];
|
||||
|
||||
#if 0 /* removed, use strchr() instead */
|
||||
char * __CDECL index(const char *,int);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __STRING_H */
|
218
Zortech C++ v30r1/INCLUDE/STRSTREA.HPP
Normal file
218
Zortech C++ v30r1/INCLUDE/STRSTREA.HPP
Normal file
@ -0,0 +1,218 @@
|
||||
#ifndef __SSTREAM_HPP
|
||||
#define __SSTREAM_HPP
|
||||
|
||||
// Iostreams Package
|
||||
// Bruce Perens, July-August 1990
|
||||
//
|
||||
// Modified Steve Teale April 1991
|
||||
// Copyright Zortech 1990-1991. All Rights Reserved.
|
||||
|
||||
#include <iostream.hpp>
|
||||
|
||||
const int default_allocation = 32;
|
||||
|
||||
class strstreambuf : public streambuf {
|
||||
|
||||
// This is a streambuf that holds a character array, and I/O is to that
|
||||
// character array instead of a file or some external character stream.
|
||||
// There is a dynamic-allocation mode that allocates space for characters
|
||||
// as needed. Get, put, and seeks are supported within the character array.
|
||||
// The call freeze() returns a pointer to the array, so that the data may
|
||||
// be read by conventional string-handling routines.
|
||||
|
||||
public:
|
||||
|
||||
// state flags
|
||||
enum sstream_flags {
|
||||
statmem = 1,
|
||||
// Set if the buffer was set with an argument to the constructor or
|
||||
// setbuf, and I should not do dynamic allocation if it runs out of
|
||||
// space.
|
||||
|
||||
frozen = 2,
|
||||
// Set when the buffer is frozen.
|
||||
merged = 4,
|
||||
// Set if the get and put areas are considered to be overlapped. This
|
||||
// will be the case if the strstreambuf is dynamic, or if a simultaneous
|
||||
// seek of both the get and put pointers has been done.
|
||||
rdonly = 0x10
|
||||
// Puts are not allowed.
|
||||
};
|
||||
|
||||
strstreambuf(int chunksize = default_allocation);
|
||||
// Create a strstreambuf in dynamic-allocation mode, with the initial
|
||||
// allocation at least "chunksize" bytes long, defaulted to default
|
||||
// allocation
|
||||
|
||||
strstreambuf(char *memory, int length = 0,
|
||||
char *start_of_put_area = 0);
|
||||
// Create a strstreambuf using the static buffer at "memory".
|
||||
// If "length" is positive, that is taken as the length of the
|
||||
// buffer. If it is zero, the length is taken from strlen(memory).
|
||||
// If "length" is negative, the buffer is assumed to be of infinite
|
||||
// length.
|
||||
//
|
||||
// The get pointer is initialized to "memory". If "start_of_put_area"
|
||||
// is zero, the get area covers the entire buffer and a put will be
|
||||
// considered an error. If "start_of_put_area" is non-zero, the
|
||||
// get area consists of the bytes between "memory" and
|
||||
// "start_of_put_area" - 1, and the put area consists of the bytes
|
||||
// between "start_of_put_area" and the end of the buffer.
|
||||
|
||||
strstreambuf(unsigned char *memory, int length = 0,
|
||||
unsigned char *start_of_put_area = 0);
|
||||
// Same as above, but for an unsigned character buffer.
|
||||
|
||||
strstreambuf(void * (*allocate_function)(size_t),
|
||||
void (*free_function)(void *),
|
||||
int chunksize = default_allocation);
|
||||
// Create a streambuf in dynamic allocation mode. Use
|
||||
// void * allocate_function(size_t length) to allocate memory,
|
||||
// and void free_function(void * memory) to free it. Allocation
|
||||
// chunk size can be specified.
|
||||
|
||||
~strstreambuf();
|
||||
|
||||
void freeze(int on = 1);
|
||||
void unfreeze() { freeze(0); }
|
||||
// If the argument is non-zero, "freeze" the strstreambuf. This
|
||||
// inhibits automatic deletion of the current character buffer.
|
||||
// This is only important in dynamic-allocation mode. Stores into
|
||||
// the buffer are invalid when it is "frozen". Calling this with
|
||||
// a zero argument "un-freezes" the buffer. Deleting a strstreambuf
|
||||
// will not de-allocate a frozen buffer - you must delete it yourself.
|
||||
|
||||
int pcount() const { return pptr()-pbase(); }
|
||||
// Return the number of characters inserted. Not accurate after
|
||||
// a seek.
|
||||
|
||||
char *str();
|
||||
// Freeze the buffer and return a pointer to its first byte.
|
||||
// The pointer may be null if no bytes have been stored and the
|
||||
// buffer is in dynamic-allocation mode. The buffer may be "un-frozen"
|
||||
// by calling freeze(0). Deleting a strstreambuf will not de-allocate
|
||||
// a frozen buffer - you must delete it yourself.
|
||||
|
||||
streambuf *setbuf(char *memory, int length);
|
||||
// The memory argument is not used. The next time the streambuf
|
||||
// does dynamic allocation, it will allocate at least "length" bytes.
|
||||
// This function in fact sets the allocation granularity.
|
||||
|
||||
#if __ZTC__ > 0x214
|
||||
int overflow(int c = EOF);
|
||||
#else
|
||||
int overflow(int c);
|
||||
#endif
|
||||
|
||||
int underflow();
|
||||
streampos seekoff(streamoff offset, seek_dir direction,
|
||||
int which =ios::in|ios::out);
|
||||
int sync();
|
||||
// All of these are virtual functions derived from streambuf.
|
||||
// There's more documentation on them in iostream.h .
|
||||
|
||||
protected:
|
||||
int doallocate();
|
||||
|
||||
private:
|
||||
short sflags;
|
||||
int chunk;
|
||||
// The minimum amount to allocate when doing dynamic allocation.
|
||||
|
||||
void *(*allocate_function)(size_t size);
|
||||
// Points to the function used to allocate memory.
|
||||
|
||||
void (*free_function)(void *memory);
|
||||
// Points to the function used to free memory.
|
||||
|
||||
void buffer_setup(char *memory, int length,
|
||||
char *start_of_put_area);
|
||||
};
|
||||
|
||||
class istrstream : public istream {
|
||||
|
||||
// A class of istream that takes as input a character array, and extracts
|
||||
// information from it.
|
||||
|
||||
public:
|
||||
istrstream(char *memory, int length = 0);
|
||||
// Create an istrstream attached to the character array at "memory",
|
||||
// of length "length". If length is zero, strlen() is used, if length
|
||||
// is negative, the stream is considered to be of a length equivalent
|
||||
// to the maximum value of type size_t.
|
||||
|
||||
~istrstream();
|
||||
strstreambuf *rdbuf() { return &buffer; }
|
||||
|
||||
private:
|
||||
strstreambuf buffer;
|
||||
};
|
||||
|
||||
class ostrstream : public ostream {
|
||||
|
||||
// A class of ostream that inserts information into a character array.
|
||||
|
||||
public:
|
||||
ostrstream();
|
||||
// Create an ostrstream in dynamic-allocation mode.
|
||||
|
||||
ostrstream(char *memory, int length, int mode=ios::out);
|
||||
// Create an ostrstream attached to the character array at "memory",
|
||||
// of length "length". If ios::ate or ios::app is set in "mode",
|
||||
// the buffer is assumed to contain a null-terminated string, and
|
||||
// the put area begins at the null character. Otherwise the put
|
||||
// area will begin at "memory".
|
||||
|
||||
~ostrstream();
|
||||
|
||||
int pcount() const { return buffer.pcount(); }
|
||||
// Returns the number of bytes that have been put into the buffer.
|
||||
|
||||
char *str();
|
||||
// Freezes the buffer, and returns a pointer to the first byte of the
|
||||
// buffer. Once the buffer is frozen it will not be deleted by
|
||||
// the destructor of the stream: it becomes the user's responsibility
|
||||
// to delete it.
|
||||
void unfreeze();
|
||||
// Unfreeze the buffer and unconditionally clear the state flags.
|
||||
|
||||
strstreambuf *rdbuf() { return &buffer; }
|
||||
private:
|
||||
strstreambuf buffer;
|
||||
};
|
||||
|
||||
|
||||
class strstream : public iostream {
|
||||
|
||||
// A class of iostream that inserts and extracts information in a character
|
||||
// array.
|
||||
|
||||
public:
|
||||
strstream();
|
||||
// Create a strstream in dynamic-allocation mode.
|
||||
|
||||
strstream(char *memory, int length = 0, int mode = ios::in|ios::out);
|
||||
// Create a strstream attached to the character array at "memory",
|
||||
// of length "length". If length is zero, then "memory" is assumed to
|
||||
// contain a null terminated string, and the langth is taken from
|
||||
// strlen. If ios::ate or ios::app is set in "mode", the buffer is
|
||||
// assumed to contain a null-terminated string, and the put area begins
|
||||
// at the null character. Otherwise the put area will begin at "memory".
|
||||
|
||||
~strstream();
|
||||
|
||||
char *str();
|
||||
// Freezes the buffer, and returns a pointer to the first byte of the
|
||||
// buffer. Once the buffer is frozen it will not be deleted by
|
||||
// the destructor of the stream: it becomes the user's responsibility
|
||||
// to delete it.
|
||||
void unfreeze();
|
||||
// Unfreeze the buffer and unconditionally clear the state flags.
|
||||
|
||||
strstreambuf *rdbuf() { return &buffer; }
|
||||
|
||||
private:
|
||||
strstreambuf buffer;
|
||||
};
|
||||
|
||||
#endif // __SSTREAM_HPP
|
96
Zortech C++ v30r1/INCLUDE/SWAP.H
Normal file
96
Zortech C++ v30r1/INCLUDE/SWAP.H
Normal file
@ -0,0 +1,96 @@
|
||||
/* swap.h written by: G. Eric Engstrom
|
||||
* (C)Copyright Concentric Software Designs, Inc. 1990
|
||||
* All Rights Reserved
|
||||
*/
|
||||
|
||||
#define SWAP_FREEMEMERROR -2
|
||||
/* errno == SWAP_FREEMEMERROR when DOS will not allow swap to shrink the allocation block */
|
||||
#define SWAP_NOVMSPACE -3
|
||||
/* errno == SWAP_NOVMSPACE when there is not enough room for the memory image file */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
/* defaults for _swapX are:
|
||||
*
|
||||
* swapping is turned on
|
||||
* windowing is turned off
|
||||
* piping is turned off
|
||||
* free paragraphs is turned off
|
||||
*
|
||||
* this allows you to link _swapX into your program without source code
|
||||
* modifications.
|
||||
*
|
||||
* _SWAPX position in the EXE determines how much of the program will get
|
||||
* "swapped out" to disk. For example, if _SWAPX is the first OBJ file in
|
||||
* linker's parameter list, then the entire EXE will be swapped to disk,
|
||||
* with the exception of the SWAP kernel required to control windowing,
|
||||
* piping, and reloading. You can get swap to leave more of the program
|
||||
* in memory by positioning it in the linker OBJ file list after the OBJ
|
||||
* files you want to remain in memory. For instance, your programs
|
||||
* CRITICAL ERROR HANDLER or some other ISR. Any ISR left in memory and
|
||||
* active while the rest of the program is "swapped out" must not access
|
||||
* any global data as it will mostly likely have been "swapped out" with
|
||||
* the rest of the program.
|
||||
*
|
||||
* on and off switches are incremental, like in the disp and msm libraries.
|
||||
* i.e.
|
||||
* swap_off();
|
||||
* swap_off();
|
||||
* swap_on();
|
||||
*
|
||||
* will result in swap still being off, two swap_on's will be required
|
||||
* to neutralize the effect of two swap_off's.
|
||||
*
|
||||
* swap_tempcheck routines are provided in case TMP/TEMP points to RAM disk
|
||||
* or other specialized memory that you don't want consumed
|
||||
* by a memory image of the program being swapped.
|
||||
*
|
||||
* swap_window's parameters are the line and column of the the upper left
|
||||
* corner of the window followed by the width[x] (in columns)
|
||||
* and the depth[y] (in lines). It can be used with or without
|
||||
* a pipe file.
|
||||
*
|
||||
* swap_pipe's parameter is the filespec where you would like all output
|
||||
* to be saved. It can be used with or without a window.
|
||||
*
|
||||
* swap_freeparagraphs' parameter is the number of 16 byte paragraphs of
|
||||
* memory you want SWAP to make available for the spawned
|
||||
* process. SWAP normally free's all the memory it can, but
|
||||
* if you are running a program you know will only require
|
||||
* 40K then SWAP will execute faster if you tell it to only
|
||||
* free up 40 * 64 paragraphs of memory. This call is for
|
||||
* speed enhancement only. NOTE: If you the number of paragraph's
|
||||
* specified is greater than SWAP can free, SWAP will free all
|
||||
* it can and still spawn the process.
|
||||
*/
|
||||
|
||||
int _cdecl swap_ison(void); /* default on returns value of swap control flag, positive non-zero is on */
|
||||
int _cdecl swap_istempcheckon(void); /* default on returns value of swap temp check flag, positive non-zero is on */
|
||||
int _cdecl swap_iswindowon(void); /* default off returns value of swap window control flag, positive non-zero is on */
|
||||
int _cdecl swap_ispipeon(void); /* default off returns value of swap pipe control flag, positive non-zero is on */
|
||||
int _cdecl swap_isfreeparagraphson(void); /* default off returns value of swap free paragraphs control flag, positive, non-zero is on */
|
||||
int _cdecl swap_istrapcbreakon(void); /* default on returns value of swap trap ^C/^Break flag, positive, non-zero is on */
|
||||
int _cdecl swap_isclearkeyboardon(void); /* default on returns value of swap clear keyboard flag, positive, non-zero is on */
|
||||
void _cdecl swap_on(void); /* turns swap on */
|
||||
void _cdecl swap_off(void); /* turns swap off */
|
||||
void _cdecl swap_tempcheckon(void); /* turns TMP\TEMP checking on, SWAP will put the image file where they say */
|
||||
void _cdecl swap_tempcheckoff(void); /* turns TMP\TEMP checking off, SWAP will put the image file in the CWD */
|
||||
void _cdecl swap_window(int col,int lin,int x,int y); /* defines spawned apps screen */
|
||||
void _cdecl swap_windowon(void); /* turns window on */
|
||||
void _cdecl swap_windowoff(void); /* turns window off */
|
||||
void _cdecl swap_pipe(const char *file); /* specifies output pipe file */
|
||||
void _cdecl swap_pipeon(void); /* turns output piping on */
|
||||
void _cdecl swap_pipeoff(void); /* turns output piping off */
|
||||
void _cdecl swap_freeparagraphs(unsigned int sz); /* specifies number of paragraphs SWAP should attempt to FREE for spawned process */
|
||||
void _cdecl swap_freeparagraphson(void); /* turns free paragraphs on */
|
||||
void _cdecl swap_freeparagraphsoff(void); /* turns free paragraphs off */
|
||||
void _cdecl swap_trapcbreakon(void); /* turns control C/Break trapping on */
|
||||
void _cdecl swap_trapcbreakoff(void); /* turns control C/Break trapping off */
|
||||
void _cdecl swap_clearkeyboardon(void); /* turns clear keyboard buffer on */
|
||||
void _cdecl swap_clearkeyboardoff(void); /* turns clear keyboard buffer off */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
14
Zortech C++ v30r1/INCLUDE/SYS/DIR.H
Normal file
14
Zortech C++ v30r1/INCLUDE/SYS/DIR.H
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef __DIR_H
|
||||
#define __DIR_H 1
|
||||
|
||||
#ifndef DIRSIZ
|
||||
#define DIRSIZ 14
|
||||
#endif
|
||||
|
||||
struct direct
|
||||
{
|
||||
unsigned short int d_ino;
|
||||
char d_name[DIRSIZ];
|
||||
};
|
||||
|
||||
#endif /* __DIR_H */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user