mirror of
https://github.com/reactos/reactos
synced 2025-10-06 08:22:58 +02:00
Compare commits
658 Commits
backups/al
...
backups/po
Author | SHA1 | Date | |
---|---|---|---|
|
3a3d839af3 | ||
|
1928c25d73 | ||
|
18ac7f07b6 | ||
|
e8c40d4eee | ||
|
2160c0c245 | ||
|
5b43b8d8b1 | ||
|
8af30ee387 | ||
|
bf338a8003 | ||
|
3b57e224a1 | ||
|
4b4d215e36 | ||
|
725d5b0050 | ||
|
264ff7e6d2 | ||
|
8d6d8aaf57 | ||
|
d7b7ff3672 | ||
|
9ac6146c7b | ||
|
7909dfa511 | ||
|
702e2a0488 | ||
|
d6eec68dd8 | ||
|
5568b1261a | ||
|
ee219b0e23 | ||
|
37d076fdc0 | ||
|
4dd2fef625 | ||
|
a93d293fa7 | ||
|
101713f39a | ||
|
31d0c28c6d | ||
|
31390cae28 | ||
|
ffb29d1f85 | ||
|
0bc300d64d | ||
|
27a6253e6c | ||
|
7792b4bfea | ||
|
6ba7e5d2cd | ||
|
9da5e3306e | ||
|
377ffd2516 | ||
|
353f0bf39d | ||
|
932dc7e607 | ||
|
995ac8a5b2 | ||
|
a0ef12d39e | ||
|
77089de5b6 | ||
|
2200dc3562 | ||
|
68a209fb2b | ||
|
05c22b76ae | ||
|
c683236f8a | ||
|
cf1a2b10ac | ||
|
00c9609713 | ||
|
87aa47161b | ||
|
38de497b18 | ||
|
0c3c1a51b0 | ||
|
2607bc5f85 | ||
|
096c2a1089 | ||
|
645c3e7497 | ||
|
08807e03af | ||
|
e2e4bed006 | ||
|
88e83d47c5 | ||
|
b3dee30733 | ||
|
aeac4dceb8 | ||
|
eb5d74fe5e | ||
|
9c23880fd4 | ||
|
0331e3dfe8 | ||
|
58f9a46b3e | ||
|
6e2aa454ad | ||
|
5817ae7a54 | ||
|
db6c8885b6 | ||
|
c614ba1a5e | ||
|
610dd8e8bc | ||
|
6733de66c9 | ||
|
c030bd043b | ||
|
5845a581f2 | ||
|
5da996d016 | ||
|
234a011028 | ||
|
2b66d8f4fb | ||
|
9cafa059bd | ||
|
6829bd8c8b | ||
|
f4d2ac0b1e | ||
|
781c6b374f | ||
|
7740536c18 | ||
|
a9920ccd9d | ||
|
30e7e912c2 | ||
|
631838f4a3 | ||
|
e0dda3685a | ||
|
c9a0b04418 | ||
|
3e18dad277 | ||
|
ddc52fc76c | ||
|
45d0cf852c | ||
|
d4449cd58d | ||
|
8c8090fc65 | ||
|
99bd564c01 | ||
|
4c0e95ce09 | ||
|
aa0b005b38 | ||
|
24b6532712 | ||
|
f4c3dd909b | ||
|
0ed727c9f8 | ||
|
d70abfc25b | ||
|
39ef71436d | ||
|
9d6033ebad | ||
|
88594a14de | ||
|
f5129193e2 | ||
|
5942162766 | ||
|
837c3298c7 | ||
|
887849790a | ||
|
58096a81e6 | ||
|
1eb9c1db51 | ||
|
91ec410e2f | ||
|
1a1051e787 | ||
|
9a53101c31 | ||
|
fc68dda45d | ||
|
df118afc6f | ||
|
956f376f4f | ||
|
3e3c9e9775 | ||
|
34eabf82b5 | ||
|
b47adbe03f | ||
|
adcb1f9fef | ||
|
3d7368e673 | ||
|
c6c92ec896 | ||
|
33bd174f16 | ||
|
a4ca03679f | ||
|
3b6c6f0a94 | ||
|
b9df1e262e | ||
|
abe286b572 | ||
|
d91b173cb3 | ||
|
1df2f8903a | ||
|
b27e166698 | ||
|
95cdf6e471 | ||
|
63e93fb6ba | ||
|
c568ca436d | ||
|
40c9a57fa2 | ||
|
9a3b51ea9a | ||
|
e70a05cabf | ||
|
abd513250f | ||
|
4b77a4d92d | ||
|
298503a6e4 | ||
|
093d9f292c | ||
|
7af94c863d | ||
|
d34cc750d8 | ||
|
9166ff8f34 | ||
|
7bbf6258d7 | ||
|
810d009783 | ||
|
c1a2f01875 | ||
|
0ba6cce82a | ||
|
85197737c3 | ||
|
a6e0f1b9c1 | ||
|
e45867b698 | ||
|
56ec91131c | ||
|
b94afd8f6e | ||
|
a16cc05ef2 | ||
|
cc161feeb5 | ||
|
c9481ea29c | ||
|
2663d38106 | ||
|
71160a6cae | ||
|
d36e7a745d | ||
|
56f3c4ed58 | ||
|
b1cf1bfa05 | ||
|
52c1eca7aa | ||
|
3985d6c980 | ||
|
a16ba46cd2 | ||
|
02d3095664 | ||
|
6256db0836 | ||
|
366a70a52a | ||
|
322cd3e113 | ||
|
c5ccc1106a | ||
|
a6bdb724d0 | ||
|
c6237266d7 | ||
|
2cb97d1370 | ||
|
601ea5384b | ||
|
18cff7ccc9 | ||
|
dac8f53fe5 | ||
|
d57bccaddf | ||
|
c0282425ac | ||
|
e2303991a6 | ||
|
034bf04901 | ||
|
bdd0224945 | ||
|
2acf2098b8 | ||
|
b995b11c1d | ||
|
98b6f6bd7b | ||
|
68c2c91476 | ||
|
237d12dc8e | ||
|
95a75efe29 | ||
|
cf7a330bf0 | ||
|
b8442ebcdd | ||
|
2cec8d9d65 | ||
|
b82483c76c | ||
|
7b78b8092c | ||
|
bbba49d610 | ||
|
16290c9195 | ||
|
49388de0ac | ||
|
c773a28861 | ||
|
bd3a9da15f | ||
|
ff86185830 | ||
|
1cb1df84c1 | ||
|
8a7c057498 | ||
|
d3ab2ca78a | ||
|
353bc6197c | ||
|
c6779bb5c2 | ||
|
785882957e | ||
|
80eabf0040 | ||
|
1a0cac4ee8 | ||
|
e1d5086ebf | ||
|
2177dfcfd2 | ||
|
47632d3088 | ||
|
f477aa0a0f | ||
|
849f32b6b5 | ||
|
f165c00432 | ||
|
13027a8afa | ||
|
cb76d1fab2 | ||
|
e26cc4962b | ||
|
04bbda156c | ||
|
f4a430511e | ||
|
1844746db4 | ||
|
e0dfaf1c5b | ||
|
d9bef42fde | ||
|
ff0ad6c8cb | ||
|
6514e33a95 | ||
|
ad17913046 | ||
|
aed77eddbd | ||
|
be04afc103 | ||
|
f22d019858 | ||
|
4e0cf9abb6 | ||
|
a9f4f32734 | ||
|
af2755d461 | ||
|
2f4cc70e0f | ||
|
7f6485630b | ||
|
938d6d1baf | ||
|
d840ae26ad | ||
|
b01de1ffd4 | ||
|
359d3bc253 | ||
|
315c267eef | ||
|
32fce0a991 | ||
|
e56e6b57c7 | ||
|
1e7d27e8c9 | ||
|
2c4319bbb7 | ||
|
3acecc6fd4 | ||
|
70ccaeb797 | ||
|
cc05ff6eb8 | ||
|
93ccc29d64 | ||
|
0f301d785a | ||
|
ff278d3830 | ||
|
8a17f1f08d | ||
|
2f69ef0ae5 | ||
|
38024cdd26 | ||
|
275c59c4d4 | ||
|
fccdd32ffd | ||
|
7e355fdee2 | ||
|
b82d7998fa | ||
|
c5fcba3366 | ||
|
d5c7b7443b | ||
|
23ffe8c3f8 | ||
|
87c424ef42 | ||
|
ce4cbf5e57 | ||
|
11fe38608b | ||
|
c5c1a87719 | ||
|
45ba821ec5 | ||
|
5875f60018 | ||
|
afa13639b8 | ||
|
f8ec26b8ae | ||
|
95daa63b61 | ||
|
c8e0c8df83 | ||
|
450aa4ce11 | ||
|
8b21b47868 | ||
|
e231640a15 | ||
|
8e401adc6b | ||
|
e31b75dfe5 | ||
|
7bf6af0dce | ||
|
de83dfa5b8 | ||
|
4ea628ccaa | ||
|
fc9d1af415 | ||
|
af98825fd6 | ||
|
a8708688d2 | ||
|
671ba3795b | ||
|
5ca5fa5dd7 | ||
|
dee9cfe25c | ||
|
0cd3294365 | ||
|
ed14a2c656 | ||
|
6edcaa7b93 | ||
|
ca512a7b11 | ||
|
ce23c3c042 | ||
|
8cd95a438b | ||
|
5696ea2bc9 | ||
|
a9bcd9387d | ||
|
fd0f414659 | ||
|
0b60acbc3c | ||
|
8a147bd7bb | ||
|
0699457c1d | ||
|
346e718bc8 | ||
|
3a1a462a26 | ||
|
c0212e2720 | ||
|
7df5d3e7e1 | ||
|
5b6820630a | ||
|
eeabdc3329 | ||
|
3d737b9d74 | ||
|
91203bfc8d | ||
|
97db1efac1 | ||
|
fd13cf7e83 | ||
|
8df3d41437 | ||
|
1d13fa9747 | ||
|
6f4ae1108e | ||
|
4069692f64 | ||
|
c1442ae332 | ||
|
9ad486dd0a | ||
|
911b9d27ae | ||
|
7c238e511f | ||
|
dea5b1d43f | ||
|
0c492c87b9 | ||
|
29937a5a8c | ||
|
f9764318f4 | ||
|
7189768d70 | ||
|
a48a01798c | ||
|
9b5646acd0 | ||
|
a57d7a6f93 | ||
|
16b0e06b8f | ||
|
ea49ca93dd | ||
|
e7986f168f | ||
|
903225f24e | ||
|
4d27307543 | ||
|
713139d9ea | ||
|
d295d5da57 | ||
|
f3fc2ca494 | ||
|
9b8f8ea446 | ||
|
f9a85ac5fb | ||
|
8030aa9a2c | ||
|
fe96ab9edf | ||
|
628501e0ac | ||
|
bcfaaaf65b | ||
|
0607c67b68 | ||
|
03a5f16ed9 | ||
|
0baf2d03b1 | ||
|
761a68acf7 | ||
|
154128c1a0 | ||
|
cd0596ffa4 | ||
|
742ddb108f | ||
|
f39737088b | ||
|
577b88645b | ||
|
fce0440b32 | ||
|
f0e7b26df9 | ||
|
5f113d7735 | ||
|
e332bc75f9 | ||
|
212b767a54 | ||
|
0a9a6b6359 | ||
|
4d4ec75256 | ||
|
fde9c768e4 | ||
|
b0c5a68699 | ||
|
5b1f9c5705 | ||
|
b4e10fa87d | ||
|
a24101498d | ||
|
3210fa3a76 | ||
|
24a420afcf | ||
|
cb6b20b96e | ||
|
614603eeb9 | ||
|
fdd9078191 | ||
|
00018abc54 | ||
|
f51f04e53e | ||
|
554ba464bc | ||
|
f14bd21382 | ||
|
2cf86ba40d | ||
|
63fa5da683 | ||
|
8ac9a09484 | ||
|
71cda6ad2a | ||
|
e11896f814 | ||
|
2b55bc2731 | ||
|
a106e5c2e0 | ||
|
0341276444 | ||
|
bb8e4bcd9e | ||
|
79d1ef572c | ||
|
97ae5f94b5 | ||
|
0ecfffa8a0 | ||
|
632a47580b | ||
|
974ee62e85 | ||
|
7889b35088 | ||
|
b929be435f | ||
|
2a60fd0675 | ||
|
1821eebb12 | ||
|
8e6267fd39 | ||
|
58042e8e21 | ||
|
64574d47b1 | ||
|
c75445a9d4 | ||
|
59904f6ca5 | ||
|
7a236ead2e | ||
|
8d780ebc45 | ||
|
c0b7a5108d | ||
|
2700763b70 | ||
|
efa9275d99 | ||
|
ef30b93924 | ||
|
a642687b55 | ||
|
fe8ad2a13b | ||
|
9cc07a82a9 | ||
|
725a3c2f57 | ||
|
8c984877c4 | ||
|
49b1d66ec3 | ||
|
561b4db8e9 | ||
|
4dcc066ed7 | ||
|
0ac49e9d42 | ||
|
160084df80 | ||
|
28a24e8079 | ||
|
e5d49d1493 | ||
|
07647a0b62 | ||
|
fd19aa00e6 | ||
|
2315100314 | ||
|
3a6ab460dd | ||
|
b1367292b1 | ||
|
a90ec8327c | ||
|
8b0ad6b22f | ||
|
a9c2167a20 | ||
|
17a549a975 | ||
|
86a52339fb | ||
|
b718e3cc4e | ||
|
a0da8855ea | ||
|
b407470ef1 | ||
|
34484a48d9 | ||
|
0f4cfdb301 | ||
|
b4d371d7d2 | ||
|
e8ecbebd7d | ||
|
0936234d7d | ||
|
124f38a790 | ||
|
de75c774c3 | ||
|
08482c30b1 | ||
|
bab510233f | ||
|
de138c3bb4 | ||
|
8b9646ca2a | ||
|
fb157f301a | ||
|
d73103f0f2 | ||
|
2d8afa8978 | ||
|
439e6fd789 | ||
|
05bc884b35 | ||
|
abb9dfec3b | ||
|
fcc7d2acc7 | ||
|
4cae592ec2 | ||
|
b0fb19733c | ||
|
0e847f36a6 | ||
|
a98111e50f | ||
|
f0e4451f31 | ||
|
572aa1faf4 | ||
|
c29c8b9124 | ||
|
621ded7636 | ||
|
e7f2044681 | ||
|
8b29e58251 | ||
|
edda3944bc | ||
|
1e7a5224aa | ||
|
db3d786f03 | ||
|
8da44c3750 | ||
|
a04bad112d | ||
|
396ff5690c | ||
|
52a70e745d | ||
|
6c8fad94ac | ||
|
6f3c732b92 | ||
|
9cb33ba90d | ||
|
dd212d63c9 | ||
|
ee054cd0f4 | ||
|
1ca3f8ce13 | ||
|
229fed0315 | ||
|
e24c42bb6b | ||
|
cf95dc8b1b | ||
|
0692378689 | ||
|
c2a04f5107 | ||
|
e54de54618 | ||
|
8b3af26269 | ||
|
e389f0c999 | ||
|
0412c84cea | ||
|
a5b6da0234 | ||
|
846dc1aebe | ||
|
f0bec76acd | ||
|
64944b49f7 | ||
|
301637bbde | ||
|
08da4a07b0 | ||
|
343e3f7bdc | ||
|
c2c6049107 | ||
|
eb54434d27 | ||
|
604f4f13c1 | ||
|
59c145b801 | ||
|
e52a450d86 | ||
|
b4e1db6c92 | ||
|
e995509c26 | ||
|
b8419654bd | ||
|
310a5bcfb7 | ||
|
a384c6e670 | ||
|
02755a61f0 | ||
|
eabbaacd53 | ||
|
fc4c441263 | ||
|
100f53e3ab | ||
|
a392c38668 | ||
|
f60f345d30 | ||
|
643a182dd0 | ||
|
cd4a8585a8 | ||
|
9019d252be | ||
|
847aa89893 | ||
|
1020ee4805 | ||
|
c72257a26f | ||
|
d1274928bb | ||
|
8753158ddb | ||
|
b6ef4c6ee6 | ||
|
96b374677d | ||
|
4dde3a1c21 | ||
|
37c4d8279f | ||
|
c79360a933 | ||
|
baefc0115b | ||
|
d86736989a | ||
|
11c6007bb9 | ||
|
31046fef6e | ||
|
4d47498931 | ||
|
ba0f1263e4 | ||
|
9577665661 | ||
|
c165636757 | ||
|
a00d9b33dc | ||
|
534636f9ce | ||
|
9189284a9d | ||
|
89cc6c3c47 | ||
|
080bf05b6d | ||
|
f07f87eb09 | ||
|
bb2b8992b4 | ||
|
53ac0de2ad | ||
|
03cf4fc8db | ||
|
6b116da4a1 | ||
|
206cbe2545 | ||
|
ff056457a2 | ||
|
e95a8de179 | ||
|
23265de0b9 | ||
|
4bf67aaf0f | ||
|
fbfe053b9b | ||
|
82c445e96b | ||
|
1fa5efe3d7 | ||
|
40b71ac19d | ||
|
3f249a0a67 | ||
|
d001f75197 | ||
|
d24e173122 | ||
|
43bfb5dd4e | ||
|
23475fc1f9 | ||
|
cea2f0f1d2 | ||
|
67b97bc9ef | ||
|
f4ccfedf3e | ||
|
aafd813531 | ||
|
33d7cd5d53 | ||
|
ef5b410045 | ||
|
cb05e516a2 | ||
|
e035ce116b | ||
|
2423a80b6b | ||
|
37ac253ad6 | ||
|
68ed284f6e | ||
|
9b56503fc8 | ||
|
2850638aad | ||
|
d4a5e08d97 | ||
|
402686e69a | ||
|
67347846ec | ||
|
0eb4051a93 | ||
|
f20f399309 | ||
|
e7005a9352 | ||
|
f9279fd739 | ||
|
9bc71c43a2 | ||
|
9a10a39940 | ||
|
8c43665c8d | ||
|
5df62c8577 | ||
|
9cc503a1b2 | ||
|
f689818f82 | ||
|
cb8820f660 | ||
|
86f13a4752 | ||
|
78237daf70 | ||
|
df94eae35b | ||
|
42819f010e | ||
|
9309c80c1b | ||
|
3f89e7fa88 | ||
|
5672781aa4 | ||
|
2f460387c0 | ||
|
666973de7f | ||
|
437f357dd1 | ||
|
009fddf0b2 | ||
|
61c807a7ec | ||
|
11039e6faf | ||
|
61dcda8178 | ||
|
e51a2aab8f | ||
|
97445cc205 | ||
|
4b9a323664 | ||
|
8b97b835f2 | ||
|
3d801bebec | ||
|
6a7ba78c91 | ||
|
e33a78f93b | ||
|
cfdb595cc6 | ||
|
865a496525 | ||
|
78dbb934c2 | ||
|
05df4eff43 | ||
|
fa4bd57bed | ||
|
f1fa92f6fc | ||
|
c367070483 | ||
|
6f699ce531 | ||
|
a8ea6a6ab4 | ||
|
a3e183bd64 | ||
|
7019953f42 | ||
|
fd01d2046a | ||
|
57946d8a9a | ||
|
785ffdc0da | ||
|
e19f4b7bd9 | ||
|
7ac15d3bbf | ||
|
1bb6977546 | ||
|
b1ce653a14 | ||
|
b607cb6445 | ||
|
3d00595df2 | ||
|
539c296fa7 | ||
|
5751b32540 | ||
|
e9ae9105f5 | ||
|
2d250ad2a7 | ||
|
12da975bfd | ||
|
779a7eeb41 | ||
|
aed77689d2 | ||
|
85fdc76fb2 | ||
|
c9f8b0e7e0 | ||
|
0418e694e6 | ||
|
28eb04c4db | ||
|
29bd3ad1f9 | ||
|
d288e05d38 | ||
|
a3c3364289 | ||
|
27f383b70d | ||
|
84a36613f5 | ||
|
53170a9c19 | ||
|
d6c9cf0a41 | ||
|
e6bf69e0ae | ||
|
0d216dc91a | ||
|
0618186aa6 | ||
|
154d6c64f8 | ||
|
fbff6fe0f0 | ||
|
b2f5efa2cf | ||
|
29f3606a01 | ||
|
bf89d5df7d | ||
|
0bf2971d1a | ||
|
bc1cb8bf6e | ||
|
108b495229 | ||
|
2a13486746 | ||
|
322dbd6fba | ||
|
6830474b06 | ||
|
7bc94f8976 | ||
|
566c2840b9 | ||
|
523d77cc92 | ||
|
0c969fe931 | ||
|
0aa810f5e1 | ||
|
7fd17a9a85 | ||
|
b21f552e3b | ||
|
fd962e2f04 | ||
|
b2a42182ef | ||
|
a8f6850b9f | ||
|
64c70941d3 | ||
|
052a86b641 | ||
|
62fe406292 | ||
|
f954a88f34 | ||
|
5307ffb9c6 | ||
|
510dc740a5 | ||
|
8871c0355a | ||
|
466b206539 | ||
|
17f773cb7d | ||
|
653d79d129 | ||
|
57787bb881 | ||
|
724d399a3f | ||
|
e58c615243 | ||
|
3db0384e86 | ||
|
0e37d806a5 | ||
|
3ed09e40d9 | ||
|
e8451b25d5 | ||
|
eab893a17c | ||
|
7c7a235e5f | ||
|
5bbfa0aa1d | ||
|
fe2a7b4489 | ||
|
94066e01ef | ||
|
b89e71762d | ||
|
b6926c02fc | ||
|
6cc6c8571b |
@@ -9,59 +9,118 @@
|
||||
|
||||
#include "File.h"
|
||||
#include "ssprintf.h"
|
||||
#include "trim.h"
|
||||
|
||||
#include "IRCClient.h"
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
const char* ArchBlackmann = "ArchBlackmann";
|
||||
#if defined(_DEBUG) && 0
|
||||
const char* BOTNAME = "RoyBot";
|
||||
const char* CHANNEL = "#RoyBotTest";
|
||||
#else
|
||||
const char* BOTNAME = "ArchBlackmann";
|
||||
const char* CHANNEL = "#ReactOS";
|
||||
#endif
|
||||
|
||||
vector<string> tech, module, dev, stru, period;
|
||||
//vector<string> tech, module, dev, stru, period, status, type, func, irql, curse, cursecop;
|
||||
|
||||
void ImportList ( vector<string>& list, const char* filename )
|
||||
class List
|
||||
{
|
||||
File f ( filename, "r" );
|
||||
public:
|
||||
string name;
|
||||
bool macro;
|
||||
std::vector<std::string> list;
|
||||
string tag;
|
||||
int last;
|
||||
List() { last = -1; }
|
||||
List ( const char* _name, bool _macro ) : name(_name), macro(_macro)
|
||||
{
|
||||
tag = ssprintf("%%%s%%",_name);
|
||||
last = -1;
|
||||
}
|
||||
};
|
||||
|
||||
vector<List> lists;
|
||||
vector<string> ops;
|
||||
|
||||
void ImportList ( const char* listname, bool macro )
|
||||
{
|
||||
lists.push_back ( List ( listname, macro ) );
|
||||
List& list = lists.back();
|
||||
File f ( ssprintf("%s.txt",listname).c_str(), "r" );
|
||||
string line;
|
||||
while ( f.next_line ( line, true ) )
|
||||
list.push_back ( line );
|
||||
list.list.push_back ( line );
|
||||
}
|
||||
|
||||
const char* ListRand ( const vector<string>& list )
|
||||
const char* ListRand ( List& list )
|
||||
{
|
||||
return list[rand()%list.size()].c_str();
|
||||
vector<string>& l = list.list;
|
||||
if ( !l.size() )
|
||||
{
|
||||
static string nothing;
|
||||
nothing = ssprintf ( "<list '%s' empty>", list.name.c_str() );
|
||||
return nothing.c_str();
|
||||
}
|
||||
else if ( l.size() == 1 )
|
||||
return l[0].c_str();
|
||||
int sel = list.last;
|
||||
while ( sel == list.last )
|
||||
sel = rand()%l.size();
|
||||
list.last = sel;
|
||||
return l[sel].c_str();
|
||||
}
|
||||
|
||||
string TechReply()
|
||||
const char* ListRand ( int i )
|
||||
{
|
||||
string t = ListRand(tech);
|
||||
return ListRand ( lists[i] );
|
||||
}
|
||||
|
||||
int GetListIndex ( const char* listname )
|
||||
{
|
||||
for ( int i = 0; i < lists.size(); i++ )
|
||||
{
|
||||
if ( !stricmp ( lists[i].name.c_str(), listname ) )
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
List& GetList ( const char* listname )
|
||||
{
|
||||
return lists[GetListIndex(listname)];
|
||||
}
|
||||
|
||||
const char* ListRand ( const char* list )
|
||||
{
|
||||
int i = GetListIndex ( list );
|
||||
if ( i < 0 )
|
||||
return NULL;
|
||||
return ListRand(i);
|
||||
}
|
||||
|
||||
string TaggedReply ( const char* listname )
|
||||
{
|
||||
string t = ListRand(listname);
|
||||
string out;
|
||||
const char* p = t.c_str();
|
||||
while ( *p )
|
||||
{
|
||||
if ( *p == '%' )
|
||||
{
|
||||
if ( !strnicmp ( p, "%dev%", 5 ) )
|
||||
bool found = false;
|
||||
for ( int i = 0; i < lists.size() && !found; i++ )
|
||||
{
|
||||
out += ListRand(dev);
|
||||
p += 5;
|
||||
if ( lists[i].macro && !strnicmp ( p, lists[i].tag.c_str(), lists[i].tag.size() ) )
|
||||
{
|
||||
out += ListRand(i);
|
||||
p += lists[i].tag.size();
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
else if ( !strnicmp ( p, "%period%", 8 ) )
|
||||
{
|
||||
out += ListRand(period);
|
||||
p += 8;
|
||||
}
|
||||
else if ( !strnicmp ( p, "%module%", 8 ) )
|
||||
{
|
||||
out += ListRand(module);
|
||||
p += 8;
|
||||
}
|
||||
else if ( !strnicmp ( p, "%stru%", 6 ) )
|
||||
{
|
||||
out += ListRand(stru);
|
||||
p += 6;
|
||||
}
|
||||
else
|
||||
if ( !found )
|
||||
out += *p++;
|
||||
}
|
||||
const char* p2 = strchr ( p, '%' );
|
||||
@@ -76,6 +135,28 @@ string TechReply()
|
||||
return out;
|
||||
}
|
||||
|
||||
string gobble ( string& s, const char* delim )
|
||||
{
|
||||
const char* p = s.c_str();
|
||||
p += strspn ( p, delim );
|
||||
const char* p2 = strpbrk ( p, delim );
|
||||
if ( !p2 ) p2 = p + strlen(p);
|
||||
string out ( p, p2-p );
|
||||
p2 += strspn ( p2, delim );
|
||||
s = string ( p2 );
|
||||
return out;
|
||||
}
|
||||
|
||||
bool isop ( const string& who )
|
||||
{
|
||||
for ( int i = 0; i < ops.size(); i++ )
|
||||
{
|
||||
if ( ops[i] == who )
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// do custom stuff with the IRCClient from your subclass via the provided callbacks...
|
||||
class MyIRCClient : public IRCClient
|
||||
{
|
||||
@@ -92,6 +173,32 @@ public:
|
||||
}
|
||||
bool OnJoin ( const string& user, const string& channel )
|
||||
{
|
||||
printf ( "user '%s' joined channel '%s'\n", user.c_str(), channel.c_str() );
|
||||
return true;
|
||||
}
|
||||
bool OnPart ( const std::string& user, const std::string& channel )
|
||||
{
|
||||
for ( int i = 0; i < ops.size(); i++ )
|
||||
{
|
||||
if ( ops[i] == user )
|
||||
{
|
||||
printf ( "remove '%s' to ops list\n", user.c_str() );
|
||||
ops.erase ( &ops[i] );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool OnNick ( const std::string& oldNick, const std::string& newNick )
|
||||
{
|
||||
for ( int i = 0; i < ops.size(); i++ )
|
||||
{
|
||||
if ( ops[i] == oldNick )
|
||||
{
|
||||
printf ( "op '%s' changed nick to '%s'\n", oldNick.c_str(), newNick.c_str() );
|
||||
ops[i] = newNick;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool OnEndChannelUsers ( const string& channel )
|
||||
@@ -102,19 +209,168 @@ public:
|
||||
{
|
||||
printf ( "<%s> %s\n", from.c_str(), text.c_str() );
|
||||
flog.printf ( "<%s> %s\n", from.c_str(), text.c_str() );
|
||||
return PrivMsg ( from, "hey, your tongue doesn't belong there!" );
|
||||
if ( strnicmp ( text.c_str(), "!say ", 5 ) || !isop(from) )
|
||||
return PrivMsg ( from, "hey, your tongue doesn't belong there!" );
|
||||
string say = trim(&text[5]);
|
||||
if ( !strnicmp ( say.c_str(), "/me ", 4 ) )
|
||||
return Action ( CHANNEL, trim(&say[4]) );
|
||||
else
|
||||
return PrivMsg ( CHANNEL, trim(say) );
|
||||
}
|
||||
bool OnChannelMsg ( const string& channel, const string& from, const string& text )
|
||||
{
|
||||
printf ( "%s <%s> %s\n", channel.c_str(), from.c_str(), text.c_str() );
|
||||
flog.printf ( "%s <%s> %s\n", channel.c_str(), from.c_str(), text.c_str() );
|
||||
string text2(text);
|
||||
bool found_name = false;
|
||||
string text2 ( text );
|
||||
strlwr ( &text2[0] );
|
||||
if ( !strnicmp ( text2.c_str(), ArchBlackmann, strlen(ArchBlackmann) ) )
|
||||
|
||||
if ( !strnicmp ( text.c_str(), BOTNAME, strlen(BOTNAME) ) )
|
||||
found_name = true;
|
||||
else if ( !strnicmp ( text.c_str(), "arch ", 5 ) )
|
||||
found_name = true;
|
||||
|
||||
if ( found_name )
|
||||
{
|
||||
string reply = ssprintf("%s: %s", from.c_str(), TechReply().c_str());
|
||||
flog.printf ( "TECH-REPLY: %s\n", reply.c_str() );
|
||||
return PrivMsg ( channel, reply );
|
||||
string s ( text );
|
||||
gobble ( s, " \t" ); // remove bot name
|
||||
found_name = true;
|
||||
if ( s[0] == '!' )
|
||||
{
|
||||
bool from_op = isop(from);
|
||||
string cmd = gobble ( s, " \t" );
|
||||
if ( !from_op )
|
||||
{
|
||||
if ( cmd == "!grovel" )
|
||||
{
|
||||
string out = ssprintf(TaggedReply("nogrovel").c_str(),from.c_str());
|
||||
if ( !strnicmp ( out.c_str(), "/me ", 4 ) )
|
||||
return Action ( channel, &out[4] );
|
||||
else
|
||||
return PrivMsg ( channel, out );
|
||||
}
|
||||
return PrivMsg ( channel, ssprintf("%s: I don't take commands from non-ops",from.c_str()) );
|
||||
}
|
||||
if ( cmd == "!add" )
|
||||
{
|
||||
string listname = gobble ( s, " \t" );
|
||||
int i = GetListIndex ( listname.c_str() );
|
||||
if ( i == -1 )
|
||||
return PrivMsg ( channel, ssprintf("%s: I don't have a list named '%s'",from.c_str(),listname.c_str()) );
|
||||
List& list = lists[i];
|
||||
if ( s[0] == '\"' || s[0] == '\'' )
|
||||
{
|
||||
char delim = s[0];
|
||||
const char* p = &s[1];
|
||||
const char* p2 = strchr ( p, delim );
|
||||
if ( !p2 )
|
||||
return PrivMsg ( channel, ssprintf("%s: Couldn't add, unmatched quotes",from.c_str()) );
|
||||
s = string ( p, p2-p );
|
||||
}
|
||||
for ( i = 0; i < list.list.size(); i++ )
|
||||
{
|
||||
if ( list.list[i] == s )
|
||||
return PrivMsg ( channel, ssprintf("%s: entry already exists in list '%s'",from.c_str(),listname.c_str()) );
|
||||
}
|
||||
if ( !stricmp ( listname.c_str(), "curse" ) )
|
||||
strlwr ( &s[0] );
|
||||
list.list.push_back ( s );
|
||||
{
|
||||
File f ( ssprintf("%s.txt",list.name.c_str()), "w" );
|
||||
for ( i = 0; i < list.list.size(); i++ )
|
||||
f.printf ( "%s\n", list.list[i].c_str() );
|
||||
}
|
||||
return PrivMsg ( channel, ssprintf("%s: entry added to list '%s'",from.c_str(),listname.c_str()) );
|
||||
}
|
||||
else if ( cmd == "!remove" )
|
||||
{
|
||||
string listname = gobble ( s, " \t" );
|
||||
int i = GetListIndex ( listname.c_str() );
|
||||
if ( i == -1 )
|
||||
return PrivMsg ( channel, ssprintf("%s: I don't have a list named '%s'",from.c_str(),listname.c_str()) );
|
||||
List& list = lists[i];
|
||||
if ( s[0] == '\"' || s[0] == '\'' )
|
||||
{
|
||||
char delim = s[0];
|
||||
const char* p = &s[1];
|
||||
const char* p2 = strchr ( p, delim );
|
||||
if ( !p2 )
|
||||
return PrivMsg ( channel, ssprintf("%s: Couldn't add, unmatched quotes",from.c_str()) );
|
||||
s = string ( p, p2-p );
|
||||
}
|
||||
for ( i = 0; i < list.list.size(); i++ )
|
||||
{
|
||||
if ( list.list[i] == s )
|
||||
{
|
||||
list.list.erase ( &list.list[i] );
|
||||
{
|
||||
File f ( ssprintf("%s.txt",list.name.c_str()), "w" );
|
||||
for ( i = 0; i < list.list.size(); i++ )
|
||||
f.printf ( "%s\n", list.list[i].c_str() );
|
||||
}
|
||||
return PrivMsg ( channel, ssprintf("%s: entry removed from list '%s'",from.c_str(),listname.c_str()) );
|
||||
}
|
||||
}
|
||||
return PrivMsg ( channel, ssprintf("%s: entry doesn't exist in list '%s'",from.c_str(),listname.c_str()) );
|
||||
}
|
||||
else if ( cmd == "!grovel" )
|
||||
{
|
||||
string out = ssprintf(TaggedReply("grovel").c_str(),from.c_str());
|
||||
if ( !strnicmp ( out.c_str(), "/me ", 4 ) )
|
||||
return Action ( channel, &out[4] );
|
||||
else
|
||||
return PrivMsg ( channel, out );
|
||||
}
|
||||
else if ( cmd == "!kiss" )
|
||||
{
|
||||
if ( s.size() )
|
||||
return Action ( channel, ssprintf("kisses %s",s.c_str()) );
|
||||
else
|
||||
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
|
||||
}
|
||||
else if ( cmd == "!hug" )
|
||||
{
|
||||
if ( s.size() )
|
||||
return Action ( channel, ssprintf("hugs %s",s.c_str()) );
|
||||
else
|
||||
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
|
||||
}
|
||||
else if ( cmd == "!give" )
|
||||
{
|
||||
string who = gobble(s," \t");
|
||||
if ( who.size() && s.size() )
|
||||
return Action ( channel, ssprintf("gives %s a %s",who.c_str(),s.c_str()) );
|
||||
else
|
||||
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return PrivMsg ( channel, ssprintf("%s: huh?",from.c_str()) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool found_curse = false;
|
||||
static vector<string>& curse = GetList("curse").list;
|
||||
text2 = ssprintf(" %s ",text2.c_str());
|
||||
for ( int i = 0; i < curse.size() && !found_curse; i++ )
|
||||
{
|
||||
if ( strstr ( text2.c_str(), curse[i].c_str() ) )
|
||||
found_curse = true;
|
||||
}
|
||||
if ( found_curse )
|
||||
{
|
||||
static List& cursecop = GetList("cursecop");
|
||||
return PrivMsg ( channel, ssprintf("%s: %s", from.c_str(), ListRand(cursecop)) );
|
||||
}
|
||||
else if ( found_name )
|
||||
{
|
||||
string out = ssprintf("%s: %s", from.c_str(), TaggedReply("tech").c_str());
|
||||
flog.printf ( "TECH-REPLY: %s\n", out.c_str() );
|
||||
if ( !strnicmp ( out.c_str(), "/me ", 4 ) )
|
||||
return Action ( channel, &out[4] );
|
||||
else
|
||||
return PrivMsg ( channel, out );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -123,9 +379,45 @@ public:
|
||||
//printf ( "OnChannelMode(%s,%s)\n", channel.c_str(), mode.c_str() );
|
||||
return true;
|
||||
}
|
||||
bool OnUserModeInChannel ( const string& src, const string& channel, const string& user, const string& mode )
|
||||
bool OnUserModeInChannel ( const string& src, const string& channel, const string& mode, const string& target )
|
||||
{
|
||||
//printf ( "OnUserModeInChannel(%s,%s%s,%s)\n", src.c_str(), channel.c_str(), user.c_str(), mode.c_str() );
|
||||
printf ( "OnUserModeInChannel(%s,%s,%s,%s)\n", src.c_str(), channel.c_str(), mode.c_str(), target.c_str() );
|
||||
const char* p = mode.c_str();
|
||||
if ( !p )
|
||||
return true;
|
||||
while ( *p )
|
||||
{
|
||||
switch ( *p++ )
|
||||
{
|
||||
case '+':
|
||||
while ( *p != 0 && *p != ' ' )
|
||||
{
|
||||
if ( *p == 'o' )
|
||||
{
|
||||
printf ( "adding '%s' to ops list\n", target.c_str() );
|
||||
ops.push_back ( target );
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case '-':
|
||||
while ( *p != 0 && *p != ' ' )
|
||||
{
|
||||
if ( *p == 'o' )
|
||||
{
|
||||
for ( int i = 0; i < ops.size(); i++ )
|
||||
{
|
||||
if ( ops[i] == target )
|
||||
{
|
||||
printf ( "remove '%s' to ops list\n", target.c_str() );
|
||||
ops.erase ( &ops[i] );
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool OnMode ( const string& user, const string& mode )
|
||||
@@ -135,14 +427,16 @@ public:
|
||||
}
|
||||
bool OnChannelUsers ( const string& channel, const vector<string>& users )
|
||||
{
|
||||
printf ( "[%s has %i users]: ", channel.c_str(), users.size() );
|
||||
//printf ( "[%s has %i users]: ", channel.c_str(), users.size() );
|
||||
for ( int i = 0; i < users.size(); i++ )
|
||||
{
|
||||
if ( i )
|
||||
if ( users[i][0] == '@' )
|
||||
ops.push_back ( &users[i][1] );
|
||||
/*if ( i )
|
||||
printf ( ", " );
|
||||
printf ( "%s", users[i].c_str() );
|
||||
printf ( "%s", users[i].c_str() );*/
|
||||
}
|
||||
printf ( "\n" );
|
||||
//printf ( "\n" );
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -150,32 +444,50 @@ public:
|
||||
int main ( int argc, char** argv )
|
||||
{
|
||||
srand ( time(NULL) );
|
||||
ImportList ( tech, "tech.txt" );
|
||||
ImportList ( stru, "stru.txt" );
|
||||
ImportList ( dev, "dev.txt" );
|
||||
ImportList ( period, "period.txt" );
|
||||
ImportList ( module, "module.txt" );
|
||||
|
||||
ImportList ( "dev", true );
|
||||
ImportList ( "func", true );
|
||||
ImportList ( "dev", true );
|
||||
ImportList ( "func", true );
|
||||
ImportList ( "irql", true );
|
||||
ImportList ( "module", true );
|
||||
ImportList ( "period", true );
|
||||
ImportList ( "status", true );
|
||||
ImportList ( "stru", true );
|
||||
ImportList ( "type", true );
|
||||
|
||||
ImportList ( "tech", false );
|
||||
ImportList ( "curse", false );
|
||||
ImportList ( "cursecop", false );
|
||||
ImportList ( "grovel", false );
|
||||
ImportList ( "nogrovel", false );
|
||||
|
||||
#ifdef _DEBUG
|
||||
printf ( "initializing IRCClient debugging\n" );
|
||||
IRCClient::SetDebug ( true );
|
||||
#endif//_DEBUG
|
||||
printf ( "calling suStartup()\n" );
|
||||
suStartup();
|
||||
printf ( "creating IRCClient object\n" );
|
||||
MyIRCClient irc;
|
||||
printf ( "connecting to freenode\n" );
|
||||
if ( !irc.Connect ( "212.204.214.114" ) ) // irc.freenode.net
|
||||
|
||||
//const char* server = "212.204.214.114";
|
||||
const char* server = "irc.freenode.net";
|
||||
|
||||
if ( !irc.Connect ( server ) ) // irc.freenode.net
|
||||
{
|
||||
printf ( "couldn't connect to server\n" );
|
||||
return -1;
|
||||
}
|
||||
printf ( "sending user command\n" );
|
||||
if ( !irc.User ( "ArchBlackmann", "", "irc.freenode.net", "Arch Blackmann" ) )
|
||||
if ( !irc.User ( BOTNAME, "", "irc.freenode.net", BOTNAME ) )
|
||||
{
|
||||
printf ( "USER command failed\n" );
|
||||
return -1;
|
||||
}
|
||||
printf ( "sending nick\n" );
|
||||
if ( !irc.Nick ( "ArchBlackmann" ) )
|
||||
if ( !irc.Nick ( BOTNAME ) )
|
||||
{
|
||||
printf ( "NICK command failed\n" );
|
||||
return -1;
|
||||
@@ -186,8 +498,8 @@ int main ( int argc, char** argv )
|
||||
printf ( "MODE command failed\n" );
|
||||
return -1;
|
||||
}
|
||||
printf ( "joining #ReactOS\n" );
|
||||
if ( !irc.Join ( "#ReactOS" ) )
|
||||
printf ( "joining channel\n" );
|
||||
if ( !irc.Join ( CHANNEL ) )
|
||||
{
|
||||
printf ( "JOIN command failed\n" );
|
||||
return -1;
|
||||
|
@@ -81,7 +81,13 @@ IRCClient::Join ( const string& channel )
|
||||
bool
|
||||
IRCClient::PrivMsg ( const string& to, const string& text )
|
||||
{
|
||||
return Send ( "PRIVMSG " + to + " :" + text + "\n" );
|
||||
return Send ( "PRIVMSG " + to + " :" + text + '\n' );
|
||||
}
|
||||
|
||||
bool
|
||||
IRCClient::Action ( const string& to, const string& text )
|
||||
{
|
||||
return Send ( "PRIVMSG " + to + " :" + (char)1 + "ACTION " + text + (char)1 + '\n' );
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -226,10 +232,41 @@ int IRCClient::Run ( bool launch_thread )
|
||||
printf ( "!!!:OnRecv failure 5 (PRIVMSG w/o target): %s", buf.c_str() );
|
||||
continue;
|
||||
}
|
||||
if ( tgt[0] == '#' )
|
||||
OnChannelMsg ( tgt, src, text );
|
||||
if ( *p == 1 )
|
||||
{
|
||||
p++;
|
||||
p2 = strchr ( p, ' ' );
|
||||
if ( !p2 ) p2 = p + strlen(p);
|
||||
cmd = string ( p, p2-p );
|
||||
strlwr ( &cmd[0] );
|
||||
p = p2 + 1;
|
||||
p2 = strchr ( p, 1 );
|
||||
if ( !p2 )
|
||||
{
|
||||
printf ( "!!!:OnRecv failure 6 (no terminating \x01 for initial \x01 found: %s", buf.c_str() );
|
||||
continue;
|
||||
}
|
||||
text = string ( p, p2-p );
|
||||
if ( cmd == "action" )
|
||||
{
|
||||
if ( tgt[0] == '#' )
|
||||
OnChannelAction ( tgt, src, text );
|
||||
else
|
||||
OnPrivAction ( src, text );
|
||||
}
|
||||
else
|
||||
{
|
||||
printf ( "!!!:OnRecv failure 7 (unrecognized \x01 command '%s': %s", cmd.c_str(), buf.c_str() );
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
OnPrivMsg ( src, text );
|
||||
{
|
||||
if ( tgt[0] == '#' )
|
||||
OnChannelMsg ( tgt, src, text );
|
||||
else
|
||||
OnPrivMsg ( src, text );
|
||||
}
|
||||
}
|
||||
else if ( cmd == "mode" )
|
||||
{
|
||||
@@ -237,22 +274,22 @@ int IRCClient::Run ( bool launch_thread )
|
||||
//printf ( "[MODE] src='%s' cmd='%s' tgt='%s' text='%s'", src.c_str(), cmd.c_str(), tgt.c_str(), text.c_str() );
|
||||
//OnMode (
|
||||
// self mode change:
|
||||
// [MODE] src=Relic3_14 cmd=mode tgt=Relic3_14 text=+i
|
||||
// [MODE] src=Nick cmd=mode tgt=Nick text=+i
|
||||
// channel mode change:
|
||||
// [MODE] src=Royce3 cmd=mode tgt=#Royce3 text=+o Relic3_14
|
||||
// [MODE] src=Nick cmd=mode tgt=#Channel text=+o Nick
|
||||
if ( tgt[0] == '#' )
|
||||
{
|
||||
p = text.c_str();
|
||||
p2 = strchr ( p, ' ' );
|
||||
if ( !p2 )
|
||||
OnChannelMode ( tgt, text );
|
||||
else
|
||||
if ( p2 && *p2 )
|
||||
{
|
||||
string user ( p, p2-p );
|
||||
string mode ( p, p2-p );
|
||||
p = p2 + 1;
|
||||
p += strspn ( p, " " );
|
||||
OnUserModeInChannel ( src, tgt, user, p );
|
||||
OnUserModeInChannel ( src, tgt, mode, trim(p) );
|
||||
}
|
||||
else
|
||||
OnChannelMode ( tgt, text );
|
||||
}
|
||||
else
|
||||
OnMode ( tgt, text );
|
||||
@@ -261,6 +298,14 @@ int IRCClient::Run ( bool launch_thread )
|
||||
{
|
||||
OnJoin ( src, text );
|
||||
}
|
||||
else if ( cmd == "part" )
|
||||
{
|
||||
OnPart ( src, text );
|
||||
}
|
||||
else if ( cmd == "nick" )
|
||||
{
|
||||
OnNick ( src, text );
|
||||
}
|
||||
else if ( isdigit(cmd[0]) )
|
||||
{
|
||||
int i = atoi(cmd.c_str());
|
||||
@@ -307,7 +352,13 @@ int IRCClient::Run ( bool launch_thread )
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( _debug ) printf ( "unrecognized ':' response: %s", buf.c_str() );
|
||||
if ( strstr ( buf.c_str(), "ACTION" ) )
|
||||
{
|
||||
printf ( "ACTION: " );
|
||||
for ( int i = 0; i < buf.size(); i++ )
|
||||
printf ( "%c(%xh)", buf[i], (unsigned)(unsigned char)buf[i] );
|
||||
}
|
||||
else if ( _debug ) printf ( "unrecognized ':' response: %s", buf.c_str() );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@@ -48,6 +48,9 @@ public:
|
||||
// send message to someone or some channel
|
||||
bool PrivMsg ( const std::string& to, const std::string& text );
|
||||
|
||||
// send /me to someone or some channel
|
||||
bool Action ( const std::string& to, const std::string& text );
|
||||
|
||||
// leave a channel
|
||||
bool Part ( const std::string& channel, const std::string& text );
|
||||
|
||||
@@ -59,32 +62,45 @@ public:
|
||||
// OnConnected: you just successfully logged into irc server
|
||||
virtual bool OnConnected() = 0;
|
||||
|
||||
// OnJoin: you just successfully joined this channel
|
||||
virtual bool OnJoin ( const std::string& user, const std::string& channel ) = 0;
|
||||
virtual bool OnNick ( const std::string& oldNick, const std::string& newNick ) { return true; }
|
||||
|
||||
// OnJoin: someone just successfully joined a channel you are in ( also sent when you successfully join a channel )
|
||||
virtual bool OnJoin ( const std::string& user, const std::string& channel ) { return true; }
|
||||
|
||||
// OnPart: someone just left a channel you are in
|
||||
virtual bool OnPart ( const std::string& user, const std::string& channel ) { return true; }
|
||||
|
||||
// OnPrivMsg: you just received a private message from a user
|
||||
virtual bool OnPrivMsg ( const std::string& from, const std::string& text ) = 0;
|
||||
virtual bool OnPrivMsg ( const std::string& from, const std::string& text ) { return true; }
|
||||
|
||||
virtual bool OnPrivAction ( const std::string& from, const std::string& text ) { return true; }
|
||||
|
||||
// OnChannelMsg: you just received a chat line in a channel
|
||||
virtual bool OnChannelMsg ( const std::string& channel, const std::string& from,
|
||||
const std::string& text ) = 0;
|
||||
const std::string& text ) { return true; }
|
||||
|
||||
// OnChannelAction: you just received a "/me" line in a channel
|
||||
virtual bool OnChannelAction ( const std::string& channel, const std::string& from,
|
||||
const std::string& text ) { return true; }
|
||||
|
||||
// OnChannelMode: notification of a change of a channel's mode
|
||||
virtual bool OnChannelMode ( const std::string& channel, const std::string& mode ) = 0;
|
||||
virtual bool OnChannelMode ( const std::string& channel, const std::string& mode )
|
||||
{ return true; }
|
||||
|
||||
// OnUserModeInChannel: notification of a mode change of a user with respect to a channel.
|
||||
// f.ex.: this will be called when someone is oped in a channel.
|
||||
virtual bool OnUserModeInChannel ( const std::string& src, const std::string& channel,
|
||||
const std::string& user, const std::string& mode ) = 0;
|
||||
const std::string& mode, const std::string& target ) { return true; }
|
||||
|
||||
// OnMode: you will receive this when you change your own mode, at least...
|
||||
virtual bool OnMode ( const std::string& user, const std::string& mode ) = 0;
|
||||
virtual bool OnMode ( const std::string& user, const std::string& mode ) { return true; }
|
||||
|
||||
// notification of what users are in a channel ( you may get multiple of these... )
|
||||
virtual bool OnChannelUsers ( const std::string& channel, const std::vector<std::string>& users ) = 0;
|
||||
virtual bool OnChannelUsers ( const std::string& channel, const std::vector<std::string>& users )
|
||||
{ return true; }
|
||||
|
||||
// notification that you have received the entire list of users for a channel
|
||||
virtual bool OnEndChannelUsers ( const std::string& channel ) = 0;
|
||||
virtual bool OnEndChannelUsers ( const std::string& channel ) { return true; }
|
||||
|
||||
// OnPing - default implementation replies to PING with a valid PONG. required on some systems to
|
||||
// log in. Most systems require a response in order to stay connected, used to verify a client hasn't
|
||||
|
26
irc/ArchBlackmann/curse.txt
Normal file
26
irc/ArchBlackmann/curse.txt
Normal file
@@ -0,0 +1,26 @@
|
||||
shit
|
||||
fuck
|
||||
pussy
|
||||
ass
|
||||
ass-
|
||||
-ass
|
||||
dumbass
|
||||
jackass
|
||||
fatass
|
||||
asshole
|
||||
smartass
|
||||
cunt
|
||||
fucker
|
||||
bitch
|
||||
dick
|
||||
penile
|
||||
stfu
|
||||
omfg
|
||||
lmao
|
||||
ass.
|
||||
-ass.
|
||||
semprini
|
||||
goat.cx
|
||||
ekush
|
||||
akshor
|
||||
poop
|
10
irc/ArchBlackmann/cursecop.txt
Normal file
10
irc/ArchBlackmann/cursecop.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
You should have your mouth washed out with soap!
|
||||
This is a clean channel... please watch your language
|
||||
Please try to keep it clean
|
||||
Hey, there's children present ( I'm not even a year old yet! )
|
||||
Could you find a less-offensive way to express yourself, please?
|
||||
Such language :(
|
||||
Those aren't nice words to use
|
||||
Oh, my poor innocent ears :(
|
||||
Help! My mind is being corrupted!
|
||||
filthy mouths are not appreciated here
|
@@ -11,4 +11,5 @@ Exception
|
||||
blight_
|
||||
jimtabor
|
||||
mtempel
|
||||
Gge
|
||||
Gge
|
||||
Alex_Ionescu
|
||||
|
581
irc/ArchBlackmann/func.txt
Normal file
581
irc/ArchBlackmann/func.txt
Normal file
@@ -0,0 +1,581 @@
|
||||
BOOLEAN
|
||||
CcCanIWrite
|
||||
CcCopyRead
|
||||
CcCopyWrite
|
||||
CcDeferWrite
|
||||
CcFastCopyRead
|
||||
CcFastCopyWrite
|
||||
CcFlushCache
|
||||
CcGetDirtyPages
|
||||
CcGetFileObjectFromBcb
|
||||
CcGetFileObjectFromSectionPtrs
|
||||
CcGetFlushedValidData
|
||||
CcGetLsnForFileObject
|
||||
CcInitializeCacheMap
|
||||
CcIsThereDirtyData
|
||||
CcMapData
|
||||
CcMdlRead
|
||||
CcMdlReadComplete
|
||||
CcMdlWriteAbort
|
||||
CcMdlWriteComplete
|
||||
CcPinMappedData
|
||||
CcPinRead
|
||||
CcPrepareMdlWrite
|
||||
CcPreparePinWrite
|
||||
CcPurgeCacheSection
|
||||
CcRemapBcb
|
||||
CcRepinBcb
|
||||
CcScheduleReadAhead
|
||||
CcSetAdditionalCacheAttributes
|
||||
CcSetBcbOwnerPointer
|
||||
CcSetDirtyPageThreshold
|
||||
CcSetDirtyPinnedData
|
||||
CcSetFileSizes
|
||||
CcSetLogHandleForFile
|
||||
CcSetReadAheadGranularity
|
||||
CcUninitializeCacheMap
|
||||
CcUnpinData
|
||||
CcUnpinDataForThread
|
||||
CcUnpinRepinnedBcb
|
||||
CcWaitForCurrentLazyWriterActivity
|
||||
CcZeroData
|
||||
DbgLoadImageSymbols
|
||||
DbgQueryDebugFilterState
|
||||
DbgSetDebugFilterState
|
||||
EVENT_TYPE
|
||||
ExAcquireResourceExclusive
|
||||
ExAcquireResourceExclusiveLite
|
||||
ExAcquireResourceSharedLite
|
||||
ExAcquireSharedStarveExclusive
|
||||
ExAcquireSharedWaitForExclusive
|
||||
ExAllocateFromZone
|
||||
ExAllocatePool
|
||||
ExAllocatePoolWithQuota
|
||||
ExAllocatePoolWithQuotaTag
|
||||
ExAllocatePoolWithTag
|
||||
ExConvertExclusiveToSharedLite
|
||||
ExCreateCallback
|
||||
ExDeleteNPagedLookasideList
|
||||
ExDeletePagedLookasideList
|
||||
ExDeleteResource
|
||||
ExDeleteResourceLite
|
||||
ExDisableResourceBoostLite
|
||||
ExEnumHandleTable
|
||||
ExExtendZone
|
||||
ExFreePool
|
||||
ExGetCurrentProcessorCounts
|
||||
ExGetCurrentProcessorCpuUsage
|
||||
ExGetExclusiveWaiterCount
|
||||
ExGetPreviousMode
|
||||
ExGetSharedWaiterCount
|
||||
ExInitializeNPagedLookasideList
|
||||
ExInitializePagedLookasideList
|
||||
ExInitializeResource
|
||||
ExInitializeResourceLite
|
||||
ExInitializeZone
|
||||
ExInterlockedAddLargeInteger
|
||||
ExInterlockedAddUlong
|
||||
ExInterlockedDecrementLong
|
||||
ExInterlockedExchangeUlong
|
||||
ExInterlockedExtendZone
|
||||
ExInterlockedIncrementLong
|
||||
ExInterlockedInsertHeadList
|
||||
ExInterlockedInsertTailList
|
||||
ExInterlockedPopEntryList
|
||||
ExInterlockedPushEntryList
|
||||
ExInterlockedRemoveHeadList
|
||||
ExIsProcessorFeaturePresent
|
||||
ExIsResourceAcquiredExclusiveLite
|
||||
ExIsResourceAcquiredSharedLite
|
||||
ExLocalTimeToSystemTime
|
||||
ExNotifyCallback
|
||||
ExPostSystemEvent
|
||||
ExQueryPoolBlockSize
|
||||
ExQueueWorkItem
|
||||
ExRaiseAccessViolation
|
||||
ExRaiseDatatypeMisalignment
|
||||
ExRaiseException
|
||||
ExRaiseHardError
|
||||
ExRaiseStatus
|
||||
ExRegisterCallback
|
||||
ExReinitializeResourceLite
|
||||
ExReleaseResource
|
||||
ExReleaseResourceForThread
|
||||
ExReleaseResourceForThreadLite
|
||||
ExRosDumpPagedPoolByTag
|
||||
ExRosQueryPoolTag
|
||||
ExSetResourceOwnerPointer
|
||||
ExSetTimerResolution
|
||||
ExSystemExceptionFilter
|
||||
ExSystemTimeToLocalTime
|
||||
ExTryToAcquireResourceExclusiveLite
|
||||
ExUnregisterCallback
|
||||
ExUuidCreate
|
||||
ExVerifySuite
|
||||
FsRtlAcquireFileExclusive
|
||||
FsRtlAddMcbEntry
|
||||
FsRtlAddToTunnelCache
|
||||
FsRtlAllocateFileLock
|
||||
FsRtlAllocatePool
|
||||
FsRtlAllocatePoolWithQuota
|
||||
FsRtlAllocatePoolWithQuotaTag
|
||||
FsRtlAllocatePoolWithTag
|
||||
FsRtlAllocateResource
|
||||
FsRtlAreNamesEqual
|
||||
FsRtlBalanceReads
|
||||
FsRtlCheckLockForReadAccess
|
||||
FsRtlCheckLockForWriteAccess
|
||||
FsRtlCopyRead
|
||||
FsRtlCopyWrite
|
||||
FsRtlFastCheckLockForRead
|
||||
FsRtlFastCheckLockForWrite
|
||||
FsRtlFastUnlockAll
|
||||
FsRtlFastUnlockAllByKey
|
||||
FsRtlFastUnlockSingle
|
||||
FsRtlFindInTunnelCache
|
||||
FsRtlFreeFileLock
|
||||
FsRtlGetFileSize
|
||||
FsRtlGetNextFileLock
|
||||
FsRtlGetNextMcbEntry
|
||||
FsRtlIncrementCcFastReadNoWait
|
||||
FsRtlIncrementCcFastReadNotPossible
|
||||
FsRtlIncrementCcFastReadResourceMiss
|
||||
FsRtlIncrementCcFastReadWait
|
||||
FsRtlInitializeFileLock
|
||||
FsRtlInitializeMcb
|
||||
FsRtlInitializeTunnelCache
|
||||
FsRtlInsertPerFileObjectContext
|
||||
FsRtlInsertPerStreamContext
|
||||
FsRtlIsDbcsInExpression
|
||||
FsRtlIsFatDbcsLegal
|
||||
FsRtlIsHpfsDbcsLegal
|
||||
FsRtlIsNameInExpression
|
||||
FsRtlLookupLastLargeMcbEntryAndIndex
|
||||
FsRtlLookupLastMcbEntry
|
||||
FsRtlLookupMcbEntry
|
||||
FsRtlLookupPerFileObjectContext
|
||||
FsRtlLookupPerStreamContextInternal
|
||||
FsRtlMdlRead
|
||||
FsRtlMdlReadComplete
|
||||
FsRtlMdlReadCompleteDev
|
||||
FsRtlMdlReadDev
|
||||
FsRtlMdlWriteComplete
|
||||
FsRtlMdlWriteCompleteDev
|
||||
FsRtlNotifyChangeDirectory
|
||||
FsRtlNotifyCleanup
|
||||
FsRtlNotifyFilterChangeDirectory
|
||||
FsRtlNotifyFilterReportChange
|
||||
FsRtlNotifyFullChangeDirectory
|
||||
FsRtlNotifyFullReportChange
|
||||
FsRtlNotifyReportChange
|
||||
FsRtlNotifyUninitializeSync
|
||||
FsRtlNumberOfRunsInMcb
|
||||
FsRtlPostPagingFileStackOverflow
|
||||
FsRtlPostStackOverflow
|
||||
FsRtlPrepareMdlWrite
|
||||
FsRtlPrepareMdlWriteDev
|
||||
FsRtlPrivateLock
|
||||
FsRtlProcessFileLock
|
||||
FsRtlRegisterFileSystemFilterCallbacks
|
||||
FsRtlReleaseFile
|
||||
FsRtlRemoveMcbEntry
|
||||
FsRtlRemovePerFileObjectContext
|
||||
FsRtlRemovePerStreamContext
|
||||
FsRtlResetLargeMcb
|
||||
FsRtlSyncVolumes
|
||||
FsRtlTeardownPerStreamContexts
|
||||
FsRtlTruncateMcb
|
||||
FsRtlUninitializeFileLock
|
||||
FsRtlUninitializeMcb
|
||||
HalAdjustResourceList
|
||||
HalAllocateCommonBuffer
|
||||
HalAssignSlotResources
|
||||
HalCalibratePerformanceCounter
|
||||
HalFlushCommonBuffer
|
||||
HalFreeCommonBuffer
|
||||
HalGetAdapter
|
||||
HalGetBusData
|
||||
HalGetBusDataByOffset
|
||||
HalGetDmaAlignmentRequirement
|
||||
HalMakeBeep
|
||||
HalQueryDisplayParameters
|
||||
HalQueryRealTimeClock
|
||||
HalReadDmaCounter
|
||||
HalRequestIpi
|
||||
HalSetBusData
|
||||
HalSetBusDataByOffset
|
||||
HalSetDisplayParameters
|
||||
HalSetRealTimeClock
|
||||
HalStartNextProcessor
|
||||
IoAcquireCancelSpinLock
|
||||
IoAcquireRemoveLockEx
|
||||
IoAcquireVpbSpinLock
|
||||
IoAllocateAdapterChannel
|
||||
IoAllocateController
|
||||
IoAllocateDriverObjectExtension
|
||||
IoAllocateErrorLogEntry
|
||||
IoAllocateIrp
|
||||
IoAllocateMdl
|
||||
IoAllocateWorkItem
|
||||
IoAssignResources
|
||||
IoAttachDevice
|
||||
IoAttachDeviceByPointer
|
||||
IoAttachDeviceToDeviceStack
|
||||
IoAttachDeviceToDeviceStackSafe
|
||||
IoBuildAsynchronousFsdRequest
|
||||
IoBuildDeviceIoControlRequest
|
||||
IoBuildPartialMdl
|
||||
IoBuildSynchronousFsdRequest
|
||||
IoCallDriver
|
||||
IoCancelFileOpen
|
||||
IoCancelIrp
|
||||
IoCheckQuerySetFileInformation
|
||||
IoCheckQuerySetVolumeInformation
|
||||
IoCheckQuotaBufferValidity
|
||||
IoCheckShareAccess
|
||||
IoCompleteRequest
|
||||
IoConnectInterrupt
|
||||
IoCreateController
|
||||
IoCreateDevice
|
||||
IoCreateDisk
|
||||
IoCreateDriver
|
||||
IoCreateFile
|
||||
IoCreateFileSpecifyDeviceObjectHint
|
||||
IoCreateNotificationEvent
|
||||
IoCreateStreamFileObject
|
||||
IoCreateStreamFileObjectEx
|
||||
IoCreateStreamFileObjectLite
|
||||
IoCreateSymbolicLink
|
||||
IoCreateSynchronizationEvent
|
||||
IoCreateUnprotectedSymbolicLink
|
||||
IoDeleteController
|
||||
IoDeleteDevice
|
||||
IoDeleteDriver
|
||||
IoDeleteSymbolicLink
|
||||
IoDetachDevice
|
||||
IoDisconnectInterrupt
|
||||
IoEnqueueIrp
|
||||
IoEnumerateDeviceObjectList
|
||||
IoFlushAdapterBuffers
|
||||
IoForwardIrpSynchronously
|
||||
IoFreeAdapterChannel
|
||||
IoFreeController
|
||||
IoFreeErrorLogEntry
|
||||
IoFreeIrp
|
||||
IoFreeMapRegisters
|
||||
IoFreeMdl
|
||||
IoFreeWorkItem
|
||||
IoGetAttachedDevice
|
||||
IoGetAttachedDeviceReference
|
||||
IoGetBaseFileSystemDeviceObject
|
||||
IoGetBootDiskInformation
|
||||
IoGetConfigurationInformation
|
||||
IoGetCurrentProcess
|
||||
IoGetDeviceAttachmentBaseRef
|
||||
IoGetDeviceInterfaceAlias
|
||||
IoGetDeviceInterfaces
|
||||
IoGetDeviceObjectPointer
|
||||
IoGetDeviceProperty
|
||||
IoGetDeviceToVerify
|
||||
IoGetDiskDeviceObject
|
||||
IoGetDriverObjectExtension
|
||||
IoGetFileObjectGenericMapping
|
||||
IoGetInitialStack
|
||||
IoGetLowerDeviceObject
|
||||
IoGetRelatedDeviceObject
|
||||
IoGetRequestorProcess
|
||||
IoGetRequestorProcessId
|
||||
IoGetRequestorSessionId
|
||||
IoGetStackLimits
|
||||
IoGetTopLevelIrp
|
||||
IoInitializeIrp
|
||||
IoInitializeRemoveLockEx
|
||||
IoInitializeTimer
|
||||
IoInvalidateDeviceRelations
|
||||
IoInvalidateDeviceState
|
||||
IoIsFileOriginRemote
|
||||
IoIsOperationSynchronous
|
||||
IoIsSystemThread
|
||||
IoIsValidNameGraftingBuffer
|
||||
IoMakeAssociatedIrp
|
||||
IoMapTransfer
|
||||
IoOpenDeviceInstanceKey
|
||||
IoOpenDeviceInterfaceRegistryKey
|
||||
IoOpenDeviceRegistryKey
|
||||
IoPageRead
|
||||
IoPnPDeliverServicePowerNotification
|
||||
IoQueryDeviceDescription
|
||||
IoQueryDeviceEnumInfo
|
||||
IoQueryFileDosDeviceName
|
||||
IoQueryFileInformation
|
||||
IoQueryVolumeInformation
|
||||
IoQueueThreadIrp
|
||||
IoQueueWorkItem
|
||||
IoRaiseHardError
|
||||
IoRaiseInformationalHardError
|
||||
IoReadDiskSignature
|
||||
IoReadPartitionTableEx
|
||||
IoRegisterBootDriverReinitialization
|
||||
IoRegisterDeviceInterface
|
||||
IoRegisterDriverReinitialization
|
||||
IoRegisterFileSystem
|
||||
IoRegisterFsRegistrationChange
|
||||
IoRegisterLastChanceShutdownNotification
|
||||
IoRegisterPlugPlayNotification
|
||||
IoRegisterShutdownNotification
|
||||
IoReleaseCancelSpinLock
|
||||
IoReleaseRemoveLockAndWaitEx
|
||||
IoReleaseRemoveLockEx
|
||||
IoReleaseVpbSpinLock
|
||||
IoRemoveShareAccess
|
||||
IoReportDetectedDevice
|
||||
IoReportHalResourceUsage
|
||||
IoReportResourceForDetection
|
||||
IoReportResourceUsage
|
||||
IoReportTargetDeviceChange
|
||||
IoReportTargetDeviceChangeAsynchronous
|
||||
IoRequestDeviceEject
|
||||
IoReuseIrp
|
||||
IoSetCompletionRoutineEx
|
||||
IoSetDeviceInterfaceState
|
||||
IoSetDeviceToVerify
|
||||
IoSetFileOrigin
|
||||
IoSetHardErrorOrVerifyDevice
|
||||
IoSetInformation
|
||||
IoSetIoCompletion
|
||||
IoSetPartitionInformationEx
|
||||
IoSetShareAccess
|
||||
IoSetStartIoAttributes
|
||||
IoSetSystemPartition
|
||||
IoSetThreadHardErrorMode
|
||||
IoSetTopLevelIrp
|
||||
IoStartNextPacket
|
||||
IoStartNextPacketByKey
|
||||
IoStartPacket
|
||||
IoStartTimer
|
||||
IoStopTimer
|
||||
IoSynchronousInvalidateDeviceRelations
|
||||
IoSynchronousPageWrite
|
||||
IoUnregisterFileSystem
|
||||
IoUnregisterFsRegistrationChange
|
||||
IoUnregisterPlugPlayNotification
|
||||
IoUnregisterShutdownNotification
|
||||
IoUpdateShareAccess
|
||||
IoValidateDeviceIoControlAccess
|
||||
IoVerifyPartitionTable
|
||||
IoVerifyVolume
|
||||
IoVolumeDeviceToDosName
|
||||
IoWMIAllocateInstanceIds
|
||||
IoWMIDeviceObjectToInstanceName
|
||||
IoWMIExecuteMethod
|
||||
IoWMIHandleToInstanceName
|
||||
IoWMIOpenBlock
|
||||
IoWMIQueryAllData
|
||||
IoWMIQueryAllDataMultiple
|
||||
IoWMIQuerySingleInstance
|
||||
IoWMIQuerySingleInstanceMultiple
|
||||
IoWMIRegistrationControl
|
||||
IoWMISetNotificationCallback
|
||||
IoWMISetSingleInstance
|
||||
IoWMISetSingleItem
|
||||
IoWMISuggestInstanceName
|
||||
IoWMIWriteEvent
|
||||
IoWriteErrorLogEntry
|
||||
IoWritePartitionTableEx
|
||||
KPRIORITY
|
||||
KdPortGetByte
|
||||
KdPortPollByte
|
||||
KdPortPutByte
|
||||
Ke386QueryIoAccessMap
|
||||
Ke386SetIoAccessMap
|
||||
KeAcquireInterruptSpinLock
|
||||
KeAreApcsDisabled
|
||||
KeCapturePersistentThreadState
|
||||
KeDeregisterBugCheckReasonCallback
|
||||
KeFindConfigurationEntry
|
||||
KeFindConfigurationNextEntry
|
||||
KeFlushEntireTb
|
||||
KeFlushQueuedDpcs
|
||||
KeGetRecommendedSharedDataAlignment
|
||||
KeIsExecutingDpc
|
||||
KeQueryActiveProcessors
|
||||
KeQueryPerformanceCounter
|
||||
KeQueryPriorityThread
|
||||
KeQueryRuntimeThread
|
||||
KeQuerySystemTime
|
||||
KeQueryTickCount
|
||||
KeQueryTimeIncrement
|
||||
KeRaiseIrql
|
||||
KeRaiseIrqlToDpcLevel
|
||||
KeRaiseUserException
|
||||
KeReadStateEvent
|
||||
KeRegisterBugCheckCallback
|
||||
KeRegisterBugCheckReasonCallback
|
||||
KeReleaseInterruptSpinLock
|
||||
KeReleaseMutant
|
||||
KeReleaseMutex
|
||||
KeReleaseSemaphore
|
||||
KeReleaseSpinLock
|
||||
KeReleaseSpinLockFromDpcLevel
|
||||
KeReleaseSpinLockFromDpcLevel
|
||||
KeRemoveByKeyDeviceQueue
|
||||
KeRemoveByKeyDeviceQueueIfBusy
|
||||
KeRemoveDeviceQueue
|
||||
KeRemoveEntryDeviceQueue
|
||||
KeRemoveSystemServiceTable
|
||||
KeRestoreFloatingPointState
|
||||
KeRevertToUserAffinityThread
|
||||
KeRosDumpStackFrames
|
||||
KeRosGetStackFrames
|
||||
KeRosPrintAddress
|
||||
KeSaveFloatingPointState
|
||||
KeSetDmaIoCoherency
|
||||
KeSetEvent
|
||||
KeSetEventBoostPriority
|
||||
KeSetIdealProcessorThread
|
||||
KeSetKernelStackSwapEnable
|
||||
KeSetProfileIrql
|
||||
KeSetSystemAffinityThread
|
||||
KeSetTimeIncrement
|
||||
KeTerminateThread
|
||||
KeUserModeCallback
|
||||
KeWaitForMutexObject
|
||||
KeWaitForSingleObject
|
||||
KiCoprocessorError
|
||||
KiUnexpectedInterrupt
|
||||
LONG
|
||||
LdrFindResourceDirectory_U
|
||||
MmAddPhysicalMemory
|
||||
MmAddVerifierThunks
|
||||
MmAdjustWorkingSetSize
|
||||
MmAdvanceMdl
|
||||
MmAllocateContiguousMemory
|
||||
MmAllocateContiguousMemorySpecifyCache
|
||||
MmAllocateMappingAddress
|
||||
MmAllocateNonCachedMemory
|
||||
MmBuildMdlForNonPagedPool
|
||||
MmCanFileBeTruncated
|
||||
MmCreateMdl
|
||||
MmCreateSection
|
||||
MmDbgTranslatePhysicalAddress
|
||||
MmDisableModifiedWriteOfSection
|
||||
MmFlushImageSection
|
||||
MmForceSectionClosed
|
||||
MmFreeContiguousMemory
|
||||
MmFreeMappingAddress
|
||||
MmFreeNonCachedMemory
|
||||
MmGetPhysicalAddress
|
||||
MmGetPhysicalMemoryRanges
|
||||
MmGetSystemRoutineAddress
|
||||
MmGetVirtualForPhysical
|
||||
MmGrowKernelStack
|
||||
MmIsAddressValid
|
||||
MmIsDriverVerifying
|
||||
MmIsNonPagedSystemAddressValid
|
||||
MmIsRecursiveIoFault
|
||||
MmIsThisAnNtAsSystem
|
||||
MmIsVerifierEnabled
|
||||
MmLockPagableDataSection
|
||||
MmLockPagableImageSection
|
||||
MmLockPagableSectionByHandle
|
||||
MmMapIoSpace
|
||||
MmMapLockedPages
|
||||
MmMapLockedPagesWithReservedMapping
|
||||
MmMapMemoryDumpMdl
|
||||
MmMapUserAddressesToPage
|
||||
MmMapVideoDisplay
|
||||
MmMapViewInSessionSpace
|
||||
MmMapViewInSystemSpace
|
||||
MmMapViewOfSection
|
||||
MmMarkPhysicalMemoryAsBad
|
||||
MmMarkPhysicalMemoryAsGood
|
||||
MmPageEntireDriver
|
||||
MmPrefetchPages
|
||||
MmProbeAndLockPages
|
||||
MmProbeAndLockProcessPages
|
||||
MmProbeAndLockSelectedPages
|
||||
MmProtectMdlSystemAddress
|
||||
MmQuerySystemSize
|
||||
MmRemovePhysicalMemory
|
||||
MmResetDriverPaging
|
||||
MmSecureVirtualMemory
|
||||
MmSetAddressRangeModified
|
||||
MmSetBankedSection
|
||||
MmSizeOfMdl
|
||||
MmTrimAllSystemPagableMemory
|
||||
MmUnlockPagableImageSection
|
||||
MmUnlockPages
|
||||
MmUnmapIoSpace
|
||||
MmUnmapLockedPages
|
||||
MmUnmapReservedMapping
|
||||
MmUnmapVideoDisplay
|
||||
MmUnmapViewInSessionSpace
|
||||
MmUnmapViewInSystemSpace
|
||||
MmUnmapViewOfSection
|
||||
MmUnsecureVirtualMemory
|
||||
OUT
|
||||
ObCreateObject
|
||||
PEJOB
|
||||
PEPROCESS
|
||||
PKBUGCHECK_CALLBACK_RECORD
|
||||
PKDEVICE_QUEUE_ENTRY
|
||||
PKIRQL
|
||||
PULONG
|
||||
PVOID
|
||||
PW32_THREAD_CALLBACK
|
||||
PoCallDriver
|
||||
PoRegisterDeviceForIdleDetection
|
||||
PoRegisterSystemState
|
||||
PoRequestPowerIrp
|
||||
PoSetDeviceBusy
|
||||
PoSetPowerState
|
||||
PoSetSystemState
|
||||
PoStartNextPowerIrp
|
||||
PoUnregisterSystemState
|
||||
ProbeForRead
|
||||
ProbeForWrite
|
||||
PsAssignImpersonationToken
|
||||
PsCreateSystemProcess
|
||||
PsCreateSystemThread
|
||||
PsGetCurrentProcessId
|
||||
PsGetCurrentThreadId
|
||||
PsImpersonateClient
|
||||
PsReferenceImpersonationToken
|
||||
PsReferencePrimaryToken
|
||||
PsRevertThreadToSelf
|
||||
PsRevertToSelf
|
||||
PsTerminateSystemThread
|
||||
READ_PORT_BUFFER_UCHAR
|
||||
READ_PORT_BUFFER_ULONG
|
||||
READ_PORT_BUFFER_USHORT
|
||||
READ_PORT_UCHAR
|
||||
READ_PORT_ULONG
|
||||
READ_PORT_USHORT
|
||||
SeAssignSecurityEx
|
||||
SeAuditHardLinkCreation
|
||||
SeAuditingFileEvents
|
||||
SeAuditingFileEventsWithContext
|
||||
SeAuditingFileOrGlobalEvents
|
||||
SeAuditingHardLinkEvents
|
||||
SeAuditingHardLinkEventsWithContext
|
||||
SeCaptureSecurityDescriptor
|
||||
SeCaptureSubjectContext
|
||||
SeCloseObjectAuditAlarm
|
||||
SeCreateAccessState
|
||||
SeCreateClientSecurityFromSubjectContext
|
||||
SeFilterToken
|
||||
SeImpersonateClientEx
|
||||
SePrivilegeObjectAuditAlarm
|
||||
SeQueryInformationToken
|
||||
SeQuerySessionIdToken
|
||||
SeReleaseSecurityDescriptor
|
||||
SeSetSecurityDescriptorInfoEx
|
||||
SeTokenIsAdmin
|
||||
SeTokenIsRestricted
|
||||
SeTokenIsWriteRestricted
|
||||
WRITE_PORT_BUFFER_UCHAR
|
||||
WRITE_PORT_BUFFER_ULONG
|
||||
WRITE_PORT_BUFFER_USHORT
|
||||
WRITE_PORT_UCHAR
|
||||
WRITE_PORT_ULONG
|
||||
WRITE_PORT_USHORT
|
10
irc/ArchBlackmann/grovel.txt
Normal file
10
irc/ArchBlackmann/grovel.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
/me bows humbly and begs %s's forgiveness
|
||||
%s is soo cool... I hope to be like him some day
|
||||
/me hides in a corner and hopes %s doesn't beat him with the whipping noodle again
|
||||
/me prostrates at %s's feet and begs his majesty's forgiveness
|
||||
%s: please don't hurt me!
|
||||
I'm not worthy... I'm not worthy...
|
||||
/me sings %s's praises to the world!
|
||||
/me thinks %s is smarter than %dev%
|
||||
%s: oh please may I defrag your sock drawer?
|
||||
/me gives %s a cookie, hoping it will make up for breaking %func% the other day...
|
9
irc/ArchBlackmann/irql.txt
Normal file
9
irc/ArchBlackmann/irql.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
PASSIVE_LEVEL
|
||||
APC_LEVEL
|
||||
DISPATCH_LEVEL
|
||||
PROFILE_LEVEL
|
||||
CLOCK1_LEVEL
|
||||
IPI_LEVEL
|
||||
POWER_LEVEL
|
||||
HIGH_LEVEL
|
||||
SYNCH_LEVEL
|
5
irc/ArchBlackmann/nogrovel.txt
Normal file
5
irc/ArchBlackmann/nogrovel.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
/me slaps %s with a large trout
|
||||
recycle(%s)
|
||||
Did I hear something? Musta been a %s-fly... Where's that fly-swatter?
|
||||
%s: go away son, you bother me....
|
||||
/me beats %s with the whipping noodle
|
654
irc/ArchBlackmann/status.txt
Normal file
654
irc/ArchBlackmann/status.txt
Normal file
@@ -0,0 +1,654 @@
|
||||
RPC_NT_ALREADY_LISTENING
|
||||
RPC_NT_ALREADY_REGISTERED
|
||||
RPC_NT_CALL_FAILED
|
||||
RPC_NT_CALL_FAILED_DNE
|
||||
RPC_NT_CANT_CREATE_ENDPOINT
|
||||
RPC_NT_INVALID_BINDING
|
||||
RPC_NT_INVALID_ENDPOINT_FORMAT
|
||||
RPC_NT_INVALID_NETWORK_OPTIONS
|
||||
RPC_NT_INVALID_NET_ADDR
|
||||
RPC_NT_INVALID_RPC_PROTSEQ
|
||||
RPC_NT_INVALID_STRING_BINDING
|
||||
RPC_NT_INVALID_STRING_UUID
|
||||
RPC_NT_INVALID_TIMEOUT
|
||||
RPC_NT_NOT_LISTENING
|
||||
RPC_NT_NO_BINDINGS
|
||||
RPC_NT_NO_CALL_ACTIVE
|
||||
RPC_NT_NO_ENDPOINT_FOUND
|
||||
RPC_NT_NO_PROTSEQS
|
||||
RPC_NT_NO_PROTSEQS_REGISTERED
|
||||
RPC_NT_OBJECT_NOT_FOUND
|
||||
RPC_NT_OUT_OF_RESOURCES
|
||||
RPC_NT_PROTOCOL_ERROR
|
||||
RPC_NT_PROTSEQ_NOT_SUPPORTED
|
||||
RPC_NT_SERVER_TOO_BUSY
|
||||
RPC_NT_SERVER_UNAVAILABLE
|
||||
RPC_NT_SS_IN_NULL_CONTEXT
|
||||
RPC_NT_TYPE_ALREADY_REGISTERED
|
||||
RPC_NT_UNKNOWN_IF
|
||||
RPC_NT_UNKNOWN_MGR_TYPE
|
||||
RPC_NT_WRONG_KIND_OF_BINDING
|
||||
STATUS_ABANDONED
|
||||
STATUS_ABANDONED_WAIT_0
|
||||
STATUS_ABANDONED_WAIT_63
|
||||
STATUS_ABIOS_INVALID_COMMAND
|
||||
STATUS_ABIOS_INVALID_LID
|
||||
STATUS_ABIOS_INVALID_SELECTOR
|
||||
STATUS_ABIOS_LID_ALREADY_OWNED
|
||||
STATUS_ABIOS_LID_NOT_EXIST
|
||||
STATUS_ABIOS_NOT_LID_OWNER
|
||||
STATUS_ABIOS_NOT_PRESENT
|
||||
STATUS_ABIOS_SELECTOR_NOT_AVAILABLE
|
||||
STATUS_ACCESS_DENIED
|
||||
STATUS_ACCESS_VIOLATION
|
||||
STATUS_ACCOUNT_DISABLED
|
||||
STATUS_ACCOUNT_EXPIRED
|
||||
STATUS_ACCOUNT_LOCKED_OUT
|
||||
STATUS_ACCOUNT_RESTRICTION
|
||||
STATUS_ADAPTER_HARDWARE_ERROR
|
||||
STATUS_ADDRESS_ALREADY_ASSOCIATED
|
||||
STATUS_ADDRESS_ALREADY_EXISTS
|
||||
STATUS_ADDRESS_CLOSED
|
||||
STATUS_ADDRESS_NOT_ASSOCIATED
|
||||
STATUS_AGENTS_EXHAUSTED
|
||||
STATUS_ALERTED
|
||||
STATUS_ALIAS_EXISTS
|
||||
STATUS_ALLOCATE_BUCKET
|
||||
STATUS_ALLOTTED_SPACE_EXCEEDED
|
||||
STATUS_ALREADY_COMMITTED
|
||||
STATUS_ALREADY_DISCONNECTED
|
||||
STATUS_ALREADY_WIN32
|
||||
STATUS_APP_INIT_FAILURE
|
||||
STATUS_ARBITRATION_UNHANDLED
|
||||
STATUS_ARRAY_BOUNDS_EXCEEDED
|
||||
STATUS_AUDIT_FAILED
|
||||
STATUS_BACKUP_CONTROLLER
|
||||
STATUS_BAD_COMPRESSION_BUFFER
|
||||
STATUS_BAD_CURRENT_DIRECTORY
|
||||
STATUS_BAD_DESCRIPTOR_FORMAT
|
||||
STATUS_BAD_DEVICE_TYPE
|
||||
STATUS_BAD_DLL_ENTRYPOINT
|
||||
STATUS_BAD_FUNCTION_TABLE
|
||||
STATUS_BAD_IMPERSONATION_LEVEL
|
||||
STATUS_BAD_INHERITANCE_ACL
|
||||
STATUS_BAD_INITIAL_PC
|
||||
STATUS_BAD_INITIAL_STACK
|
||||
STATUS_BAD_LOGON_SESSION_STATE
|
||||
STATUS_BAD_MASTER_BOOT_RECORD
|
||||
STATUS_BAD_NETWORK_NAME
|
||||
STATUS_BAD_NETWORK_PATH
|
||||
STATUS_BAD_REMOTE_ADAPTER
|
||||
STATUS_BAD_SERVICE_ENTRYPOINT
|
||||
STATUS_BAD_STACK
|
||||
STATUS_BAD_TOKEN_TYPE
|
||||
STATUS_BAD_VALIDATION_CLASS
|
||||
STATUS_BAD_WORKING_SET_LIMIT
|
||||
STATUS_BEGINNING_OF_MEDIA
|
||||
STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT
|
||||
STATUS_BREAKPOINT
|
||||
STATUS_BUFFER_OVERFLOW
|
||||
STATUS_BUFFER_TOO_SMALL
|
||||
STATUS_BUS_RESET
|
||||
STATUS_CANCELLED
|
||||
STATUS_CANNOT_DELETE
|
||||
STATUS_CANNOT_IMPERSONATE
|
||||
STATUS_CANNOT_LOAD_REGISTRY_FILE
|
||||
STATUS_CANT_ACCESS_DOMAIN_INFO
|
||||
STATUS_CANT_DISABLE_MANDATORY
|
||||
STATUS_CANT_OPEN_ANONYMOUS
|
||||
STATUS_CANT_TERMINATE_SELF
|
||||
STATUS_CANT_WAIT
|
||||
STATUS_CARDBUS_NOT_SUPPORTED
|
||||
STATUS_CHECKING_FILE_SYSTEM
|
||||
STATUS_CHILD_MUST_BE_VOLATILE
|
||||
STATUS_CLIENT_SERVER_PARAMETERS_INVALID
|
||||
STATUS_COMMITMENT_LIMIT
|
||||
STATUS_CONFLICTING_ADDRESSES
|
||||
STATUS_CONNECTION_ABORTED
|
||||
STATUS_CONNECTION_ACTIVE
|
||||
STATUS_CONNECTION_COUNT_LIMIT
|
||||
STATUS_CONNECTION_DISCONNECTED
|
||||
STATUS_CONNECTION_INVALID
|
||||
STATUS_CONNECTION_IN_USE
|
||||
STATUS_CONNECTION_REFUSED
|
||||
STATUS_CONNECTION_RESET
|
||||
STATUS_CONTROL_C_EXIT
|
||||
STATUS_CONVERT_TO_LARGE
|
||||
STATUS_COULD_NOT_INTERPRET
|
||||
STATUS_CRC_ERROR
|
||||
STATUS_CTL_FILE_NOT_SUPPORTED
|
||||
STATUS_DATATYPE_MISALIGNMENT
|
||||
STATUS_DATA_ERROR
|
||||
STATUS_DATA_LATE_ERROR
|
||||
STATUS_DATA_NOT_ACCEPTED
|
||||
STATUS_DATA_OVERRUN
|
||||
STATUS_DEBUG_ATTACH_FAILED
|
||||
STATUS_DELETE_PENDING
|
||||
STATUS_DEVICE_ALREADY_ATTACHED
|
||||
STATUS_DEVICE_BUSY
|
||||
STATUS_DEVICE_CONFIGURATION_ERROR
|
||||
STATUS_DEVICE_DATA_ERROR
|
||||
STATUS_DEVICE_DOES_NOT_EXIST
|
||||
STATUS_DEVICE_NOT_CONNECTED
|
||||
STATUS_DEVICE_NOT_PARTITIONED
|
||||
STATUS_DEVICE_NOT_READY
|
||||
STATUS_DEVICE_OFF_LINE
|
||||
STATUS_DEVICE_PAPER_EMPTY
|
||||
STATUS_DEVICE_POWERED_OFF
|
||||
STATUS_DEVICE_POWER_FAILURE
|
||||
STATUS_DEVICE_PROTOCOL_ERROR
|
||||
STATUS_DFS_EXIT_PATH_FOUND
|
||||
STATUS_DFS_UNAVAILABLE
|
||||
STATUS_DIRECTORY_NOT_EMPTY
|
||||
STATUS_DISK_CORRUPT_ERROR
|
||||
STATUS_DISK_FULL
|
||||
STATUS_DISK_OPERATION_FAILED
|
||||
STATUS_DISK_RECALIBRATE_FAILED
|
||||
STATUS_DISK_RESET_FAILED
|
||||
STATUS_DLL_INIT_FAILED
|
||||
STATUS_DLL_INIT_FAILED_LOGOFF
|
||||
STATUS_DLL_NOT_FOUND
|
||||
STATUS_DOMAIN_CONTROLLER_NOT_FOUND
|
||||
STATUS_DOMAIN_CTRLR_CONFIG_ERROR
|
||||
STATUS_DOMAIN_EXISTS
|
||||
STATUS_DOMAIN_LIMIT_EXCEEDED
|
||||
STATUS_DOMAIN_TRUST_INCONSISTENT
|
||||
STATUS_DRIVER_CANCEL_TIMEOUT
|
||||
STATUS_DRIVER_ENTRYPOINT_NOT_FOUND
|
||||
STATUS_DRIVER_INTERNAL_ERROR
|
||||
STATUS_DRIVER_ORDINAL_NOT_FOUND
|
||||
STATUS_DRIVER_UNABLE_TO_LOAD
|
||||
STATUS_DUPLICATE_NAME
|
||||
STATUS_DUPLICATE_OBJECTID
|
||||
STATUS_EAS_NOT_SUPPORTED
|
||||
STATUS_EA_CORRUPT_ERROR
|
||||
STATUS_EA_LIST_INCONSISTENT
|
||||
STATUS_EA_TOO_LARGE
|
||||
STATUS_END_OF_FILE
|
||||
STATUS_END_OF_MEDIA
|
||||
STATUS_ENTRYPOINT_NOT_FOUND
|
||||
STATUS_EOM_OVERFLOW
|
||||
STATUS_EVALUATION_EXPIRATION
|
||||
STATUS_EVENTLOG_CANT_START
|
||||
STATUS_EVENTLOG_FILE_CHANGED
|
||||
STATUS_EVENTLOG_FILE_CORRUPT
|
||||
STATUS_EVENT_DONE
|
||||
STATUS_EVENT_PENDING
|
||||
STATUS_EXTRANEOUS_INFORMATION
|
||||
STATUS_FAIL_CHECK
|
||||
STATUS_FATAL_APP_EXIT
|
||||
STATUS_FILEMARK_DETECTED
|
||||
STATUS_FILES_OPEN
|
||||
STATUS_FILE_CLOSED
|
||||
STATUS_FILE_CORRUPT_ERROR
|
||||
STATUS_FILE_DELETED
|
||||
STATUS_FILE_FORCED_CLOSED
|
||||
STATUS_FILE_INVALID
|
||||
STATUS_FILE_IS_A_DIRECTORY
|
||||
STATUS_FILE_IS_OFFLINE
|
||||
STATUS_FILE_LOCK_CONFLICT
|
||||
STATUS_FILE_RENAMED
|
||||
STATUS_FLOAT_DENORMAL_OPERAND
|
||||
STATUS_FLOAT_DIVIDE_BY_ZERO
|
||||
STATUS_FLOAT_INEXACT_RESULT
|
||||
STATUS_FLOAT_INVALID_OPERATION
|
||||
STATUS_FLOAT_OVERFLOW
|
||||
STATUS_FLOAT_STACK_CHECK
|
||||
STATUS_FLOAT_UNDERFLOW
|
||||
STATUS_FLOPPY_BAD_REGISTERS
|
||||
STATUS_FLOPPY_ID_MARK_NOT_FOUND
|
||||
STATUS_FLOPPY_UNKNOWN_ERROR
|
||||
STATUS_FLOPPY_VOLUME
|
||||
STATUS_FLOPPY_WRONG_CYLINDER
|
||||
STATUS_FOUND_OUT_OF_SCOPE
|
||||
STATUS_FREE_VM_NOT_AT_BASE
|
||||
STATUS_FS_DRIVER_REQUIRED
|
||||
STATUS_FT_MISSING_MEMBER
|
||||
STATUS_FT_ORPHANING
|
||||
STATUS_FT_READ_RECOVERING_FROM_BACKUP
|
||||
STATUS_FT_WRITE_RECOVERY
|
||||
STATUS_FULLSCREEN_MODE
|
||||
STATUS_GENERIC_NOT_MAPPED
|
||||
STATUS_GRACEFUL_DISCONNECT
|
||||
STATUS_GROUP_EXISTS
|
||||
STATUS_GUARD_PAGE_VIOLATION
|
||||
STATUS_GUIDS_EXHAUSTED
|
||||
STATUS_GUID_SUBSTITUTION_MADE
|
||||
STATUS_HANDLES_CLOSED
|
||||
STATUS_HANDLE_NOT_CLOSABLE
|
||||
STATUS_HOST_UNREACHABLE
|
||||
STATUS_ILLEGAL_CHARACTER
|
||||
STATUS_ILLEGAL_DLL_RELOCATION
|
||||
STATUS_ILLEGAL_FLOAT_CONTEXT
|
||||
STATUS_ILLEGAL_FUNCTION
|
||||
STATUS_ILLEGAL_INSTRUCTION
|
||||
STATUS_ILL_FORMED_PASSWORD
|
||||
STATUS_ILL_FORMED_SERVICE_ENTRY
|
||||
STATUS_IMAGE_ALREADY_LOADED
|
||||
STATUS_IMAGE_CHECKSUM_MISMATCH
|
||||
STATUS_IMAGE_MACHINE_TYPE_MISMATCH
|
||||
STATUS_IMAGE_MACHINE_TYPE_MISMATCH_EXE
|
||||
STATUS_IMAGE_MP_UP_MISMATCH
|
||||
STATUS_IMAGE_NOT_AT_BASE
|
||||
STATUS_INCOMPATIBLE_FILE_MAP
|
||||
STATUS_INFO_LENGTH_MISMATCH
|
||||
STATUS_INSTANCE_NOT_AVAILABLE
|
||||
STATUS_INSTRUCTION_MISALIGNMENT
|
||||
STATUS_INSUFFICIENT_LOGON_INFO
|
||||
STATUS_INSUFFICIENT_RESOURCES
|
||||
STATUS_INSUFF_SERVER_RESOURCES
|
||||
STATUS_INTEGER_DIVIDE_BY_ZERO
|
||||
STATUS_INTEGER_OVERFLOW
|
||||
STATUS_INTERNAL_DB_CORRUPTION
|
||||
STATUS_INTERNAL_DB_ERROR
|
||||
STATUS_INTERNAL_ERROR
|
||||
STATUS_INVALID_ACCOUNT_NAME
|
||||
STATUS_INVALID_ACL
|
||||
STATUS_INVALID_ADDRESS
|
||||
STATUS_INVALID_ADDRESS_COMPONENT
|
||||
STATUS_INVALID_ADDRESS_WILDCARD
|
||||
STATUS_INVALID_BLOCK_LENGTH
|
||||
STATUS_INVALID_BUFFER_SIZE
|
||||
STATUS_INVALID_CID
|
||||
STATUS_INVALID_COMPUTER_NAME
|
||||
STATUS_INVALID_CONNECTION
|
||||
STATUS_INVALID_DEVICE_REQUEST
|
||||
STATUS_INVALID_DEVICE_STATE
|
||||
STATUS_INVALID_DISPOSITION
|
||||
STATUS_INVALID_DOMAIN_ROLE
|
||||
STATUS_INVALID_DOMAIN_STATE
|
||||
STATUS_INVALID_EA_FLAG
|
||||
STATUS_INVALID_EA_NAME
|
||||
STATUS_INVALID_FILE_FOR_SECTION
|
||||
STATUS_INVALID_GROUP_ATTRIBUTES
|
||||
STATUS_INVALID_HANDLE
|
||||
STATUS_INVALID_HW_PROFILE
|
||||
STATUS_INVALID_ID_AUTHORITY
|
||||
STATUS_INVALID_IMAGE_FORMAT
|
||||
STATUS_INVALID_IMAGE_LE_FORMAT
|
||||
STATUS_INVALID_IMAGE_NE_FORMAT
|
||||
STATUS_INVALID_IMAGE_NOT_MZ
|
||||
STATUS_INVALID_IMAGE_PROTECT
|
||||
STATUS_INVALID_IMAGE_WIN_16
|
||||
STATUS_INVALID_INFO_CLASS
|
||||
STATUS_INVALID_LDT_DESCRIPTOR
|
||||
STATUS_INVALID_LDT_OFFSET
|
||||
STATUS_INVALID_LDT_SIZE
|
||||
STATUS_INVALID_LEVEL
|
||||
STATUS_INVALID_LOCK_SEQUENCE
|
||||
STATUS_INVALID_LOGON_HOURS
|
||||
STATUS_INVALID_LOGON_TYPE
|
||||
STATUS_INVALID_MEMBER
|
||||
STATUS_INVALID_NETWORK_RESPONSE
|
||||
STATUS_INVALID_OPLOCK_PROTOCOL
|
||||
STATUS_INVALID_OWNER
|
||||
STATUS_INVALID_PAGE_PROTECTION
|
||||
STATUS_INVALID_PARAMETER
|
||||
STATUS_INVALID_PARAMETER_1
|
||||
STATUS_INVALID_PARAMETER_10
|
||||
STATUS_INVALID_PARAMETER_11
|
||||
STATUS_INVALID_PARAMETER_12
|
||||
STATUS_INVALID_PARAMETER_2
|
||||
STATUS_INVALID_PARAMETER_3
|
||||
STATUS_INVALID_PARAMETER_4
|
||||
STATUS_INVALID_PARAMETER_5
|
||||
STATUS_INVALID_PARAMETER_6
|
||||
STATUS_INVALID_PARAMETER_7
|
||||
STATUS_INVALID_PARAMETER_8
|
||||
STATUS_INVALID_PARAMETER_9
|
||||
STATUS_INVALID_PARAMETER_MIX
|
||||
STATUS_INVALID_PIPE_STATE
|
||||
STATUS_INVALID_PLUGPLAY_DEVICE_PATH
|
||||
STATUS_INVALID_PORT_ATTRIBUTES
|
||||
STATUS_INVALID_PORT_HANDLE
|
||||
STATUS_INVALID_PRIMARY_GROUP
|
||||
STATUS_INVALID_QUOTA_LOWER
|
||||
STATUS_INVALID_READ_MODE
|
||||
STATUS_INVALID_SECURITY_DESCR
|
||||
STATUS_INVALID_SERVER_STATE
|
||||
STATUS_INVALID_SID
|
||||
STATUS_INVALID_SUB_AUTHORITY
|
||||
STATUS_INVALID_SYSTEM_SERVICE
|
||||
STATUS_INVALID_UNWIND_TARGET
|
||||
STATUS_INVALID_USER_BUFFER
|
||||
STATUS_INVALID_VARIANT
|
||||
STATUS_INVALID_VIEW_SIZE
|
||||
STATUS_INVALID_VLM_OPERATION
|
||||
STATUS_INVALID_VOLUME_LABEL
|
||||
STATUS_INVALID_WORKSTATION
|
||||
STATUS_IN_PAGE_ERROR
|
||||
STATUS_IO_DEVICE_ERROR
|
||||
STATUS_IO_PRIVILEGE_FAILED
|
||||
STATUS_IO_REPARSE_DATA_INVALID
|
||||
STATUS_IO_REPARSE_TAG_INVALID
|
||||
STATUS_IO_REPARSE_TAG_MISMATCH
|
||||
STATUS_IO_REPARSE_TAG_NOT_HANDLED
|
||||
STATUS_IO_TIMEOUT
|
||||
STATUS_IP_ADDRESS_CONFLICT1
|
||||
STATUS_IP_ADDRESS_CONFLICT2
|
||||
STATUS_KERNEL_APC
|
||||
STATUS_KEY_DELETED
|
||||
STATUS_KEY_HAS_CHILDREN
|
||||
STATUS_LAST_ADMIN
|
||||
STATUS_LICENSE_QUOTA_EXCEEDED
|
||||
STATUS_LICENSE_VIOLATION
|
||||
STATUS_LINK_FAILED
|
||||
STATUS_LINK_TIMEOUT
|
||||
STATUS_LM_CROSS_ENCRYPTION_REQUIRED
|
||||
STATUS_LOCAL_DISCONNECT
|
||||
STATUS_LOCAL_USER_SESSION_KEY
|
||||
STATUS_LOCK_NOT_GRANTED
|
||||
STATUS_LOGIN_TIME_RESTRICTION
|
||||
STATUS_LOGIN_WKSTA_RESTRICTION
|
||||
STATUS_LOGON_FAILURE
|
||||
STATUS_LOGON_NOT_GRANTED
|
||||
STATUS_LOGON_SERVER_CONFLICT
|
||||
STATUS_LOGON_SESSION_COLLISION
|
||||
STATUS_LOGON_SESSION_EXISTS
|
||||
STATUS_LOGON_TYPE_NOT_GRANTED
|
||||
STATUS_LOG_FILE_FULL
|
||||
STATUS_LOG_HARD_ERROR
|
||||
STATUS_LONGJUMP
|
||||
STATUS_LOST_WRITEBEHIND_DATA
|
||||
STATUS_LPC_REPLY_LOST
|
||||
STATUS_LUIDS_EXHAUSTED
|
||||
STATUS_MAPPED_ALIGNMENT
|
||||
STATUS_MAPPED_FILE_SIZE_ZERO
|
||||
STATUS_MARSHALL_OVERFLOW
|
||||
STATUS_MEDIA_CHANGED
|
||||
STATUS_MEDIA_CHECK
|
||||
STATUS_MEDIA_WRITE_PROTECTED
|
||||
STATUS_MEMBERS_PRIMARY_GROUP
|
||||
STATUS_MEMBER_IN_ALIAS
|
||||
STATUS_MEMBER_IN_GROUP
|
||||
STATUS_MEMBER_NOT_IN_ALIAS
|
||||
STATUS_MEMBER_NOT_IN_GROUP
|
||||
STATUS_MEMORY_NOT_ALLOCATED
|
||||
STATUS_MESSAGE_NOT_FOUND
|
||||
STATUS_MISSING_SYSTEMFILE
|
||||
STATUS_MORE_ENTRIES
|
||||
STATUS_MORE_PROCESSING_REQUIRED
|
||||
STATUS_MUTANT_LIMIT_EXCEEDED
|
||||
STATUS_MUTANT_NOT_OWNED
|
||||
STATUS_NAME_TOO_LONG
|
||||
STATUS_NETLOGON_NOT_STARTED
|
||||
STATUS_NETWORK_ACCESS_DENIED
|
||||
STATUS_NETWORK_BUSY
|
||||
STATUS_NETWORK_CREDENTIAL_CONFLICT
|
||||
STATUS_NETWORK_NAME_DELETED
|
||||
STATUS_NETWORK_UNREACHABLE
|
||||
STATUS_NET_WRITE_FAULT
|
||||
STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT
|
||||
STATUS_NOLOGON_SERVER_TRUST_ACCOUNT
|
||||
STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT
|
||||
STATUS_NONCONTINUABLE_EXCEPTION
|
||||
STATUS_NONEXISTENT_EA_ENTRY
|
||||
STATUS_NONEXISTENT_SECTOR
|
||||
STATUS_NONE_MAPPED
|
||||
STATUS_NOTIFY_CLEANUP
|
||||
STATUS_NOTIFY_ENUM_DIR
|
||||
STATUS_NOT_ALL_ASSIGNED
|
||||
STATUS_NOT_A_DIRECTORY
|
||||
STATUS_NOT_A_REPARSE_POINT
|
||||
STATUS_NOT_CLIENT_SESSION
|
||||
STATUS_NOT_COMMITTED
|
||||
STATUS_NOT_FOUND
|
||||
STATUS_NOT_IMPLEMENTED
|
||||
STATUS_NOT_LOCKED
|
||||
STATUS_NOT_LOGON_PROCESS
|
||||
STATUS_NOT_MAPPED_DATA
|
||||
STATUS_NOT_MAPPED_VIEW
|
||||
STATUS_NOT_REGISTRY_FILE
|
||||
STATUS_NOT_SAME_DEVICE
|
||||
STATUS_NOT_SERVER_SESSION
|
||||
STATUS_NOT_SUPPORTED
|
||||
STATUS_NOT_TINY_STREAM
|
||||
STATUS_NO_BROWSER_SERVERS_FOUND
|
||||
STATUS_NO_CALLBACK_ACTIVE
|
||||
STATUS_NO_DATA_DETECTED
|
||||
STATUS_NO_EAS_ON_FILE
|
||||
STATUS_NO_EVENT_PAIR
|
||||
STATUS_NO_GUID_TRANSLATION
|
||||
STATUS_NO_IMPERSONATION_TOKEN
|
||||
STATUS_NO_INHERITANCE
|
||||
STATUS_NO_LDT
|
||||
STATUS_NO_LOGON_SERVERS
|
||||
STATUS_NO_LOG_SPACE
|
||||
STATUS_NO_MATCH
|
||||
STATUS_NO_MEDIA
|
||||
STATUS_NO_MEDIA_IN_DEVICE
|
||||
STATUS_NO_MEMORY
|
||||
STATUS_NO_MORE_EAS
|
||||
STATUS_NO_MORE_ENTRIES
|
||||
STATUS_NO_MORE_FILES
|
||||
STATUS_NO_MORE_MATCHES
|
||||
STATUS_NO_PAGEFILE
|
||||
STATUS_NO_QUOTAS_NO_ACCOUNT
|
||||
STATUS_NO_SECURITY_ON_OBJECT
|
||||
STATUS_NO_SPOOL_SPACE
|
||||
STATUS_NO_SUCH_ALIAS
|
||||
STATUS_NO_SUCH_DEVICE
|
||||
STATUS_NO_SUCH_DOMAIN
|
||||
STATUS_NO_SUCH_FILE
|
||||
STATUS_NO_SUCH_GROUP
|
||||
STATUS_NO_SUCH_LOGON_SESSION
|
||||
STATUS_NO_SUCH_MEMBER
|
||||
STATUS_NO_SUCH_PACKAGE
|
||||
STATUS_NO_SUCH_PRIVILEGE
|
||||
STATUS_NO_SUCH_USER
|
||||
STATUS_NO_TOKEN
|
||||
STATUS_NO_TRUST_LSA_SECRET
|
||||
STATUS_NO_TRUST_SAM_ACCOUNT
|
||||
STATUS_NO_USER_SESSION_KEY
|
||||
STATUS_NO_YIELD_PERFORMED
|
||||
STATUS_NT_CROSS_ENCRYPTION_REQUIRED
|
||||
STATUS_NULL_LM_PASSWORD
|
||||
STATUS_OBJECTID_EXISTS
|
||||
STATUS_OBJECT_EXISTS
|
||||
STATUS_OBJECT_NAME_COLLISION
|
||||
STATUS_OBJECT_NAME_EXISTS
|
||||
STATUS_OBJECT_NAME_INVALID
|
||||
STATUS_OBJECT_NAME_NOT_FOUND
|
||||
STATUS_OBJECT_PATH_INVALID
|
||||
STATUS_OBJECT_PATH_NOT_FOUND
|
||||
STATUS_OBJECT_PATH_SYNTAX_BAD
|
||||
STATUS_OBJECT_TYPE_MISMATCH
|
||||
STATUS_OPEN_FAILED
|
||||
STATUS_OPLOCK_BREAK_IN_PROCESS
|
||||
STATUS_OPLOCK_NOT_GRANTED
|
||||
STATUS_ORDINAL_NOT_FOUND
|
||||
STATUS_PAGEFILE_CREATE_FAILED
|
||||
STATUS_PAGEFILE_QUOTA
|
||||
STATUS_PAGEFILE_QUOTA_EXCEEDED
|
||||
STATUS_PARITY_ERROR
|
||||
STATUS_PARTIAL_COPY
|
||||
STATUS_PARTITION_FAILURE
|
||||
STATUS_PASSWORD_EXPIRED
|
||||
STATUS_PASSWORD_MUST_CHANGE
|
||||
STATUS_PASSWORD_RESTRICTION
|
||||
STATUS_PATH_NOT_COVERED
|
||||
STATUS_PENDING
|
||||
STATUS_PIPE_BROKEN
|
||||
STATUS_PIPE_BUSY
|
||||
STATUS_PIPE_CLOSING
|
||||
STATUS_PIPE_CONNECTED
|
||||
STATUS_PIPE_DISCONNECTED
|
||||
STATUS_PIPE_EMPTY
|
||||
STATUS_PIPE_LISTENING
|
||||
STATUS_PIPE_NOT_AVAILABLE
|
||||
STATUS_PLUGPLAY_NO_DEVICE
|
||||
STATUS_PORT_ALREADY_SET
|
||||
STATUS_PORT_CONNECTION_REFUSED
|
||||
STATUS_PORT_DISCONNECTED
|
||||
STATUS_PORT_MESSAGE_TOO_LONG
|
||||
STATUS_PORT_UNREACHABLE
|
||||
STATUS_POSSIBLE_DEADLOCK
|
||||
STATUS_PREDEFINED_HANDLE
|
||||
STATUS_PRIMARY_TRANSPORT_CONNECT_FAILED
|
||||
STATUS_PRINT_CANCELLED
|
||||
STATUS_PRINT_QUEUE_FULL
|
||||
STATUS_PRIVILEGED_INSTRUCTION
|
||||
STATUS_PRIVILEGE_NOT_HELD
|
||||
STATUS_PROCEDURE_NOT_FOUND
|
||||
STATUS_PROCESS_IN_JOB
|
||||
STATUS_PROCESS_IS_TERMINATING
|
||||
STATUS_PROCESS_NOT_IN_JOB
|
||||
STATUS_PROFILING_AT_LIMIT
|
||||
STATUS_PROFILING_NOT_STARTED
|
||||
STATUS_PROFILING_NOT_STOPPED
|
||||
STATUS_PROPSET_NOT_FOUND
|
||||
STATUS_PROTOCOL_UNREACHABLE
|
||||
STATUS_PWD_HISTORY_CONFLICT
|
||||
STATUS_PWD_TOO_RECENT
|
||||
STATUS_PWD_TOO_SHORT
|
||||
STATUS_QUOTA_EXCEEDED
|
||||
STATUS_QUOTA_LIST_INCONSISTENT
|
||||
STATUS_RANGE_LIST_CONFLICT
|
||||
STATUS_RANGE_NOT_FOUND
|
||||
STATUS_RANGE_NOT_LOCKED
|
||||
STATUS_RECEIVE_EXPEDITED
|
||||
STATUS_RECEIVE_PARTIAL
|
||||
STATUS_RECEIVE_PARTIAL_EXPEDITED
|
||||
STATUS_RECOVERY_FAILURE
|
||||
STATUS_REDIRECTOR_HAS_OPEN_HANDLES
|
||||
STATUS_REDIRECTOR_NOT_STARTED
|
||||
STATUS_REDIRECTOR_PAUSED
|
||||
STATUS_REDIRECTOR_STARTED
|
||||
STATUS_REGISTRY_CORRUPT
|
||||
STATUS_REGISTRY_IO_FAILED
|
||||
STATUS_REGISTRY_QUOTA_LIMIT
|
||||
STATUS_REGISTRY_RECOVERED
|
||||
STATUS_REMOTE_DISCONNECT
|
||||
STATUS_REMOTE_NOT_LISTENING
|
||||
STATUS_REMOTE_RESOURCES
|
||||
STATUS_REMOTE_SESSION_LIMIT
|
||||
STATUS_REPARSE
|
||||
STATUS_REPLY_MESSAGE_MISMATCH
|
||||
STATUS_REQUEST_ABORTED
|
||||
STATUS_REQUEST_NOT_ACCEPTED
|
||||
STATUS_RESOURCE_DATA_NOT_FOUND
|
||||
STATUS_RESOURCE_LANG_NOT_FOUND
|
||||
STATUS_RESOURCE_NAME_NOT_FOUND
|
||||
STATUS_RESOURCE_NOT_OWNED
|
||||
STATUS_RESOURCE_TYPE_NOT_FOUND
|
||||
STATUS_RETRY
|
||||
STATUS_REVISION_MISMATCH
|
||||
STATUS_RXACT_COMMITTED
|
||||
STATUS_RXACT_COMMIT_FAILURE
|
||||
STATUS_RXACT_COMMIT_NECESSARY
|
||||
STATUS_RXACT_INVALID_STATE
|
||||
STATUS_RXACT_STATE_CREATED
|
||||
STATUS_SAM_INIT_FAILURE
|
||||
STATUS_SECRET_TOO_LONG
|
||||
STATUS_SECTION_NOT_EXTENDED
|
||||
STATUS_SECTION_NOT_IMAGE
|
||||
STATUS_SECTION_PROTECTION
|
||||
STATUS_SECTION_TOO_BIG
|
||||
STATUS_SEGMENT_NOTIFICATION
|
||||
STATUS_SEMAPHORE_LIMIT_EXCEEDED
|
||||
STATUS_SERIAL_COUNTER_TIMEOUT
|
||||
STATUS_SERIAL_MORE_WRITES
|
||||
STATUS_SERIAL_NO_DEVICE_INITED
|
||||
STATUS_SERVER_DISABLED
|
||||
STATUS_SERVER_HAS_OPEN_HANDLES
|
||||
STATUS_SERVER_NOT_DISABLED
|
||||
STATUS_SERVICE_NOTIFICATION
|
||||
STATUS_SETMARK_DETECTED
|
||||
STATUS_SHARED_IRQ_BUSY
|
||||
STATUS_SHARING_PAUSED
|
||||
STATUS_SHARING_VIOLATION
|
||||
STATUS_SINGLE_STEP
|
||||
STATUS_SOME_NOT_MAPPED
|
||||
STATUS_SPECIAL_ACCOUNT
|
||||
STATUS_SPECIAL_GROUP
|
||||
STATUS_SPECIAL_USER
|
||||
STATUS_STACK_OVERFLOW
|
||||
STATUS_STACK_OVERFLOW_READ
|
||||
STATUS_SUCCESS
|
||||
STATUS_SUSPEND_COUNT_EXCEEDED
|
||||
STATUS_SYNCHRONIZATION_REQUIRED
|
||||
STATUS_SYSTEM_PROCESS_TERMINATED
|
||||
STATUS_THREAD_IS_TERMINATING
|
||||
STATUS_THREAD_NOT_IN_PROCESS
|
||||
STATUS_THREAD_WAS_SUSPENDED
|
||||
STATUS_TIMEOUT
|
||||
STATUS_TIMER_NOT_CANCELED
|
||||
STATUS_TIMER_RESOLUTION_NOT_SET
|
||||
STATUS_TIMER_RESUME_IGNORED
|
||||
STATUS_TIME_DIFFERENCE_AT_DC
|
||||
STATUS_TOKEN_ALREADY_IN_USE
|
||||
STATUS_TOO_LATE
|
||||
STATUS_TOO_MANY_ADDRESSES
|
||||
STATUS_TOO_MANY_COMMANDS
|
||||
STATUS_TOO_MANY_CONTEXT_IDS
|
||||
STATUS_TOO_MANY_GUIDS_REQUESTED
|
||||
STATUS_TOO_MANY_LINKS
|
||||
STATUS_TOO_MANY_LUIDS_REQUESTED
|
||||
STATUS_TOO_MANY_NAMES
|
||||
STATUS_TOO_MANY_NODES
|
||||
STATUS_TOO_MANY_OPENED_FILES
|
||||
STATUS_TOO_MANY_PAGING_FILES
|
||||
STATUS_TOO_MANY_SECRETS
|
||||
STATUS_TOO_MANY_SESSIONS
|
||||
STATUS_TOO_MANY_SIDS
|
||||
STATUS_TOO_MANY_THREADS
|
||||
STATUS_TRANSACTION_ABORTED
|
||||
STATUS_TRANSACTION_INVALID_ID
|
||||
STATUS_TRANSACTION_INVALID_TYPE
|
||||
STATUS_TRANSACTION_NO_MATCH
|
||||
STATUS_TRANSACTION_NO_RELEASE
|
||||
STATUS_TRANSACTION_RESPONDED
|
||||
STATUS_TRANSACTION_TIMED_OUT
|
||||
STATUS_TRUSTED_DOMAIN_FAILURE
|
||||
STATUS_TRUSTED_RELATIONSHIP_FAILURE
|
||||
STATUS_TRUST_FAILURE
|
||||
STATUS_UNABLE_TO_DECOMMIT_VM
|
||||
STATUS_UNABLE_TO_DELETE_SECTION
|
||||
STATUS_UNABLE_TO_FREE_VM
|
||||
STATUS_UNABLE_TO_LOCK_MEDIA
|
||||
STATUS_UNABLE_TO_UNLOAD_MEDIA
|
||||
STATUS_UNDEFINED_CHARACTER
|
||||
STATUS_UNEXPECTED_IO_ERROR
|
||||
STATUS_UNEXPECTED_MM_CREATE_ERR
|
||||
STATUS_UNEXPECTED_MM_EXTEND_ERR
|
||||
STATUS_UNEXPECTED_MM_MAP_ERROR
|
||||
STATUS_UNEXPECTED_NETWORK_ERROR
|
||||
STATUS_UNHANDLED_EXCEPTION
|
||||
STATUS_UNKNOWN_REVISION
|
||||
STATUS_UNMAPPABLE_CHARACTER
|
||||
STATUS_UNRECOGNIZED_MEDIA
|
||||
STATUS_UNRECOGNIZED_VOLUME
|
||||
STATUS_UNSUCCESSFUL
|
||||
STATUS_UNSUPPORTED_COMPRESSION
|
||||
STATUS_UNWIND
|
||||
STATUS_USER_APC
|
||||
STATUS_USER_EXISTS
|
||||
STATUS_USER_MAPPED_FILE
|
||||
STATUS_USER_SESSION_DELETED
|
||||
STATUS_VALIDATE_CONTINUE
|
||||
STATUS_VARIABLE_NOT_FOUND
|
||||
STATUS_VDM_HARD_ERROR
|
||||
STATUS_VERIFY_REQUIRED
|
||||
STATUS_VIRTUAL_CIRCUIT_CLOSED
|
||||
STATUS_VOLUME_DISMOUNTED
|
||||
STATUS_VOLUME_MOUNTED
|
||||
STATUS_WAIT_0
|
||||
STATUS_WAIT_63
|
||||
STATUS_WAKE_SYSTEM_DEBUGGER
|
||||
STATUS_WAS_LOCKED
|
||||
STATUS_WAS_UNLOCKED
|
||||
STATUS_WORKING_SET_LIMIT_RANGE
|
||||
STATUS_WORKING_SET_QUOTA
|
||||
STATUS_WRONG_PASSWORD
|
||||
STATUS_WRONG_PASSWORD_CORE
|
||||
STATUS_WRONG_VOLUME
|
||||
STATUS_WX86_BREAKPOINT
|
||||
STATUS_WX86_CONTINUE
|
||||
STATUS_WX86_CREATEWX86TIB
|
||||
STATUS_WX86_EXCEPTION_CHAIN
|
||||
STATUS_WX86_EXCEPTION_CONTINUE
|
||||
STATUS_WX86_EXCEPTION_LASTCHANCE
|
||||
STATUS_WX86_FLOAT_STACK_CHECK
|
||||
STATUS_WX86_INTERNAL_ERROR
|
||||
STATUS_WX86_SINGLE_STEP
|
||||
STATUS_WX86_UNSIMULATE
|
@@ -18,7 +18,7 @@ Don't you know going around dereferncing null pointers all day can be hazardous
|
||||
Well, duh!
|
||||
There's a bit in cr3 for problems like that.
|
||||
Just add a field to the %stru% to keep track of it!
|
||||
Don't worry about it... the garbage collector in the kernel will clean it up for you.
|
||||
Don't worry about it... the garbage collector in %module% will clean it up for you.
|
||||
Did I do that?
|
||||
Didn't %dev% fix that already?
|
||||
Yes, I think I've seen that bug before... no... that was another program.
|
||||
@@ -43,7 +43,7 @@ Hmm.. that seems to have been introduced by my last commit... I bet CVS mixed up
|
||||
It can't possibly be my fault, so I don't care.
|
||||
I'm not experiencing that problem, perhaps it's all in your mind.
|
||||
Well... like a good friend of mine said... "Don't Panic!"
|
||||
It just shows you how far ReactOS has come along! A year ago a bug like that wouldn't have even been possible!
|
||||
It just shows you how far ReactOS has come along! A %period% ago a bug like that wouldn't have even been possible!
|
||||
Just surround the code with an #if 0/#endif block, it solves all my problems!
|
||||
You know.. if %dev% would just finish %module% for us, we wouldn't be having this problem.
|
||||
I say we move on to the next function, since we can't seem to figure this one out.
|
||||
@@ -54,8 +54,20 @@ ask %dev%
|
||||
Thank you for that amazingly keen insight, Commander Obvious.
|
||||
Sorry, can't help you right now, trying to track down this bug %dev% caused in %module%
|
||||
I dont know about that, but I just fixed a problem in %module% for %dev%
|
||||
How should I know? I'm still trying to figure out this main() thing... ooh! wanna see what I did in the kernel?
|
||||
How should I know? I'm still trying to figure out this main() thing... ooh! wanna see what I did in %module%?
|
||||
lol!
|
||||
*wink*
|
||||
;)
|
||||
42
|
||||
It's gonna take me %period%s to fix all %dev%'s bugs in %module% :(
|
||||
It's gonna take me over %period% to fix all %dev%'s bugs in %module% :(
|
||||
How could %func% return %status%!? It bet %dev% broke it! I didn't touch it... honest! no.. really! (me hides)
|
||||
It's fine if you get %status% there ... just ignore the destruction, and call %func% instead.
|
||||
%dev% said %status% isn't really an error in this context because we expect %module% to be toast by now
|
||||
heh, I'm still trying to figure out why %func% is returning %status% when I call it from %module%...
|
||||
%dev% said it's okay to ignore that as long as you're below %irql%
|
||||
erm, what do you mean?
|
||||
damn, I do that all the time
|
||||
if you want a reply that sounds right, I'd say that %func% support for that is vital to the future of %module%
|
||||
Sounds like you're having a problem with %func%. I hate that thing... don't talk to me about it.
|
||||
Just return %status% and forget about it. Someone else will fix it, later.
|
||||
Blah blah blah... sheesh... can't you figure out *anything*?
|
1000
irc/ArchBlackmann/type.txt
Normal file
1000
irc/ArchBlackmann/type.txt
Normal file
File diff suppressed because it is too large
Load Diff
40
os2/lib/doscalls/memory/memory.cpp
Normal file
40
os2/lib/doscalls/memory/memory.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
|
||||
|
||||
|
||||
// TODO: HEader: To be pasted
|
||||
|
||||
|
||||
|
||||
|
||||
// INCL_DOSMEMMGR || !INCL_NOCOMMON
|
||||
#define INCL_DOSMEMMGR
|
||||
#undefine INCL_NOCOMMON
|
||||
|
||||
#include <os2.h>
|
||||
|
||||
|
||||
// TODO: Expain that this is for memory alloc/free funcs of Os2 api
|
||||
|
||||
|
||||
|
||||
// TODO: Implement functions and give them bodies
|
||||
ULONG DosAllocMem (PPVOID pBaseAddress, ULONG ulObjectSize,
|
||||
ULONG ulAllocationFlags);
|
||||
ULONG DosAllocSharedMem (PPVOID pBaseAddress, PCSZ pszName,
|
||||
ULONG ulObjectSize, ULONG ulAllocationFlags);
|
||||
ULONG DosFreeMem (PVOID pBaseAddress);
|
||||
ULONG DosGetNamedSharedMem (PPVOID pBaseAddress, PCSZ pszSharedMemName,
|
||||
ULONG ulAttributeFlags);
|
||||
ULONG DosGetSharedMem (CPVOID pBaseAddress, ULONG ulAttributeFlags);
|
||||
ULONG DosGiveSharedMem (CPVOID pBaseAddress, PID idProcessId,
|
||||
ULONG ulAttributeFlags);
|
||||
ULONG DosQueryMem (CPVOID pBaseAddress, PULONG pulRegionSize,
|
||||
PULONG pulAllocationFlags);
|
||||
ULONG DosSetMem (CPVOID pBaseAddress, ULONG ulRegionSize,
|
||||
ULONG ulAttributeFlags);
|
||||
ULONG DosSubAllocMem (PVOID pOffset, PPVOID pBlockOffset, ULONG ulSize);
|
||||
ULONG DosSubFreeMem (PVOID pOffset, PVOID pBlockOffset, ULONG ulSize);
|
||||
ULONG DosSubSetMem (PVOID pOffset, ULONG ulFlags, ULONG ulSize);
|
||||
ULONG DosSubUnsetMem (PVOID pOffset);
|
||||
|
||||
// TODO: Add file to makefile
|
@@ -34,8 +34,8 @@ COMPONENTS = ntoskrnl
|
||||
HALS = halx86/up halx86/mp
|
||||
|
||||
# Bus drivers
|
||||
# acpi isapnp pci
|
||||
BUS = acpi isapnp pci
|
||||
# acpi isapnp pci serenum
|
||||
BUS = acpi isapnp pci serenum
|
||||
|
||||
# Filesystem libraries
|
||||
# vfatlib
|
||||
@@ -48,7 +48,7 @@ LIBUNICODE =
|
||||
LIB_STATIC = string rosrtl epsapi uuid libwine zlib rtl tgetopt pseh adns dxguid strmiids crt rossym wdmguid
|
||||
|
||||
# Keyboard layout libraries
|
||||
DLLS_KBD = kbdda kbddv kbdes kbdfr kbdgr kbdse kbduk kbdus
|
||||
DLLS_KBD = kbdda kbddv kbdes kbdfr kbdgr kbdru kbdse kbdsg kbduk kbdus
|
||||
|
||||
# Control Panels
|
||||
DLLS_CPL = cpl
|
||||
@@ -61,9 +61,10 @@ DLLS_SHELLEXT = shellext
|
||||
DLLS = acledit aclui advapi32 advpack cabinet cards comctl32 crtdll comdlg32 d3d8thk dbghelp expat fmifs freetype \
|
||||
gdi32 gdiplus glu32 hid imagehlp imm32 iphlpapi kernel32 lzexpand mesa32 midimap mmdrv mpr msacm msafd \
|
||||
msgina msi msimg32 msvcrt20 msvideo mswsock netapi32 ntdll ole32 oleaut32 oledlg olepro32 opengl32 \
|
||||
packet psapi riched20 richedit rpcrt4 samlib secur32 setupapi shell32 shlwapi smdll snmpapi syssetup \
|
||||
twain user32 userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda dnsapi \
|
||||
urlmon shdocvw dinput dinput8 dxdiagn devenum dsound lsasrv $(DLLS_KBD) $(DLLS_CPL) $(DLLS_SHELLEXT)
|
||||
packet psapi riched20 richedit rpcrt4 samlib secur32 serialui setupapi shell32 shlwapi smlib smdll snmpapi \
|
||||
syssetup twain user32 userenv version wininet winmm winspool ws2help ws2_32 wsock32 wshirda dnsapi \
|
||||
urlmon shdocvw dinput dinput8 dxdiagn devenum dsound lsasrv dhcpcapi \
|
||||
$(DLLS_KBD) $(DLLS_CPL) $(DLLS_SHELLEXT)
|
||||
|
||||
SUBSYS = smss win32k csrss ntvdm
|
||||
|
||||
@@ -105,7 +106,7 @@ STORAGE_DRIVERS = atapi cdrom class2 disk floppy scsiport diskdump
|
||||
# autochk cmd format services setup usetup welcome winlogon msiexec
|
||||
SYS_APPS = autochk calc cmd explorer expand format ibrowser msiexec regsvr32 \
|
||||
reporterror services setup taskmgr userinit usetup welcome vmwinst rundll32 \
|
||||
winlogon regedit winefile notepad reactos lsass
|
||||
winlogon regedit winefile notepad reactos lsass dhcp
|
||||
|
||||
# System services
|
||||
SYS_SVC = rpcss eventlog umpnpmgr
|
||||
|
@@ -11,7 +11,7 @@ TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = loadlib
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror -D_USE_W32API -DUNICODE -D_UNICODE
|
||||
TARGET_CFLAGS = -Wall -Werror -D__USE_W32API -DUNICODE -D_UNICODE
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a ntdll.a
|
||||
|
||||
|
@@ -9,7 +9,7 @@ include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
# Console system utilities
|
||||
# cabman cat net objdir partinfo pice ps sc stats
|
||||
UTIL_APPS = cat objdir partinfo pnpdump sc shutdown stats tickcount consw ps
|
||||
UTIL_APPS = cat objdir pnpdump sc shutdown stats tickcount ps
|
||||
|
||||
UTIL_NET_APPS = arp finger ftp ipconfig netstat ping route telnet whois
|
||||
|
||||
|
@@ -1,23 +1,21 @@
|
||||
# $Id$
|
||||
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = consw
|
||||
|
||||
TARGET_SDKLIBS = ntdll.a kernel32.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_NORC = yes
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = binpatch
|
||||
|
||||
TARGET_SDKLIBS =
|
||||
|
||||
TARGET_OBJECTS = patch.o
|
||||
|
||||
TARGET_CFLAGS += -Wall -Werror
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
615
reactos/apps/utils/binpatch/patch.c
Normal file
615
reactos/apps/utils/binpatch/patch.c
Normal file
@@ -0,0 +1,615 @@
|
||||
#include <conio.h>
|
||||
#include <io.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/** DEFINES *******************************************************************/
|
||||
|
||||
#define PATCH_BUFFER_SIZE 4096 /* Maximum size of a patch */
|
||||
#define PATCH_BUFFER_MAGIC "\xde\xad\xbe\xef MaGiC MaRk "
|
||||
#define SIZEOF_PATCH_BUFFER_MAGIC (sizeof (PATCH_BUFFER_MAGIC) - 1)
|
||||
|
||||
/** TYPES *********************************************************************/
|
||||
|
||||
typedef struct _PatchedByte
|
||||
{
|
||||
int offset; /*!< File offset of the patched byte. */
|
||||
unsigned char expected; /*!< Expected (original) value of the byte. */
|
||||
unsigned char patched; /*!< Patched (new) value for the byte. */
|
||||
} PatchedByte;
|
||||
|
||||
typedef struct _PatchedFile
|
||||
{
|
||||
const char *name; /*!< Name of the file to be patched. */
|
||||
int fileSize; /*!< Size of the file in bytes. */
|
||||
int patchCount; /*!< Number of patches for the file. */
|
||||
PatchedByte *patches; /*!< Patches for the file. */
|
||||
} PatchedFile;
|
||||
|
||||
typedef struct _Patch
|
||||
{
|
||||
const char *name; /*!< Name of the patch. */
|
||||
int fileCount; /*!< Number of files in the patch. */
|
||||
PatchedFile *files; /*!< Files for the patch. */
|
||||
} Patch;
|
||||
|
||||
/** FUNCTION PROTOTYPES *******************************************************/
|
||||
|
||||
static void printUsage();
|
||||
|
||||
/** GLOBALS *******************************************************************/
|
||||
|
||||
static Patch m_patch = { NULL, 0, NULL };
|
||||
static int m_argc = 0;
|
||||
static char **m_argv = NULL;
|
||||
|
||||
/* patch buffer where we put the patch info into */
|
||||
static unsigned char m_patchBuffer[SIZEOF_PATCH_BUFFER_MAGIC + PATCH_BUFFER_SIZE] =
|
||||
PATCH_BUFFER_MAGIC;
|
||||
|
||||
/** HELPER FUNCTIONS **********************************************************/
|
||||
|
||||
static void *
|
||||
loadFile(const char *fileName, int *fileSize_)
|
||||
{
|
||||
FILE *f;
|
||||
struct stat sb;
|
||||
int fileSize;
|
||||
void *p;
|
||||
|
||||
/* Open the file */
|
||||
f = fopen(fileName, "rb");
|
||||
if (f == NULL)
|
||||
{
|
||||
printf("Couldn't open file %s for reading!\n", fileName);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Get file size */
|
||||
if (fstat(fileno(f), &sb) < 0)
|
||||
{
|
||||
fclose(f);
|
||||
printf("Couldn't get size of file %s!\n", fileName);
|
||||
return NULL;
|
||||
}
|
||||
fileSize = sb.st_size;
|
||||
|
||||
/* Load file */
|
||||
p = malloc(fileSize);
|
||||
if (p == NULL)
|
||||
{
|
||||
fclose(f);
|
||||
printf("Couldn't allocate %d bytes for file %s!\n", fileSize, fileName);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (fread(p, fileSize, 1, f) != 1)
|
||||
{
|
||||
fclose(f);
|
||||
free(p);
|
||||
printf("Couldn't read file %s into memory!\n", fileName);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Close file */
|
||||
fclose(f);
|
||||
|
||||
*fileSize_ = fileSize;
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
saveFile(const char *fileName, void *file, int fileSize)
|
||||
{
|
||||
FILE *f;
|
||||
|
||||
/* Open the file */
|
||||
f = fopen(fileName, "wb");
|
||||
if (f == NULL)
|
||||
{
|
||||
printf("Couldn't open file %s for writing!\n", fileName);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Write file */
|
||||
if (fwrite(file, fileSize, 1, f) != 1)
|
||||
{
|
||||
fclose(f);
|
||||
printf("Couldn't write file %s!\n", fileName);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Close file */
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
compareFiles(
|
||||
PatchedFile *patchedFile,
|
||||
const char *originalFileName)
|
||||
{
|
||||
const char *patchedFileName = patchedFile->name;
|
||||
unsigned char *origChunk, *patchedChunk;
|
||||
int origSize, patchedSize, i, patchCount;
|
||||
PatchedByte *patches = NULL;
|
||||
int patchesArrayCount = 0;
|
||||
|
||||
/* Load both files */
|
||||
origChunk = loadFile(originalFileName, &origSize);
|
||||
if (origChunk == NULL)
|
||||
return -1;
|
||||
patchedChunk = loadFile(patchedFileName, &patchedSize);
|
||||
if (patchedChunk == NULL)
|
||||
{
|
||||
free(origChunk);
|
||||
return -1;
|
||||
}
|
||||
if (origSize != patchedSize)
|
||||
{
|
||||
free(origChunk);
|
||||
free(patchedChunk);
|
||||
printf("File size of %s and %s differs (%d != %d)\n",
|
||||
originalFileName, patchedFileName,
|
||||
origSize, patchedSize);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Compare the files and record any differences */
|
||||
printf("Comparing %s to %s", originalFileName, patchedFileName);
|
||||
for (i = 0, patchCount = 0; i < origSize; i++)
|
||||
{
|
||||
if (origChunk[i] != patchedChunk[i])
|
||||
{
|
||||
patchCount++;
|
||||
|
||||
/* Resize patches array if needed */
|
||||
if (patchesArrayCount < patchCount)
|
||||
{
|
||||
PatchedByte *newPatches;
|
||||
newPatches = realloc(patches, patchCount * sizeof (PatchedByte));
|
||||
if (newPatches == NULL)
|
||||
{
|
||||
if (patches != NULL)
|
||||
free(patches);
|
||||
free(origChunk);
|
||||
free(patchedChunk);
|
||||
printf("\nOut of memory (tried to allocated %d bytes)\n",
|
||||
patchCount * sizeof (PatchedByte));
|
||||
return -1;
|
||||
}
|
||||
patches = newPatches;
|
||||
}
|
||||
|
||||
/* Fill in patch info */
|
||||
patches[patchCount - 1].offset = i;
|
||||
patches[patchCount - 1].expected = origChunk[i];
|
||||
patches[patchCount - 1].patched = patchedChunk[i];
|
||||
}
|
||||
if ((i % (origSize / 40)) == 0)
|
||||
printf(".");
|
||||
}
|
||||
printf(" %d changed bytes found.\n", patchCount);
|
||||
|
||||
/* Unload the files */
|
||||
free(origChunk);
|
||||
free(patchedChunk);
|
||||
|
||||
/* Save patch info */
|
||||
patchedFile->fileSize = patchedSize;
|
||||
patchedFile->patchCount = patchCount;
|
||||
patchedFile->patches = patches;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
outputPatch(const char *outputFileName)
|
||||
{
|
||||
unsigned char *patchExe, *patchBuffer;
|
||||
int i, size, patchExeSize, patchSize, stringSize, stringOffset, patchOffset;
|
||||
Patch *patch;
|
||||
PatchedFile *files;
|
||||
|
||||
printf("Putting patch into %s...\n", outputFileName);
|
||||
|
||||
/* Calculate size of the patch */
|
||||
patchSize = sizeof (Patch) + sizeof (PatchedFile) * m_patch.fileCount;
|
||||
stringSize = strlen(m_patch.name) + 1;
|
||||
for (i = 0; i < m_patch.fileCount; i++)
|
||||
{
|
||||
stringSize += strlen(m_patch.files[i].name) + 1;
|
||||
patchSize += sizeof (PatchedByte) * m_patch.files[i].patchCount;
|
||||
}
|
||||
if ((stringSize + patchSize) > PATCH_BUFFER_SIZE)
|
||||
{
|
||||
printf("Patch is too big - %d bytes maximum, %d bytes needed\n",
|
||||
PATCH_BUFFER_SIZE, stringSize + patchSize);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Load patch.exe file into memory... */
|
||||
patchExe = loadFile(m_argv[0], &patchExeSize);
|
||||
if (patchExe == NULL)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Try to find the magic mark for the patch buffer */
|
||||
for (i = 0; i < (patchExeSize - SIZEOF_PATCH_BUFFER_MAGIC); i++)
|
||||
{
|
||||
if (memcmp(patchExe + i, m_patchBuffer, SIZEOF_PATCH_BUFFER_MAGIC) == 0)
|
||||
{
|
||||
patchBuffer = patchExe + i + SIZEOF_PATCH_BUFFER_MAGIC;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!(i < (patchExeSize - SIZEOF_PATCH_BUFFER_MAGIC)))
|
||||
{
|
||||
free(patchExe);
|
||||
printf("Couldn't find patch buffer magic in file %s - this shouldn't happen!!!\n", m_argv[0]);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Pack patch together and replace string pointers by offsets */
|
||||
patch = (Patch *)patchBuffer;
|
||||
files = (PatchedFile *)(patchBuffer + sizeof (Patch));
|
||||
patchOffset = sizeof (Patch) + sizeof (PatchedFile) * m_patch.fileCount;
|
||||
stringOffset = patchSize;
|
||||
|
||||
patch->fileCount = m_patch.fileCount;
|
||||
patch->files = (PatchedFile *)sizeof (Patch);
|
||||
|
||||
patch->name = (const char *)stringOffset;
|
||||
strcpy(patchBuffer + stringOffset, m_patch.name);
|
||||
stringOffset += strlen(m_patch.name) + 1;
|
||||
|
||||
for (i = 0; i < m_patch.fileCount; i++)
|
||||
{
|
||||
files[i].fileSize = m_patch.files[i].fileSize;
|
||||
files[i].patchCount = m_patch.files[i].patchCount;
|
||||
|
||||
files[i].name = (const char *)stringOffset;
|
||||
strcpy(patchBuffer + stringOffset, m_patch.files[i].name);
|
||||
stringOffset += strlen(m_patch.files[i].name) + 1;
|
||||
|
||||
size = files[i].patchCount * sizeof (PatchedByte);
|
||||
files[i].patches = (PatchedByte *)patchOffset;
|
||||
memcpy(patchBuffer + patchOffset, m_patch.files[i].patches, size);
|
||||
patchOffset += size;
|
||||
}
|
||||
size = patchSize + stringSize;
|
||||
memset(patchBuffer + size, 0, PATCH_BUFFER_SIZE - size);
|
||||
|
||||
/* Save file */
|
||||
if (saveFile(outputFileName, patchExe, patchExeSize) < 0)
|
||||
{
|
||||
free(patchExe);
|
||||
return -1;
|
||||
}
|
||||
free(patchExe);
|
||||
|
||||
printf("Patch saved!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
loadPatch()
|
||||
{
|
||||
char *p;
|
||||
Patch *patch;
|
||||
int i;
|
||||
|
||||
p = m_patchBuffer + SIZEOF_PATCH_BUFFER_MAGIC;
|
||||
patch = (Patch *)p;
|
||||
|
||||
if (patch->name == NULL)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
m_patch.name = p + (int)patch->name;
|
||||
m_patch.fileCount = patch->fileCount;
|
||||
m_patch.files = (PatchedFile *)(p + (int)patch->files);
|
||||
|
||||
for (i = 0; i < m_patch.fileCount; i++)
|
||||
{
|
||||
m_patch.files[i].name = p + (int)m_patch.files[i].name;
|
||||
m_patch.files[i].patches = (PatchedByte *)(p + (int)m_patch.files[i].patches);
|
||||
}
|
||||
|
||||
printf("Patch %s loaded...\n", m_patch.name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/** MAIN FUNCTIONS ************************************************************/
|
||||
|
||||
static int
|
||||
createPatch()
|
||||
{
|
||||
int i, status;
|
||||
const char *outputFileName;
|
||||
|
||||
/* Check argument count */
|
||||
if (m_argc < 6 || (m_argc % 2) != 0)
|
||||
{
|
||||
printUsage();
|
||||
return -1;
|
||||
}
|
||||
|
||||
outputFileName = m_argv[3];
|
||||
m_patch.name = m_argv[2];
|
||||
|
||||
/* Allocate PatchedFiles array */
|
||||
m_patch.fileCount = (m_argc - 4) / 2;
|
||||
m_patch.files = malloc(m_patch.fileCount * sizeof (PatchedFile));
|
||||
if (m_patch.files == NULL)
|
||||
{
|
||||
printf("Out of memory!\n");
|
||||
return -1;
|
||||
}
|
||||
memset(m_patch.files, 0, m_patch.fileCount * sizeof (PatchedFile));
|
||||
|
||||
/* Compare original to patched files and fill m_patch.files array */
|
||||
for (i = 0; i < m_patch.fileCount; i++)
|
||||
{
|
||||
m_patch.files[i].name = m_argv[4 + (i * 2) + 1];
|
||||
status = compareFiles(m_patch.files + i, m_argv[4 + (i * 2) + 0]);
|
||||
if (status < 0)
|
||||
{
|
||||
for (i = 0; i < m_patch.fileCount; i++)
|
||||
{
|
||||
if (m_patch.files[i].patches != NULL)
|
||||
free(m_patch.files[i].patches);
|
||||
}
|
||||
free(m_patch.files);
|
||||
m_patch.files = NULL;
|
||||
m_patch.fileCount = 0;
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
/* Output patch */
|
||||
return outputPatch(outputFileName);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
applyPatch()
|
||||
{
|
||||
int c, i, j, fileSize, makeBackup;
|
||||
unsigned char *file;
|
||||
char *p;
|
||||
const char *fileName;
|
||||
char buffer[MAX_PATH];
|
||||
|
||||
|
||||
if (m_argc > 1 && strcmp(m_argv[1], "-d") != 0)
|
||||
{
|
||||
printUsage();
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Load patch */
|
||||
if (loadPatch() < 0)
|
||||
{
|
||||
printf("This executable doesn't contain a patch, use -c to create one.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (m_argc > 1)
|
||||
{
|
||||
/* Dump patch */
|
||||
printf("Patch name: %s\n", m_patch.name);
|
||||
printf("File count: %d\n", m_patch.fileCount);
|
||||
for (i = 0; i < m_patch.fileCount; i++)
|
||||
{
|
||||
printf("----------------------\n"
|
||||
"File name: %s\n"
|
||||
"File size: %d bytes\n",
|
||||
m_patch.files[i].name, m_patch.files[i].fileSize);
|
||||
printf("Patch count: %d\n", m_patch.files[i].patchCount);
|
||||
for (j = 0; j < m_patch.files[i].patchCount; j++)
|
||||
{
|
||||
printf(" Offset 0x%x 0x%02x -> 0x%02x\n",
|
||||
m_patch.files[i].patches[j].offset,
|
||||
m_patch.files[i].patches[j].expected,
|
||||
m_patch.files[i].patches[j].patched);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Apply patch */
|
||||
printf("Applying patch...\n");
|
||||
for (i = 0; i < m_patch.fileCount; i++)
|
||||
{
|
||||
/* Load original file */
|
||||
fileName = m_patch.files[i].name;
|
||||
applyPatch_retry_file:
|
||||
file = loadFile(fileName, &fileSize);
|
||||
if (file == NULL)
|
||||
{
|
||||
printf("File %s not found! ", fileName);
|
||||
applyPatch_file_open_error:
|
||||
printf("(S)kip, (R)etry, (A)bort, (M)anually enter filename");
|
||||
do
|
||||
{
|
||||
c = getch();
|
||||
}
|
||||
while (c != 's' && c != 'r' && c != 'a' && c != 'm');
|
||||
printf("\n");
|
||||
if (c == 's')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else if (c == 'r')
|
||||
{
|
||||
goto applyPatch_retry_file;
|
||||
}
|
||||
else if (c == 'a')
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (c == 'm')
|
||||
{
|
||||
if (fgets(buffer, sizeof (buffer), stdin) == NULL)
|
||||
{
|
||||
printf("fgets() failed!\n");
|
||||
return -1;
|
||||
}
|
||||
p = strchr(buffer, '\r');
|
||||
if (p != NULL)
|
||||
*p = '\0';
|
||||
p = strchr(buffer, '\n');
|
||||
if (p != NULL)
|
||||
*p = '\0';
|
||||
|
||||
fileName = buffer;
|
||||
goto applyPatch_retry_file;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check file size */
|
||||
if (fileSize != m_patch.files[i].fileSize)
|
||||
{
|
||||
free(file);
|
||||
printf("File %s has unexpected filesize of %d bytes (%d bytes expected)\n",
|
||||
fileName, fileSize, m_patch.files[i].fileSize);
|
||||
if (fileName != m_patch.files[i].name) /* manually entered filename */
|
||||
{
|
||||
goto applyPatch_file_open_error;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Ask for backup */
|
||||
printf("Do you want to make a backup of %s? (Y)es, (N)o, (A)bort", fileName);
|
||||
do
|
||||
{
|
||||
c = getch();
|
||||
}
|
||||
while (c != 'y' && c != 'n' && c != 'a');
|
||||
printf("\n");
|
||||
if (c == 'y')
|
||||
{
|
||||
char buffer[MAX_PATH];
|
||||
snprintf(buffer, MAX_PATH, "%s.bak", fileName);
|
||||
buffer[MAX_PATH-1] = '\0';
|
||||
makeBackup = 1;
|
||||
if (access(buffer, 0) >= 0) /* file exists */
|
||||
{
|
||||
printf("File %s already exists, overwrite? (Y)es, (N)o, (A)bort", buffer);
|
||||
do
|
||||
{
|
||||
c = getch();
|
||||
}
|
||||
while (c != 'y' && c != 'n' && c != 'a');
|
||||
printf("\n");
|
||||
if (c == 'n')
|
||||
makeBackup = 0;
|
||||
else if (c == 'a')
|
||||
{
|
||||
free(file);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (makeBackup && saveFile(buffer, file, fileSize) < 0)
|
||||
{
|
||||
free(file);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else if (c == 'a')
|
||||
{
|
||||
free(file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Patch file */
|
||||
for (j = 0; j < m_patch.files[i].patchCount; j++)
|
||||
{
|
||||
int offset = m_patch.files[i].patches[j].offset;
|
||||
if (file[offset] != m_patch.files[i].patches[j].expected)
|
||||
{
|
||||
printf("Unexpected value in file %s at offset 0x%x: expected = 0x%02x, found = 0x%02x\n",
|
||||
fileName, offset, m_patch.files[i].patches[j].expected, file[offset]);
|
||||
free(file);
|
||||
return -1;
|
||||
}
|
||||
file[offset] = m_patch.files[i].patches[j].patched;
|
||||
}
|
||||
|
||||
/* Save file */
|
||||
if (saveFile(fileName, file, fileSize) < 0)
|
||||
{
|
||||
free(file);
|
||||
return -1;
|
||||
}
|
||||
free(file);
|
||||
}
|
||||
|
||||
printf("Patch applied sucessfully!\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
printUsage()
|
||||
{
|
||||
printf("Usage:\n"
|
||||
"%s -c - Create patch\n"
|
||||
"%s -d - Dump patch\n"
|
||||
"%s - Apply patch\n"
|
||||
"\n"
|
||||
"A patch can be created like this:\n"
|
||||
"%s -c \"patch name\" output.exe file1.orig file1.patched[ file2.orig file2.patched[ ...]]\n",
|
||||
m_argv[0], m_argv[0], m_argv[0], m_argv[0]);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
main(
|
||||
int argc,
|
||||
char *argv[])
|
||||
{
|
||||
m_argc = argc;
|
||||
m_argv = argv;
|
||||
|
||||
if (argc >= 2 && (strcmp(argv[1], "-h") == 0 || strcmp(argv[1], "--help") == 0))
|
||||
{
|
||||
printUsage();
|
||||
return 0;
|
||||
}
|
||||
else if (argc >= 2 && argv[1][0] == '-')
|
||||
{
|
||||
if (strcmp(argv[1], "-c") == 0)
|
||||
{
|
||||
return createPatch();
|
||||
}
|
||||
else if (strcmp(argv[1], "-d") == 0)
|
||||
{
|
||||
return applyPatch();
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Unknown option: %s\n"
|
||||
"Use -h for help.\n",
|
||||
argv[1]);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return applyPatch();
|
||||
}
|
||||
|
@@ -1,30 +0,0 @@
|
||||
/* $Id$
|
||||
*
|
||||
* DESCRIPTION: Console mode switcher
|
||||
* PROGRAMMER: Art Yerkes
|
||||
* REVISIONS
|
||||
* 2003-07-26 (arty)
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void STDCALL SetConsoleHardwareState( HANDLE conhandle,
|
||||
DWORD flags,
|
||||
DWORD state );
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if( argc > 1 ) {
|
||||
SetConsoleHardwareState( GetStdHandle( STD_INPUT_HANDLE ),
|
||||
0,
|
||||
!strcmp( argv[1], "hw" ) );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* EOF */
|
@@ -1,5 +0,0 @@
|
||||
@echo off
|
||||
rem Turn off cosole, run a program, turn console on
|
||||
\reactos\bin\consw sw
|
||||
"%1" "%2" "%3" "%4" "%5" "%6" "%7" "%8" "%9"
|
||||
\reactos\bin\consw hw
|
@@ -56,14 +56,14 @@ netfinger(char *name)
|
||||
struct hostent *hp, def;
|
||||
struct servent *sp;
|
||||
struct sockaddr_in sin;
|
||||
int s;
|
||||
SOCKET s;
|
||||
char *alist[1], *host;
|
||||
|
||||
/* If this is a local request */
|
||||
if (!(host = rindex(name, '@')))
|
||||
return;
|
||||
|
||||
*host++ = NULL;
|
||||
*host++ = '\0';
|
||||
if (isdigit(*host) && (defaddr.s_addr = inet_addr(host)) != -1) {
|
||||
def.h_name = host;
|
||||
def.h_addr_list = alist;
|
||||
@@ -84,7 +84,7 @@ netfinger(char *name)
|
||||
sin.sin_family = hp->h_addrtype;
|
||||
bcopy(hp->h_addr, (char *)&sin.sin_addr, hp->h_length);
|
||||
sin.sin_port = sp->s_port;
|
||||
if ((s = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) {
|
||||
if ((s = socket(hp->h_addrtype, SOCK_STREAM, 0)) == INVALID_SOCKET) {
|
||||
perror("finger: socket");
|
||||
return;
|
||||
}
|
||||
|
@@ -235,7 +235,7 @@ char *getpass (const char * prompt)
|
||||
static char input[256];
|
||||
HANDLE in;
|
||||
HANDLE err;
|
||||
int count;
|
||||
DWORD count;
|
||||
|
||||
in = GetStdHandle (STD_INPUT_HANDLE);
|
||||
err = GetStdHandle (STD_ERROR_HANDLE);
|
||||
|
@@ -97,7 +97,7 @@ uid_t getuid();
|
||||
sig_t lostpeer();
|
||||
off_t restart_point = 0;
|
||||
|
||||
int cin, cout;
|
||||
SOCKET cin, cout;
|
||||
int dataconn(char *mode);
|
||||
|
||||
int command(char *fmt, ...);
|
||||
@@ -113,7 +113,8 @@ void psabort(int sig);
|
||||
char *hookup(char *host, int port)
|
||||
{
|
||||
register struct hostent *hp = 0;
|
||||
int s,len;
|
||||
int len;
|
||||
SOCKET s;
|
||||
static char hostnamebuf[80];
|
||||
|
||||
bzero((char *)&hisctladdr, sizeof (hisctladdr));
|
||||
@@ -136,7 +137,7 @@ char *hookup(char *host, int port)
|
||||
}
|
||||
hostname = hostnamebuf;
|
||||
s = socket(hisctladdr.sin_family, SOCK_STREAM, 0);
|
||||
if (s < 0) {
|
||||
if (s == INVALID_SOCKET) {
|
||||
perror("ftp: socket");
|
||||
code = -1;
|
||||
return (0);
|
||||
@@ -1327,8 +1328,8 @@ void pswitch(int flag)
|
||||
char name[MAXHOSTNAMELEN];
|
||||
struct sockaddr_in mctl;
|
||||
struct sockaddr_in hctl;
|
||||
FILE *in;
|
||||
FILE *out;
|
||||
SOCKET in;
|
||||
SOCKET out;
|
||||
int tpe;
|
||||
int cpnd;
|
||||
int sunqe;
|
||||
@@ -1371,10 +1372,10 @@ void pswitch(int flag)
|
||||
hisctladdr = op->hctl;
|
||||
ip->mctl = myctladdr;
|
||||
myctladdr = op->mctl;
|
||||
(int) ip->in = cin; // What the hell am I looking at...?
|
||||
cin = (int) op->in;
|
||||
(int) ip->out = cout; // Same again...
|
||||
cout = (int) op->out;
|
||||
ip->in = cin;
|
||||
cin = op->in;
|
||||
ip->out = cout;
|
||||
cout = op->out;
|
||||
ip->tpe = type;
|
||||
type = op->tpe;
|
||||
if (!type)
|
||||
|
@@ -8,6 +8,8 @@ TARGET_NAME = ftp
|
||||
|
||||
TARGET_INSTALLDIR = system32
|
||||
|
||||
TARGET_CFLAGS = -D__USE_W32API
|
||||
|
||||
TARGET_SDKLIBS = ws2_32.a iphlpapi.a
|
||||
# ntdll.a
|
||||
|
||||
|
@@ -8,7 +8,7 @@ TARGET_NAME = ping
|
||||
|
||||
TARGET_INSTALLDIR = system32
|
||||
|
||||
TARGET_CFLAGS = -D__USE_W32_SOCKETS
|
||||
TARGET_CFLAGS = -D__USE_W32API -D__USE_W32_SOCKETS
|
||||
|
||||
TARGET_SDKLIBS = ws2_32.a
|
||||
|
||||
|
@@ -12,7 +12,7 @@ TARGET_SDKLIBS = ws2_32.a iphlpapi.a ntdll.a
|
||||
|
||||
TARGET_OBJECTS = $(TARGET_NAME).o
|
||||
|
||||
TARGET_GCCLIBS =
|
||||
TARGET_CFLAGS = -D__USE_W32API
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
|
@@ -10,7 +10,7 @@ TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = partinfo
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror -Wno-format
|
||||
TARGET_CFLAGS = -D__USE_W32API -Wall -Werror -Wno-format
|
||||
|
||||
TARGET_SDKLIBS = ntdll.a kernel32.a
|
||||
|
||||
|
@@ -8,9 +8,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
//#define DUMP_DATA
|
||||
#define DUMP_SIZE_INFO
|
||||
|
||||
#define UNICODE
|
||||
|
||||
#ifdef DUMP_DATA
|
||||
void HexDump(char *buffer, ULONG size)
|
||||
|
@@ -10,7 +10,7 @@ TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = pnpdump
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror
|
||||
TARGET_CFLAGS = -D__USE_W32API -Wall -Werror
|
||||
|
||||
TARGET_SDKLIBS = ntdll.a kernel32.a
|
||||
|
||||
|
@@ -8,6 +8,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <conio.h>
|
||||
|
||||
#include <ddk/ntddk.h>
|
||||
|
||||
#include <pshpack1.h>
|
||||
|
||||
typedef struct _CM_PNP_BIOS_DEVICE_NODE
|
||||
|
@@ -10,7 +10,7 @@ TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = ps
|
||||
|
||||
TARGET_CFLAGS = -DANONYMOUSUNIONS -Werror -Wall
|
||||
TARGET_CFLAGS = -D__USE_W32API -DANONYMOUSUNIONS -Werror -Wall
|
||||
|
||||
TARGET_SDKLIBS = ntdll.a kernel32.a user32.a
|
||||
|
||||
|
@@ -110,8 +110,8 @@ int main()
|
||||
DWORD r;
|
||||
ANSI_STRING astring;
|
||||
HANDLE stdout = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
PSYSTEM_PROCESSES SystemProcesses = NULL;
|
||||
PSYSTEM_PROCESSES CurrentProcess;
|
||||
PSYSTEM_PROCESS_INFORMATION SystemProcesses = NULL;
|
||||
PSYSTEM_PROCESS_INFORMATION CurrentProcess;
|
||||
ULONG BufferSize, ReturnSize;
|
||||
NTSTATUS Status;
|
||||
char buf[256];
|
||||
@@ -140,7 +140,7 @@ int main()
|
||||
|
||||
/* For every process print the information. */
|
||||
CurrentProcess = SystemProcesses;
|
||||
while (CurrentProcess->NextEntryDelta != 0)
|
||||
while (CurrentProcess->NextEntryOffset != 0)
|
||||
{
|
||||
int hour, hour1, thour, thour1;
|
||||
unsigned char minute, minute1, tmin, tmin1;
|
||||
@@ -159,53 +159,53 @@ int main()
|
||||
minute1 = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL;
|
||||
seconds1 = (ptime.QuadPart / 10000000LL) % 60LL;
|
||||
|
||||
RtlUnicodeStringToAnsiString(&astring, &CurrentProcess->ProcessName, TRUE);
|
||||
RtlUnicodeStringToAnsiString(&astring, &CurrentProcess->ImageName, TRUE);
|
||||
|
||||
wsprintf(buf,"P%8d %8d %3d:%02d:%02d %3d:%02d:%02d ProcName: %s\n",
|
||||
CurrentProcess->ProcessId, CurrentProcess->InheritedFromProcessId,
|
||||
CurrentProcess->UniqueProcessId, CurrentProcess->InheritedFromUniqueProcessId,
|
||||
hour, minute, seconds, hour1, minute1, seconds1,
|
||||
astring.Buffer);
|
||||
WriteFile(stdout, buf, lstrlen(buf), &r, NULL);
|
||||
|
||||
RtlFreeAnsiString(&astring);
|
||||
|
||||
for (ti = 0; ti < CurrentProcess->ThreadCount; ti++)
|
||||
for (ti = 0; ti < CurrentProcess->NumberOfThreads; ti++)
|
||||
{
|
||||
struct status *statt;
|
||||
struct waitres *waitt;
|
||||
char szWindowName[30] = {" "};
|
||||
|
||||
ptime = CurrentProcess->Threads[ti].KernelTime;
|
||||
ptime = CurrentProcess->TH[ti].KernelTime;
|
||||
thour = (ptime.QuadPart / (10000000LL * 3600LL));
|
||||
tmin = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL;
|
||||
tsec = (ptime.QuadPart / 10000000LL) % 60LL;
|
||||
|
||||
ptime = CurrentProcess->Threads[ti].UserTime;
|
||||
ptime = CurrentProcess->TH[ti].UserTime;
|
||||
thour1 = (ptime.QuadPart / (10000000LL * 3600LL));
|
||||
tmin1 = (ptime.QuadPart / (10000000LL * 60LL)) % 60LL;
|
||||
tsec1 = (ptime.QuadPart / 10000000LL) % 60LL;
|
||||
|
||||
statt = thread_stat;
|
||||
while (statt->state != CurrentProcess->Threads[ti].State && statt->state >= 0)
|
||||
while (statt->state != CurrentProcess->TH[ti].ThreadState && statt->state >= 0)
|
||||
statt++;
|
||||
|
||||
waitt = waitreason;
|
||||
while (waitt->state != CurrentProcess->Threads[ti].WaitReason && waitt->state >= 0)
|
||||
while (waitt->state != CurrentProcess->TH[ti].WaitReason && waitt->state >= 0)
|
||||
waitt++;
|
||||
|
||||
wsprintf (buf1,
|
||||
"t% %8d %3d:%02d:%02d %3d:%02d:%02d %s %s\n",
|
||||
CurrentProcess->Threads[ti].ClientId.UniqueThread,
|
||||
CurrentProcess->TH[ti].ClientId.UniqueThread,
|
||||
thour, tmin, tsec, thour1, tmin1, tsec1,
|
||||
statt->desc , waitt->desc);
|
||||
WriteFile(stdout, buf1, lstrlen(buf1), &r, NULL);
|
||||
|
||||
EnumThreadWindows((DWORD)CurrentProcess->Threads[ti].ClientId.UniqueThread,
|
||||
EnumThreadWindows((DWORD)CurrentProcess->TH[ti].ClientId.UniqueThread,
|
||||
(ENUMWINDOWSPROC) EnumThreadProc,
|
||||
(LPARAM)(LPTSTR) szWindowName );
|
||||
}
|
||||
CurrentProcess = (PSYSTEM_PROCESSES)((ULONG_PTR)CurrentProcess +
|
||||
CurrentProcess->NextEntryDelta);
|
||||
CurrentProcess = (PSYSTEM_PROCESS_INFORMATION)((ULONG_PTR)CurrentProcess +
|
||||
CurrentProcess->NextEntryOffset);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ TARGET_INSTALLDIR = system32
|
||||
|
||||
TARGET_NAME = sc
|
||||
|
||||
TARGET_CFLAGS = -DDBG -Werror -Wall
|
||||
TARGET_CFLAGS = -D__USE_W32API -DDBG -Werror -Wall
|
||||
|
||||
TARGET_SDKLIBS = kernel32.a ntdll.a advapi32.a
|
||||
|
||||
|
949
reactos/apps/utils/winetest/config.h
Normal file
949
reactos/apps/utils/winetest/config.h
Normal file
@@ -0,0 +1,949 @@
|
||||
/* include/config.h. Generated by configure. */
|
||||
/* include/config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
#define __WINE_CONFIG_H
|
||||
|
||||
/* Specifies the compiler flag that forces a short wchar_t */
|
||||
#define CC_FLAG_SHORT_WCHAR "-fshort-wchar"
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
/* #undef CRAY_STACKSEG_END */
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
/* #undef C_ALLOCA */
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#define HAVE_ALLOCA 1
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
/* #undef HAVE_ALLOCA_H */
|
||||
|
||||
/* Define if you have ALSA 1.x including devel headers */
|
||||
/* #undef HAVE_ALSA */
|
||||
|
||||
/* Define to 1 if you have the <alsa/asoundlib.h> header file. */
|
||||
/* #undef HAVE_ALSA_ASOUNDLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
/* #undef HAVE_ARPA_INET_H */
|
||||
|
||||
/* Define to 1 if you have the <arpa/nameser.h> header file. */
|
||||
/* #undef HAVE_ARPA_NAMESER_H */
|
||||
|
||||
/* Define if you have ARTS sound server */
|
||||
/* #undef HAVE_ARTS */
|
||||
|
||||
/* Define if the assembler keyword .size is accepted */
|
||||
/* #undef HAVE_ASM_DOT_SIZE */
|
||||
|
||||
/* Define to 1 if you have the <audio/audiolib.h> header file. */
|
||||
/* #undef HAVE_AUDIO_AUDIOLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <audio/soundlib.h> header file. */
|
||||
/* #undef HAVE_AUDIO_SOUNDLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <capi20.h> header file. */
|
||||
/* #undef HAVE_CAPI20_H */
|
||||
|
||||
/* Define if you have capi4linux libs and headers */
|
||||
/* #undef HAVE_CAPI4LINUX */
|
||||
|
||||
/* Define to 1 if you have the `chsize' function. */
|
||||
#define HAVE_CHSIZE 1
|
||||
|
||||
/* Define to 1 if you have the `clone' function. */
|
||||
/* #undef HAVE_CLONE */
|
||||
|
||||
/* Define to 1 if you have the `connect' function. */
|
||||
/* #undef HAVE_CONNECT */
|
||||
|
||||
/* Define if we have linux/input.h AND it contains the INPUT event API */
|
||||
/* #undef HAVE_CORRECT_LINUXINPUT_H */
|
||||
|
||||
/* Define to 1 if you have the <cups/cups.h> header file. */
|
||||
/* #undef HAVE_CUPS_CUPS_H */
|
||||
|
||||
/* Define to 1 if you have the <curses.h> header file. */
|
||||
/* #undef HAVE_CURSES_H */
|
||||
|
||||
/* Define to 1 if you have the <direct.h> header file. */
|
||||
#define HAVE_DIRECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
/* #undef HAVE_DLFCN_H */
|
||||
|
||||
/* Define if you have dlopen */
|
||||
/* #undef HAVE_DLOPEN */
|
||||
|
||||
/* Define to 1 if you have the <elf.h> header file. */
|
||||
/* #undef HAVE_ELF_H */
|
||||
|
||||
/* Define to 1 if you have the `epoll_create' function. */
|
||||
/* #undef HAVE_EPOLL_CREATE */
|
||||
|
||||
/* Define to 1 if you have the `ffs' function. */
|
||||
/* #undef HAVE_FFS */
|
||||
|
||||
/* Define to 1 if you have the `finite' function. */
|
||||
#define HAVE_FINITE 1
|
||||
|
||||
/* Define to 1 if you have the <float.h> header file. */
|
||||
#define HAVE_FLOAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <fontconfig/fontconfig.h> header file. */
|
||||
/* #undef HAVE_FONTCONFIG_FONTCONFIG_H */
|
||||
|
||||
/* Define to 1 if you have the `fork' function. */
|
||||
/* #undef HAVE_FORK */
|
||||
|
||||
/* Define to 1 if you have the `fpclass' function. */
|
||||
#define HAVE_FPCLASS 1
|
||||
|
||||
/* Define if FreeType 2 is installed */
|
||||
/* #undef HAVE_FREETYPE */
|
||||
|
||||
/* Define to 1 if you have the <freetype/freetype.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FREETYPE_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ftglyph.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTGLYPH_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ftnames.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTNAMES_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ftoutln.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTOUTLN_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ftsnames.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTSNAMES_H */
|
||||
|
||||
/* Define if you have the <freetype/fttrigon.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTTRIGON_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ftwinfnt.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_FTWINFNT_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/internal/sfnt.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_INTERNAL_SFNT_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/ttnameid.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_TTNAMEID_H */
|
||||
|
||||
/* Define to 1 if you have the <freetype/tttables.h> header file. */
|
||||
/* #undef HAVE_FREETYPE_TTTABLES_H */
|
||||
|
||||
/* Define to 1 if the system has the type `fsblkcnt_t'. */
|
||||
/* #undef HAVE_FSBLKCNT_T */
|
||||
|
||||
/* Define to 1 if the system has the type `fsfilcnt_t'. */
|
||||
/* #undef HAVE_FSFILCNT_T */
|
||||
|
||||
/* Define to 1 if you have the `fstatfs' function. */
|
||||
/* #undef HAVE_FSTATFS */
|
||||
|
||||
/* Define to 1 if you have the `fstatvfs' function. */
|
||||
/* #undef HAVE_FSTATVFS */
|
||||
|
||||
/* Define to 1 if you have the <ft2build.h> header file. */
|
||||
/* #undef HAVE_FT2BUILD_H */
|
||||
|
||||
/* Define to 1 if you have the `ftruncate' function. */
|
||||
#define HAVE_FTRUNCATE 1
|
||||
|
||||
/* Define to 1 if you have the `futimes' function. */
|
||||
/* #undef HAVE_FUTIMES */
|
||||
|
||||
/* Define to 1 if you have the `gethostbyname' function. */
|
||||
/* #undef HAVE_GETHOSTBYNAME */
|
||||
|
||||
/* Define to 1 if you have the `getnetbyname' function. */
|
||||
/* #undef HAVE_GETNETBYNAME */
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#define HAVE_GETOPT_H 1
|
||||
|
||||
/* Define to 1 if you have the `getopt_long' function. */
|
||||
#define HAVE_GETOPT_LONG 1
|
||||
|
||||
/* Define to 1 if you have the `getpagesize' function. */
|
||||
#define HAVE_GETPAGESIZE 1
|
||||
|
||||
/* Define to 1 if you have the `getprotobyname' function. */
|
||||
/* #undef HAVE_GETPROTOBYNAME */
|
||||
|
||||
/* Define to 1 if you have the `getprotobynumber' function. */
|
||||
/* #undef HAVE_GETPROTOBYNUMBER */
|
||||
|
||||
/* Define to 1 if you have the `getpwuid' function. */
|
||||
/* #undef HAVE_GETPWUID */
|
||||
|
||||
/* Define to 1 if you have the `getservbyport' function. */
|
||||
/* #undef HAVE_GETSERVBYPORT */
|
||||
|
||||
/* Define to 1 if you have the `gettid' function. */
|
||||
/* #undef HAVE_GETTID */
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
/* #undef HAVE_GETTIMEOFDAY */
|
||||
|
||||
/* Define to 1 if you have the `getuid' function. */
|
||||
/* #undef HAVE_GETUID */
|
||||
|
||||
/* Define to 1 if you have the <gif_lib.h> header file. */
|
||||
/* #undef HAVE_GIF_LIB_H */
|
||||
|
||||
/* Define to 1 if you have the <GL/glext.h> header file. */
|
||||
/* #undef HAVE_GL_GLEXT_H */
|
||||
|
||||
/* Define to 1 if you have the <GL/glx.h> header file. */
|
||||
/* #undef HAVE_GL_GLX_H */
|
||||
|
||||
/* Define to 1 if you have the <GL/gl.h> header file. */
|
||||
/* #undef HAVE_GL_GL_H */
|
||||
|
||||
/* Define to 1 if the ICU libraries are installed */
|
||||
/* #undef HAVE_ICU */
|
||||
|
||||
/* Define to 1 if you have the <ieeefp.h> header file. */
|
||||
/* #undef HAVE_IEEEFP_H */
|
||||
|
||||
/* Define to 1 if you have the `inet_aton' function. */
|
||||
/* #undef HAVE_INET_ATON */
|
||||
|
||||
/* Define to 1 if you have the `inet_network' function. */
|
||||
/* #undef HAVE_INET_NETWORK */
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <io.h> header file. */
|
||||
#define HAVE_IO_H 1
|
||||
|
||||
/* Define if IPX should use netipx/ipx.h from libc */
|
||||
/* #undef HAVE_IPX_GNU */
|
||||
|
||||
/* Define if IPX includes are taken from Linux kernel */
|
||||
/* #undef HAVE_IPX_LINUX */
|
||||
|
||||
/* Define to 1 if you have the `iswalnum' function. */
|
||||
#define HAVE_ISWALNUM 1
|
||||
|
||||
/* Define to 1 if you have the <jack/jack.h> header file. */
|
||||
/* #undef HAVE_JACK_JACK_H */
|
||||
|
||||
/* Define to 1 if you have the <jpeglib.h> header file. */
|
||||
/* #undef HAVE_JPEGLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <lcms.h> header file. */
|
||||
/* #undef HAVE_LCMS_H */
|
||||
|
||||
/* Define to 1 if you have the <lcms/lcms.h> header file. */
|
||||
/* #undef HAVE_LCMS_LCMS_H */
|
||||
|
||||
/* Define if you have libaudioIO */
|
||||
/* #undef HAVE_LIBAUDIOIO */
|
||||
|
||||
/* Define to 1 if you have the <libaudioio.h> header file. */
|
||||
/* #undef HAVE_LIBAUDIOIO_H */
|
||||
|
||||
/* Define if you have the curses library (-lcurses) */
|
||||
/* #undef HAVE_LIBCURSES */
|
||||
|
||||
/* Define to 1 if you have the `i386' library (-li386). */
|
||||
/* #undef HAVE_LIBI386 */
|
||||
|
||||
/* Define if you have the ncurses library (-lncurses) */
|
||||
/* #undef HAVE_LIBNCURSES */
|
||||
|
||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||
/* #undef HAVE_LIBNSL */
|
||||
|
||||
/* Define to 1 if you have the `ossaudio' library (-lossaudio). */
|
||||
/* #undef HAVE_LIBOSSAUDIO */
|
||||
|
||||
/* Define to 1 if you have the `poll' library (-lpoll). */
|
||||
/* #undef HAVE_LIBPOLL */
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
/* #undef HAVE_LIBRESOLV */
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
/* #undef HAVE_LIBSOCKET */
|
||||
|
||||
/* Define to 1 if you have the `w' library (-lw). */
|
||||
/* #undef HAVE_LIBW */
|
||||
|
||||
/* Define to 1 if you have the `xpg4' library (-lxpg4). */
|
||||
/* #undef HAVE_LIBXPG4 */
|
||||
|
||||
/* Define if you have the Xrandr library */
|
||||
/* #undef HAVE_LIBXRANDR */
|
||||
|
||||
/* Define if you have the X Shape extension */
|
||||
/* #undef HAVE_LIBXSHAPE */
|
||||
|
||||
/* Define if you have the Xxf86dga library version 2 */
|
||||
/* #undef HAVE_LIBXXF86DGA2 */
|
||||
|
||||
/* Define if you have the Xxf86vm library */
|
||||
/* #undef HAVE_LIBXXF86VM */
|
||||
|
||||
/* Define if you have the X Shm extension */
|
||||
/* #undef HAVE_LIBXXSHM */
|
||||
|
||||
/* Define to 1 if you have the <link.h> header file. */
|
||||
/* #undef HAVE_LINK_H */
|
||||
|
||||
/* Define if <linux/joystick.h> defines the Linux 2.2 joystick API */
|
||||
/* #undef HAVE_LINUX_22_JOYSTICK_API */
|
||||
|
||||
/* Define to 1 if you have the <linux/capi.h> header file. */
|
||||
/* #undef HAVE_LINUX_CAPI_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/cdrom.h> header file. */
|
||||
/* #undef HAVE_LINUX_CDROM_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/compiler.h> header file. */
|
||||
/* #undef HAVE_LINUX_COMPILER_H */
|
||||
|
||||
/* Define if Linux-style gethostbyname_r and gethostbyaddr_r are available */
|
||||
/* #undef HAVE_LINUX_GETHOSTBYNAME_R_6 */
|
||||
|
||||
/* Define to 1 if you have the <linux/hdreg.h> header file. */
|
||||
/* #undef HAVE_LINUX_HDREG_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/input.h> header file. */
|
||||
/* #undef HAVE_LINUX_INPUT_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/ioctl.h> header file. */
|
||||
/* #undef HAVE_LINUX_IOCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/joystick.h> header file. */
|
||||
/* #undef HAVE_LINUX_JOYSTICK_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/major.h> header file. */
|
||||
/* #undef HAVE_LINUX_MAJOR_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/param.h> header file. */
|
||||
/* #undef HAVE_LINUX_PARAM_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/serial.h> header file. */
|
||||
/* #undef HAVE_LINUX_SERIAL_H */
|
||||
|
||||
/* Define to 1 if you have the <linux/ucdrom.h> header file. */
|
||||
/* #undef HAVE_LINUX_UCDROM_H */
|
||||
|
||||
/* Define to 1 if the system has the type `long long'. */
|
||||
#define HAVE_LONG_LONG 1
|
||||
|
||||
/* Define to 1 if you have the `lstat' function. */
|
||||
/* #undef HAVE_LSTAT */
|
||||
|
||||
/* Define to 1 if you have the <machine/cpu.h> header file. */
|
||||
/* #undef HAVE_MACHINE_CPU_H */
|
||||
|
||||
/* Define to 1 if you have the <machine/soundcard.h> header file. */
|
||||
/* #undef HAVE_MACHINE_SOUNDCARD_H */
|
||||
|
||||
/* Define to 1 if you have the `memmove' function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mmap' function. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define to 1 if you have the <mntent.h> header file. */
|
||||
/* #undef HAVE_MNTENT_H */
|
||||
|
||||
/* Define to 1 if the system has the type `mode_t'. */
|
||||
#define HAVE_MODE_T 1
|
||||
|
||||
/* Define if you have NAS including devel headers */
|
||||
/* #undef HAVE_NAS */
|
||||
|
||||
/* Define to 1 if you have the <ncurses.h> header file. */
|
||||
/* #undef HAVE_NCURSES_H */
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
/* #undef HAVE_NETDB_H */
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
/* #undef HAVE_NETINET_IN_H */
|
||||
|
||||
/* Define to 1 if you have the <netinet/in_systm.h> header file. */
|
||||
/* #undef HAVE_NETINET_IN_SYSTM_H */
|
||||
|
||||
/* Define to 1 if you have the <netinet/tcp_fsm.h> header file. */
|
||||
/* #undef HAVE_NETINET_TCP_FSM_H */
|
||||
|
||||
/* Define to 1 if you have the <netinet/tcp.h> header file. */
|
||||
/* #undef HAVE_NETINET_TCP_H */
|
||||
|
||||
/* Define to 1 if you have the <net/if_arp.h> header file. */
|
||||
/* #undef HAVE_NET_IF_ARP_H */
|
||||
|
||||
/* Define to 1 if you have the <net/if_dl.h> header file. */
|
||||
/* #undef HAVE_NET_IF_DL_H */
|
||||
|
||||
/* Define to 1 if you have the <net/if.h> header file. */
|
||||
/* #undef HAVE_NET_IF_H */
|
||||
|
||||
/* Define to 1 if you have the <net/if_types.h> header file. */
|
||||
/* #undef HAVE_NET_IF_TYPES_H */
|
||||
|
||||
/* Define to 1 if you have the <net/route.h> header file. */
|
||||
/* #undef HAVE_NET_ROUTE_H */
|
||||
|
||||
/* Define to 1 if the system has the type `off_t'. */
|
||||
#define HAVE_OFF_T 1
|
||||
|
||||
/* Define if OpenGL is present on the system */
|
||||
/* #undef HAVE_OPENGL */
|
||||
|
||||
/* Define to 1 if you have the <openssl/ssl.h> header file. */
|
||||
/* #undef HAVE_OPENSSL_SSL_H */
|
||||
|
||||
/* Define if you have the Open Sound system */
|
||||
/* #undef HAVE_OSS */
|
||||
|
||||
/* Define if you have the Open Sound system (MIDI interface) */
|
||||
/* #undef HAVE_OSS_MIDI */
|
||||
|
||||
/* Define to 1 if you have the `pclose' function. */
|
||||
#define HAVE_PCLOSE 1
|
||||
|
||||
/* Define to 1 if the system has the type `pid_t'. */
|
||||
#define HAVE_PID_T 1
|
||||
|
||||
/* Define to 1 if you have the `popen' function. */
|
||||
#define HAVE_POPEN 1
|
||||
|
||||
/* Define if we can use ppdev.h for parallel port access */
|
||||
/* #undef HAVE_PPDEV */
|
||||
|
||||
/* Define to 1 if you have the `pread' function. */
|
||||
/* #undef HAVE_PREAD */
|
||||
|
||||
/* Define to 1 if you have the <process.h> header file. */
|
||||
#define HAVE_PROCESS_H 1
|
||||
|
||||
/* Define to 1 if you have the `pthread_getattr_np' function. */
|
||||
/* #undef HAVE_PTHREAD_GETATTR_NP */
|
||||
|
||||
/* Define to 1 if you have the `pthread_get_stackaddr_np' function. */
|
||||
/* #undef HAVE_PTHREAD_GET_STACKADDR_NP */
|
||||
|
||||
/* Define to 1 if you have the `pthread_get_stacksize_np' function. */
|
||||
/* #undef HAVE_PTHREAD_GET_STACKSIZE_NP */
|
||||
|
||||
/* Define to 1 if you have the <pthread.h> header file. */
|
||||
/* #undef HAVE_PTHREAD_H */
|
||||
|
||||
/* Define to 1 if the system has the type `pthread_rwlockattr_t'. */
|
||||
/* #undef HAVE_PTHREAD_RWLOCKATTR_T */
|
||||
|
||||
/* Define to 1 if the system has the type `pthread_rwlock_t'. */
|
||||
/* #undef HAVE_PTHREAD_RWLOCK_T */
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
/* #undef HAVE_PWD_H */
|
||||
|
||||
/* Define to 1 if you have the `pwrite' function. */
|
||||
/* #undef HAVE_PWRITE */
|
||||
|
||||
/* Define to 1 if you have the `readlink' function. */
|
||||
/* #undef HAVE_READLINK */
|
||||
|
||||
/* Define to 1 if you have the <regex.h> header file. */
|
||||
/* #undef HAVE_REGEX_H */
|
||||
|
||||
/* Define to 1 if you have the <resolv.h> header file. */
|
||||
/* #undef HAVE_RESOLV_H */
|
||||
|
||||
/* Define to 1 if you have the `rfork' function. */
|
||||
/* #undef HAVE_RFORK */
|
||||
|
||||
/* Define if we have SANE development environment */
|
||||
/* #undef HAVE_SANE */
|
||||
|
||||
/* Define to 1 if you have the <sched.h> header file. */
|
||||
/* #undef HAVE_SCHED_H */
|
||||
|
||||
/* Define to 1 if you have the `sched_yield' function. */
|
||||
/* #undef HAVE_SCHED_YIELD */
|
||||
|
||||
/* Define to 1 if you have the <scsi/scsi.h> header file. */
|
||||
/* #undef HAVE_SCSI_SCSI_H */
|
||||
|
||||
/* Define to 1 if you have the <scsi/scsi_ioctl.h> header file. */
|
||||
/* #undef HAVE_SCSI_SCSI_IOCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <scsi/sg.h> header file. */
|
||||
/* #undef HAVE_SCSI_SG_H */
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
/* #undef HAVE_SELECT */
|
||||
|
||||
/* Define to 1 if you have the `sendmsg' function. */
|
||||
/* #undef HAVE_SENDMSG */
|
||||
|
||||
/* Define to 1 if you have the `settimeofday' function. */
|
||||
/* #undef HAVE_SETTIMEOFDAY */
|
||||
|
||||
/* Define if sigaddset is supported */
|
||||
/* #undef HAVE_SIGADDSET */
|
||||
|
||||
/* Define to 1 if you have the `sigaltstack' function. */
|
||||
/* #undef HAVE_SIGALTSTACK */
|
||||
|
||||
/* Define to 1 if `si_fd' is member of `siginfo_t'. */
|
||||
/* #undef HAVE_SIGINFO_T_SI_FD */
|
||||
|
||||
/* Define to 1 if you have the `sigprocmask' function. */
|
||||
/* #undef HAVE_SIGPROCMASK */
|
||||
|
||||
/* Define to 1 if you have the sigsetjmp (and siglongjmp) function */
|
||||
/* #undef HAVE_SIGSETJMP */
|
||||
|
||||
/* Define to 1 if the system has the type `sigset_t'. */
|
||||
/* #undef HAVE_SIGSET_T */
|
||||
|
||||
/* Define to 1 if the system has the type `size_t'. */
|
||||
#define HAVE_SIZE_T 1
|
||||
|
||||
/* Define to 1 if you have the `snprintf' function. */
|
||||
#define HAVE_SNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the <soundcard.h> header file. */
|
||||
/* #undef HAVE_SOUNDCARD_H */
|
||||
|
||||
/* Define to 1 if you have the `spawnvp' function. */
|
||||
#define HAVE_SPAWNVP 1
|
||||
|
||||
/* Define to 1 if the system has the type `ssize_t'. */
|
||||
#define HAVE_SSIZE_T 1
|
||||
|
||||
/* Define to 1 if you have the `statfs' function. */
|
||||
/* #undef HAVE_STATFS */
|
||||
|
||||
/* Define to 1 if you have the `statvfs' function. */
|
||||
/* #undef HAVE_STATVFS */
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strcasecmp' function. */
|
||||
#define HAVE_STRCASECMP 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strncasecmp' function. */
|
||||
#define HAVE_STRNCASECMP 1
|
||||
|
||||
/* Define to 1 if `msg_accrights' is member of `struct msghdr'. */
|
||||
/* #undef HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS */
|
||||
|
||||
/* Define to 1 if `name' is member of `struct option'. */
|
||||
#define HAVE_STRUCT_OPTION_NAME 1
|
||||
|
||||
/* Define to 1 if `sa_len' is member of `struct sockaddr'. */
|
||||
/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
|
||||
|
||||
/* Define to 1 if `sun_len' is member of `struct sockaddr_un'. */
|
||||
/* #undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN */
|
||||
|
||||
/* Define to 1 if `f_bavail' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_BAVAIL */
|
||||
|
||||
/* Define to 1 if `f_bfree' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_BFREE */
|
||||
|
||||
/* Define to 1 if `f_favail' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_FAVAIL */
|
||||
|
||||
/* Define to 1 if `f_ffree' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_FFREE */
|
||||
|
||||
/* Define to 1 if `f_frsize' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_FRSIZE */
|
||||
|
||||
/* Define to 1 if `f_namelen' is member of `struct statfs'. */
|
||||
/* #undef HAVE_STRUCT_STATFS_F_NAMELEN */
|
||||
|
||||
/* Define to 1 if `f_blocks' is member of `struct statvfs'. */
|
||||
/* #undef HAVE_STRUCT_STATVFS_F_BLOCKS */
|
||||
|
||||
/* Define to 1 if `st_blocks' is member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_BLOCKS */
|
||||
|
||||
/* Define to 1 if you have the <syscall.h> header file. */
|
||||
/* #undef HAVE_SYSCALL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/asoundlib.h> header file. */
|
||||
/* #undef HAVE_SYS_ASOUNDLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/cdio.h> header file. */
|
||||
/* #undef HAVE_SYS_CDIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/elf32.h> header file. */
|
||||
/* #undef HAVE_SYS_ELF32_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/epoll.h> header file. */
|
||||
/* #undef HAVE_SYS_EPOLL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/errno.h> header file. */
|
||||
/* #undef HAVE_SYS_ERRNO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/exec_elf.h> header file. */
|
||||
/* #undef HAVE_SYS_EXEC_ELF_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/filio.h> header file. */
|
||||
/* #undef HAVE_SYS_FILIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ioctl.h> header file. */
|
||||
/* #undef HAVE_SYS_IOCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ipc.h> header file. */
|
||||
/* #undef HAVE_SYS_IPC_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/link.h> header file. */
|
||||
/* #undef HAVE_SYS_LINK_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/lwp.h> header file. */
|
||||
/* #undef HAVE_SYS_LWP_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/mman.h> header file. */
|
||||
/* #undef HAVE_SYS_MMAN_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/modem.h> header file. */
|
||||
/* #undef HAVE_SYS_MODEM_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/mount.h> header file. */
|
||||
/* #undef HAVE_SYS_MOUNT_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/msg.h> header file. */
|
||||
/* #undef HAVE_SYS_MSG_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/poll.h> header file. */
|
||||
/* #undef HAVE_SYS_POLL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ptrace.h> header file. */
|
||||
/* #undef HAVE_SYS_PTRACE_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/reg.h> header file. */
|
||||
/* #undef HAVE_SYS_REG_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/scsiio.h> header file. */
|
||||
/* #undef HAVE_SYS_SCSIIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/shm.h> header file. */
|
||||
/* #undef HAVE_SYS_SHM_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/signal.h> header file. */
|
||||
/* #undef HAVE_SYS_SIGNAL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
/* #undef HAVE_SYS_SOCKET_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
/* #undef HAVE_SYS_SOCKIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/soundcard.h> header file. */
|
||||
/* #undef HAVE_SYS_SOUNDCARD_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/statfs.h> header file. */
|
||||
/* #undef HAVE_SYS_STATFS_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/statvfs.h> header file. */
|
||||
/* #undef HAVE_SYS_STATVFS_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/strtio.h> header file. */
|
||||
/* #undef HAVE_SYS_STRTIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/syscall.h> header file. */
|
||||
/* #undef HAVE_SYS_SYSCALL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/sysctl.h> header file. */
|
||||
/* #undef HAVE_SYS_SYSCTL_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/times.h> header file. */
|
||||
/* #undef HAVE_SYS_TIMES_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||
/* #undef HAVE_SYS_UIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/un.h> header file. */
|
||||
/* #undef HAVE_SYS_UN_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/user.h> header file. */
|
||||
/* #undef HAVE_SYS_USER_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/vfs.h> header file. */
|
||||
/* #undef HAVE_SYS_VFS_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/vm86.h> header file. */
|
||||
/* #undef HAVE_SYS_VM86_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/wait.h> header file. */
|
||||
/* #undef HAVE_SYS_WAIT_H */
|
||||
|
||||
/* Define to 1 if you have the `tcgetattr' function. */
|
||||
/* #undef HAVE_TCGETATTR */
|
||||
|
||||
/* Define to 1 if you have the <termios.h> header file. */
|
||||
/* #undef HAVE_TERMIOS_H */
|
||||
|
||||
/* Define to 1 if you have the `timegm' function. */
|
||||
/* #undef HAVE_TIMEGM */
|
||||
|
||||
/* Define to 1 if you have the <ucontext.h> header file. */
|
||||
/* #undef HAVE_UCONTEXT_H */
|
||||
|
||||
/* Define to 1 if you have the <unicode/ubidi.h> header file. */
|
||||
/* #undef HAVE_UNICODE_UBIDI_H */
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `usleep' function. */
|
||||
/* #undef HAVE_USLEEP */
|
||||
|
||||
/* Define to 1 if you have the <utime.h> header file. */
|
||||
#define HAVE_UTIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <valgrind/memcheck.h> header file. */
|
||||
/* #undef HAVE_VALGRIND_MEMCHECK_H */
|
||||
|
||||
/* Define if we have va_copy */
|
||||
#define HAVE_VA_COPY 1
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `wait4' function. */
|
||||
/* #undef HAVE_WAIT4 */
|
||||
|
||||
/* Define to 1 if you have the `waitpid' function. */
|
||||
/* #undef HAVE_WAITPID */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/shape.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_SHAPE_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/xf86dga.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XF86DGA_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/xf86vmode.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XF86VMODE_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/XInput.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XINPUT_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/Xrandr.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XRANDR_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/Xrender.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XRENDER_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/extensions/XShm.h> header file. */
|
||||
/* #undef HAVE_X11_EXTENSIONS_XSHM_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/XKBlib.h> header file. */
|
||||
/* #undef HAVE_X11_XKBLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/Xlib.h> header file. */
|
||||
/* #undef HAVE_X11_XLIB_H */
|
||||
|
||||
/* Define to 1 if you have the <X11/Xutil.h> header file. */
|
||||
/* #undef HAVE_X11_XUTIL_H */
|
||||
|
||||
/* Define if you have the XKB extension */
|
||||
/* #undef HAVE_XKB */
|
||||
|
||||
/* Define if Xrender has the XRenderSetPictureTransform function */
|
||||
/* #undef HAVE_XRENDERSETPICTURETRANSFORM */
|
||||
|
||||
/* Define to 1 if you have the `_lwp_create' function. */
|
||||
/* #undef HAVE__LWP_CREATE */
|
||||
|
||||
/* Define to 1 if you have the `_lwp_self' function. */
|
||||
/* #undef HAVE__LWP_SELF */
|
||||
|
||||
/* Define to 1 if you have the `_pclose' function. */
|
||||
#define HAVE__PCLOSE 1
|
||||
|
||||
/* Define to 1 if you have the `_popen' function. */
|
||||
#define HAVE__POPEN 1
|
||||
|
||||
/* Define to 1 if you have the `_snprintf' function. */
|
||||
#define HAVE__SNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `_spawnvp' function. */
|
||||
#define HAVE__SPAWNVP 1
|
||||
|
||||
/* Define to 1 if you have the `_stricmp' function. */
|
||||
#define HAVE__STRICMP 1
|
||||
|
||||
/* Define to 1 if you have the `_strnicmp' function. */
|
||||
#define HAVE__STRNICMP 1
|
||||
|
||||
/* Define to 1 if you have the `_vsnprintf' function. */
|
||||
#define HAVE__VSNPRINTF 1
|
||||
|
||||
/* Define if we have __va_copy */
|
||||
#define HAVE___VA_COPY 1
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "wine-devel@winehq.org"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "Wine"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "Wine 20050211"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "wine"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "20050211"
|
||||
|
||||
/* Define to the soname of the libcapi20 library. */
|
||||
/* #undef SONAME_LIBCAPI20 */
|
||||
|
||||
/* Define to the soname of the libcrypto library. */
|
||||
/* #undef SONAME_LIBCRYPTO */
|
||||
|
||||
/* Define to the soname of the libcups library. */
|
||||
/* #undef SONAME_LIBCUPS */
|
||||
|
||||
/* Define to the soname of the libcurses library. */
|
||||
/* #undef SONAME_LIBCURSES */
|
||||
|
||||
/* Define to the soname of the libfontconfig library. */
|
||||
/* #undef SONAME_LIBFONTCONFIG */
|
||||
|
||||
/* Define to the soname of the libfreetype library. */
|
||||
/* #undef SONAME_LIBFREETYPE */
|
||||
|
||||
/* Define to the soname of the libgif library. */
|
||||
/* #undef SONAME_LIBGIF */
|
||||
|
||||
/* Define to the soname of the libGL library. */
|
||||
/* #undef SONAME_LIBGL */
|
||||
|
||||
/* Define to the soname of the libjack library. */
|
||||
/* #undef SONAME_LIBJACK */
|
||||
|
||||
/* Define to the soname of the libjpeg library. */
|
||||
/* #undef SONAME_LIBJPEG */
|
||||
|
||||
/* Define to the soname of the liblcms library. */
|
||||
/* #undef SONAME_LIBLCMS */
|
||||
|
||||
/* Define to the soname of the libncurses library. */
|
||||
/* #undef SONAME_LIBNCURSES */
|
||||
|
||||
/* Define to the soname of the libssl library. */
|
||||
/* #undef SONAME_LIBSSL */
|
||||
|
||||
/* Define to the soname of the libtxc_dxtn library. */
|
||||
/* #undef SONAME_LIBTXC_DXTN */
|
||||
|
||||
/* Define to the soname of the libungif library. */
|
||||
/* #undef SONAME_LIBUNGIF */
|
||||
|
||||
/* Define to the soname of the libX11 library. */
|
||||
/* #undef SONAME_LIBX11 */
|
||||
|
||||
/* Define to the soname of the libXext library. */
|
||||
/* #undef SONAME_LIBXEXT */
|
||||
|
||||
/* Define to the soname of the libXi library. */
|
||||
/* #undef SONAME_LIBXI */
|
||||
|
||||
/* Define to the soname of the libXrandr library. */
|
||||
/* #undef SONAME_LIBXRANDR */
|
||||
|
||||
/* Define to the soname of the libXrender library. */
|
||||
/* #undef SONAME_LIBXRENDER */
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
/* #undef STACK_DIRECTION */
|
||||
|
||||
/* Define if the struct statfs is defined by <sys/mount.h> */
|
||||
/* #undef STATFS_DEFINED_BY_SYS_MOUNT */
|
||||
|
||||
/* Define if the struct statfs is defined by <sys/statfs.h> */
|
||||
/* #undef STATFS_DEFINED_BY_SYS_STATFS */
|
||||
|
||||
/* Define if the struct statfs is defined by <sys/vfs.h> */
|
||||
/* #undef STATFS_DEFINED_BY_SYS_VFS */
|
||||
|
||||
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if the X Window System is missing or not being used. */
|
||||
#define X_DISPLAY_MISSING 1
|
||||
|
||||
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
|
||||
`char[]'. */
|
||||
#define YYTEXT_POINTER 1
|
||||
|
||||
/* Set this to 64 to enable 64-bit file support on Linux */
|
||||
/* #undef _FILE_OFFSET_BITS */
|
||||
|
||||
/* Define to a macro to generate an assembly function directive */
|
||||
#define __ASM_FUNC(name) ".def " __ASM_NAME(name) "; .scl 2; .type 32; .endef"
|
||||
|
||||
/* Define to a macro to generate an assembly name from a C symbol */
|
||||
#define __ASM_NAME(name) "_" name
|
||||
|
||||
/* Define to the assembler keyword used to specify a word value */
|
||||
#define __ASM_SHORT ".short"
|
||||
|
||||
/* Define to the assembler keyword used to specify an ASCII string */
|
||||
#define __ASM_STRING ".string"
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
@@ -1,27 +1,25 @@
|
||||
/* Definitions for the VERsion infolibrary (VER.DLL)
|
||||
*
|
||||
* Copyright 1996 Marcus Meissner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Marked as obsolete: Albert den Haan (Corel Corp) 1999-04-28
|
||||
* VER.H obsolete, include winver.h instead
|
||||
*/
|
||||
#ifndef __WINE_VER_H
|
||||
#define __WINE_VER_H
|
||||
|
||||
#include <winver.h>
|
||||
|
||||
#endif /* __WINE_VER_H */
|
||||
/*
|
||||
* Resources for the binary we distribute to testers
|
||||
*
|
||||
* Copyright 2004 Ferenc Wagner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "winetest.rc"
|
||||
|
||||
WINE_BUILD STRINGRES "build.id"
|
||||
BUILD_INFO STRINGRES "build.nfo"
|
||||
TESTS_URL STRINGRES "tests.url"
|
473
reactos/apps/utils/winetest/gui.c
Normal file
473
reactos/apps/utils/winetest/gui.c
Normal file
@@ -0,0 +1,473 @@
|
||||
/*
|
||||
* GUI support
|
||||
*
|
||||
* Copyright 2004 Ferenc Wagner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "resource.h"
|
||||
#include "winetest.h"
|
||||
|
||||
/* Event object to signal successful window creation to main thread.
|
||||
*/
|
||||
HANDLE initEvent;
|
||||
|
||||
/* Dialog handle
|
||||
*/
|
||||
HWND dialog;
|
||||
|
||||
/* Progress data for the text* functions and for scaling.
|
||||
*/
|
||||
unsigned int progressMax, progressCurr;
|
||||
double progressScale;
|
||||
|
||||
/* Progress group counter for the gui* functions.
|
||||
*/
|
||||
int progressGroup;
|
||||
|
||||
char *
|
||||
renderString (va_list ap)
|
||||
{
|
||||
const char *fmt = va_arg (ap, char*);
|
||||
static char buffer[128];
|
||||
|
||||
vsnprintf (buffer, sizeof buffer, fmt, ap);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
int
|
||||
MBdefault (int uType)
|
||||
{
|
||||
static const int matrix[][4] = {{IDOK, 0, 0, 0},
|
||||
{IDOK, IDCANCEL, 0, 0},
|
||||
{IDABORT, IDRETRY, IDIGNORE, 0},
|
||||
{IDYES, IDNO, IDCANCEL, 0},
|
||||
{IDYES, IDNO, 0, 0},
|
||||
{IDRETRY, IDCANCEL, 0, 0}};
|
||||
int type = uType & MB_TYPEMASK;
|
||||
int def = (uType & MB_DEFMASK) / MB_DEFBUTTON2;
|
||||
|
||||
return matrix[type][def];
|
||||
}
|
||||
|
||||
/* report (R_STATUS, fmt, ...) */
|
||||
int
|
||||
textStatus (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
fputs (str, stderr);
|
||||
fputc ('\n', stderr);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiStatus (va_list ap)
|
||||
{
|
||||
size_t len;
|
||||
char *str = vstrmake (&len, ap);
|
||||
|
||||
if (len > 128) str[129] = 0;
|
||||
SetDlgItemText (dialog, IDC_SB, str);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_PROGRESS, barnum, steps) */
|
||||
int
|
||||
textProgress (va_list ap)
|
||||
{
|
||||
progressGroup = va_arg (ap, int);
|
||||
progressMax = va_arg (ap, int);
|
||||
progressCurr = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiProgress (va_list ap)
|
||||
{
|
||||
unsigned int max;
|
||||
HWND pb;
|
||||
|
||||
progressGroup = va_arg (ap, int);
|
||||
progressMax = max = va_arg (ap, int);
|
||||
progressCurr = 0;
|
||||
if (max > 0xffff) {
|
||||
progressScale = (double)0xffff / max;
|
||||
max = 0xffff;
|
||||
}
|
||||
else progressScale = 1;
|
||||
pb = GetDlgItem (dialog, IDC_PB0 + progressGroup * 2);
|
||||
SendMessage (pb, PBM_SETRANGE, 0, MAKELPARAM (0, max));
|
||||
SendMessage (pb, PBM_SETSTEP, (WPARAM)1, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_STEP, fmt, ...) */
|
||||
int
|
||||
textStep (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
progressCurr++;
|
||||
fputs (str, stderr);
|
||||
fprintf (stderr, " (%d of %d)\n", progressCurr, progressMax);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiStep (va_list ap)
|
||||
{
|
||||
const int pgID = IDC_ST0 + progressGroup * 2;
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
progressCurr++;
|
||||
SetDlgItemText (dialog, pgID, str);
|
||||
SendDlgItemMessage (dialog, pgID+1, PBM_SETPOS,
|
||||
(WPARAM)(progressScale * progressCurr), 0);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_DELTA, inc, fmt, ...) */
|
||||
int
|
||||
textDelta (va_list ap)
|
||||
{
|
||||
const int inc = va_arg (ap, int);
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
progressCurr += inc;
|
||||
fputs (str, stderr);
|
||||
fprintf (stderr, " (%d of %d)\n", progressCurr, progressMax);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiDelta (va_list ap)
|
||||
{
|
||||
const int inc = va_arg (ap, int);
|
||||
const int pgID = IDC_ST0 + progressGroup * 2;
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
progressCurr += inc;
|
||||
SetDlgItemText (dialog, pgID, str);
|
||||
SendDlgItemMessage (dialog, pgID+1, PBM_SETPOS,
|
||||
(WPARAM)(progressScale * progressCurr), 0);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_DIR, fmt, ...) */
|
||||
int
|
||||
textDir (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
fputs ("Temporary directory: ", stderr);
|
||||
fputs (str, stderr);
|
||||
fputc ('\n', stderr);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiDir (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
SetDlgItemText (dialog, IDC_DIR, str);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_OUT, fmt, ...) */
|
||||
int
|
||||
textOut (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
fputs ("Log file: ", stderr);
|
||||
fputs (str, stderr);
|
||||
fputc ('\n', stderr);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiOut (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
SetDlgItemText (dialog, IDC_OUT, str);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_WARNING, fmt, ...) */
|
||||
int
|
||||
textWarning (va_list ap)
|
||||
{
|
||||
fputs ("Warning: ", stderr);
|
||||
textStatus (ap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiWarning (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
MessageBox (dialog, str, "Warning", MB_ICONWARNING | MB_OK);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_ERROR, fmt, ...) */
|
||||
int
|
||||
textError (va_list ap)
|
||||
{
|
||||
fputs ("Error: ", stderr);
|
||||
textStatus (ap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
guiError (va_list ap)
|
||||
{
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
MessageBox (dialog, str, "Error", MB_ICONERROR | MB_OK);
|
||||
free (str);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* report (R_FATAL, fmt, ...) */
|
||||
int
|
||||
textFatal (va_list ap)
|
||||
{
|
||||
textError (ap);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
int
|
||||
guiFatal (va_list ap)
|
||||
{
|
||||
guiError (ap);
|
||||
exit (1);
|
||||
}
|
||||
|
||||
/* report (R_ASK, type, fmt, ...) */
|
||||
int
|
||||
textAsk (va_list ap)
|
||||
{
|
||||
int uType = va_arg (ap, int);
|
||||
int ret = MBdefault (uType);
|
||||
char *str = vstrmake (NULL, ap);
|
||||
|
||||
fprintf (stderr, "Question of type %d: %s\n"
|
||||
"Returning default: %d\n", uType, str, ret);
|
||||
free (str);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
guiAsk (va_list ap)
|
||||
{
|
||||
int uType = va_arg (ap, int);
|
||||
char *str = vstrmake (NULL, ap);
|
||||
int ret = MessageBox (dialog, str, "Question",
|
||||
MB_ICONQUESTION | uType);
|
||||
|
||||
free (str);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Quiet functions */
|
||||
int
|
||||
qNoOp (va_list ap)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
qFatal (va_list ap)
|
||||
{
|
||||
exit (1);
|
||||
}
|
||||
|
||||
int
|
||||
qAsk (va_list ap)
|
||||
{
|
||||
return MBdefault (va_arg (ap, int));
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
AboutProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD (wParam)) {
|
||||
case IDCANCEL:
|
||||
EndDialog (hwnd, IDCANCEL);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
DlgProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
SendMessage (hwnd, WM_SETICON, ICON_SMALL,
|
||||
(LPARAM)LoadIcon (GetModuleHandle (NULL),
|
||||
MAKEINTRESOURCE (IDI_WINE)));
|
||||
SendMessage (hwnd, WM_SETICON, ICON_BIG,
|
||||
(LPARAM)LoadIcon (GetModuleHandle (NULL),
|
||||
MAKEINTRESOURCE (IDI_WINE)));
|
||||
dialog = hwnd;
|
||||
if (!SetEvent (initEvent)) {
|
||||
report (R_STATUS, "Can't signal main thread: %d",
|
||||
GetLastError ());
|
||||
EndDialog (hwnd, 2);
|
||||
}
|
||||
return TRUE;
|
||||
case WM_CLOSE:
|
||||
EndDialog (hwnd, 3);
|
||||
return TRUE;
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD (wParam)) {
|
||||
case IDHELP:
|
||||
DialogBox (GetModuleHandle (NULL),
|
||||
MAKEINTRESOURCE (IDD_ABOUT), hwnd, AboutProc);
|
||||
return TRUE;
|
||||
case IDABORT:
|
||||
report (R_WARNING, "Not implemented");
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
DWORD WINAPI
|
||||
DlgThreadProc ()
|
||||
{
|
||||
int ret;
|
||||
|
||||
InitCommonControls ();
|
||||
ret = DialogBox (GetModuleHandle (NULL),
|
||||
MAKEINTRESOURCE (IDD_STATUS),
|
||||
NULL, DlgProc);
|
||||
switch (ret) {
|
||||
case 0:
|
||||
report (R_WARNING, "Invalid parent handle");
|
||||
break;
|
||||
case 1:
|
||||
report (R_WARNING, "DialogBox failed: %d",
|
||||
GetLastError ());
|
||||
break;
|
||||
case 3:
|
||||
exit (0);
|
||||
default:
|
||||
report (R_STATUS, "Dialog exited: %d", ret);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
report (enum report_type t, ...)
|
||||
{
|
||||
typedef int r_fun_t (va_list);
|
||||
|
||||
va_list ap;
|
||||
int ret = 0;
|
||||
static r_fun_t * const text_funcs[] =
|
||||
{textStatus, textProgress, textStep, textDelta,
|
||||
textDir, textOut,
|
||||
textWarning, textError, textFatal, textAsk};
|
||||
static r_fun_t * const GUI_funcs[] =
|
||||
{guiStatus, guiProgress, guiStep, guiDelta,
|
||||
guiDir, guiOut,
|
||||
guiWarning, guiError, guiFatal, guiAsk};
|
||||
static r_fun_t * const quiet_funcs[] =
|
||||
{qNoOp, qNoOp, qNoOp, qNoOp,
|
||||
qNoOp, qNoOp,
|
||||
qNoOp, qNoOp, qFatal, qAsk};
|
||||
static r_fun_t * const * funcs = NULL;
|
||||
|
||||
switch (t) {
|
||||
case R_TEXTMODE:
|
||||
funcs = text_funcs;
|
||||
return 0;
|
||||
case R_QUIET:
|
||||
funcs = quiet_funcs;
|
||||
return 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!funcs) {
|
||||
HANDLE DlgThread;
|
||||
DWORD DlgThreadID;
|
||||
|
||||
funcs = text_funcs;
|
||||
initEvent = CreateEvent (NULL, FALSE, FALSE, NULL);
|
||||
if (!initEvent)
|
||||
report (R_STATUS, "Can't create event object: %d",
|
||||
GetLastError ());
|
||||
else {
|
||||
DlgThread = CreateThread (NULL, 0, DlgThreadProc,
|
||||
NULL, 0, &DlgThreadID);
|
||||
if (!DlgThread)
|
||||
report (R_STATUS, "Can't create GUI thread: %d",
|
||||
GetLastError ());
|
||||
else {
|
||||
DWORD ret = WaitForSingleObject (initEvent, INFINITE);
|
||||
switch (ret) {
|
||||
case WAIT_OBJECT_0:
|
||||
funcs = GUI_funcs;
|
||||
break;
|
||||
case WAIT_TIMEOUT:
|
||||
report (R_STATUS, "GUI creation timed out");
|
||||
break;
|
||||
case WAIT_FAILED:
|
||||
report (R_STATUS, "Wait for GUI failed: %d",
|
||||
GetLastError ());
|
||||
break;
|
||||
default:
|
||||
report (R_STATUS, "Wait returned %d",
|
||||
ret);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
va_start (ap, t);
|
||||
if (t < sizeof text_funcs / sizeof text_funcs[0] &&
|
||||
t < sizeof GUI_funcs / sizeof GUI_funcs[0] &&
|
||||
t >= 0) ret = funcs[t](ap);
|
||||
else report (R_WARNING, "unimplemented report type: %d", t);
|
||||
va_end (ap);
|
||||
return ret;
|
||||
}
|
621
reactos/apps/utils/winetest/main.c
Normal file
621
reactos/apps/utils/winetest/main.c
Normal file
@@ -0,0 +1,621 @@
|
||||
/*
|
||||
* Wine Conformance Test EXE
|
||||
*
|
||||
* Copyright 2003, 2004 Jakob Eriksson (for Solid Form Sweden AB)
|
||||
* Copyright 2003 Dimitrie O. Paun
|
||||
* Copyright 2003 Ferenc Wagner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* This program is dedicated to Anna Lindh,
|
||||
* Swedish Minister of Foreign Affairs.
|
||||
* Anna was murdered September 11, 2003.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include "wine/port.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#include <windows.h>
|
||||
|
||||
#include "winetest.h"
|
||||
#include "resource.h"
|
||||
|
||||
struct wine_test
|
||||
{
|
||||
char *name;
|
||||
int resource;
|
||||
int subtest_count;
|
||||
char **subtests;
|
||||
char *exename;
|
||||
};
|
||||
|
||||
struct rev_info
|
||||
{
|
||||
const char* file;
|
||||
const char* rev;
|
||||
};
|
||||
|
||||
static struct wine_test *wine_tests;
|
||||
static struct rev_info *rev_infos = NULL;
|
||||
static const char whitespace[] = " \t\r\n";
|
||||
|
||||
static int running_under_wine ()
|
||||
{
|
||||
HMODULE module = GetModuleHandleA("ntdll.dll");
|
||||
|
||||
if (!module) return 0;
|
||||
return (GetProcAddress(module, "wine_server_call") != NULL);
|
||||
}
|
||||
|
||||
static int running_on_visible_desktop ()
|
||||
{
|
||||
FARPROC pGetProcessWindowStation = GetProcAddress(GetModuleHandle("user32.dll"), "GetProcessWindowStation");
|
||||
|
||||
if (pGetProcessWindowStation)
|
||||
{
|
||||
DWORD len;
|
||||
HWINSTA wstation;
|
||||
USEROBJECTFLAGS uoflags;
|
||||
FARPROC pGetUserObjectInformationA = GetProcAddress(GetModuleHandle("user32.dll"), "GetUserObjectInformationA");
|
||||
|
||||
wstation = (HWINSTA)pGetProcessWindowStation();
|
||||
assert(pGetUserObjectInformationA(wstation, UOI_FLAGS, &uoflags, sizeof(uoflags), &len));
|
||||
return (uoflags.dwFlags & WSF_VISIBLE) != 0;
|
||||
}
|
||||
else
|
||||
return IsWindowVisible(GetDesktopWindow());
|
||||
}
|
||||
|
||||
void print_version ()
|
||||
{
|
||||
OSVERSIONINFOEX ver;
|
||||
BOOL ext;
|
||||
|
||||
ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
if (!(ext = GetVersionEx ((OSVERSIONINFO *) &ver)))
|
||||
{
|
||||
ver.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
|
||||
if (!GetVersionEx ((OSVERSIONINFO *) &ver))
|
||||
report (R_FATAL, "Can't get OS version.");
|
||||
}
|
||||
|
||||
xprintf (" bRunningUnderWine=%d\n", running_under_wine ());
|
||||
xprintf (" bRunningOnVisibleDesktop=%d\n", running_on_visible_desktop ());
|
||||
xprintf (" dwMajorVersion=%ld\n dwMinorVersion=%ld\n"
|
||||
" dwBuildNumber=%ld\n PlatformId=%ld\n szCSDVersion=%s\n",
|
||||
ver.dwMajorVersion, ver.dwMinorVersion, ver.dwBuildNumber,
|
||||
ver.dwPlatformId, ver.szCSDVersion);
|
||||
|
||||
if (!ext) return;
|
||||
|
||||
xprintf (" wServicePackMajor=%d\n wServicePackMinor=%d\n"
|
||||
" wSuiteMask=%d\n wProductType=%d\n wReserved=%d\n",
|
||||
ver.wServicePackMajor, ver.wServicePackMinor, ver.wSuiteMask,
|
||||
ver.wProductType, ver.wReserved);
|
||||
}
|
||||
|
||||
static inline int is_dot_dir(const char* x)
|
||||
{
|
||||
return ((x[0] == '.') && ((x[1] == 0) || ((x[1] == '.') && (x[2] == 0))));
|
||||
}
|
||||
|
||||
void remove_dir (const char *dir)
|
||||
{
|
||||
HANDLE hFind;
|
||||
WIN32_FIND_DATA wfd;
|
||||
char path[MAX_PATH];
|
||||
size_t dirlen = strlen (dir);
|
||||
|
||||
/* Make sure the directory exists before going further */
|
||||
memcpy (path, dir, dirlen);
|
||||
strcpy (path + dirlen++, "\\*");
|
||||
hFind = FindFirstFile (path, &wfd);
|
||||
if (hFind == INVALID_HANDLE_VALUE) return;
|
||||
|
||||
do {
|
||||
char *lp = wfd.cFileName;
|
||||
|
||||
if (!lp[0]) lp = wfd.cAlternateFileName; /* ? FIXME not (!lp) ? */
|
||||
if (is_dot_dir (lp)) continue;
|
||||
strcpy (path + dirlen, lp);
|
||||
if (FILE_ATTRIBUTE_DIRECTORY & wfd.dwFileAttributes)
|
||||
remove_dir(path);
|
||||
else if (!DeleteFile (path))
|
||||
report (R_WARNING, "Can't delete file %s: error %d",
|
||||
path, GetLastError ());
|
||||
} while (FindNextFile (hFind, &wfd));
|
||||
FindClose (hFind);
|
||||
if (!RemoveDirectory (dir))
|
||||
report (R_WARNING, "Can't remove directory %s: error %d",
|
||||
dir, GetLastError ());
|
||||
}
|
||||
|
||||
const char* get_test_source_file(const char* test, const char* subtest)
|
||||
{
|
||||
static const char* special_dirs[][2] = {
|
||||
{ "gdi32", "gdi"}, { "kernel32", "kernel" },
|
||||
{ "msacm32", "msacm" },
|
||||
{ "user32", "user" }, { "winspool.drv", "winspool" },
|
||||
{ "ws2_32", "winsock" }, { 0, 0 }
|
||||
};
|
||||
static char buffer[MAX_PATH];
|
||||
int i;
|
||||
|
||||
for (i = 0; special_dirs[i][0]; i++) {
|
||||
if (strcmp(test, special_dirs[i][0]) == 0) {
|
||||
test = special_dirs[i][1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "dlls/%s/tests/%s.c", test, subtest);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
const char* get_file_rev(const char* file)
|
||||
{
|
||||
const struct rev_info* rev;
|
||||
|
||||
for(rev = rev_infos; rev->file; rev++) {
|
||||
if (strcmp(rev->file, file) == 0) return rev->rev;
|
||||
}
|
||||
|
||||
return "-";
|
||||
}
|
||||
|
||||
void extract_rev_infos ()
|
||||
{
|
||||
char revinfo[256], *p;
|
||||
int size = 0, i, len;
|
||||
HMODULE module = GetModuleHandle (NULL);
|
||||
|
||||
for (i = 0; TRUE; i++) {
|
||||
if (i >= size) {
|
||||
size += 100;
|
||||
rev_infos = xrealloc (rev_infos, size * sizeof (*rev_infos));
|
||||
}
|
||||
memset(rev_infos + i, 0, sizeof(rev_infos[i]));
|
||||
|
||||
len = LoadStringA (module, REV_INFO+i, revinfo, sizeof(revinfo));
|
||||
if (len == 0) break; /* end of revision info */
|
||||
if (len >= sizeof(revinfo) - 1)
|
||||
report (R_FATAL, "Revision info too long.");
|
||||
if(!(p = strrchr(revinfo, ':')))
|
||||
report (R_FATAL, "Revision info malformed (i=%d)", i);
|
||||
*p = 0;
|
||||
rev_infos[i].file = strdup(revinfo);
|
||||
rev_infos[i].rev = strdup(p + 1);
|
||||
}
|
||||
}
|
||||
|
||||
void* extract_rcdata (int id, int type, DWORD* size)
|
||||
{
|
||||
HRSRC rsrc;
|
||||
HGLOBAL hdl;
|
||||
LPVOID addr;
|
||||
|
||||
if (!(rsrc = FindResource (NULL, (LPTSTR)id, MAKEINTRESOURCE(type))) ||
|
||||
!(*size = SizeofResource (0, rsrc)) ||
|
||||
!(hdl = LoadResource (0, rsrc)) ||
|
||||
!(addr = LockResource (hdl)))
|
||||
return NULL;
|
||||
return addr;
|
||||
}
|
||||
|
||||
/* Fills in the name and exename fields */
|
||||
void
|
||||
extract_test (struct wine_test *test, const char *dir, int id)
|
||||
{
|
||||
BYTE* code;
|
||||
DWORD size;
|
||||
FILE* fout;
|
||||
int strlen, bufflen = 128;
|
||||
char *exepos;
|
||||
|
||||
code = extract_rcdata (id, TESTRES, &size);
|
||||
if (!code) report (R_FATAL, "Can't find test resource %d: %d",
|
||||
id, GetLastError ());
|
||||
test->name = xmalloc (bufflen);
|
||||
while ((strlen = LoadStringA (NULL, id, test->name, bufflen))
|
||||
== bufflen - 1) {
|
||||
bufflen *= 2;
|
||||
test->name = xrealloc (test->name, bufflen);
|
||||
}
|
||||
if (!strlen) report (R_FATAL, "Can't read name of test %d.", id);
|
||||
test->exename = strmake (NULL, "%s/%s", dir, test->name);
|
||||
exepos = strstr (test->name, "_test.exe");
|
||||
if (!exepos) report (R_FATAL, "Not an .exe file: %s", test->name);
|
||||
*exepos = 0;
|
||||
test->name = xrealloc (test->name, exepos - test->name + 1);
|
||||
report (R_STEP, "Extracting: %s", test->name);
|
||||
|
||||
if (!(fout = fopen (test->exename, "wb")) ||
|
||||
(fwrite (code, size, 1, fout) != 1) ||
|
||||
fclose (fout)) report (R_FATAL, "Failed to write file %s.",
|
||||
test->exename);
|
||||
}
|
||||
|
||||
/* Run a command for MS milliseconds. If OUT != NULL, also redirect
|
||||
stdout to there.
|
||||
|
||||
Return the exit status, -2 if can't create process or the return
|
||||
value of WaitForSingleObject.
|
||||
*/
|
||||
int
|
||||
run_ex (char *cmd, const char *out, DWORD ms)
|
||||
{
|
||||
STARTUPINFO si;
|
||||
PROCESS_INFORMATION pi;
|
||||
int fd, oldstdout = -1;
|
||||
DWORD wait, status;
|
||||
|
||||
GetStartupInfo (&si);
|
||||
si.wShowWindow = SW_HIDE;
|
||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||
|
||||
if (out) {
|
||||
fd = open (out, O_WRONLY | O_CREAT, 0666);
|
||||
if (-1 == fd)
|
||||
report (R_FATAL, "Can't open '%s': %d", out, errno);
|
||||
oldstdout = dup (1);
|
||||
if (-1 == oldstdout)
|
||||
report (R_FATAL, "Can't save stdout: %d", errno);
|
||||
if (-1 == dup2 (fd, 1))
|
||||
report (R_FATAL, "Can't redirect stdout: %d", errno);
|
||||
close (fd);
|
||||
}
|
||||
|
||||
if (!CreateProcessA (NULL, cmd, NULL, NULL, TRUE, 0,
|
||||
NULL, NULL, &si, &pi)) {
|
||||
status = -2;
|
||||
} else {
|
||||
CloseHandle (pi.hThread);
|
||||
wait = WaitForSingleObject (pi.hProcess, ms);
|
||||
if (wait == WAIT_OBJECT_0) {
|
||||
GetExitCodeProcess (pi.hProcess, &status);
|
||||
} else {
|
||||
switch (wait) {
|
||||
case WAIT_FAILED:
|
||||
report (R_ERROR, "Wait for '%s' failed: %d", cmd,
|
||||
GetLastError ());
|
||||
break;
|
||||
case WAIT_TIMEOUT:
|
||||
report (R_ERROR, "Process '%s' timed out.", cmd);
|
||||
break;
|
||||
default:
|
||||
report (R_ERROR, "Wait returned %d", wait);
|
||||
}
|
||||
status = wait;
|
||||
if (!TerminateProcess (pi.hProcess, 257))
|
||||
report (R_ERROR, "TerminateProcess failed: %d",
|
||||
GetLastError ());
|
||||
wait = WaitForSingleObject (pi.hProcess, 5000);
|
||||
switch (wait) {
|
||||
case WAIT_FAILED:
|
||||
report (R_ERROR,
|
||||
"Wait for termination of '%s' failed: %d",
|
||||
cmd, GetLastError ());
|
||||
break;
|
||||
case WAIT_OBJECT_0:
|
||||
break;
|
||||
case WAIT_TIMEOUT:
|
||||
report (R_ERROR, "Can't kill process '%s'", cmd);
|
||||
break;
|
||||
default:
|
||||
report (R_ERROR, "Waiting for termination: %d",
|
||||
wait);
|
||||
}
|
||||
}
|
||||
CloseHandle (pi.hProcess);
|
||||
}
|
||||
|
||||
if (out) {
|
||||
close (1);
|
||||
if (-1 == dup2 (oldstdout, 1))
|
||||
report (R_FATAL, "Can't recover stdout: %d", errno);
|
||||
close (oldstdout);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
void
|
||||
get_subtests (const char *tempdir, struct wine_test *test, int id)
|
||||
{
|
||||
char *subname;
|
||||
FILE *subfile;
|
||||
size_t total;
|
||||
char buffer[8192], *index;
|
||||
static const char header[] = "Valid test names:";
|
||||
int allocated;
|
||||
|
||||
test->subtest_count = 0;
|
||||
|
||||
subname = tempnam (0, "sub");
|
||||
if (!subname) report (R_FATAL, "Can't name subtests file.");
|
||||
|
||||
extract_test (test, tempdir, id);
|
||||
run_ex (test->exename, subname, 5000);
|
||||
|
||||
subfile = fopen (subname, "r");
|
||||
if (!subfile) {
|
||||
report (R_ERROR, "Can't open subtests output of %s: %d",
|
||||
test->name, errno);
|
||||
goto quit;
|
||||
}
|
||||
total = fread (buffer, 1, sizeof buffer, subfile);
|
||||
fclose (subfile);
|
||||
if (sizeof buffer == total) {
|
||||
report (R_ERROR, "Subtest list of %s too big.",
|
||||
test->name, sizeof buffer);
|
||||
goto quit;
|
||||
}
|
||||
buffer[total] = 0;
|
||||
|
||||
index = strstr (buffer, header);
|
||||
if (!index) {
|
||||
report (R_ERROR, "Can't parse subtests output of %s",
|
||||
test->name);
|
||||
goto quit;
|
||||
}
|
||||
index += sizeof header;
|
||||
|
||||
allocated = 10;
|
||||
test->subtests = xmalloc (allocated * sizeof(char*));
|
||||
index = strtok (index, whitespace);
|
||||
while (index) {
|
||||
if (test->subtest_count == allocated) {
|
||||
allocated *= 2;
|
||||
test->subtests = xrealloc (test->subtests,
|
||||
allocated * sizeof(char*));
|
||||
}
|
||||
test->subtests[test->subtest_count++] = strdup (index);
|
||||
index = strtok (NULL, whitespace);
|
||||
}
|
||||
test->subtests = xrealloc (test->subtests,
|
||||
test->subtest_count * sizeof(char*));
|
||||
|
||||
quit:
|
||||
if (remove (subname))
|
||||
report (R_WARNING, "Can't delete file '%s': %d",
|
||||
subname, errno);
|
||||
free (subname);
|
||||
}
|
||||
|
||||
void
|
||||
run_test (struct wine_test* test, const char* subtest)
|
||||
{
|
||||
int status;
|
||||
const char* file = get_test_source_file(test->name, subtest);
|
||||
const char* rev = get_file_rev(file);
|
||||
char *cmd = strmake (NULL, "%s %s", test->exename, subtest);
|
||||
|
||||
xprintf ("%s:%s start %s %s\n", test->name, subtest, file, rev);
|
||||
status = run_ex (cmd, NULL, 120000);
|
||||
free (cmd);
|
||||
xprintf ("%s:%s done (%d)\n", test->name, subtest, status);
|
||||
}
|
||||
|
||||
BOOL CALLBACK
|
||||
EnumTestFileProc (HMODULE hModule, LPCTSTR lpszType,
|
||||
LPTSTR lpszName, LONG_PTR lParam)
|
||||
{
|
||||
(*(int*)lParam)++;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
char *
|
||||
run_tests (char *logname, const char *tag)
|
||||
{
|
||||
int nr_of_files = 0, nr_of_tests = 0, i;
|
||||
char *tempdir;
|
||||
int logfile;
|
||||
char *strres, *eol, *nextline;
|
||||
DWORD strsize;
|
||||
|
||||
SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX);
|
||||
|
||||
if (!logname) {
|
||||
logname = tempnam (0, "res");
|
||||
if (!logname) report (R_FATAL, "Can't name logfile.");
|
||||
}
|
||||
report (R_OUT, logname);
|
||||
|
||||
logfile = open (logname, O_WRONLY | O_CREAT | O_EXCL | O_APPEND,
|
||||
0666);
|
||||
if (-1 == logfile) {
|
||||
if (EEXIST == errno)
|
||||
report (R_FATAL, "File %s already exists.", logname);
|
||||
else report (R_FATAL, "Could not open logfile: %d", errno);
|
||||
}
|
||||
if (-1 == dup2 (logfile, 1))
|
||||
report (R_FATAL, "Can't redirect stdout: %d", errno);
|
||||
close (logfile);
|
||||
|
||||
tempdir = tempnam (0, "wct");
|
||||
if (!tempdir)
|
||||
report (R_FATAL, "Can't name temporary dir (check %%TEMP%%).");
|
||||
report (R_DIR, tempdir);
|
||||
if (!CreateDirectory (tempdir, NULL))
|
||||
report (R_FATAL, "Could not create directory: %s", tempdir);
|
||||
|
||||
xprintf ("Version 3\n");
|
||||
strres = extract_rcdata (WINE_BUILD, STRINGRES, &strsize);
|
||||
xprintf ("Tests from build ");
|
||||
if (strres) xprintf ("%.*s", strsize, strres);
|
||||
else xprintf ("-\n");
|
||||
strres = extract_rcdata (TESTS_URL, STRINGRES, &strsize);
|
||||
xprintf ("Archive: ");
|
||||
if (strres) xprintf ("%.*s", strsize, strres);
|
||||
else xprintf ("-\n");
|
||||
xprintf ("Tag: %s\n", tag?tag:"");
|
||||
xprintf ("Build info:\n");
|
||||
strres = extract_rcdata (BUILD_INFO, STRINGRES, &strsize);
|
||||
while (strres) {
|
||||
eol = memchr (strres, '\n', strsize);
|
||||
if (!eol) {
|
||||
nextline = NULL;
|
||||
eol = strres + strsize;
|
||||
} else {
|
||||
strsize -= eol - strres + 1;
|
||||
nextline = strsize?eol+1:NULL;
|
||||
if (eol > strres && *(eol-1) == '\r') eol--;
|
||||
}
|
||||
xprintf (" %.*s\n", eol-strres, strres);
|
||||
strres = nextline;
|
||||
}
|
||||
xprintf ("Operating system version:\n");
|
||||
print_version ();
|
||||
xprintf ("Test output:\n" );
|
||||
|
||||
report (R_STATUS, "Counting tests");
|
||||
if (!EnumResourceNames (NULL, MAKEINTRESOURCE(TESTRES),
|
||||
EnumTestFileProc, (LPARAM)&nr_of_files))
|
||||
report (R_FATAL, "Can't enumerate test files: %d",
|
||||
GetLastError ());
|
||||
wine_tests = xmalloc (nr_of_files * sizeof wine_tests[0]);
|
||||
|
||||
report (R_STATUS, "Extracting tests");
|
||||
report (R_PROGRESS, 0, nr_of_files);
|
||||
for (i = 0; i < nr_of_files; i++) {
|
||||
get_subtests (tempdir, wine_tests+i, i);
|
||||
nr_of_tests += wine_tests[i].subtest_count;
|
||||
}
|
||||
report (R_DELTA, 0, "Extracting: Done");
|
||||
|
||||
report (R_STATUS, "Running tests");
|
||||
report (R_PROGRESS, 1, nr_of_tests);
|
||||
for (i = 0; i < nr_of_files; i++) {
|
||||
struct wine_test *test = wine_tests + i;
|
||||
int j;
|
||||
|
||||
for (j = 0; j < test->subtest_count; j++) {
|
||||
report (R_STEP, "Running: %s:%s", test->name,
|
||||
test->subtests[j]);
|
||||
run_test (test, test->subtests[j]);
|
||||
}
|
||||
}
|
||||
report (R_DELTA, 0, "Running: Done");
|
||||
|
||||
report (R_STATUS, "Cleaning up");
|
||||
close (1);
|
||||
remove_dir (tempdir);
|
||||
free (tempdir);
|
||||
free (wine_tests);
|
||||
|
||||
return logname;
|
||||
}
|
||||
|
||||
void
|
||||
usage ()
|
||||
{
|
||||
fprintf (stderr, "\
|
||||
Usage: winetest [OPTION]...\n\n\
|
||||
-c console mode, no GUI\n\
|
||||
-e preserve the environment\n\
|
||||
-h print this message and exit\n\
|
||||
-q quiet mode, no output at all\n\
|
||||
-o FILE put report into FILE, do not submit\n\
|
||||
-s FILE submit FILE, do not run tests\n\
|
||||
-t TAG include TAG of characters [-.0-9a-zA-Z] in the report\n");
|
||||
}
|
||||
|
||||
int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
|
||||
LPSTR cmdLine, int cmdShow)
|
||||
{
|
||||
char *logname = NULL;
|
||||
const char *cp, *submit = NULL, *tag = NULL;
|
||||
int reset_env = 1;
|
||||
|
||||
if (!running_on_visible_desktop ()) {
|
||||
report (R_ERROR, "Tests must be run on a visible desktop");
|
||||
exit (2);
|
||||
}
|
||||
|
||||
/* initialize the revision information first */
|
||||
extract_rev_infos();
|
||||
|
||||
cmdLine = strtok (cmdLine, whitespace);
|
||||
while (cmdLine) {
|
||||
if (cmdLine[0] != '-' || cmdLine[2]) {
|
||||
report (R_ERROR, "Not a single letter option: %s", cmdLine);
|
||||
usage ();
|
||||
exit (2);
|
||||
}
|
||||
switch (cmdLine[1]) {
|
||||
case 'c':
|
||||
report (R_TEXTMODE);
|
||||
break;
|
||||
case 'e':
|
||||
reset_env = 0;
|
||||
break;
|
||||
case 'h':
|
||||
usage ();
|
||||
exit (0);
|
||||
case 'q':
|
||||
report (R_QUIET);
|
||||
break;
|
||||
case 's':
|
||||
submit = strtok (NULL, whitespace);
|
||||
if (tag)
|
||||
report (R_WARNING, "ignoring tag for submission");
|
||||
send_file (submit);
|
||||
break;
|
||||
case 'o':
|
||||
logname = strtok (NULL, whitespace);
|
||||
break;
|
||||
case 't':
|
||||
tag = strtok (NULL, whitespace);
|
||||
cp = badtagchar (tag);
|
||||
if (cp) {
|
||||
report (R_ERROR, "invalid char in tag: %c", *cp);
|
||||
usage ();
|
||||
exit (2);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
report (R_ERROR, "invalid option: -%c", cmdLine[1]);
|
||||
usage ();
|
||||
exit (2);
|
||||
}
|
||||
cmdLine = strtok (NULL, whitespace);
|
||||
}
|
||||
if (!submit) {
|
||||
if (reset_env && (putenv ("WINETEST_PLATFORM=windows") ||
|
||||
putenv ("WINETEST_DEBUG=1") ||
|
||||
putenv ("WINETEST_INTERACTIVE=0") ||
|
||||
putenv ("WINETEST_REPORT_SUCCESS=0")))
|
||||
report (R_FATAL, "Could not reset environment: %d", errno);
|
||||
|
||||
report (R_STATUS, "Starting up");
|
||||
if (!logname) {
|
||||
logname = run_tests (NULL, tag);
|
||||
if (report (R_ASK, MB_YESNO, "Do you want to submit the "
|
||||
"test results?") == IDYES)
|
||||
if (!send_file (logname) && remove (logname))
|
||||
report (R_WARNING, "Can't remove logfile: %d.", errno);
|
||||
free (logname);
|
||||
} else run_tests (logname, tag);
|
||||
report (R_STATUS, "Finished");
|
||||
}
|
||||
exit (0);
|
||||
}
|
23
reactos/apps/utils/winetest/makefile
Normal file
23
reactos/apps/utils/winetest/makefile
Normal file
@@ -0,0 +1,23 @@
|
||||
PATH_TO_TOP = ../../..
|
||||
|
||||
TARGET_TYPE = program
|
||||
|
||||
TARGET_APPTYPE = console
|
||||
|
||||
TARGET_NAME = winetest
|
||||
|
||||
TARGET_SDKLIBS = comctl32.a comdlg32.a ws2_32.a
|
||||
|
||||
TARGET_OBJECTS = \
|
||||
main.o \
|
||||
send.o \
|
||||
util.o \
|
||||
gui.o
|
||||
|
||||
TARGET_CFLAGS = -Wall -Werror -D__USE_W32API
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
include $(TOOLS_PATH)/helper.mk
|
||||
|
||||
# EOF
|
469
reactos/apps/utils/winetest/port.h
Normal file
469
reactos/apps/utils/winetest/port.h
Normal file
@@ -0,0 +1,469 @@
|
||||
/*
|
||||
* Wine porting definitions
|
||||
*
|
||||
* Copyright 1996 Alexandre Julliard
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __WINE_WINE_PORT_H
|
||||
#define __WINE_WINE_PORT_H
|
||||
|
||||
#ifndef __WINE_CONFIG_H
|
||||
# error You must include config.h to use this header
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE /* for pread/pwrite */
|
||||
#include <fcntl.h>
|
||||
#include <math.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_DIRECT_H
|
||||
# include <direct.h>
|
||||
#endif
|
||||
#ifdef HAVE_IO_H
|
||||
# include <io.h>
|
||||
#endif
|
||||
#ifdef HAVE_PROCESS_H
|
||||
# include <process.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* Type definitions
|
||||
*/
|
||||
|
||||
#ifndef HAVE_MODE_T
|
||||
typedef int mode_t;
|
||||
#endif
|
||||
#ifndef HAVE_OFF_T
|
||||
typedef long off_t;
|
||||
#endif
|
||||
#ifndef HAVE_PID_T
|
||||
typedef int pid_t;
|
||||
#endif
|
||||
#ifndef HAVE_SIZE_T
|
||||
typedef unsigned int size_t;
|
||||
#endif
|
||||
#ifndef HAVE_SSIZE_T
|
||||
typedef int ssize_t;
|
||||
#endif
|
||||
#ifndef HAVE_FSBLKCNT_T
|
||||
typedef unsigned long fsblkcnt_t;
|
||||
#endif
|
||||
#ifndef HAVE_FSFILCNT_T
|
||||
typedef unsigned long fsfilcnt_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRUCT_STATVFS_F_BLOCKS
|
||||
struct statvfs
|
||||
{
|
||||
unsigned long f_bsize;
|
||||
unsigned long f_frsize;
|
||||
fsblkcnt_t f_blocks;
|
||||
fsblkcnt_t f_bfree;
|
||||
fsblkcnt_t f_bavail;
|
||||
fsfilcnt_t f_files;
|
||||
fsfilcnt_t f_ffree;
|
||||
fsfilcnt_t f_favail;
|
||||
unsigned long f_fsid;
|
||||
unsigned long f_flag;
|
||||
unsigned long f_namemax;
|
||||
};
|
||||
#endif /* HAVE_STRUCT_STATVFS_F_BLOCKS */
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* Macro definitions
|
||||
*/
|
||||
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#else
|
||||
#define RTLD_LAZY 0x001
|
||||
#define RTLD_NOW 0x002
|
||||
#define RTLD_GLOBAL 0x100
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_FTRUNCATE) && defined(HAVE_CHSIZE)
|
||||
#define ftruncate chsize
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_POPEN) && defined(HAVE__POPEN)
|
||||
#define popen _popen
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_PCLOSE) && defined(HAVE__PCLOSE)
|
||||
#define pclose _pclose
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_SNPRINTF) && defined(HAVE__SNPRINTF)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_VSNPRINTF) && defined(HAVE__VSNPRINTF)
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
|
||||
#ifndef S_ISLNK
|
||||
# define S_ISLNK(mod) (0)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISSOCK
|
||||
# define S_ISSOCK(mod) (0)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISDIR
|
||||
# define S_ISDIR(mod) (((mod) & _S_IFMT) == _S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISCHR
|
||||
# define S_ISCHR(mod) (((mod) & _S_IFMT) == _S_IFCHR)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISFIFO
|
||||
# define S_ISFIFO(mod) (((mod) & _S_IFMT) == _S_IFIFO)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISREG
|
||||
# define S_ISREG(mod) (((mod) & _S_IFMT) == _S_IFREG)
|
||||
#endif
|
||||
|
||||
#ifndef S_IWUSR
|
||||
# define S_IWUSR 0
|
||||
#endif
|
||||
|
||||
/* So we open files in 64 bit access mode on Linux */
|
||||
#ifndef O_LARGEFILE
|
||||
# define O_LARGEFILE 0
|
||||
#endif
|
||||
|
||||
#ifndef O_NONBLOCK
|
||||
# define O_NONBLOCK 0
|
||||
#endif
|
||||
|
||||
#ifndef O_BINARY
|
||||
# define O_BINARY 0
|
||||
#endif
|
||||
|
||||
#if !defined(S_IXUSR) && defined(S_IEXEC)
|
||||
# define S_IXUSR S_IEXEC
|
||||
#endif
|
||||
#if !defined(S_IXGRP) && defined(S_IEXEC)
|
||||
# define S_IXGRP S_IEXEC
|
||||
#endif
|
||||
#if !defined(S_IXOTH) && defined(S_IEXEC)
|
||||
# define S_IXOTH S_IEXEC
|
||||
#endif
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* Constants
|
||||
*/
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
|
||||
#ifndef M_PI_2
|
||||
#define M_PI_2 1.570796326794896619
|
||||
#endif
|
||||
|
||||
|
||||
/* Macros to define assembler functions somewhat portably */
|
||||
|
||||
#if defined(__GNUC__) && !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__APPLE__)
|
||||
# define __ASM_GLOBAL_FUNC(name,code) \
|
||||
__asm__( ".text\n\t" \
|
||||
".align 4\n\t" \
|
||||
".globl " __ASM_NAME(#name) "\n\t" \
|
||||
__ASM_FUNC(#name) "\n" \
|
||||
__ASM_NAME(#name) ":\n\t" \
|
||||
code \
|
||||
"\n\t.previous" );
|
||||
#else /* defined(__GNUC__) && !defined(__MINGW32__) && !defined(__APPLE__) */
|
||||
# define __ASM_GLOBAL_FUNC(name,code) \
|
||||
void __asm_dummy_##name(void) { \
|
||||
asm( ".align 4\n\t" \
|
||||
".globl " __ASM_NAME(#name) "\n\t" \
|
||||
__ASM_FUNC(#name) "\n" \
|
||||
__ASM_NAME(#name) ":\n\t" \
|
||||
code ); \
|
||||
}
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
|
||||
/* Constructor functions */
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define DECL_GLOBAL_CONSTRUCTOR(func) \
|
||||
static void func(void) __attribute__((constructor)); \
|
||||
static void func(void)
|
||||
#elif defined(__i386__)
|
||||
# define DECL_GLOBAL_CONSTRUCTOR(func) \
|
||||
static void __dummy_init_##func(void) { \
|
||||
asm(".section .init,\"ax\"\n\t" \
|
||||
"call " #func "\n\t" \
|
||||
".previous"); } \
|
||||
static void func(void)
|
||||
#elif defined(__sparc__)
|
||||
# define DECL_GLOBAL_CONSTRUCTOR(func) \
|
||||
static void __dummy_init_##func(void) { \
|
||||
asm("\t.section \".init\",#alloc,#execinstr\n" \
|
||||
"\tcall " #func "\n" \
|
||||
"\tnop\n" \
|
||||
"\t.section \".text\",#alloc,#execinstr\n" ); } \
|
||||
static void func(void)
|
||||
#else
|
||||
# error You must define the DECL_GLOBAL_CONSTRUCTOR macro for your platform
|
||||
#endif
|
||||
|
||||
|
||||
/* Register functions */
|
||||
|
||||
#ifdef __i386__
|
||||
#define DEFINE_REGS_ENTRYPOINT( name, fn, args, pop_args ) \
|
||||
__ASM_GLOBAL_FUNC( name, \
|
||||
"call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
|
||||
".long " __ASM_NAME(#fn) "\n\t" \
|
||||
".byte " #args "," #pop_args )
|
||||
/* FIXME: add support for other CPUs */
|
||||
#endif /* __i386__ */
|
||||
|
||||
|
||||
/****************************************************************
|
||||
* Function definitions (only when using libwine_port)
|
||||
*/
|
||||
|
||||
#ifndef NO_LIBWINE_PORT
|
||||
|
||||
#ifndef HAVE_FSTATVFS
|
||||
int fstatvfs( int fd, struct statvfs *buf );
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETOPT_LONG
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
extern int opterr;
|
||||
extern int optopt;
|
||||
struct option;
|
||||
|
||||
#ifndef HAVE_STRUCT_OPTION_NAME
|
||||
struct option
|
||||
{
|
||||
const char *name;
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
#endif
|
||||
|
||||
extern int getopt_long (int ___argc, char *const *___argv,
|
||||
const char *__shortopts,
|
||||
const struct option *__longopts, int *__longind);
|
||||
extern int getopt_long_only (int ___argc, char *const *___argv,
|
||||
const char *__shortopts,
|
||||
const struct option *__longopts, int *__longind);
|
||||
#endif /* HAVE_GETOPT_LONG */
|
||||
|
||||
#ifndef HAVE_FFS
|
||||
int ffs( int x );
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_FUTIMES
|
||||
struct timeval;
|
||||
int futimes(int fd, const struct timeval tv[2]);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETPAGESIZE
|
||||
size_t getpagesize(void);
|
||||
#endif /* HAVE_GETPAGESIZE */
|
||||
|
||||
#ifndef HAVE_GETTID
|
||||
pid_t gettid(void);
|
||||
#endif /* HAVE_GETTID */
|
||||
|
||||
#ifndef HAVE_LSTAT
|
||||
int lstat(const char *file_name, struct stat *buf);
|
||||
#endif /* HAVE_LSTAT */
|
||||
|
||||
#ifndef HAVE_MEMMOVE
|
||||
void *memmove(void *dest, const void *src, size_t len);
|
||||
#endif /* !defined(HAVE_MEMMOVE) */
|
||||
|
||||
#ifndef HAVE_PREAD
|
||||
ssize_t pread( int fd, void *buf, size_t count, off_t offset );
|
||||
#endif /* HAVE_PREAD */
|
||||
|
||||
#ifndef HAVE_PWRITE
|
||||
ssize_t pwrite( int fd, const void *buf, size_t count, off_t offset );
|
||||
#endif /* HAVE_PWRITE */
|
||||
|
||||
#ifndef HAVE_READLINK
|
||||
int readlink( const char *path, char *buf, size_t size );
|
||||
#endif /* HAVE_READLINK */
|
||||
|
||||
#ifndef HAVE_SIGSETJMP
|
||||
# include <setjmp.h>
|
||||
typedef jmp_buf sigjmp_buf;
|
||||
int sigsetjmp( sigjmp_buf buf, int savesigs );
|
||||
void siglongjmp( sigjmp_buf buf, int val );
|
||||
#endif /* HAVE_SIGSETJMP */
|
||||
|
||||
#ifndef HAVE_STATVFS
|
||||
int statvfs( const char *path, struct statvfs *buf );
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_STRNCASECMP
|
||||
# ifndef HAVE__STRNICMP
|
||||
int strncasecmp(const char *str1, const char *str2, size_t n);
|
||||
# else
|
||||
# define strncasecmp _strnicmp
|
||||
# endif
|
||||
#endif /* !defined(HAVE_STRNCASECMP) */
|
||||
|
||||
#ifndef HAVE_STRERROR
|
||||
const char *strerror(int err);
|
||||
#endif /* !defined(HAVE_STRERROR) */
|
||||
|
||||
#ifndef HAVE_STRCASECMP
|
||||
# ifndef HAVE__STRICMP
|
||||
int strcasecmp(const char *str1, const char *str2);
|
||||
# else
|
||||
# define strcasecmp _stricmp
|
||||
# endif
|
||||
#endif /* !defined(HAVE_STRCASECMP) */
|
||||
|
||||
#ifndef HAVE_USLEEP
|
||||
int usleep (unsigned int useconds);
|
||||
#endif /* !defined(HAVE_USLEEP) */
|
||||
|
||||
#ifdef __i386__
|
||||
static inline void *memcpy_unaligned( void *dst, const void *src, size_t size )
|
||||
{
|
||||
return memcpy( dst, src, size );
|
||||
}
|
||||
#else
|
||||
extern void *memcpy_unaligned( void *dst, const void *src, size_t size );
|
||||
#endif /* __i386__ */
|
||||
|
||||
extern int mkstemps(char *template, int suffix_len);
|
||||
|
||||
/* Process creation flags */
|
||||
#ifndef _P_WAIT
|
||||
# define _P_WAIT 0
|
||||
# define _P_NOWAIT 1
|
||||
# define _P_OVERLAY 2
|
||||
# define _P_NOWAITO 3
|
||||
# define _P_DETACH 4
|
||||
#endif
|
||||
#ifndef HAVE_SPAWNVP
|
||||
extern int spawnvp(int mode, const char *cmdname, const char * const argv[]);
|
||||
#endif
|
||||
|
||||
/* Interlocked functions */
|
||||
|
||||
#if defined(__i386__) && defined(__GNUC__)
|
||||
|
||||
extern inline long interlocked_cmpxchg( long *dest, long xchg, long compare );
|
||||
extern inline void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare );
|
||||
extern inline long interlocked_xchg( long *dest, long val );
|
||||
extern inline void *interlocked_xchg_ptr( void **dest, void *val );
|
||||
extern inline long interlocked_xchg_add( long *dest, long incr );
|
||||
|
||||
extern inline long interlocked_cmpxchg( long *dest, long xchg, long compare )
|
||||
{
|
||||
long ret;
|
||||
__asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
|
||||
: "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern inline void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare )
|
||||
{
|
||||
void *ret;
|
||||
__asm__ __volatile__( "lock; cmpxchgl %2,(%1)"
|
||||
: "=a" (ret) : "r" (dest), "r" (xchg), "0" (compare) : "memory" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern inline long interlocked_xchg( long *dest, long val )
|
||||
{
|
||||
long ret;
|
||||
__asm__ __volatile__( "lock; xchgl %0,(%1)"
|
||||
: "=r" (ret) : "r" (dest), "0" (val) : "memory" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern inline void *interlocked_xchg_ptr( void **dest, void *val )
|
||||
{
|
||||
void *ret;
|
||||
__asm__ __volatile__( "lock; xchgl %0,(%1)"
|
||||
: "=r" (ret) : "r" (dest), "0" (val) : "memory" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
extern inline long interlocked_xchg_add( long *dest, long incr )
|
||||
{
|
||||
long ret;
|
||||
__asm__ __volatile__( "lock; xaddl %0,(%1)"
|
||||
: "=r" (ret) : "r" (dest), "0" (incr) : "memory" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
#else /* __i386___ && __GNUC__ */
|
||||
|
||||
extern long interlocked_cmpxchg( long *dest, long xchg, long compare );
|
||||
extern void *interlocked_cmpxchg_ptr( void **dest, void *xchg, void *compare );
|
||||
extern long interlocked_xchg( long *dest, long val );
|
||||
extern void *interlocked_xchg_ptr( void **dest, void *val );
|
||||
extern long interlocked_xchg_add( long *dest, long incr );
|
||||
|
||||
#endif /* __i386___ && __GNUC__ */
|
||||
|
||||
#else /* NO_LIBWINE_PORT */
|
||||
|
||||
#define __WINE_NOT_PORTABLE(func) func##_is_not_portable func##_is_not_portable
|
||||
|
||||
#define ffs __WINE_NOT_PORTABLE(ffs)
|
||||
#define fstatvfs __WINE_NOT_PORTABLE(fstatvfs)
|
||||
#define futimes __WINE_NOT_PORTABLE(futimes)
|
||||
#define getopt_long __WINE_NOT_PORTABLE(getopt_long)
|
||||
#define getopt_long_only __WINE_NOT_PORTABLE(getopt_long_only)
|
||||
#define getpagesize __WINE_NOT_PORTABLE(getpagesize)
|
||||
#define interlocked_cmpxchg __WINE_NOT_PORTABLE(interlocked_cmpxchg)
|
||||
#define interlocked_cmpxchg_ptr __WINE_NOT_PORTABLE(interlocked_cmpxchg_ptr)
|
||||
#define interlocked_xchg __WINE_NOT_PORTABLE(interlocked_xchg)
|
||||
#define interlocked_xchg_ptr __WINE_NOT_PORTABLE(interlocked_xchg_ptr)
|
||||
#define interlocked_xchg_add __WINE_NOT_PORTABLE(interlocked_xchg_add)
|
||||
#define lstat __WINE_NOT_PORTABLE(lstat)
|
||||
#define memcpy_unaligned __WINE_NOT_PORTABLE(memcpy_unaligned)
|
||||
#define memmove __WINE_NOT_PORTABLE(memmove)
|
||||
#define pread __WINE_NOT_PORTABLE(pread)
|
||||
#define pwrite __WINE_NOT_PORTABLE(pwrite)
|
||||
#define spawnvp __WINE_NOT_PORTABLE(spawnvp)
|
||||
#define statvfs __WINE_NOT_PORTABLE(statvfs)
|
||||
#define strcasecmp __WINE_NOT_PORTABLE(strcasecmp)
|
||||
#define strerror __WINE_NOT_PORTABLE(strerror)
|
||||
#define strncasecmp __WINE_NOT_PORTABLE(strncasecmp)
|
||||
#define usleep __WINE_NOT_PORTABLE(usleep)
|
||||
|
||||
#endif /* NO_LIBWINE_PORT */
|
||||
|
||||
#endif /* !defined(__WINE_WINE_PORT_H) */
|
53
reactos/apps/utils/winetest/resource.h
Normal file
53
reactos/apps/utils/winetest/resource.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Resource definitions
|
||||
*
|
||||
* Copyright 2004 Ferenc Wagner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#define IDI_WINE 1
|
||||
|
||||
#define IDD_STATUS 100
|
||||
#define IDD_ABOUT 101
|
||||
|
||||
#define IDC_ST0 1000
|
||||
#define IDC_PB0 1001
|
||||
#define IDC_ST1 1002
|
||||
#define IDC_PB1 1003
|
||||
#define IDC_ST2 1004
|
||||
#define IDC_PB2 1005
|
||||
|
||||
#define IDC_DIR 2000
|
||||
#define IDC_OUT 2001
|
||||
|
||||
#define IDC_SB 3000
|
||||
|
||||
#define IDC_EDIT 4000
|
||||
#define IDC_ABOUT 4001
|
||||
|
||||
/* Resource types */
|
||||
|
||||
#define TESTRES 1000
|
||||
#define STRINGRES 1001
|
||||
|
||||
/* String resources */
|
||||
|
||||
#define WINE_BUILD 10000
|
||||
#define BUILD_INFO 10001
|
||||
#define TESTS_URL 10002
|
||||
|
||||
/* Revision info strings start from this index: */
|
||||
#define REV_INFO 30000
|
223
reactos/apps/utils/winetest/send.c
Normal file
223
reactos/apps/utils/winetest/send.c
Normal file
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
* HTTP handling functions.
|
||||
*
|
||||
* Copyright 2003 Ferenc Wagner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <winsock.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "winetest.h"
|
||||
|
||||
SOCKET
|
||||
open_http (const char *server)
|
||||
{
|
||||
WSADATA wsad;
|
||||
struct sockaddr_in sa;
|
||||
SOCKET s;
|
||||
|
||||
report (R_STATUS, "Opening HTTP connection to %s", server);
|
||||
if (WSAStartup (MAKEWORD (2,2), &wsad)) return INVALID_SOCKET;
|
||||
|
||||
sa.sin_family = AF_INET;
|
||||
sa.sin_port = htons (80);
|
||||
sa.sin_addr.s_addr = inet_addr (server);
|
||||
if (sa.sin_addr.s_addr == INADDR_NONE) {
|
||||
struct hostent *host = gethostbyname (server);
|
||||
if (!host) {
|
||||
report (R_ERROR, "Hostname lookup failed for %s", server);
|
||||
goto failure;
|
||||
}
|
||||
sa.sin_addr.s_addr = ((struct in_addr *)host->h_addr)->s_addr;
|
||||
}
|
||||
s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
||||
if (s == INVALID_SOCKET) {
|
||||
report (R_ERROR, "Can't open network socket: %d",
|
||||
WSAGetLastError ());
|
||||
goto failure;
|
||||
}
|
||||
if (!connect (s, (struct sockaddr*)&sa, sizeof (struct sockaddr_in)))
|
||||
return s;
|
||||
|
||||
report (R_ERROR, "Can't connect: %d", WSAGetLastError ());
|
||||
closesocket (s);
|
||||
failure:
|
||||
WSACleanup ();
|
||||
return INVALID_SOCKET;
|
||||
}
|
||||
|
||||
int
|
||||
close_http (SOCKET s)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = closesocket (s);
|
||||
return (WSACleanup () || ret);
|
||||
}
|
||||
|
||||
int
|
||||
send_buf (SOCKET s, const char *buf, size_t length)
|
||||
{
|
||||
int sent;
|
||||
|
||||
while (length > 0) {
|
||||
sent = send (s, buf, length, 0);
|
||||
if (sent == SOCKET_ERROR) return 1;
|
||||
buf += sent;
|
||||
length -= sent;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
send_str (SOCKET s, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char *p;
|
||||
int ret;
|
||||
size_t len;
|
||||
|
||||
va_start (ap, s);
|
||||
p = vstrmake (&len, ap);
|
||||
va_end (ap);
|
||||
if (!p) return 1;
|
||||
ret = send_buf (s, p, len);
|
||||
free (p);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
send_file (const char *name)
|
||||
{
|
||||
SOCKET s;
|
||||
FILE *f;
|
||||
#define BUFLEN 8192
|
||||
unsigned char buffer[BUFLEN+1];
|
||||
size_t bytes_read, total, filesize;
|
||||
char *str;
|
||||
int ret;
|
||||
|
||||
/* RFC 2616 */
|
||||
#define SEP "--8<--cut-here--8<--"
|
||||
static const char head[] = "POST /submit HTTP/1.0\r\n"
|
||||
"Host: test.winehq.org\r\n"
|
||||
"User-Agent: Winetest Shell\r\n"
|
||||
"Content-Type: multipart/form-data; boundary=\"" SEP "\"\r\n"
|
||||
"Content-Length: %u\r\n\r\n";
|
||||
static const char body1[] = "--" SEP "\r\n"
|
||||
"Content-Disposition: form-data; name=\"reportfile\"; filename=\"%s\"\r\n"
|
||||
"Content-Type: application/octet-stream\r\n\r\n";
|
||||
static const char body2[] = "\r\n--" SEP "\r\n"
|
||||
"Content-Disposition: form-data; name=\"submit\"\r\n\r\n"
|
||||
"Upload File\r\n"
|
||||
"--" SEP "--\r\n";
|
||||
|
||||
s = open_http ("test.winehq.org");
|
||||
if (s == INVALID_SOCKET) return 1;
|
||||
|
||||
f = fopen (name, "rb");
|
||||
if (!f) {
|
||||
report (R_WARNING, "Can't open file '%s': %d", name, errno);
|
||||
goto abort1;
|
||||
}
|
||||
fseek (f, 0, SEEK_END);
|
||||
filesize = ftell (f);
|
||||
if (filesize > 1024*1024) {
|
||||
report (R_WARNING,
|
||||
"File too big (%.1f MB > 1 MB); submitting partial report.",
|
||||
filesize/1024.0/1024);
|
||||
filesize = 1024*1024;
|
||||
}
|
||||
fseek (f, 0, SEEK_SET);
|
||||
|
||||
report (R_STATUS, "Sending header");
|
||||
str = strmake (&total, body1, name);
|
||||
ret = send_str (s, head, filesize + total + sizeof body2 - 1) ||
|
||||
send_buf (s, str, total);
|
||||
free (str);
|
||||
if (ret) {
|
||||
report (R_WARNING, "Error sending header: %d, %d",
|
||||
errno, WSAGetLastError ());
|
||||
goto abort2;
|
||||
}
|
||||
|
||||
report (R_STATUS, "Sending %u bytes of data", filesize);
|
||||
report (R_PROGRESS, 2, filesize);
|
||||
total = 0;
|
||||
while (total < filesize && (bytes_read = fread (buffer, 1, BUFLEN/2, f))) {
|
||||
if ((signed)bytes_read == -1) {
|
||||
report (R_WARNING, "Error reading log file: %d", errno);
|
||||
goto abort2;
|
||||
}
|
||||
total += bytes_read;
|
||||
if (total > filesize) bytes_read -= total - filesize;
|
||||
if (send_buf (s, buffer, bytes_read)) {
|
||||
report (R_WARNING, "Error sending body: %d, %d",
|
||||
errno, WSAGetLastError ());
|
||||
goto abort2;
|
||||
}
|
||||
report (R_DELTA, bytes_read, "Network transfer: In progress");
|
||||
}
|
||||
fclose (f);
|
||||
|
||||
if (send_buf (s, body2, sizeof body2 - 1)) {
|
||||
report (R_WARNING, "Error sending trailer: %d, %d",
|
||||
errno, WSAGetLastError ());
|
||||
goto abort2;
|
||||
}
|
||||
report (R_DELTA, 0, "Network transfer: Done");
|
||||
|
||||
total = 0;
|
||||
while ((bytes_read = recv (s, buffer+total, BUFLEN-total, 0))) {
|
||||
if ((signed)bytes_read == SOCKET_ERROR) {
|
||||
report (R_WARNING, "Error receiving reply: %d, %d",
|
||||
errno, WSAGetLastError ());
|
||||
goto abort1;
|
||||
}
|
||||
total += bytes_read;
|
||||
if (total == BUFLEN) {
|
||||
report (R_WARNING, "Buffer overflow");
|
||||
goto abort1;
|
||||
}
|
||||
}
|
||||
if (close_http (s)) {
|
||||
report (R_WARNING, "Error closing connection: %d, %d",
|
||||
errno, WSAGetLastError ());
|
||||
return 1;
|
||||
}
|
||||
|
||||
str = strmake (&bytes_read, "Received %s (%d bytes).\n",
|
||||
name, filesize);
|
||||
ret = memcmp (str, buffer + total - bytes_read, bytes_read);
|
||||
free (str);
|
||||
if (ret) {
|
||||
buffer[total] = 0;
|
||||
str = strstr (buffer, "\r\n\r\n");
|
||||
if (!str) str = buffer;
|
||||
else str = str + 4;
|
||||
report (R_ERROR, "Can't submit logfile '%s'. "
|
||||
"Server response: %s", name, str);
|
||||
}
|
||||
return ret;
|
||||
|
||||
abort2:
|
||||
fclose (f);
|
||||
abort1:
|
||||
close_http (s);
|
||||
return 1;
|
||||
}
|
20
reactos/apps/utils/winetest/tests.rc
Normal file
20
reactos/apps/utils/winetest/tests.rc
Normal file
@@ -0,0 +1,20 @@
|
||||
/* Automatically generated -- do not edit! */
|
||||
#include "resource.h"
|
||||
STRINGTABLE {
|
||||
0 "advapi32_test.exe"
|
||||
1 "comctl32_test.exe"
|
||||
REV_INFO+0 "lib/advapi32/winetests/crypt_lmhash.c:1.1"
|
||||
REV_INFO+1 "lib/advapi32/winetests/crypt_md4.c:1.1"
|
||||
REV_INFO+2 "lib/advapi32/winetests/crypt_md5.c:1.1"
|
||||
REV_INFO+3 "lib/advapi32/winetests/crypt_sha.c:1.1"
|
||||
REV_INFO+4 "lib/advapi32/winetests/registry.c:1.1"
|
||||
REV_INFO+5 "lib/advapi32/winetests/security.c:1."
|
||||
REV_INFO+6 "lib/advapi32/winetests/crypt.c:1.1"
|
||||
REV_INFO+7 "dlls/comctl32/tests/imagelist.c:1.1"
|
||||
REV_INFO+8 "dlls/comctl32/tests/mru.c:1.1"
|
||||
REV_INFO+9 "dlls/comctl32/tests/subclass.c:1.1"
|
||||
REV_INFO+10 "dlls/comctl32/tests/tab.c:1.1"
|
||||
|
||||
}
|
||||
0 TESTRES "../../../lib/advapi32/winetests/advapi32_test.exe"
|
||||
1 TESTRES "../../../lib/comctl32/winetests/comctl32_test.exe"
|
118
reactos/apps/utils/winetest/util.c
Normal file
118
reactos/apps/utils/winetest/util.c
Normal file
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Utility functions.
|
||||
*
|
||||
* Copyright 2003 Dimitrie O. Paun
|
||||
* Copyright 2003 Ferenc Wagner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "winetest.h"
|
||||
|
||||
void *xmalloc (size_t len)
|
||||
{
|
||||
void *p = malloc (len);
|
||||
|
||||
if (!p) report (R_FATAL, "Out of memory.");
|
||||
return p;
|
||||
}
|
||||
|
||||
void *xrealloc (void *op, size_t len)
|
||||
{
|
||||
void *p = realloc (op, len);
|
||||
|
||||
if (!p) report (R_FATAL, "Out of memory.");
|
||||
return p;
|
||||
}
|
||||
|
||||
char *vstrfmtmake (size_t *lenp, const char *fmt, va_list ap)
|
||||
{
|
||||
size_t size = 1000;
|
||||
char *p, *q;
|
||||
int n;
|
||||
|
||||
p = malloc (size);
|
||||
if (!p) return NULL;
|
||||
while (1) {
|
||||
n = vsnprintf (p, size, fmt, ap);
|
||||
if (n < 0) size *= 2; /* Windows */
|
||||
else if ((unsigned)n >= size) size = n+1; /* glibc */
|
||||
else break;
|
||||
q = realloc (p, size);
|
||||
if (!q) {
|
||||
free (p);
|
||||
return NULL;
|
||||
}
|
||||
p = q;
|
||||
}
|
||||
if (lenp) *lenp = n;
|
||||
return p;
|
||||
}
|
||||
|
||||
char *vstrmake (size_t *lenp, va_list ap)
|
||||
{
|
||||
const char *fmt;
|
||||
|
||||
fmt = va_arg (ap, const char*);
|
||||
return vstrfmtmake (lenp, fmt, ap);
|
||||
}
|
||||
|
||||
char *strmake (size_t *lenp, ...)
|
||||
{
|
||||
va_list ap;
|
||||
char *p;
|
||||
|
||||
va_start (ap, lenp);
|
||||
p = vstrmake (lenp, ap);
|
||||
if (!p) report (R_FATAL, "Out of memory.");
|
||||
va_end (ap);
|
||||
return p;
|
||||
}
|
||||
|
||||
void xprintf (const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
size_t size;
|
||||
ssize_t written;
|
||||
char *buffer, *head;
|
||||
|
||||
va_start (ap, fmt);
|
||||
buffer = vstrfmtmake (&size, fmt, ap);
|
||||
head = buffer;
|
||||
va_end (ap);
|
||||
while ((written = write (1, head, size)) != size) {
|
||||
if (written == -1)
|
||||
report (R_FATAL, "Can't write logs: %d", errno);
|
||||
head += written;
|
||||
size -= written;
|
||||
}
|
||||
free (buffer);
|
||||
}
|
||||
|
||||
const char *
|
||||
badtagchar (const char *tag)
|
||||
{
|
||||
while (*tag)
|
||||
if (('a'<=*tag && *tag<='z') ||
|
||||
('A'<=*tag && *tag<='Z') ||
|
||||
('0'<=*tag && *tag<='9') ||
|
||||
*tag=='-' || *tag=='.')
|
||||
tag++;
|
||||
else return tag;
|
||||
return NULL;
|
||||
}
|
BIN
reactos/apps/utils/winetest/wine.ico
Normal file
BIN
reactos/apps/utils/winetest/wine.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
61
reactos/apps/utils/winetest/winetest.h
Normal file
61
reactos/apps/utils/winetest/winetest.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* winetest definitions
|
||||
*
|
||||
* Copyright 2003 Dimitrie O. Paun
|
||||
* Copyright 2003 Ferenc Wagner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef __WINETESTS_H
|
||||
#define __WINETESTS_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
void fatal (const char* msg);
|
||||
void warning (const char* msg);
|
||||
void *xmalloc (size_t len);
|
||||
void *xrealloc (void *op, size_t len);
|
||||
void xprintf (const char *fmt, ...);
|
||||
char *vstrmake (size_t *lenp, va_list ap);
|
||||
char *strmake (size_t *lenp, ...);
|
||||
const char *badtagchar (const char *tag);
|
||||
|
||||
int send_file (const char *name);
|
||||
|
||||
/* GUI definitions */
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
enum report_type {
|
||||
R_STATUS = 0,
|
||||
R_PROGRESS,
|
||||
R_STEP,
|
||||
R_DELTA,
|
||||
R_DIR,
|
||||
R_OUT,
|
||||
R_WARNING,
|
||||
R_ERROR,
|
||||
R_FATAL,
|
||||
R_ASK,
|
||||
R_TEXTMODE,
|
||||
R_QUIET
|
||||
};
|
||||
|
||||
int report (enum report_type t, ...);
|
||||
|
||||
#endif /* __WINETESTS_H */
|
132
reactos/apps/utils/winetest/winetest.rc
Normal file
132
reactos/apps/utils/winetest/winetest.rc
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* Winetest resources
|
||||
*
|
||||
* Copyright 2004 Ferenc Wagner
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <winres.h>
|
||||
#include "resource.h"
|
||||
#include "tests.rc"
|
||||
|
||||
IDD_STATUS DIALOG 0, 0, 160, 140
|
||||
STYLE WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX
|
||||
CAPTION "Wine Test Shell"
|
||||
BEGIN
|
||||
LTEXT "Extracting:", IDC_ST0, 10, 5, 140, 10
|
||||
CONTROL "PB0", IDC_PB0, PROGRESS_CLASS, 0, 5, 15, 150, 10
|
||||
LTEXT "Running:", IDC_ST1, 10, 30, 140, 10
|
||||
CONTROL "PB1", IDC_PB1, PROGRESS_CLASS, 0, 5, 40, 150, 15
|
||||
LTEXT "Network transfer:", IDC_ST2, 10, 60, 140, 10
|
||||
CONTROL "PB2", IDC_PB2, PROGRESS_CLASS, 0, 5, 70, 150, 10
|
||||
|
||||
LTEXT "Working directory:", IDC_STATIC, 10, 89, 100, 10
|
||||
EDITTEXT IDC_DIR, 71, 88, 79, 10,
|
||||
ES_READONLY | ES_AUTOHSCROLL
|
||||
LTEXT "Output file:", IDC_STATIC, 10, 100, 100, 10
|
||||
EDITTEXT IDC_OUT, 46, 99, 104, 10,
|
||||
ES_READONLY | ES_AUTOHSCROLL
|
||||
|
||||
DEFPUSHBUTTON "About", IDHELP, 20, 113, 30, 14
|
||||
PUSHBUTTON "Edit", IDCANCEL, 65, 113, 30, 14,
|
||||
WS_DISABLED
|
||||
PUSHBUTTON "Stop", IDABORT, 110, 113, 30, 14
|
||||
|
||||
CONTROL "Created", IDC_SB, STATUSCLASSNAME, 0, 0,0,0,0
|
||||
END
|
||||
|
||||
IDD_ABOUT DIALOG 0, 0, 150, 60
|
||||
STYLE WS_POPUP
|
||||
CAPTION "About Wine Test Shell"
|
||||
BEGIN
|
||||
CTEXT "This program extracts and runs a series of tests which check Wine's conformance to the Windows API.",
|
||||
IDC_STATIC, 10, 5, 130, 30
|
||||
DEFPUSHBUTTON "Close", IDCANCEL, 55, 40, 40, 14
|
||||
END
|
||||
|
||||
/* BINRES wine.ico */
|
||||
IDI_WINE ICON "wine.ico"
|
||||
/* {
|
||||
'00 00 01 00 02 00 20 20 10 00 00 00 00 00 E8 02'
|
||||
'00 00 26 00 00 00 10 10 10 00 00 00 00 00 28 01'
|
||||
'00 00 0E 03 00 00 28 00 00 00 20 00 00 00 40 00'
|
||||
'00 00 01 00 04 00 00 00 00 00 00 02 00 00 00 00'
|
||||
'00 00 00 00 00 00 10 00 00 00 00 00 00 00 39 02'
|
||||
'B1 00 23 02 6C 00 0F 03 29 00 1B 02 51 00 FF FF'
|
||||
'FF 00 1B 1A 1B 00 1E 02 63 00 33 02 A1 00 08 08'
|
||||
'08 00 14 03 3C 00 0C 04 1E 00 2E 02 8E 00 10 0F'
|
||||
'10 00 2A 02 82 00 29 02 7D 00 03 02 04 00 44 44'
|
||||
'44 44 44 44 44 44 55 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 8F FF 84 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 8F F8 F8 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 8F FF F5 44 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 5C F8 C8 F5 44 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 85 44 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 4C 44 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 4C 44 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 45 54 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 45 F4 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 45 FF 44 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 48 FF F4 44 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 48 23 9A 84 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 42 B7 7E AF 44 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 49 00 00 EA C4 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 46 00 00 01 F4 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 46 00 00 00 9F 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 46 00 70 00 EF 44 44 44 44 44 44 44'
|
||||
'44 44 44 44 43 00 00 00 79 F4 44 44 44 44 44 44'
|
||||
'44 44 44 44 49 00 00 00 0E F4 44 44 44 44 44 44'
|
||||
'44 44 44 44 42 00 00 00 07 24 44 44 44 44 44 44'
|
||||
'44 44 44 44 43 B0 00 00 00 34 44 44 44 44 44 44'
|
||||
'44 44 44 44 4C 30 00 00 00 1F 44 44 44 44 44 44'
|
||||
'44 44 44 44 48 27 E1 1D B1 2C 44 44 44 44 44 44'
|
||||
'44 44 44 44 44 A9 CC CF F8 48 C4 44 44 44 44 44'
|
||||
'44 44 44 44 44 58 44 44 44 45 C4 44 44 44 44 44'
|
||||
'44 44 44 44 44 4C 44 44 44 44 84 44 44 44 44 44'
|
||||
'44 44 44 44 44 48 44 44 44 44 C4 44 44 44 44 44'
|
||||
'44 44 44 44 44 48 C4 44 44 44 C4 44 44 44 44 44'
|
||||
'44 44 44 44 44 44 F4 44 44 4C C4 44 44 44 44 44'
|
||||
'44 44 44 44 44 44 84 44 F8 84 44 44 44 44 44 44'
|
||||
'44 44 44 44 44 44 48 F8 44 44 44 44 44 44 FF FF'
|
||||
'3F FF FF F0 7F FF FF C0 FF FF FF 03 FF FF FC 03'
|
||||
'FF FF FF F3 FF FF FF FB FF FF FF FB FF FF FF F9'
|
||||
'FF FF FF F9 FF FF FF F8 FF FF FF F8 7F FF FF F8'
|
||||
'1F FF FF F8 0F FF FF F8 07 FF FF F8 07 FF FF F8'
|
||||
'03 FF FF F8 03 FF FF F8 01 FF FF F8 01 FF FF F8'
|
||||
'01 FF FF F8 01 FF FF F8 00 FF FF F8 00 FF FF FC'
|
||||
'02 7F FF FC FE 7F FF FE FF 7F FF FE FF 7F FF FE'
|
||||
'7F 7F FF FF 7E 7F FF FF 71 FF FF FF 8F FF 28 00'
|
||||
'00 00 10 00 00 00 20 00 00 00 01 00 04 00 00 00'
|
||||
'00 00 80 00 00 00 00 00 00 00 00 00 00 00 10 00'
|
||||
'00 00 00 00 00 00 3A 02 B1 00 0A 06 14 00 12 03'
|
||||
'33 00 FF FF FF 00 12 12 12 00 0B 0B 0B 00 1B 1B'
|
||||
'1B 00 25 02 6F 00 2E 02 92 00 1A 02 52 00 36 02'
|
||||
'A6 00 15 03 3E 00 04 04 05 00 13 11 19 00 1E 02'
|
||||
'62 00 2A 02 82 00 33 33 33 CC 43 33 33 33 33 33'
|
||||
'CC 5C 33 33 33 33 33 36 C5 53 33 33 33 33 33 33'
|
||||
'33 43 33 33 33 33 33 33 33 65 33 33 33 33 33 33'
|
||||
'33 DC 33 33 33 33 33 33 33 17 EC 33 33 33 33 33'
|
||||
'33 B0 07 53 33 33 33 33 33 90 00 B3 33 33 33 33'
|
||||
'33 B0 00 FC 33 33 33 33 33 BA 00 A2 33 33 33 33'
|
||||
'33 C7 88 82 33 33 33 33 33 3D D5 14 43 33 33 33'
|
||||
'33 35 33 33 53 33 33 33 33 33 53 33 53 33 33 33'
|
||||
'33 33 C5 5C 33 33 FC 7F 00 00 F0 FF 00 00 E1 FF'
|
||||
'00 00 FD FF 00 00 FC FF 00 00 FC FF 00 00 FC 3F'
|
||||
'00 00 FC 1F 00 00 FC 1F 00 00 FC 0F 00 00 FC 0F'
|
||||
'00 00 FC 0F 00 00 FE 07 00 00 FE F7 00 00 FF 77'
|
||||
'00 00 FF 0F 00 00'
|
||||
} */
|
@@ -14,6 +14,7 @@ TARGET_BASE_LIB_DSOUND =0x50000000
|
||||
TARGET_BASE_LIB_GLU32 =0x50000000
|
||||
TARGET_BASE_LIB_OPENGL32 =0x50000000
|
||||
TARGET_BASE_LIB_EXT_SLAYER =0x5C7E0000
|
||||
TARGET_BASE_LIB_SERIALUI =0x5CDA0000
|
||||
TARGET_BASE_LIB_DINPUT =0x5F580000
|
||||
TARGET_BASE_LIB_CPL_TIMEDATE =0x64DA0000
|
||||
TARGET_BASE_LIB_CPL_SYSDM =0x64DD0000
|
||||
@@ -67,8 +68,8 @@ TARGET_BASE_LIB_SETUPAPI =0x76660000
|
||||
TARGET_BASE_LIB_GDIPLUS =0x76a00000
|
||||
TARGET_BASE_LIB_IMAGEHLP =0x76c90000
|
||||
TARGET_BASE_LIB_FMIFS =0x76df0000
|
||||
TARGET_BASE_LIB_SHELL32 =0x77260000
|
||||
TARGET_BASE_LIB_IPHLPAPI =0x77300000
|
||||
TARGET_BASE_LIB_SHELL32 =0x77200000
|
||||
TARGET_BASE_LIB_IPHLPAPI =0x77380000
|
||||
TARGET_BASE_LIB_MSACM =0x77400000
|
||||
TARGET_BASE_LIB_MMDRV =0x77500000
|
||||
TARGET_BASE_LIB_CRTDLL =0x77630000
|
||||
@@ -86,8 +87,8 @@ TARGET_BASE_LIB_OLE32 =0x77a50000
|
||||
TARGET_BASE_LIB_OLEPRO32 =0x77a50000
|
||||
TARGET_BASE_LIB_VERSION =0x77a90000
|
||||
TARGET_BASE_LIB_ADVAPI32 =0x77dc0000
|
||||
TARGET_BASE_LIB_USER32 =0x77e60000
|
||||
TARGET_BASE_LIB_GDI32 =0x77ed0000
|
||||
TARGET_BASE_LIB_USER32 =0x77e50000
|
||||
TARGET_BASE_LIB_GDI32 =0x77ee0000
|
||||
TARGET_BASE_LIB_DNSAPI =0x77f00000
|
||||
TARGET_BASE_LIB_MSVCRT =0x78000000
|
||||
TARGET_BASE_LIB_MSVCRT20 =0x78500000
|
||||
|
@@ -20,6 +20,7 @@
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
include rules.mak
|
||||
include $(PATH_TO_TOP)/config
|
||||
|
||||
all:
|
||||
$(MAKE) -C tools
|
||||
@@ -29,7 +30,7 @@ all:
|
||||
$(MAKE) -C fdebug
|
||||
|
||||
test:
|
||||
|
||||
|
||||
clean:
|
||||
$(MAKE) -C bootsect clean
|
||||
$(MAKE) -C freeldr clean
|
||||
@@ -38,6 +39,7 @@ clean:
|
||||
$(MAKE) -C tools clean
|
||||
|
||||
bootcd:
|
||||
ifeq ($(ARCH),i386)
|
||||
$(CP) bootsect/isoboot.bin ${BOOTCD_DIR}/../isoboot.bin
|
||||
$(CP) bootsect/dosmbr.bin ${BOOTCD_DIR}/loader/dosmbr.bin
|
||||
$(CP) bootsect/ext2.bin ${BOOTCD_DIR}/loader/ext2.bin
|
||||
@@ -46,5 +48,7 @@ bootcd:
|
||||
$(CP) bootsect/isoboot.bin ${BOOTCD_DIR}/loader/isoboot.bin
|
||||
$(CP) freeldr/freeldr.sys ${BOOTCD_DIR}/loader/freeldr.sys
|
||||
$(CP) freeldr/setupldr.sys ${BOOTCD_DIR}/loader/setupldr.sys
|
||||
endif
|
||||
|
||||
.PHONY : clean
|
||||
|
||||
|
@@ -25,56 +25,8 @@ BOOTCD_DIR = $(PATH_TO_TOP)/../bootcd
|
||||
|
||||
.PHONY : clean bootcd
|
||||
|
||||
all: $(BIN2C) dosmbr.bin fat.bin fat32.bin isoboot.bin ext2.bin
|
||||
|
||||
|
||||
$(BIN2C) :
|
||||
@$(MAKE) --no-print-directory -C $(FREELDR_TOOLS_PATH)
|
||||
|
||||
dosmbr.bin : dosmbr.asm
|
||||
@echo freeldr: Assembling dosmbr
|
||||
@$(NASM_CMD) $(NFLAGS) -o dosmbr.bin -f bin dosmbr.asm
|
||||
|
||||
fat.bin : fat.asm $(BIN2C)
|
||||
@echo freeldr: Assembling fat
|
||||
@$(NASM_CMD) $(NFLAGS) -o fat.bin -f bin fat.asm
|
||||
@$(BIN2C) fat.bin fat.h fat_data
|
||||
|
||||
|
||||
fat32.bin : fat32.asm $(BIN2C)
|
||||
@echo freeldr: Assembling fat32
|
||||
@$(NASM_CMD) $(NFLAGS) -o fat32.bin -f bin fat32.asm
|
||||
@$(BIN2C) fat32.bin fat32.h fat32_data
|
||||
|
||||
isoboot.bin : isoboot.asm
|
||||
@echo freeldr: Assembling isoboot
|
||||
@$(NASM_CMD) $(NFLAGS) -o isoboot.bin -f bin isoboot.asm
|
||||
|
||||
ext2.bin : ext2.asm
|
||||
@echo freeldr: Assembling ext2
|
||||
@$(NASM_CMD) $(NFLAGS) -o ext2.bin -f bin ext2.asm
|
||||
@$(BIN2C) ext2.bin ext2.h ext2_data
|
||||
|
||||
|
||||
.PHONY : bootcd
|
||||
bootcd: bootcd_dirs isoboot.bin
|
||||
$(CP) isoboot.bin $(BOOTCD_DIR)
|
||||
$(CP) dosmbr.bin $(BOOTCD_DIR)/disk/loader
|
||||
$(CP) ext2.bin $(BOOTCD_DIR)/disk/loader
|
||||
$(CP) fat.bin $(BOOTCD_DIR)/disk/loader
|
||||
$(CP) fat32.bin $(BOOTCD_DIR)/disk/loader
|
||||
$(CP) isoboot.bin $(BOOTCD_DIR)/disk/loader
|
||||
|
||||
.PHONY : bootcd_dirs
|
||||
bootcd_dirs:
|
||||
$(MKDIR) $(BOOTCD_DIR)
|
||||
$(MKDIR) $(BOOTCD_DIR)/disk
|
||||
$(MKDIR) $(BOOTCD_DIR)/disk/reactos
|
||||
$(MKDIR) $(BOOTCD_DIR)/disk/install
|
||||
$(MKDIR) $(BOOTCD_DIR)/disk/bootdisk
|
||||
$(MKDIR) $(BOOTCD_DIR)/disk/loader
|
||||
|
||||
clean:
|
||||
@-$(RM) *.bin
|
||||
@-$(RM) *.h
|
||||
@echo freeldr: Clean ALL done.
|
||||
ifeq ($(ARCH),powerpc)
|
||||
include Makefile.powerpc
|
||||
else
|
||||
include Makefile.i386
|
||||
endif
|
||||
|
52
reactos/boot/freeldr/bootsect/Makefile.i386
Normal file
52
reactos/boot/freeldr/bootsect/Makefile.i386
Normal file
@@ -0,0 +1,52 @@
|
||||
all: $(BIN2C) dosmbr.bin fat.bin fat32.bin isoboot.bin ext2.bin
|
||||
|
||||
$(BIN2C) :
|
||||
@$(MAKE) --no-print-directory -C $(FREELDR_TOOLS_PATH)
|
||||
|
||||
dosmbr.bin : dosmbr.asm
|
||||
@echo ===================================================== Assembling dosmbr
|
||||
@$(NASM_CMD) $(NFLAGS) -o dosmbr.bin -f bin dosmbr.asm
|
||||
|
||||
fat.bin : fat.asm $(BIN2C)
|
||||
@echo ===================================================== Assembling fat
|
||||
@$(NASM_CMD) $(NFLAGS) -o fat.bin -f bin fat.asm
|
||||
@$(BIN2C) fat.bin fat.h fat_data
|
||||
|
||||
|
||||
fat32.bin : fat32.asm $(BIN2C)
|
||||
@echo ===================================================== Assembling fat32
|
||||
@$(NASM_CMD) $(NFLAGS) -o fat32.bin -f bin fat32.asm
|
||||
@$(BIN2C) fat32.bin fat32.h fat32_data
|
||||
|
||||
isoboot.bin : isoboot.asm
|
||||
@echo ===================================================== Assembling isoboot
|
||||
@$(NASM_CMD) $(NFLAGS) -o isoboot.bin -f bin isoboot.asm
|
||||
|
||||
ext2.bin : ext2.asm
|
||||
@echo ===================================================== Assembling ext2
|
||||
@$(NASM_CMD) $(NFLAGS) -o ext2.bin -f bin ext2.asm
|
||||
@$(BIN2C) ext2.bin ext2.h ext2_data
|
||||
|
||||
|
||||
.PHONY : bootcd
|
||||
bootcd: bootcd_dirs isoboot.bin
|
||||
$(CP) isoboot.bin $(BOOTCD_DIR)
|
||||
$(CP) dosmbr.bin $(BOOTCD_DIR)/disk/loader
|
||||
$(CP) ext2.bin $(BOOTCD_DIR)/disk/loader
|
||||
$(CP) fat.bin $(BOOTCD_DIR)/disk/loader
|
||||
$(CP) fat32.bin $(BOOTCD_DIR)/disk/loader
|
||||
$(CP) isoboot.bin $(BOOTCD_DIR)/disk/loader
|
||||
|
||||
.PHONY : bootcd_dirs
|
||||
bootcd_dirs:
|
||||
$(MKDIR) $(BOOTCD_DIR)
|
||||
$(MKDIR) $(BOOTCD_DIR)/disk
|
||||
$(MKDIR) $(BOOTCD_DIR)/disk/reactos
|
||||
$(MKDIR) $(BOOTCD_DIR)/disk/install
|
||||
$(MKDIR) $(BOOTCD_DIR)/disk/bootdisk
|
||||
$(MKDIR) $(BOOTCD_DIR)/disk/loader
|
||||
|
||||
clean:
|
||||
@-$(RM) *.bin
|
||||
@-$(RM) *.h
|
||||
@echo Clean ALL done.
|
35
reactos/boot/freeldr/bootsect/Makefile.powerpc
Normal file
35
reactos/boot/freeldr/bootsect/Makefile.powerpc
Normal file
@@ -0,0 +1,35 @@
|
||||
TOOLS=$(PATH_TO_TOP)/tools
|
||||
SECTIONS= \
|
||||
--only-section=.text \
|
||||
--only-section=.data \
|
||||
--only-section=.bss
|
||||
LDSECT= -Ttext 0xe00000 -Tdata 0xe10000
|
||||
OBJS=ofwboot.o freeldr.o
|
||||
CFLAGS=-mbig -meabi -fPIC -fno-builtin -I../freeldr/include
|
||||
FREELDR=../freeldr/freeldr.sys
|
||||
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
all: ofwldr
|
||||
|
||||
hack-coff$(EXEEXT):
|
||||
$(HOST_CC) -I../freeldr/include hack-coff.c -o $@
|
||||
|
||||
ofwboot.o: ofwboot.s
|
||||
$(NASM_CMD) $< -c -o $@
|
||||
|
||||
$(FREELDR):
|
||||
$(MAKE) -C ../freeldr
|
||||
|
||||
freeldr.o: $(FREELDR)
|
||||
$(TOOLS)/ppc-le2be $< freeldr.tmp
|
||||
$(OBJCOPY) -I binary -O elf32-powerpc -B powerpc:common freeldr.tmp $@
|
||||
rm freeldr.tmp
|
||||
|
||||
ofwldr: $(OBJS)
|
||||
$(LD) -melf32ppc --no-omagic $(LDSECT) $(OBJS) -g -o $@.elf
|
||||
$(OBJCOPY) $(SECTIONS) -O aixcoff-rs6000 $@.elf $@
|
||||
$(TOOLS)/hack-coff $@
|
||||
|
||||
clean:
|
||||
rm -rf ofwldr *.o *.elf *.tmp
|
@@ -89,9 +89,6 @@ main:
|
||||
mov es,ax ; Make ES correct
|
||||
|
||||
|
||||
cmp BYTE [BYTE bp+BootDrive],BYTE 0xff ; If they have specified a boot drive then use it
|
||||
jne GetDriveParameters
|
||||
|
||||
mov [BYTE bp+BootDrive],dl ; Save the boot drive
|
||||
|
||||
|
||||
|
960
reactos/boot/freeldr/bootsect/ofwboot.s
Normal file
960
reactos/boot/freeldr/bootsect/ofwboot.s
Normal file
@@ -0,0 +1,960 @@
|
||||
.section .text
|
||||
_start:
|
||||
.long 0xe00000 + 12
|
||||
.long 0
|
||||
.long 0
|
||||
|
||||
/*
|
||||
* LIFTED FROM arch/macppc/stand/ofwboot/Locore.c
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
* Copyright (C) 1995, 1996 TooLs GmbH.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by TooLs GmbH.
|
||||
* 4. The name of TooLs GmbH may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE, DATA, OR PROFITS;
|
||||
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
_begin:
|
||||
sync
|
||||
isync
|
||||
|
||||
lis %r1,stack@ha
|
||||
addi %r1,%r1,stack@l
|
||||
addi %r1,%r1,16384 - 0x10
|
||||
|
||||
mfmsr %r8
|
||||
li %r0,0
|
||||
mtmsr %r0
|
||||
isync
|
||||
|
||||
mtibatu 0,%r0
|
||||
mtibatu 1,%r0
|
||||
mtibatu 2,%r0
|
||||
mtibatu 3,%r0
|
||||
mtdbatu 0,%r0
|
||||
mtdbatu 1,%r0
|
||||
mtdbatu 2,%r0
|
||||
mtdbatu 3,%r0
|
||||
|
||||
li %r9,0x12 /* BATL(0, BAT_M, BAT_PP_RW) */
|
||||
mtibatl 0,%r9
|
||||
mtdbatl 0,%r9
|
||||
li %r9,0x1ffe /* BATU(0, BAT_BL_256M, BAT_Vs) */
|
||||
mtibatu 0,%r9
|
||||
mtdbatu 0,%r9
|
||||
isync
|
||||
|
||||
li %r8,0x3030
|
||||
mtmsr %r8
|
||||
|
||||
/* Store ofw call addr */
|
||||
mr %r21,%r5
|
||||
lis %r10,0xe00000@ha
|
||||
stw %r5,ofw_call_addr - _start@l(%r10)
|
||||
|
||||
lis %r4,_binary_freeldr_tmp_end@ha
|
||||
addi %r4,%r4,_binary_freeldr_tmp_end@l
|
||||
lis %r3,_binary_freeldr_tmp_start@ha
|
||||
addi %r3,%r3,_binary_freeldr_tmp_start@l
|
||||
|
||||
lis %r5,0x8000@ha
|
||||
addi %r5,%r5,0x8000@l
|
||||
|
||||
bl copy_bits
|
||||
|
||||
bl zero_registers
|
||||
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,freeldr_banner - _start
|
||||
|
||||
bl ofw_print_string
|
||||
|
||||
bl ofw_print_eol
|
||||
|
||||
/* Zero CTR */
|
||||
mtcr %r31
|
||||
|
||||
lis %r3,0x8000@ha
|
||||
addi %r3,%r3,0x8000@l
|
||||
|
||||
mtlr %r3
|
||||
|
||||
lis %r3,call_ofw@ha
|
||||
addi %r3,%r3,call_ofw - _start
|
||||
|
||||
b call_freeldr
|
||||
|
||||
.align 4
|
||||
call_freeldr:
|
||||
/* Get the address of the functions list --
|
||||
* Note:
|
||||
* Because of little endian switch we must use an even number of
|
||||
* instructions here.. Pad with a nop if needed. */
|
||||
mfmsr %r10
|
||||
ori %r10,%r10,1
|
||||
mtmsr %r10
|
||||
|
||||
nop
|
||||
|
||||
/* Note that this is little-endian from here on */
|
||||
blr
|
||||
nop
|
||||
|
||||
.align 4
|
||||
call_ofw:
|
||||
/* R3 has the function offset to call (n * 4)
|
||||
* Other arg registers are unchanged.
|
||||
* Note that these 4 instructions are in reverse order due to
|
||||
* little-endian convention */
|
||||
andi. %r0,%r0,65534
|
||||
mfmsr %r0
|
||||
mtmsr %r0
|
||||
/* Now normal ordering resumes */
|
||||
subi %r1,%r1,0x100
|
||||
|
||||
stw %r8,4(%r1)
|
||||
stw %r9,8(%r1)
|
||||
stw %r10,12(%r1)
|
||||
mflr %r8
|
||||
stw %r8,16(%r1)
|
||||
|
||||
lis %r10,0xe00000@ha
|
||||
add %r9,%r3,%r10
|
||||
lwz %r3,ofw_functions - _start@l(%r9)
|
||||
mtctr %r3
|
||||
|
||||
mr %r3,%r4
|
||||
mr %r4,%r5
|
||||
mr %r5,%r6
|
||||
mr %r6,%r7
|
||||
mr %r7,%r8
|
||||
|
||||
/* Goto the swapped function */
|
||||
bctrl
|
||||
|
||||
lwz %r8,16(%r1)
|
||||
mtlr %r8
|
||||
|
||||
lwz %r8,4(%r1)
|
||||
lwz %r9,8(%r1)
|
||||
lwz %r10,12(%r1)
|
||||
|
||||
addi %r1,%r1,0x100
|
||||
/* Ok, go back to little endian */
|
||||
mfmsr %r0
|
||||
ori %r0,%r0,1
|
||||
mtmsr %r0
|
||||
|
||||
/* Note that this is little-endian from here on */
|
||||
blr
|
||||
nop
|
||||
|
||||
zero_registers:
|
||||
xor %r2,%r2,%r2
|
||||
mr %r0,%r2
|
||||
mr %r3,%r2
|
||||
|
||||
mr %r4,%r2
|
||||
mr %r5,%r2
|
||||
mr %r6,%r2
|
||||
mr %r7,%r2
|
||||
|
||||
mr %r8,%r2
|
||||
mr %r9,%r2
|
||||
mr %r10,%r2
|
||||
mr %r11,%r2
|
||||
|
||||
mr %r12,%r2
|
||||
mr %r13,%r2
|
||||
mr %r14,%r2
|
||||
mr %r15,%r2
|
||||
|
||||
mr %r12,%r2
|
||||
mr %r13,%r2
|
||||
mr %r14,%r2
|
||||
mr %r15,%r2
|
||||
|
||||
mr %r16,%r2
|
||||
mr %r17,%r2
|
||||
mr %r18,%r2
|
||||
mr %r19,%r2
|
||||
|
||||
mr %r20,%r2
|
||||
mr %r21,%r2
|
||||
mr %r22,%r2
|
||||
mr %r23,%r2
|
||||
|
||||
mr %r24,%r2
|
||||
mr %r25,%r2
|
||||
mr %r26,%r2
|
||||
mr %r27,%r2
|
||||
|
||||
mr %r28,%r2
|
||||
mr %r29,%r2
|
||||
mr %r30,%r2
|
||||
mr %r31,%r2
|
||||
|
||||
blr
|
||||
|
||||
prim_strlen:
|
||||
mr %r5,%r3
|
||||
prim_strlen_loop:
|
||||
lbz %r4,0(%r3)
|
||||
cmpi 0,0,%r4,0
|
||||
beq prim_strlen_done
|
||||
addi %r3,%r3,1
|
||||
b prim_strlen_loop
|
||||
|
||||
prim_strlen_done:
|
||||
sub %r3,%r3,%r5
|
||||
blr
|
||||
|
||||
copy_bits:
|
||||
cmp 0,0,%r3,%r4
|
||||
beqlr
|
||||
lwz %r6,0(%r3)
|
||||
stw %r6,0(%r5)
|
||||
addi %r3,%r3,4
|
||||
addi %r5,%r5,4
|
||||
b copy_bits
|
||||
|
||||
ofw_print_string_hook:
|
||||
bl ofw_print_number
|
||||
bl ofw_exit
|
||||
|
||||
ofw_print_string:
|
||||
/* Reserve some stack space */
|
||||
subi %r1,%r1,32
|
||||
|
||||
/* Save args */
|
||||
stw %r3,0(%r1)
|
||||
|
||||
/* Save the lr, a scratch register */
|
||||
stw %r8,8(%r1)
|
||||
mflr %r8
|
||||
stw %r8,12(%r1)
|
||||
|
||||
/* Load the package name */
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,ofw_chosen_name - _start
|
||||
|
||||
/* Fire */
|
||||
bl ofw_finddevice
|
||||
|
||||
/* Load up for getprop */
|
||||
stw %r3,16(%r1)
|
||||
|
||||
lis %r4,0xe00000@ha
|
||||
addi %r4,%r4,ofw_stdout_name - _start
|
||||
|
||||
addi %r5,%r1,20
|
||||
|
||||
li %r6,4
|
||||
|
||||
bl ofw_getprop
|
||||
|
||||
/* Measure the string and remember the length */
|
||||
lwz %r3,0(%r1)
|
||||
bl prim_strlen
|
||||
mr %r5,%r3
|
||||
|
||||
lwz %r3,20(%r1)
|
||||
lwz %r4,0(%r1)
|
||||
|
||||
/* Write the string */
|
||||
bl ofw_write
|
||||
|
||||
/* Return */
|
||||
lwz %r8,12(%r1)
|
||||
mtlr %r8
|
||||
lwz %r8,8(%r1)
|
||||
|
||||
addi %r1,%r1,32
|
||||
blr
|
||||
|
||||
/* Print 8 hex digits representing a number in r3 */
|
||||
ofw_print_number:
|
||||
subi %r1,%r1,32
|
||||
stw %r8,0(%r1)
|
||||
mflr %r8
|
||||
stw %r8,4(%r1)
|
||||
stw %r9,8(%r1)
|
||||
|
||||
xor %r9,%r9,%r9
|
||||
stw %r9,12(%r1)
|
||||
|
||||
/* Set up and, devide, shift */
|
||||
mr %r8,%r3
|
||||
lis %r6,0xf0000000@ha
|
||||
lis %r7,0x10000000@ha
|
||||
li %r9,8
|
||||
|
||||
ofw_number_loop:
|
||||
nop
|
||||
cmpi 0,0,%r9,0
|
||||
beq ofw_number_return
|
||||
subi %r9,%r9,1
|
||||
|
||||
/* Body: isolate digit, divide, print */
|
||||
and %r5,%r6,%r8
|
||||
divwu %r4,%r5,%r7
|
||||
srwi %r6,%r6,4
|
||||
srwi %r7,%r7,4
|
||||
|
||||
nop
|
||||
|
||||
cmpi 0,0,%r4,10
|
||||
bge ofw_number_letter
|
||||
addi %r4,%r4,'0'
|
||||
b ofw_number_digit_out
|
||||
|
||||
ofw_number_letter:
|
||||
addi %r4,%r4,'A' - 10
|
||||
|
||||
ofw_number_digit_out:
|
||||
stb %r4,12(%r1)
|
||||
addi %r3,%r1,12
|
||||
|
||||
stw %r6,16(%r1)
|
||||
stw %r7,20(%r1)
|
||||
stw %r8,24(%r1)
|
||||
stw %r9,28(%r1)
|
||||
|
||||
bl ofw_print_string
|
||||
|
||||
lwz %r6,16(%r1)
|
||||
lwz %r7,20(%r1)
|
||||
lwz %r8,24(%r1)
|
||||
lwz %r9,28(%r1)
|
||||
|
||||
b ofw_number_loop
|
||||
|
||||
ofw_number_return:
|
||||
/* Return */
|
||||
lwz %r9,8(%r1)
|
||||
lwz %r8,4(%r1)
|
||||
mtlr %r8
|
||||
lwz %r8,0(%r1)
|
||||
addi %r1,%r1,32
|
||||
blr
|
||||
|
||||
ofw_print_eol:
|
||||
subi %r1,%r1,16
|
||||
stw %r8,0(%r1)
|
||||
mflr %r8
|
||||
stw %r8,4(%r1)
|
||||
li %r4,0x0d0a
|
||||
sth %r4,8(%r1)
|
||||
xor %r4,%r4,%r4
|
||||
sth %r4,10(%r1)
|
||||
addi %r3,%r1,8
|
||||
bl ofw_print_string
|
||||
lwz %r8,4(%r1)
|
||||
mtlr %r8
|
||||
lwz %r8,0(%r1)
|
||||
addi %r1,%r1,16
|
||||
blr
|
||||
|
||||
ofw_print_nothing:
|
||||
subi %r1,%r1,16
|
||||
stw %r8,0(%r1)
|
||||
mflr %r8
|
||||
stw %r8,4(%r1)
|
||||
li %r4,0
|
||||
sth %r4,8(%r1)
|
||||
xor %r4,%r4,%r4
|
||||
sth %r4,10(%r1)
|
||||
addi %r3,%r1,8
|
||||
bl ofw_print_string
|
||||
lwz %r8,4(%r1)
|
||||
mtlr %r8
|
||||
lwz %r8,0(%r1)
|
||||
addi %r1,%r1,16
|
||||
blr
|
||||
|
||||
ofw_print_space:
|
||||
subi %r1,%r1,16
|
||||
stw %r8,0(%r1)
|
||||
mflr %r8
|
||||
stw %r8,4(%r1)
|
||||
li %r4,0x2000
|
||||
sth %r4,8(%r1)
|
||||
xor %r4,%r4,%r4
|
||||
sth %r4,10(%r1)
|
||||
addi %r3,%r1,8
|
||||
bl ofw_print_string
|
||||
lwz %r8,4(%r1)
|
||||
mtlr %r8
|
||||
lwz %r8,0(%r1)
|
||||
addi %r1,%r1,16
|
||||
blr
|
||||
|
||||
ofw_print_regs:
|
||||
/* Construct ofw exit call */
|
||||
subi %r1,%r1,0xa0
|
||||
|
||||
stw %r0,0(%r1)
|
||||
stw %r1,4(%r1)
|
||||
stw %r2,8(%r1)
|
||||
stw %r3,12(%r1)
|
||||
|
||||
stw %r4,16(%r1)
|
||||
stw %r5,20(%r1)
|
||||
stw %r6,24(%r1)
|
||||
stw %r7,28(%r1)
|
||||
|
||||
stw %r8,32(%r1)
|
||||
stw %r9,36(%r1)
|
||||
stw %r10,40(%r1)
|
||||
stw %r11,44(%r1)
|
||||
|
||||
stw %r12,48(%r1)
|
||||
stw %r13,52(%r1)
|
||||
stw %r14,56(%r1)
|
||||
stw %r15,60(%r1)
|
||||
|
||||
stw %r16,64(%r1)
|
||||
stw %r17,68(%r1)
|
||||
stw %r18,72(%r1)
|
||||
stw %r19,76(%r1)
|
||||
|
||||
stw %r20,80(%r1)
|
||||
stw %r21,84(%r1)
|
||||
stw %r22,88(%r1)
|
||||
stw %r23,92(%r1)
|
||||
|
||||
stw %r24,96(%r1)
|
||||
stw %r25,100(%r1)
|
||||
stw %r26,104(%r1)
|
||||
stw %r27,108(%r1)
|
||||
|
||||
stw %r28,112(%r1)
|
||||
stw %r29,116(%r1)
|
||||
stw %r30,120(%r1)
|
||||
stw %r31,124(%r1)
|
||||
|
||||
mflr %r0
|
||||
stw %r0,128(%r1)
|
||||
mfcr %r0
|
||||
stw %r0,132(%r1)
|
||||
mfctr %r0
|
||||
stw %r0,136(%r1)
|
||||
mfmsr %r0
|
||||
stw %r0,140(%r1)
|
||||
|
||||
/* Count at zero */
|
||||
xor %r0,%r0,%r0
|
||||
stw %r0,144(%r1)
|
||||
mr %r3,%r1
|
||||
stw %r3,148(%r1)
|
||||
|
||||
/* Body, print the regname, then the register */
|
||||
ofw_register_loop:
|
||||
lwz %r3,144(%r1)
|
||||
cmpi 0,0,%r3,32
|
||||
beq ofw_register_special
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,freeldr_reg_init - _start
|
||||
bl ofw_print_string
|
||||
lwz %r3,144(%r1)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_space
|
||||
lwz %r3,144(%r1)
|
||||
mulli %r3,%r3,4
|
||||
add %r3,%r1,%r3
|
||||
lwz %r3,0(%r3)
|
||||
stw %r3,152(%r1)
|
||||
bl ofw_print_number
|
||||
lwz %r3,144(%r1)
|
||||
addi %r3,%r3,1
|
||||
stw %r3,144(%r1)
|
||||
b done_dump
|
||||
|
||||
dump_optional:
|
||||
bl ofw_print_space
|
||||
bl ofw_print_space
|
||||
lwz %r3,152(%r1)
|
||||
lwz %r3,0(%r3)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_space
|
||||
lwz %r3,152(%r1)
|
||||
lwz %r3,4(%r3)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_space
|
||||
lwz %r3,152(%r1)
|
||||
lwz %r3,8(%r3)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_space
|
||||
lwz %r3,152(%r1)
|
||||
lwz %r3,12(%r3)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_space
|
||||
done_dump:
|
||||
bl ofw_print_eol
|
||||
b ofw_register_loop
|
||||
|
||||
ofw_register_special:
|
||||
/* LR */
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,freeldr_reg_lr - _start
|
||||
bl ofw_print_string
|
||||
bl ofw_print_space
|
||||
lwz %r3,128(%r1)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_eol
|
||||
|
||||
/* CR */
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,freeldr_reg_cr - _start
|
||||
bl ofw_print_string
|
||||
bl ofw_print_space
|
||||
lwz %r3,132(%r1)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_eol
|
||||
|
||||
/* CTR */
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,freeldr_reg_ctr - _start
|
||||
bl ofw_print_string
|
||||
bl ofw_print_space
|
||||
lwz %r3,136(%r1)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_eol
|
||||
|
||||
/* MSR */
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,freeldr_reg_msr - _start
|
||||
bl ofw_print_string
|
||||
bl ofw_print_space
|
||||
lwz %r3,140(%r1)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_eol
|
||||
|
||||
/* Return */
|
||||
lwz %r0,128(%r1)
|
||||
mtlr %r0
|
||||
|
||||
lwz %r0,0(%r1)
|
||||
lwz %r2,8(%r1)
|
||||
lwz %r3,12(%r1)
|
||||
|
||||
lwz %r4,16(%r1)
|
||||
lwz %r5,20(%r1)
|
||||
lwz %r6,24(%r1)
|
||||
lwz %r7,28(%r1)
|
||||
|
||||
addi %r1,%r1,0xa0
|
||||
|
||||
blr
|
||||
|
||||
ofw_finddevice_hook:
|
||||
subi %r1,%r1,32
|
||||
stw %r3,0(%r1)
|
||||
mflr %r3
|
||||
stw %r3,4(%r1)
|
||||
lwz %r3,0(%r1)
|
||||
bl ofw_finddevice
|
||||
stw %r3,0(%r1)
|
||||
lwz %r3,4(%r1)
|
||||
mtlr %r3
|
||||
lwz %r3,0(%r1)
|
||||
addi %r1,%r1,32
|
||||
blr
|
||||
|
||||
ofw_finddevice:
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
* r8, r9, and lr */
|
||||
subi %r1,%r1,32
|
||||
|
||||
/* Store r8, r9, lr */
|
||||
stw %r8,20(%r1)
|
||||
stw %r9,24(%r1)
|
||||
mflr %r8
|
||||
stw %r8,28(%r1)
|
||||
|
||||
/* Get finddevice name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_finddevice_name - _start
|
||||
stw %r9,0(%r1)
|
||||
|
||||
/* 1 Argument and 1 return */
|
||||
li %r9,1
|
||||
stw %r9,4(%r1)
|
||||
stw %r9,8(%r1)
|
||||
|
||||
stw %r3,12(%r1)
|
||||
|
||||
/* Load up the call address */
|
||||
lwz %r9,ofw_call_addr - _start(%r8)
|
||||
mtlr %r9
|
||||
|
||||
/* Set argument */
|
||||
mr %r3,%r1
|
||||
|
||||
/* Fire */
|
||||
blrl
|
||||
|
||||
lwz %r3,16(%r1)
|
||||
|
||||
/* Restore registers */
|
||||
lwz %r8,28(%r1)
|
||||
mtlr %r8
|
||||
lwz %r9,24(%r1)
|
||||
lwz %r8,20(%r1)
|
||||
|
||||
addi %r1,%r1,32
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
ofw_getprop_hook:
|
||||
/* Reserve stack space:
|
||||
* 32 bytes for the ofw call
|
||||
* 12 bytes for r8, r9, lr
|
||||
*/
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
* r8, r9, and lr */
|
||||
subi %r1,%r1,48
|
||||
|
||||
/* Store r8, r9, lr */
|
||||
stw %r8,32(%r1)
|
||||
stw %r9,36(%r1)
|
||||
mflr %r8
|
||||
stw %r8,40(%r1)
|
||||
|
||||
/* Get getprop name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_getprop_name - _start
|
||||
stw %r9,0(%r1)
|
||||
|
||||
/* 4 Argument and 1 return */
|
||||
li %r9,4
|
||||
stw %r9,4(%r1)
|
||||
li %r9,1
|
||||
stw %r9,8(%r1)
|
||||
|
||||
stw %r3,12(%r1) /* Package */
|
||||
stw %r4,16(%r1) /* Property */
|
||||
stw %r5,20(%r1) /* Return buffer */
|
||||
stw %r6,24(%r1) /* Buffer size */
|
||||
|
||||
/* Load up the call address */
|
||||
lwz %r9,ofw_call_addr - _start(%r8)
|
||||
mtlr %r9
|
||||
|
||||
/* Set argument */
|
||||
mr %r3,%r1
|
||||
|
||||
/* Fire */
|
||||
blrl
|
||||
|
||||
/* Workaround to a wierd crash ... not sure what causes it.
|
||||
* XXX investigate me */
|
||||
bl ofw_print_nothing
|
||||
|
||||
/* Return */
|
||||
lwz %r3,28(%r1)
|
||||
|
||||
/* Restore registers */
|
||||
lwz %r8,40(%r1)
|
||||
mtlr %r8
|
||||
lwz %r9,36(%r1)
|
||||
lwz %r8,32(%r1)
|
||||
|
||||
addi %r1,%r1,48
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
ofw_getprop:
|
||||
/* Reserve stack space:
|
||||
* 32 bytes for the ofw call
|
||||
* 12 bytes for r8, r9, lr
|
||||
*/
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
* r8, r9, and lr */
|
||||
subi %r1,%r1,48
|
||||
|
||||
/* Store r8, r9, lr */
|
||||
stw %r8,32(%r1)
|
||||
stw %r9,36(%r1)
|
||||
mflr %r8
|
||||
stw %r8,40(%r1)
|
||||
|
||||
/* Get getprop name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_getprop_name - _start
|
||||
stw %r9,0(%r1)
|
||||
|
||||
/* 4 Argument and 1 return */
|
||||
li %r9,4
|
||||
stw %r9,4(%r1)
|
||||
li %r9,1
|
||||
stw %r9,8(%r1)
|
||||
|
||||
stw %r3,12(%r1) /* Package */
|
||||
stw %r4,16(%r1) /* Property */
|
||||
stw %r5,20(%r1) /* Return buffer */
|
||||
stw %r6,24(%r1) /* Buffer size */
|
||||
|
||||
/* Load up the call address */
|
||||
lwz %r9,ofw_call_addr - _start(%r8)
|
||||
mtlr %r9
|
||||
|
||||
/* Set argument */
|
||||
mr %r3,%r1
|
||||
|
||||
/* Fire */
|
||||
blrl
|
||||
|
||||
/* Return */
|
||||
lwz %r3,28(%r1)
|
||||
|
||||
/* Restore registers */
|
||||
lwz %r8,40(%r1)
|
||||
|
||||
mtlr %r8
|
||||
lwz %r9,36(%r1)
|
||||
lwz %r8,32(%r1)
|
||||
|
||||
addi %r1,%r1,48
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
ofw_write:
|
||||
/* Reserve stack space:
|
||||
* 28 bytes for the ofw call
|
||||
* 12 bytes for r8, r9, lr
|
||||
*/
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
* r8, r9, and lr */
|
||||
subi %r1,%r1,48
|
||||
|
||||
nop
|
||||
|
||||
/* Store r8, r9, lr */
|
||||
stw %r8,28(%r1)
|
||||
stw %r9,32(%r1)
|
||||
mflr %r8
|
||||
stw %r8,36(%r1)
|
||||
|
||||
/* Get write name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_write_name - _start
|
||||
stw %r9,0(%r1)
|
||||
|
||||
/* 3 Arguments and 1 return */
|
||||
li %r9,3
|
||||
stw %r9,4(%r1)
|
||||
li %r9,1
|
||||
stw %r9,8(%r1)
|
||||
|
||||
stw %r3,12(%r1)
|
||||
stw %r4,16(%r1)
|
||||
stw %r5,20(%r1)
|
||||
|
||||
/* Load up the call address */
|
||||
lwz %r9,ofw_call_addr - _start(%r8)
|
||||
mtlr %r9
|
||||
|
||||
/* Set argument */
|
||||
mr %r3,%r1
|
||||
|
||||
/* Fire */
|
||||
blrl
|
||||
|
||||
/* Return */
|
||||
lwz %r3,24(%r1)
|
||||
|
||||
/* Restore registers */
|
||||
lwz %r8,36(%r1)
|
||||
mtlr %r8
|
||||
lwz %r9,32(%r1)
|
||||
lwz %r8,28(%r1)
|
||||
|
||||
addi %r1,%r1,48
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
ofw_read:
|
||||
/* Reserve stack space:
|
||||
* 28 bytes for the ofw call
|
||||
* 12 bytes for r8, r9, lr
|
||||
*/
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
* r8, r9, and lr */
|
||||
subi %r1,%r1,48
|
||||
|
||||
nop
|
||||
|
||||
/* Store r8, r9, lr */
|
||||
stw %r8,28(%r1)
|
||||
stw %r9,32(%r1)
|
||||
mflr %r8
|
||||
stw %r8,36(%r1)
|
||||
|
||||
/* Get read name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_read_name - _start
|
||||
stw %r9,0(%r1)
|
||||
|
||||
/* 3 Arguments and 1 return */
|
||||
li %r9,3
|
||||
stw %r9,4(%r1)
|
||||
li %r9,1
|
||||
stw %r9,8(%r1)
|
||||
|
||||
stw %r3,12(%r1)
|
||||
stw %r4,16(%r1)
|
||||
stw %r5,20(%r1)
|
||||
|
||||
/* Load up the call address */
|
||||
lwz %r9,ofw_call_addr - _start(%r8)
|
||||
mtlr %r9
|
||||
|
||||
/* Set argument */
|
||||
mr %r3,%r1
|
||||
|
||||
/* Fire */
|
||||
blrl
|
||||
|
||||
/* Return */
|
||||
lwz %r3,24(%r1)
|
||||
|
||||
/* Restore registers */
|
||||
lwz %r8,36(%r1)
|
||||
mtlr %r8
|
||||
lwz %r9,32(%r1)
|
||||
lwz %r8,28(%r1)
|
||||
|
||||
addi %r1,%r1,48
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
ofw_exit:
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,freeldr_halt - _start
|
||||
|
||||
bl ofw_print_string
|
||||
/*
|
||||
ofw_exit_loop:
|
||||
b ofw_exit_loop
|
||||
*/
|
||||
/* Load the exit name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_exit_name - _start
|
||||
stw %r9,0(%r1)
|
||||
|
||||
/* Zero args, zero returns */
|
||||
xor %r9,%r9,%r9
|
||||
stw %r9,4(%r1)
|
||||
stw %r9,8(%r1)
|
||||
|
||||
/* Load up the call address */
|
||||
lwz %r9,ofw_call_addr - _start(%r8)
|
||||
mtlr %r9
|
||||
|
||||
mr %r3,%r1
|
||||
|
||||
/* Fire */
|
||||
blrl
|
||||
/* No return from exit */
|
||||
|
||||
.org 0x1000
|
||||
freeldr_banner:
|
||||
.ascii "ReactOS OpenFirmware Boot Program\r\n\0"
|
||||
|
||||
freeldr_halt:
|
||||
.ascii "ReactOS OpenFirmware Boot Program Halting\r\n\0"
|
||||
|
||||
freeldr_reg_init:
|
||||
.ascii "r\0"
|
||||
|
||||
freeldr_reg_lr:
|
||||
.ascii "lr \0"
|
||||
freeldr_reg_cr:
|
||||
.ascii "cr \0"
|
||||
freeldr_reg_ctr:
|
||||
.ascii "ctr\0"
|
||||
freeldr_reg_msr:
|
||||
.ascii "msr\0"
|
||||
|
||||
ofw_call_addr:
|
||||
.long 0
|
||||
|
||||
ofw_memory_size:
|
||||
.long 0
|
||||
.long 0
|
||||
.long 0
|
||||
.long 0
|
||||
|
||||
ofw_finddevice_name:
|
||||
.ascii "finddevice\0"
|
||||
|
||||
ofw_getprop_name:
|
||||
.ascii "getprop\0"
|
||||
|
||||
ofw_write_name:
|
||||
.ascii "write\0"
|
||||
|
||||
ofw_read_name:
|
||||
.ascii "read\0"
|
||||
|
||||
ofw_exit_name:
|
||||
.ascii "exit\0"
|
||||
|
||||
ofw_chosen_name:
|
||||
.ascii "/chosen\0"
|
||||
|
||||
ofw_stdout_name:
|
||||
.ascii "stdout\0"
|
||||
|
||||
ofw_memory_name:
|
||||
.ascii "/memory@0\0"
|
||||
|
||||
ofw_reg_name:
|
||||
.ascii "reg\0"
|
||||
|
||||
ofw_functions:
|
||||
.long ofw_finddevice_hook
|
||||
.long ofw_getprop_hook
|
||||
.long ofw_write
|
||||
.long ofw_read
|
||||
.long ofw_exit
|
||||
.long ofw_print_regs
|
||||
.long ofw_print_string
|
||||
.long ofw_print_number
|
||||
|
||||
.org 0x2000
|
||||
stack:
|
||||
.space 0x4000
|
@@ -47,10 +47,10 @@ EXTERN(RealEntryPoint)
|
||||
.code32
|
||||
|
||||
/* Store the boot drive */
|
||||
movb %dl,(_BootDrive)
|
||||
movb %dl,(_i386BootDrive)
|
||||
|
||||
/* Store the boot partition */
|
||||
movb %dh,(_BootPartition)
|
||||
movb %dh,(_i386BootPartition)
|
||||
|
||||
/* GO! */
|
||||
xorl %eax,%eax
|
||||
@@ -275,9 +275,11 @@ EXTERN(_DisableA20)
|
||||
* other boot loaders like Grub
|
||||
*/
|
||||
|
||||
#define MB_INFO_SIZE 90
|
||||
#define MB_INFO_FLAGS_OFFSET 0
|
||||
#define MB_INFO_BOOT_DEVICE_OFFSET 12
|
||||
#define MB_INFO_COMMAND_LINE_OFFSET 16
|
||||
#define CMDLINE_SIZE 256
|
||||
|
||||
/*
|
||||
* We want to execute at 0x8000 (to be compatible with bootsector
|
||||
@@ -285,7 +287,6 @@ EXTERN(_DisableA20)
|
||||
* above 1MB. So we let Grub load us there and then relocate
|
||||
* ourself to 0x8000
|
||||
*/
|
||||
#define CMDLINE_BASE 0x7000
|
||||
#define FREELDR_BASE 0x8000
|
||||
#define INITIAL_BASE 0x200000
|
||||
|
||||
@@ -328,6 +329,31 @@ mb1:
|
||||
movw %dx,%ds
|
||||
movw %dx,%es
|
||||
|
||||
/* Check for valid multiboot signature */
|
||||
cmpl $MULTIBOOT_BOOTLOADER_MAGIC,%eax
|
||||
jne mbfail
|
||||
|
||||
/* Store multiboot info in a safe place */
|
||||
movl %ebx,%esi
|
||||
movl $(mb_info + INITIAL_BASE - FREELDR_BASE),%edi
|
||||
movl $MB_INFO_SIZE,%ecx
|
||||
rep movsb
|
||||
|
||||
/* Save commandline */
|
||||
movl MB_INFO_FLAGS_OFFSET(%ebx),%edx
|
||||
testl $MB_INFO_FLAG_COMMAND_LINE,MB_INFO_FLAGS_OFFSET(%ebx)
|
||||
jz mb3
|
||||
movl MB_INFO_COMMAND_LINE_OFFSET(%ebx),%esi
|
||||
movl $(cmdline + INITIAL_BASE - FREELDR_BASE),%edi
|
||||
movl $CMDLINE_SIZE,%ecx
|
||||
mb2: lodsb
|
||||
stosb
|
||||
testb %al,%al
|
||||
jz mb3
|
||||
dec %ecx
|
||||
jnz mb2
|
||||
mb3:
|
||||
|
||||
/* Copy to low mem */
|
||||
movl $INITIAL_BASE,%esi
|
||||
movl $FREELDR_BASE,%edi
|
||||
@@ -342,8 +368,8 @@ mb1:
|
||||
|
||||
/* Clear prefetch queue & correct CS,
|
||||
* jump to low mem */
|
||||
ljmp $PMODE_CS, $mb2
|
||||
mb2:
|
||||
ljmp $PMODE_CS, $mb4
|
||||
mb4:
|
||||
/* Reload segment selectors */
|
||||
movw $PMODE_DS,%dx
|
||||
movw %dx,%ds
|
||||
@@ -353,39 +379,28 @@ mb2:
|
||||
movw %dx,%ss
|
||||
movl $STACK32ADDR,%esp
|
||||
|
||||
/* Check for valid multiboot signature */
|
||||
cmpl $MULTIBOOT_BOOTLOADER_MAGIC,%eax
|
||||
jne mbfail
|
||||
|
||||
movl $mb_info,%ebx
|
||||
/* See if the boot device was passed in */
|
||||
movl MB_INFO_FLAGS_OFFSET(%ebx),%edx
|
||||
testl $MB_INFO_FLAG_BOOT_DEVICE,%edx
|
||||
jz mb3
|
||||
jz mb5
|
||||
/* Retrieve boot device info */
|
||||
movl MB_INFO_BOOT_DEVICE_OFFSET(%ebx),%eax
|
||||
shrl $16,%eax
|
||||
incb %al
|
||||
movb %al,_BootPartition
|
||||
movb %ah,_BootDrive
|
||||
jmp mb4
|
||||
mb3: /* No boot device known, assume first partition of first harddisk */
|
||||
movb $0x80,_BootDrive
|
||||
movb $1,_BootPartition
|
||||
mb4:
|
||||
|
||||
/* Check for a command line */
|
||||
xorl %eax,%eax
|
||||
testl $MB_INFO_FLAG_COMMAND_LINE,%edx
|
||||
jz mb6
|
||||
/* Copy command line to low mem*/
|
||||
movl MB_INFO_COMMAND_LINE_OFFSET(%ebx),%esi
|
||||
movl $CMDLINE_BASE,%edi
|
||||
mb5: lodsb
|
||||
stosb
|
||||
testb %al,%al
|
||||
jnz mb5
|
||||
movl $CMDLINE_BASE,%eax
|
||||
movb %al,_i386BootPartition
|
||||
movb %ah,_i386BootDrive
|
||||
jmp mb6
|
||||
mb5: /* No boot device known, assume first partition of first harddisk */
|
||||
movb $0x80,_i386BootDrive
|
||||
movb $1,_i386BootPartition
|
||||
mb6:
|
||||
/* Check for command line */
|
||||
mov $cmdline,%eax
|
||||
testl $MB_INFO_FLAG_COMMAND_LINE,MB_INFO_FLAGS_OFFSET(%ebx)
|
||||
jnz mb7
|
||||
xorl %eax,%eax
|
||||
mb7:
|
||||
|
||||
/* GO! */
|
||||
pushl %eax
|
||||
@@ -462,8 +477,15 @@ rmode_idtptr:
|
||||
.word 0x3ff /* Limit */
|
||||
.long 0 /* Base Address */
|
||||
|
||||
EXTERN(_BootDrive)
|
||||
EXTERN(_i386BootDrive)
|
||||
.long 0
|
||||
|
||||
EXTERN(_BootPartition)
|
||||
EXTERN(_i386BootPartition)
|
||||
.long 0
|
||||
|
||||
.bss
|
||||
mb_info:
|
||||
.fill MB_INFO_SIZE, 1, 0
|
||||
|
||||
cmdline:
|
||||
.fill CMDLINE_SIZE, 1, 0
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#include "rtl.h"
|
||||
|
||||
VOID
|
||||
MachInit(VOID)
|
||||
MachInit(char *CmdLine)
|
||||
{
|
||||
ULONG PciId;
|
||||
|
||||
@@ -39,11 +39,11 @@ MachInit(VOID)
|
||||
PciId = READ_PORT_ULONG((ULONG*) 0xcfc);
|
||||
if (0x02a510de == PciId)
|
||||
{
|
||||
XboxMachInit();
|
||||
XboxMachInit(CmdLine);
|
||||
}
|
||||
else
|
||||
{
|
||||
PcMachInit();
|
||||
PcMachInit(CmdLine);
|
||||
}
|
||||
|
||||
HalpCalibrateStallExecution();
|
||||
|
@@ -31,7 +31,7 @@ EXTERN(_ChainLoadBiosBootSectorCode)
|
||||
.code16
|
||||
|
||||
/* Set the boot drive */
|
||||
movb (_BootDrive),%dl
|
||||
movb (_i386BootDrive),%dl
|
||||
|
||||
/* Load segment registers */
|
||||
cli
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "../../reactos/registry.h"
|
||||
#include "hardware.h"
|
||||
|
||||
BOOLEAN AcpiPresent = FALSE;
|
||||
|
||||
static BOOL
|
||||
FindAcpiBios(VOID)
|
||||
@@ -63,6 +64,7 @@ DetectAcpiBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
|
||||
|
||||
if (FindAcpiBios())
|
||||
{
|
||||
AcpiPresent = TRUE;
|
||||
/* Create new bus key */
|
||||
sprintf(Buffer,
|
||||
"MultifunctionAdapter\\%u", *BusNumber);
|
||||
|
40
reactos/boot/freeldr/freeldr/arch/i386/i386.h
Normal file
40
reactos/boot/freeldr/freeldr/arch/i386/i386.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* FreeLoader
|
||||
*
|
||||
* Copyright (C) 2003 Eric Kohl
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __I386_I386_H_
|
||||
#define __I386_I386_H_
|
||||
|
||||
|
||||
extern ULONG i386BootDrive;
|
||||
extern ULONG i386BootPartition;
|
||||
|
||||
extern BOOL i386DiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector,
|
||||
PULONGLONG SectorCount, int *FsType);
|
||||
extern BOOL i386DiskGetSystemVolume(char *SystemPath, char *RemainingPath,
|
||||
PULONG Device, PULONG DriveNumber,
|
||||
PULONGLONG StartSector,
|
||||
PULONGLONG SectorCount, int *FsType);
|
||||
extern BOOL i386DiskGetBootPath(char *BootPath, unsigned Size);
|
||||
extern VOID i386DiskGetBootDevice(PULONG BootDevice);
|
||||
extern BOOL i386DiskBootingFromFloppy(VOID);
|
||||
|
||||
#endif /* __I386_I386_H_ */
|
||||
|
||||
/* EOF */
|
@@ -19,6 +19,8 @@
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "debug.h"
|
||||
#include "i386.h"
|
||||
#include "fsrec.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// FUNCTIONS
|
||||
@@ -166,4 +168,244 @@ BOOL DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT Buff
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif // defined __i386__
|
||||
BOOL i386DiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType)
|
||||
{
|
||||
PARTITION_TABLE_ENTRY PartitionTableEntry;
|
||||
UCHAR VolumeType;
|
||||
|
||||
DbgPrint((DPRINT_FILESYSTEM, "FsOpenVolume() DriveNumber: 0x%x PartitionNumber: 0x%x\n", i386BootDrive, i386BootPartition));
|
||||
|
||||
// Check and see if it is a floppy drive
|
||||
// If so then just assume FAT12 file system type
|
||||
if (DiskIsDriveRemovable(i386BootDrive))
|
||||
{
|
||||
DbgPrint((DPRINT_FILESYSTEM, "Drive is a floppy diskette drive. Assuming FAT12 file system.\n"));
|
||||
|
||||
*DriveNumber = i386BootDrive;
|
||||
*StartSector = 0;
|
||||
*SectorCount = 2 * 80 * 18; /* FIXME hardcoded for 1.44 Mb */
|
||||
*FsType = FS_FAT;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Check for ISO9660 file system type
|
||||
if (i386BootDrive >= 0x80 && FsRecIsIso9660(i386BootDrive))
|
||||
{
|
||||
DbgPrint((DPRINT_FILESYSTEM, "Drive is a cdrom drive. Assuming ISO-9660 file system.\n"));
|
||||
|
||||
*DriveNumber = i386BootDrive;
|
||||
*StartSector = 0;
|
||||
*SectorCount = 0;
|
||||
*FsType = FS_ISO9660;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Get the requested partition entry
|
||||
if (i386BootPartition == 0)
|
||||
{
|
||||
// Partition requested was zero which means the boot partition
|
||||
if (! DiskGetActivePartitionEntry(i386BootDrive, &PartitionTableEntry))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get requested partition
|
||||
if (! MachDiskGetPartitionEntry(i386BootDrive, i386BootPartition, &PartitionTableEntry))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for valid partition
|
||||
if (PartitionTableEntry.SystemIndicator == PARTITION_ENTRY_UNUSED)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Try to recognize the file system
|
||||
if (!FsRecognizeVolume(i386BootDrive, PartitionTableEntry.SectorCountBeforePartition, &VolumeType))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*DriveNumber = i386BootDrive;
|
||||
*StartSector = PartitionTableEntry.SectorCountBeforePartition;
|
||||
*SectorCount = PartitionTableEntry.PartitionSectorCount;
|
||||
|
||||
//switch (PartitionTableEntry.SystemIndicator)
|
||||
switch (VolumeType)
|
||||
{
|
||||
case PARTITION_FAT_12:
|
||||
case PARTITION_FAT_16:
|
||||
case PARTITION_HUGE:
|
||||
case PARTITION_XINT13:
|
||||
case PARTITION_FAT32:
|
||||
case PARTITION_FAT32_XINT13:
|
||||
*FsType = FS_FAT;
|
||||
return TRUE;
|
||||
case PARTITION_EXT2:
|
||||
*FsType = FS_EXT2;
|
||||
return TRUE;
|
||||
case PARTITION_NTFS:
|
||||
*FsType = FS_NTFS;
|
||||
return TRUE;
|
||||
default:
|
||||
*FsType = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
VOID
|
||||
i386DiskGetBootDevice(PULONG BootDevice)
|
||||
{
|
||||
((char *)BootDevice)[0] = (char)i386BootDrive;
|
||||
((char *)BootDevice)[1] = (char)i386BootPartition;
|
||||
}
|
||||
|
||||
BOOL
|
||||
i386DiskBootingFromFloppy(VOID)
|
||||
{
|
||||
return i386BootDrive < 0x80;
|
||||
}
|
||||
|
||||
#define IsRecognizedPartition(P) \
|
||||
((P) == PARTITION_FAT_12 || \
|
||||
(P) == PARTITION_FAT_16 || \
|
||||
(P) == PARTITION_HUGE || \
|
||||
(P) == PARTITION_IFS || \
|
||||
(P) == PARTITION_EXT2 || \
|
||||
(P) == PARTITION_FAT32 || \
|
||||
(P) == PARTITION_FAT32_XINT13 || \
|
||||
(P) == PARTITION_XINT13)
|
||||
|
||||
BOOL i386DiskGetSystemVolume(char *SystemPath,
|
||||
char *RemainingPath,
|
||||
PULONG Device,
|
||||
PULONG DriveNumber,
|
||||
PULONGLONG StartSector,
|
||||
PULONGLONG SectorCount,
|
||||
int *FsType)
|
||||
{
|
||||
ULONG PartitionNumber;
|
||||
PARTITION_TABLE_ENTRY PartitionTableEntry;
|
||||
UCHAR VolumeType;
|
||||
CHAR BootPath[256];
|
||||
unsigned i, RosPartition;
|
||||
|
||||
/*
|
||||
* Verify system path
|
||||
*/
|
||||
if (!DissectArcPath(SystemPath, BootPath, DriveNumber, &PartitionNumber))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (NULL != RemainingPath)
|
||||
{
|
||||
strcpy(RemainingPath, BootPath);
|
||||
}
|
||||
|
||||
/* 0xff -> no partition table present, use whole device */
|
||||
if (0xff == PartitionNumber)
|
||||
{
|
||||
PartitionTableEntry.SectorCountBeforePartition = 0;
|
||||
i = 0xff;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* recalculate the boot partition for freeldr */
|
||||
i = 0;
|
||||
RosPartition = 0;
|
||||
while (1)
|
||||
{
|
||||
if (!MachDiskGetPartitionEntry(*DriveNumber, ++i, &PartitionTableEntry))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (IsRecognizedPartition(PartitionTableEntry.SystemIndicator))
|
||||
{
|
||||
if (++RosPartition == PartitionNumber)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Check for ISO9660 file system type */
|
||||
if (*DriveNumber >= 0x80 && FsRecIsIso9660(*DriveNumber))
|
||||
{
|
||||
DbgPrint((DPRINT_FILESYSTEM, "Drive is a cdrom drive. Assuming ISO-9660 file system.\n"));
|
||||
|
||||
if (NULL != Device)
|
||||
{
|
||||
((char *)Device)[0] = (char)(*DriveNumber);
|
||||
((char *)Device)[1] = (char)i;
|
||||
}
|
||||
*StartSector = 0;
|
||||
*SectorCount = 0;
|
||||
*FsType = FS_ISO9660;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (!FsRecognizeVolume(*DriveNumber, PartitionTableEntry.SectorCountBeforePartition, &VolumeType))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (NULL != Device)
|
||||
{
|
||||
((char *)Device)[0] = (char)(*DriveNumber);
|
||||
((char *)Device)[1] = (char)i;
|
||||
}
|
||||
*StartSector = PartitionTableEntry.SectorCountBeforePartition;
|
||||
*SectorCount = PartitionTableEntry.PartitionSectorCount;
|
||||
|
||||
switch (VolumeType)
|
||||
{
|
||||
case PARTITION_FAT_12:
|
||||
case PARTITION_FAT_16:
|
||||
case PARTITION_HUGE:
|
||||
case PARTITION_XINT13:
|
||||
case PARTITION_FAT32:
|
||||
case PARTITION_FAT32_XINT13:
|
||||
*FsType = FS_FAT;
|
||||
return TRUE;
|
||||
case PARTITION_EXT2:
|
||||
*FsType = FS_EXT2;
|
||||
return TRUE;
|
||||
case PARTITION_NTFS:
|
||||
*FsType = FS_NTFS;
|
||||
return TRUE;
|
||||
default:
|
||||
*FsType = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL
|
||||
i386DiskGetBootPath(char *BootPath, unsigned Size)
|
||||
{
|
||||
static char Path[] = "multi(0)disk(0)";
|
||||
char Device[4];
|
||||
|
||||
itoa(i386BootDrive, Device, 10);
|
||||
if (Size <= sizeof(Path) + 6 + strlen(Device))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
strcpy(BootPath, Path);
|
||||
strcat(BootPath, MachDiskBootingFromFloppy() ? "fdisk" : "cdrom");
|
||||
strcat(strcat(strcat(BootPath, "("), Device), ")");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif /* defined __i386__ */
|
||||
|
||||
/* EOF */
|
||||
|
@@ -30,7 +30,7 @@ EXTERN(_BootNewLinuxKernel)
|
||||
.code16
|
||||
|
||||
/* Set the boot drive */
|
||||
movb (_BootDrive),%dl
|
||||
movb (_i386BootDrive),%dl
|
||||
|
||||
/* Load segment registers */
|
||||
cli
|
||||
@@ -66,7 +66,7 @@ EXTERN(_BootOldLinuxKernel)
|
||||
.code16
|
||||
|
||||
/* Set the boot drive */
|
||||
movb (_BootDrive),%dl
|
||||
movb (_i386BootDrive),%dl
|
||||
|
||||
/* Load segment registers */
|
||||
cli
|
||||
|
@@ -23,9 +23,10 @@
|
||||
#include "machine.h"
|
||||
#include "machpc.h"
|
||||
#include "rtl.h"
|
||||
#include "i386.h"
|
||||
|
||||
VOID
|
||||
PcMachInit(VOID)
|
||||
PcMachInit(char *CmdLine)
|
||||
{
|
||||
EnableA20();
|
||||
|
||||
@@ -48,6 +49,11 @@ PcMachInit(VOID)
|
||||
MachVtbl.VideoSync = PcVideoSync;
|
||||
MachVtbl.VideoPrepareForReactOS = PcVideoPrepareForReactOS;
|
||||
MachVtbl.GetMemoryMap = PcMemGetMemoryMap;
|
||||
MachVtbl.DiskGetBootVolume = i386DiskGetBootVolume;
|
||||
MachVtbl.DiskGetSystemVolume = i386DiskGetSystemVolume;
|
||||
MachVtbl.DiskGetBootPath = i386DiskGetBootPath;
|
||||
MachVtbl.DiskGetBootDevice = i386DiskGetBootDevice;
|
||||
MachVtbl.DiskBootingFromFloppy = i386DiskBootingFromFloppy;
|
||||
MachVtbl.DiskReadLogicalSectors = PcDiskReadLogicalSectors;
|
||||
MachVtbl.DiskGetPartitionEntry = PcDiskGetPartitionEntry;
|
||||
MachVtbl.DiskGetDriveGeometry = PcDiskGetDriveGeometry;
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#include "mm.h"
|
||||
#endif
|
||||
|
||||
VOID PcMachInit(VOID);
|
||||
VOID PcMachInit(char *CmdLine);
|
||||
|
||||
VOID PcConsPutChar(int Ch);
|
||||
BOOL PcConsKbHit();
|
||||
|
@@ -21,9 +21,10 @@
|
||||
#include "mm.h"
|
||||
#include "machine.h"
|
||||
#include "machxbox.h"
|
||||
#include "i386.h"
|
||||
|
||||
VOID
|
||||
XboxMachInit(VOID)
|
||||
XboxMachInit(char *CmdLine)
|
||||
{
|
||||
/* Initialize our stuff */
|
||||
XboxMemInit();
|
||||
@@ -46,6 +47,11 @@ XboxMachInit(VOID)
|
||||
MachVtbl.VideoSync = XboxVideoSync;
|
||||
MachVtbl.VideoPrepareForReactOS = XboxVideoPrepareForReactOS;
|
||||
MachVtbl.GetMemoryMap = XboxMemGetMemoryMap;
|
||||
MachVtbl.DiskGetBootVolume = i386DiskGetBootVolume;
|
||||
MachVtbl.DiskGetSystemVolume = i386DiskGetSystemVolume;
|
||||
MachVtbl.DiskGetBootPath = i386DiskGetBootPath;
|
||||
MachVtbl.DiskGetBootDevice = i386DiskGetBootDevice;
|
||||
MachVtbl.DiskBootingFromFloppy = i386DiskBootingFromFloppy;
|
||||
MachVtbl.DiskReadLogicalSectors = XboxDiskReadLogicalSectors;
|
||||
MachVtbl.DiskGetPartitionEntry = XboxDiskGetPartitionEntry;
|
||||
MachVtbl.DiskGetDriveGeometry = XboxDiskGetDriveGeometry;
|
||||
|
@@ -26,7 +26,7 @@
|
||||
|
||||
UCHAR XboxFont8x16[256 * 16];
|
||||
|
||||
VOID XboxMachInit(VOID);
|
||||
VOID XboxMachInit(char *CmdLine);
|
||||
|
||||
VOID XboxConsPutChar(int Ch);
|
||||
BOOL XboxConsKbHit();
|
||||
|
3
reactos/boot/freeldr/freeldr/arch/powerpc/boot.s
Normal file
3
reactos/boot/freeldr/freeldr/arch/powerpc/boot.s
Normal file
@@ -0,0 +1,3 @@
|
||||
.extern PpcInit
|
||||
_start:
|
||||
b PpcInit
|
305
reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
Normal file
305
reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
Normal file
@@ -0,0 +1,305 @@
|
||||
/*
|
||||
* FreeLoader PowerPC Part
|
||||
* Copyright (C) 2005 Art Yerkes
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
#include "freeldr.h"
|
||||
#include "machine.h"
|
||||
#include "of.h"
|
||||
|
||||
extern void BootMain( char * );
|
||||
extern char *GetFreeLoaderVersionString();
|
||||
ULONG BootPartition = 0;
|
||||
ULONG BootDrive = 0;
|
||||
|
||||
of_proxy ofproxy;
|
||||
void *PageDirectoryStart, *PageDirectoryEnd;
|
||||
static int chosen_package, stdin_handle;
|
||||
BOOLEAN AcpiPresent = FALSE;
|
||||
char BootPath[0x100];
|
||||
|
||||
void le_swap( const void *start_addr_v,
|
||||
const void *end_addr_v,
|
||||
const void *target_addr_v ) {
|
||||
long *start_addr = (long *)ROUND_DOWN((long)start_addr_v,8),
|
||||
*end_addr = (long *)ROUND_UP((long)end_addr_v,8),
|
||||
*target_addr = (long *)ROUND_DOWN((long)target_addr_v,8);
|
||||
long tmp;
|
||||
while( start_addr <= end_addr ) {
|
||||
tmp = start_addr[0];
|
||||
target_addr[0] = REV(start_addr[1]);
|
||||
target_addr[1] = REV(tmp);
|
||||
start_addr += 2;
|
||||
target_addr += 2;
|
||||
}
|
||||
}
|
||||
|
||||
int ofw_finddevice( const char *name ) {
|
||||
int ret, len;
|
||||
|
||||
len = strlen(name);
|
||||
le_swap( name, name + len, name );
|
||||
ret = ofproxy( 0, (char *)name, NULL, NULL, NULL );
|
||||
le_swap( name, name + len, name );
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ofw_getprop( int package, const char *name, void *buffer, int buflen ) {
|
||||
int ret, len = strlen(name);
|
||||
le_swap( name, name + len, name );
|
||||
le_swap( buffer, buffer + buflen, buffer );
|
||||
ret = ofproxy
|
||||
( 4, (void *)package, (char *)name, buffer, (void *)buflen );
|
||||
le_swap( buffer, buffer + buflen, buffer );
|
||||
le_swap( name, name + len, name );
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ofw_write( int handle, const char *data, int len ) {
|
||||
int ret;
|
||||
le_swap( data, data + len, data );
|
||||
ret = ofproxy
|
||||
( 8, (void *)handle, (char *)data, (void *)len, NULL );
|
||||
le_swap( data, data + len, data );
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ofw_read( int handle, const char *data, int len ) {
|
||||
int ret;
|
||||
le_swap( data, data + len, data );
|
||||
ret = ofproxy
|
||||
( 12, (void *)handle, (char *)data, (void *)len, NULL );
|
||||
le_swap( data, data + len, data );
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ofw_exit() {
|
||||
ofproxy( 16, NULL, NULL, NULL, NULL );
|
||||
}
|
||||
|
||||
void ofw_dumpregs() {
|
||||
ofproxy( 20, NULL, NULL, NULL, NULL );
|
||||
}
|
||||
|
||||
void ofw_print_string( const char *str ) {
|
||||
int len = strlen(str);
|
||||
le_swap( (char *)str, str + len, (char *)str );
|
||||
ofproxy( 24, (void *)str, NULL, NULL, NULL );
|
||||
le_swap( (char *)str, str + len, (char *)str );
|
||||
}
|
||||
|
||||
void ofw_print_number( int num ) {
|
||||
ofproxy( 28, (void *)num, NULL, NULL, NULL );
|
||||
}
|
||||
|
||||
void PpcPutChar( int ch ) {
|
||||
char buf[3];
|
||||
if( ch == 0x0a ) { buf[0] = 0x0d; buf[1] = 0x0a; }
|
||||
else { buf[0] = ch; buf[1] = 0; }
|
||||
buf[2] = 0;
|
||||
ofw_print_string( buf );
|
||||
}
|
||||
|
||||
BOOL PpcConsKbHit() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int PpcConsGetCh() {
|
||||
char buf;
|
||||
ofw_read( stdin_handle, &buf, 1 );
|
||||
return buf;
|
||||
}
|
||||
|
||||
void PpcVideoClearScreen( UCHAR Attr ) {
|
||||
ofw_print_string("ClearScreen\n");
|
||||
}
|
||||
|
||||
VIDEODISPLAYMODE PpcVideoSetDisplayMode( char *DisplayMode, BOOL Init ) {
|
||||
printf( "DisplayMode: %s %s\n", DisplayMode, Init ? "true" : "false" );
|
||||
return VideoGraphicsMode;
|
||||
}
|
||||
|
||||
/* FIXME: Query */
|
||||
VOID PpcVideoGetDisplaySize( PULONG Width, PULONG Height, PULONG Depth ) {
|
||||
ofw_print_string("GetDisplaySize\n");
|
||||
*Width = 640;
|
||||
*Height = 480;
|
||||
*Depth = 8;
|
||||
}
|
||||
|
||||
ULONG PpcVideoGetBufferSize() {
|
||||
ULONG Width, Height, Depth;
|
||||
ofw_print_string("PpcVideoGetBufferSize\n");
|
||||
PpcVideoGetDisplaySize( &Width, &Height, &Depth );
|
||||
return Width * Height * Depth / 8;
|
||||
}
|
||||
|
||||
VOID PpcVideoSetTextCursorPosition( ULONG X, ULONG Y ) {
|
||||
printf("SetTextCursorPosition(%d,%d)\n", X,Y);
|
||||
}
|
||||
|
||||
VOID PpcVideoHideShowTextCursor( BOOL Show ) {
|
||||
printf("HideShowTextCursor(%s)\n", Show ? "true" : "false");
|
||||
}
|
||||
|
||||
VOID PpcVideoPutChar( int Ch, UCHAR Attr, unsigned X, unsigned Y ) {
|
||||
printf( "\033[%d;%dH%c", Y, X, Ch );
|
||||
}
|
||||
|
||||
VOID PpcVideoCopyOffScreenBufferToVRAM( PVOID Buffer ) {
|
||||
printf( "CopyOffScreenBufferToVRAM(%x)\n", Buffer );
|
||||
}
|
||||
|
||||
BOOL PpcVideoIsPaletteFixed() {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
VOID PpcVideoSetPaletteColor( UCHAR Color,
|
||||
UCHAR Red, UCHAR Green, UCHAR Blue ) {
|
||||
printf( "SetPaletteColor(%x,%x,%x,%x)\n", Color, Red, Green, Blue );
|
||||
}
|
||||
|
||||
VOID PpcVideoGetPaletteColor( UCHAR Color,
|
||||
UCHAR *Red, UCHAR *Green, UCHAR *Blue ) {
|
||||
printf( "GetPaletteColor(%x)\n", Color);
|
||||
}
|
||||
|
||||
VOID PpcVideoSync() {
|
||||
printf( "Sync\n" );
|
||||
}
|
||||
|
||||
VOID PpcVideoPrepareForReactOS() {
|
||||
printf( "PrepareForReactOS\n");
|
||||
}
|
||||
/* XXX FIXME:
|
||||
* According to the linux people (this is backed up by my own experience),
|
||||
* the memory object in older ofw does not do getprop right.
|
||||
*
|
||||
* The "right" way is to probe the pci bridge. *sigh*
|
||||
*/
|
||||
ULONG PpcGetMemoryMap( PBIOS_MEMORY_MAP BiosMemoryMap,
|
||||
ULONG MaxMemoryMapSize ) {
|
||||
printf("GetMemoryMap(chosen=%x)\n", chosen_package);
|
||||
|
||||
BiosMemoryMap[0].Type = MEMTYPE_USABLE;
|
||||
BiosMemoryMap[0].BaseAddress = 0;
|
||||
BiosMemoryMap[0].Length = 32 * 1024 * 1024; /* Assume 32 meg for now */
|
||||
|
||||
printf( "Returning memory map (%dk total)\n",
|
||||
(int)BiosMemoryMap[0].Length / 1024 );
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
BOOL PpcDiskReadLogicalSectors( ULONG DriveNumber, ULONGLONG SectorNumber,
|
||||
ULONG SectorCount, PVOID Buffer ) {
|
||||
printf("DiskReadLogicalSectors\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL PpcDiskGetPartitionEntry( ULONG DriveNumber, ULONG PartitionNumber,
|
||||
PPARTITION_TABLE_ENTRY PartitionTableEntry ) {
|
||||
printf("GetPartitionEntry(%d,%d)\n", DriveNumber, PartitionNumber);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL PpcDiskGetDriveGeometry( ULONG DriveNumber, PGEOMETRY DriveGeometry ) {
|
||||
printf("GetGeometry(%d)\n", DriveNumber);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ULONG PpcDiskGetCacheableBlockCount( ULONG DriveNumber ) {
|
||||
printf("GetCacheableBlockCount\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
VOID PpcRTCGetCurrentDateTime( PULONG Hear, PULONG Month, PULONG Day,
|
||||
PULONG Hour, PULONG Minute, PULONG Second ) {
|
||||
printf("RTCGeturrentDateTime\n");
|
||||
}
|
||||
|
||||
VOID PpcHwDetect() {
|
||||
}
|
||||
|
||||
void PpcInit( of_proxy the_ofproxy ) {
|
||||
ofproxy = the_ofproxy;
|
||||
chosen_package = ofw_finddevice( "/chosen" );
|
||||
|
||||
ofw_getprop( chosen_package, "stdin",
|
||||
&stdin_handle, sizeof(stdin_handle) );
|
||||
|
||||
stdin_handle = REV(stdin_handle);
|
||||
|
||||
MachVtbl.ConsPutChar = PpcPutChar;
|
||||
MachVtbl.ConsKbHit = PpcConsKbHit;
|
||||
MachVtbl.ConsGetCh = PpcConsGetCh;
|
||||
|
||||
printf("chosen_package = %x\n", chosen_package);
|
||||
|
||||
MachVtbl.VideoClearScreen = PpcVideoClearScreen;
|
||||
MachVtbl.VideoSetDisplayMode = PpcVideoSetDisplayMode;
|
||||
MachVtbl.VideoGetDisplaySize = PpcVideoGetDisplaySize;
|
||||
MachVtbl.VideoGetBufferSize = PpcVideoGetBufferSize;
|
||||
MachVtbl.VideoSetTextCursorPosition = PpcVideoSetTextCursorPosition;
|
||||
MachVtbl.VideoHideShowTextCursor = PpcVideoHideShowTextCursor;
|
||||
MachVtbl.VideoPutChar = PpcVideoPutChar;
|
||||
MachVtbl.VideoCopyOffScreenBufferToVRAM =
|
||||
PpcVideoCopyOffScreenBufferToVRAM;
|
||||
MachVtbl.VideoIsPaletteFixed = PpcVideoIsPaletteFixed;
|
||||
MachVtbl.VideoSetPaletteColor = PpcVideoSetPaletteColor;
|
||||
MachVtbl.VideoGetPaletteColor = PpcVideoGetPaletteColor;
|
||||
MachVtbl.VideoSync = PpcVideoSync;
|
||||
MachVtbl.VideoPrepareForReactOS = PpcVideoPrepareForReactOS;
|
||||
|
||||
MachVtbl.GetMemoryMap = PpcGetMemoryMap;
|
||||
|
||||
MachVtbl.DiskReadLogicalSectors = PpcDiskReadLogicalSectors;
|
||||
MachVtbl.DiskGetPartitionEntry = PpcDiskGetPartitionEntry;
|
||||
MachVtbl.DiskGetDriveGeometry = PpcDiskGetDriveGeometry;
|
||||
MachVtbl.DiskGetCacheableBlockCount = PpcDiskGetCacheableBlockCount;
|
||||
|
||||
MachVtbl.RTCGetCurrentDateTime = PpcRTCGetCurrentDateTime;
|
||||
|
||||
MachVtbl.HwDetect = PpcHwDetect;
|
||||
|
||||
printf( "FreeLDR version [%s]\n", GetFreeLoaderVersionString() );
|
||||
BootMain("freeldr-ppc");
|
||||
}
|
||||
|
||||
void MachInit(char *CmdLine) {
|
||||
int len;
|
||||
printf( "Determining boot device:\n" );
|
||||
len = ofw_getprop(chosen_package, "bootpath",
|
||||
BootPath, sizeof(BootPath));
|
||||
printf( "Got %d bytes of path\n", len );
|
||||
BootPath[len] = 0;
|
||||
printf( "Boot Path: %s\n", BootPath );
|
||||
|
||||
printf( "FreeLDR starting\n" );
|
||||
}
|
||||
|
||||
void FrLdrSetupPageDirectory() {
|
||||
}
|
||||
|
||||
void beep() {
|
||||
}
|
||||
|
||||
UCHAR STDCALL READ_PORT_UCHAR(PUCHAR Address) {
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
void WRITE_PORT_UCHAR(PUCHAR Address, UCHAR Value) {
|
||||
}
|
@@ -49,6 +49,13 @@ VOID RunLoader(VOID)
|
||||
LONG TimeOut;
|
||||
ULONG SelectedOperatingSystem;
|
||||
|
||||
if (!FsOpenBootVolume())
|
||||
{
|
||||
printf("Error opening boot partition for file access.\n");
|
||||
MachConsGetCh();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IniFileInitialize())
|
||||
{
|
||||
printf("Press any key to reboot.\n");
|
||||
|
@@ -28,7 +28,8 @@
|
||||
|
||||
BOOL DiskGetActivePartitionEntry(ULONG DriveNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry)
|
||||
{
|
||||
ULONG BootablePartitionCount = 0;
|
||||
ULONG BootablePartitionCount = 0;
|
||||
ULONG ActivePartition = 0;
|
||||
MASTER_BOOT_RECORD MasterBootRecord;
|
||||
|
||||
// Read master boot record
|
||||
@@ -41,22 +42,22 @@ BOOL DiskGetActivePartitionEntry(ULONG DriveNumber, PPARTITION_TABLE_ENTRY Parti
|
||||
if (MasterBootRecord.PartitionTable[0].BootIndicator == 0x80)
|
||||
{
|
||||
BootablePartitionCount++;
|
||||
BootPartition = 0;
|
||||
ActivePartition = 0;
|
||||
}
|
||||
if (MasterBootRecord.PartitionTable[1].BootIndicator == 0x80)
|
||||
{
|
||||
BootablePartitionCount++;
|
||||
BootPartition = 1;
|
||||
ActivePartition = 1;
|
||||
}
|
||||
if (MasterBootRecord.PartitionTable[2].BootIndicator == 0x80)
|
||||
{
|
||||
BootablePartitionCount++;
|
||||
BootPartition = 2;
|
||||
ActivePartition = 2;
|
||||
}
|
||||
if (MasterBootRecord.PartitionTable[3].BootIndicator == 0x80)
|
||||
{
|
||||
BootablePartitionCount++;
|
||||
BootPartition = 3;
|
||||
ActivePartition = 3;
|
||||
}
|
||||
|
||||
// Make sure there was only one bootable partition
|
||||
@@ -72,7 +73,7 @@ BOOL DiskGetActivePartitionEntry(ULONG DriveNumber, PPARTITION_TABLE_ENTRY Parti
|
||||
}
|
||||
|
||||
// Copy the partition table entry
|
||||
RtlCopyMemory(PartitionTableEntry, &MasterBootRecord.PartitionTable[BootPartition], sizeof(PARTITION_TABLE_ENTRY));
|
||||
RtlCopyMemory(PartitionTableEntry, &MasterBootRecord.PartitionTable[ActivePartition], sizeof(PARTITION_TABLE_ENTRY));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ VOID BootMain(char *CmdLine)
|
||||
{
|
||||
CmdLineParse(CmdLine);
|
||||
|
||||
MachInit();
|
||||
MachInit(CmdLine);
|
||||
|
||||
DebugInit();
|
||||
|
||||
|
@@ -51,110 +51,78 @@ VOID FileSystemError(PUCHAR ErrorString)
|
||||
|
||||
/*
|
||||
*
|
||||
* BOOL FsOpenVolume(ULONG DriveNumber, ULONG PartitionNumber);
|
||||
* BOOL FsOpenVolume(ULONG DriveNumber, ULONGLONG StartSector, ULONGLONG SectorCount, int Type);
|
||||
*
|
||||
* This function is called to open a disk volume for file access.
|
||||
* It must be called before any of the file functions will work.
|
||||
* It takes two parameters:
|
||||
*
|
||||
* Drive: The BIOS drive number of the disk to open
|
||||
* Partition: This is zero for floppy drives.
|
||||
* If the disk is a hard disk then this specifies
|
||||
* The partition number to open (1 - 4)
|
||||
* If it is zero then it opens the active (bootable) partition
|
||||
*
|
||||
*/
|
||||
BOOL FsOpenVolume(ULONG DriveNumber, ULONG PartitionNumber)
|
||||
static BOOL FsOpenVolume(ULONG DriveNumber, ULONGLONG StartSector, ULONGLONG SectorCount, int Type)
|
||||
{
|
||||
PARTITION_TABLE_ENTRY PartitionTableEntry;
|
||||
UCHAR ErrorText[80];
|
||||
UCHAR VolumeType;
|
||||
UCHAR ErrorText[80];
|
||||
|
||||
DbgPrint((DPRINT_FILESYSTEM, "FsOpenVolume() DriveNumber: 0x%x PartitionNumber: 0x%x\n", DriveNumber, PartitionNumber));
|
||||
FsType = Type;
|
||||
|
||||
// Check and see if it is a floppy drive
|
||||
// If so then just assume FAT12 file system type
|
||||
if (DiskIsDriveRemovable(DriveNumber))
|
||||
switch (FsType)
|
||||
{
|
||||
DbgPrint((DPRINT_FILESYSTEM, "Drive is a floppy diskette drive. Assuming FAT12 file system.\n"));
|
||||
|
||||
FsType = FS_FAT;
|
||||
return FatOpenVolume(DriveNumber, 0, 0);
|
||||
}
|
||||
|
||||
// Check for ISO9660 file system type
|
||||
if (DriveNumber >= 0x80 && FsRecIsIso9660(DriveNumber))
|
||||
{
|
||||
DbgPrint((DPRINT_FILESYSTEM, "Drive is a cdrom drive. Assuming ISO-9660 file system.\n"));
|
||||
|
||||
FsType = FS_ISO9660;
|
||||
case FS_FAT:
|
||||
return FatOpenVolume(DriveNumber, StartSector, SectorCount);
|
||||
case FS_EXT2:
|
||||
return Ext2OpenVolume(DriveNumber, StartSector);
|
||||
case FS_NTFS:
|
||||
return NtfsOpenVolume(DriveNumber, StartSector);
|
||||
case FS_ISO9660:
|
||||
return IsoOpenVolume(DriveNumber);
|
||||
}
|
||||
|
||||
// Set the boot partition
|
||||
BootPartition = PartitionNumber;
|
||||
|
||||
// Get the requested partition entry
|
||||
if (PartitionNumber == 0)
|
||||
{
|
||||
// Partition requested was zero which means the boot partition
|
||||
if (DiskGetActivePartitionEntry(DriveNumber, &PartitionTableEntry) == FALSE)
|
||||
{
|
||||
FileSystemError("No active partition.");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Get requested partition
|
||||
if (MachDiskGetPartitionEntry(DriveNumber, PartitionNumber, &PartitionTableEntry) == FALSE)
|
||||
{
|
||||
FileSystemError("Partition not found.");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for valid partition
|
||||
if (PartitionTableEntry.SystemIndicator == PARTITION_ENTRY_UNUSED)
|
||||
{
|
||||
FileSystemError("Invalid partition.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Try to recognize the file system
|
||||
if (!FsRecognizeVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition, &VolumeType))
|
||||
{
|
||||
FileSystemError("Unrecognized file system.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//switch (PartitionTableEntry.SystemIndicator)
|
||||
switch (VolumeType)
|
||||
{
|
||||
case PARTITION_FAT_12:
|
||||
case PARTITION_FAT_16:
|
||||
case PARTITION_HUGE:
|
||||
case PARTITION_XINT13:
|
||||
case PARTITION_FAT32:
|
||||
case PARTITION_FAT32_XINT13:
|
||||
FsType = FS_FAT;
|
||||
return FatOpenVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition, PartitionTableEntry.PartitionSectorCount);
|
||||
case PARTITION_EXT2:
|
||||
FsType = FS_EXT2;
|
||||
return Ext2OpenVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition);
|
||||
case PARTITION_NTFS:
|
||||
FsType = FS_NTFS;
|
||||
return NtfsOpenVolume(DriveNumber, PartitionTableEntry.SectorCountBeforePartition);
|
||||
default:
|
||||
FsType = 0;
|
||||
sprintf(ErrorText, "Unsupported file system. Type: 0x%x", VolumeType);
|
||||
sprintf(ErrorText, "Unsupported file system. Type: 0x%x", Type);
|
||||
FileSystemError(ErrorText);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
/*
|
||||
*
|
||||
* BOOL FsOpenBootVolume()
|
||||
*
|
||||
* This function is called to open the boot disk volume for file access.
|
||||
* It must be called before any of the file functions will work.
|
||||
*/
|
||||
BOOL FsOpenBootVolume()
|
||||
{
|
||||
ULONG DriveNumber;
|
||||
ULONGLONG StartSector;
|
||||
ULONGLONG SectorCount;
|
||||
int Type;
|
||||
|
||||
if (! MachDiskGetBootVolume(&DriveNumber, &StartSector, &SectorCount, &Type))
|
||||
{
|
||||
FileSystemError("Unable to locate boot partition\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return FsOpenVolume(DriveNumber, StartSector, SectorCount, Type);
|
||||
}
|
||||
|
||||
BOOL FsOpenSystemVolume(char *SystemPath, char *RemainingPath, PULONG Device)
|
||||
{
|
||||
ULONG DriveNumber;
|
||||
ULONGLONG StartSector;
|
||||
ULONGLONG SectorCount;
|
||||
int Type;
|
||||
|
||||
if (! MachDiskGetSystemVolume(SystemPath, RemainingPath, Device,
|
||||
&DriveNumber, &StartSector, &SectorCount,
|
||||
&Type))
|
||||
{
|
||||
FileSystemError("Unable to locate system partition\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return FsOpenVolume(DriveNumber, StartSector, SectorCount, Type);
|
||||
}
|
||||
|
||||
|
||||
PFILE FsOpenFile(PUCHAR FileName)
|
||||
{
|
||||
PFILE FileHandle = NULL;
|
||||
|
@@ -21,7 +21,7 @@
|
||||
* Limitations:
|
||||
* - No support for compressed files.
|
||||
* - No attribute list support.
|
||||
* - May crash on currupted filesystem.
|
||||
* - May crash on corrupted filesystem.
|
||||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
|
@@ -38,8 +38,6 @@
|
||||
#define ROUND_DOWN(N, S) ((N) & ~((S) - 1))
|
||||
#define Ke386EraseFlags(x) __asm__ __volatile__("pushl $0 ; popfl\n")
|
||||
|
||||
extern ULONG BootDrive; /* BIOS boot drive, 0-A:, 1-B:, 0x80-C:, 0x81-D:, etc. */
|
||||
extern ULONG BootPartition; /* Boot Partition, 1-4 */
|
||||
extern BOOL UserInterfaceUp; /* Tells us if the user interface is displayed */
|
||||
|
||||
VOID BootMain(LPSTR CmdLine);
|
||||
|
@@ -33,7 +33,8 @@
|
||||
#define PFILE FILE *
|
||||
|
||||
VOID FileSystemError(PUCHAR ErrorString);
|
||||
BOOL FsOpenVolume(ULONG DriveNumber, ULONG PartitionNumber);
|
||||
BOOL FsOpenBootVolume();
|
||||
BOOL FsOpenSystemVolume(char *SystemPath, char *RemainingPath, PULONG BootDevice);
|
||||
PFILE FsOpenFile(PUCHAR FileName);
|
||||
VOID FsCloseFile(PFILE FileHandle);
|
||||
BOOL FsReadFile(PFILE FileHandle, ULONG BytesToRead, ULONG* BytesRead, PVOID Buffer);
|
||||
|
@@ -56,6 +56,11 @@ typedef struct tagMACHVTBL
|
||||
|
||||
ULONG (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
|
||||
|
||||
BOOL (*DiskGetBootVolume)(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType);
|
||||
BOOL (*DiskGetSystemVolume)(char *SystemPath, char *RemainingPath, PULONG Device, PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType);
|
||||
BOOL (*DiskGetBootPath)(char *BootPath, unsigned Size);
|
||||
VOID (*DiskGetBootDevice)(PULONG BootDevice);
|
||||
BOOL (*DiskBootingFromFloppy)(VOID);
|
||||
BOOL (*DiskReadLogicalSectors)(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer);
|
||||
BOOL (*DiskGetPartitionEntry)(ULONG DriveNumber, ULONG PartitionNumber, PPARTITION_TABLE_ENTRY PartitionTableEntry);
|
||||
BOOL (*DiskGetDriveGeometry)(ULONG DriveNumber, PGEOMETRY DriveGeometry);
|
||||
@@ -66,7 +71,7 @@ typedef struct tagMACHVTBL
|
||||
VOID (*HwDetect)(VOID);
|
||||
} MACHVTBL, *PMACHVTBL;
|
||||
|
||||
VOID MachInit(VOID);
|
||||
VOID MachInit(char *CmdLine);
|
||||
|
||||
extern MACHVTBL MachVtbl;
|
||||
|
||||
@@ -87,6 +92,11 @@ extern MACHVTBL MachVtbl;
|
||||
#define MachVideoSync() MachVtbl.VideoSync()
|
||||
#define MachVideoPrepareForReactOS() MachVtbl.VideoPrepareForReactOS()
|
||||
#define MachGetMemoryMap(MMap, Size) MachVtbl.GetMemoryMap((MMap), (Size))
|
||||
#define MachDiskGetBootVolume(Drv, Start, Cnt, FsType) MachVtbl.DiskGetBootVolume((Drv), (Start), (Cnt), (FsType))
|
||||
#define MachDiskGetSystemVolume(SysPath, RemPath, Dev, Drv, Start, Cnt, FsType) MachVtbl.DiskGetSystemVolume((SysPath), (RemPath), (Dev), (Drv), (Start), (Cnt), (FsType))
|
||||
#define MachDiskGetBootPath(Path, Size) MachVtbl.DiskGetBootPath((Path), (Size))
|
||||
#define MachDiskGetBootDevice(BootDevice) MachVtbl.DiskGetBootDevice(BootDevice)
|
||||
#define MachDiskBootingFromFloppy() MachVtbl.DiskBootingFromFloppy()
|
||||
#define MachDiskReadLogicalSectors(Drive, Start, Count, Buf) MachVtbl.DiskReadLogicalSectors((Drive), (Start), (Count), (Buf))
|
||||
#define MachDiskGetPartitionEntry(Drive, Part, Entry) MachVtbl.DiskGetPartitionEntry((Drive), (Part), (Entry))
|
||||
#define MachDiskGetDriveGeometry(Drive, Geom) MachVtbl.DiskGetDriveGeometry((Drive), (Geom))
|
||||
|
@@ -52,6 +52,7 @@
|
||||
#define MB_INFO_FLAG_BOOT_LOADER_NAME 0x00000200
|
||||
#define MB_INFO_FLAG_APM_TABLE 0x00000400
|
||||
#define MB_INFO_FLAG_GRAPHICS_TABLE 0x00000800
|
||||
#define MB_INFO_FLAG_ACPI_TABLE 0x00001000
|
||||
|
||||
#ifndef ASM
|
||||
/* Do not include here in boot.S. */
|
||||
|
@@ -57,7 +57,7 @@ extern PINI_SECTION IniFileSectionListHead;
|
||||
extern ULONG IniFileSectionCount;
|
||||
extern ULONG IniFileSettingCount;
|
||||
|
||||
PFILE IniOpenIniFile(UCHAR BootDriveNumber, UCHAR BootPartitionNumber);
|
||||
PFILE IniOpenIniFile();
|
||||
|
||||
BOOL IniParseFile(PUCHAR IniFileData, ULONG IniFileSize);
|
||||
ULONG IniGetNextLineSize(PUCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset);
|
||||
|
@@ -33,22 +33,7 @@ BOOL IniFileInitialize(VOID)
|
||||
BOOL Success;
|
||||
|
||||
// Open freeldr.ini
|
||||
// BootDrive & BootPartition are passed
|
||||
// in from the boot sector code in the
|
||||
// DL & DH registers.
|
||||
Freeldr_Ini = IniOpenIniFile(BootDrive, BootPartition);
|
||||
|
||||
// If we couldn't open freeldr.ini on the partition
|
||||
// they specified in the boot sector then try
|
||||
// opening the active (boot) partition.
|
||||
if ((Freeldr_Ini == NULL) && (BootPartition != 0))
|
||||
{
|
||||
BootPartition = 0;
|
||||
|
||||
Freeldr_Ini = IniOpenIniFile(BootDrive, BootPartition);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
Freeldr_Ini = IniOpenIniFile();
|
||||
|
||||
if (Freeldr_Ini == NULL)
|
||||
{
|
||||
@@ -87,24 +72,10 @@ BOOL IniFileInitialize(VOID)
|
||||
return Success;
|
||||
}
|
||||
|
||||
PFILE IniOpenIniFile(UCHAR BootDriveNumber, UCHAR BootPartitionNumber)
|
||||
PFILE IniOpenIniFile()
|
||||
{
|
||||
PFILE IniFileHandle; // File handle for freeldr.ini
|
||||
|
||||
if (!FsOpenVolume(BootDriveNumber, BootPartitionNumber))
|
||||
{
|
||||
if (BootPartitionNumber == 0)
|
||||
{
|
||||
printf("Error opening active (bootable) partition on boot drive 0x%x for file access.\n", BootDriveNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("Error opening partition %d on boot drive 0x%x for file access.\n", BootPartitionNumber, BootDriveNumber);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Try to open freeldr.ini
|
||||
IniFileHandle = FsOpenFile("freeldr.ini");
|
||||
|
||||
|
@@ -40,18 +40,19 @@
|
||||
|
||||
PLINUX_BOOTSECTOR LinuxBootSector = NULL;
|
||||
PLINUX_SETUPSECTOR LinuxSetupSector = NULL;
|
||||
ULONG SetupSectorSize = 0;
|
||||
BOOL NewStyleLinuxKernel = FALSE;
|
||||
ULONG LinuxKernelSize = 0;
|
||||
ULONG LinuxInitrdSize = 0;
|
||||
UCHAR LinuxKernelName[260];
|
||||
UCHAR LinuxInitrdName[260];
|
||||
BOOL LinuxHasInitrd = FALSE;
|
||||
UCHAR LinuxCommandLine[260] = "";
|
||||
ULONG LinuxCommandLineSize = 0;
|
||||
PVOID LinuxKernelLoadAddress = NULL;
|
||||
PVOID LinuxInitrdLoadAddress = NULL;
|
||||
UCHAR LinuxBootDescription[80];
|
||||
ULONG SetupSectorSize = 0;
|
||||
BOOL NewStyleLinuxKernel = FALSE;
|
||||
ULONG LinuxKernelSize = 0;
|
||||
ULONG LinuxInitrdSize = 0;
|
||||
UCHAR LinuxKernelName[260];
|
||||
UCHAR LinuxInitrdName[260];
|
||||
BOOL LinuxHasInitrd = FALSE;
|
||||
UCHAR LinuxCommandLine[260] = "";
|
||||
ULONG LinuxCommandLineSize = 0;
|
||||
PVOID LinuxKernelLoadAddress = NULL;
|
||||
PVOID LinuxInitrdLoadAddress = NULL;
|
||||
UCHAR LinuxBootDescription[80];
|
||||
UCHAR LinuxBootPath[260] = "";
|
||||
|
||||
VOID LoadAndBootLinux(PUCHAR OperatingSystemName, PUCHAR Description)
|
||||
{
|
||||
@@ -80,7 +81,7 @@ VOID LoadAndBootLinux(PUCHAR OperatingSystemName, PUCHAR Description)
|
||||
}
|
||||
|
||||
// Open the boot volume
|
||||
if (!FsOpenVolume(BootDrive, BootPartition))
|
||||
if (!FsOpenSystemVolume(LinuxBootPath, NULL, NULL))
|
||||
{
|
||||
UiMessageBox("Failed to open boot drive.");
|
||||
goto LinuxBootFailed;
|
||||
@@ -226,8 +227,7 @@ LinuxBootFailed:
|
||||
BOOL LinuxParseIniSection(PUCHAR OperatingSystemName)
|
||||
{
|
||||
UCHAR SettingName[260];
|
||||
UCHAR SettingValue[260];
|
||||
ULONG SectionId;
|
||||
ULONG SectionId;
|
||||
|
||||
// Find all the message box settings and run them
|
||||
UiShowMessageBoxesInSection(OperatingSystemName);
|
||||
@@ -240,20 +240,12 @@ BOOL LinuxParseIniSection(PUCHAR OperatingSystemName)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 260))
|
||||
if (!IniReadSettingByName(SectionId, "BootPath", LinuxBootPath, 260))
|
||||
{
|
||||
UiMessageBox("Boot drive not specified for selected OS!");
|
||||
UiMessageBox("Boot path not specified for selected OS!");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
|
||||
|
||||
BootPartition = 0;
|
||||
if (IniReadSettingByName(SectionId, "BootPartition", SettingValue, 260))
|
||||
{
|
||||
BootPartition = atoi(SettingValue);
|
||||
}
|
||||
|
||||
// Get the kernel name
|
||||
if (!IniReadSettingByName(SectionId, "Kernel", LinuxKernelName, 260))
|
||||
{
|
||||
|
@@ -37,6 +37,11 @@
|
||||
#undef MachVideoSync
|
||||
#undef MachVideoPrepareForReactOS
|
||||
#undef MachGetMemoryMap
|
||||
#undef MachDiskGetBootVolume
|
||||
#undef MachDiskGetSystemVolume
|
||||
#undef MachDiskGetBootPath
|
||||
#undef MachDiskGetBootDevice
|
||||
#undef MachDiskBootingFromFloppy
|
||||
#undef MachDiskReadLogicalSectors
|
||||
#undef MachDiskGetPartitionEntry
|
||||
#undef MachDiskGetDriveGeometry
|
||||
@@ -148,6 +153,44 @@ MachGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize)
|
||||
return MachVtbl.GetMemoryMap(BiosMemoryMap, MaxMemoryMapSize);
|
||||
}
|
||||
|
||||
BOOL
|
||||
MachDiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType)
|
||||
{
|
||||
return MachVtbl.DiskGetBootVolume(DriveNumber, StartSector, SectorCount, FsType);
|
||||
}
|
||||
|
||||
BOOL
|
||||
MachDiskGetSystemVolume(char *SystemPath,
|
||||
char *RemainingPath,
|
||||
PULONG Device,
|
||||
PULONG DriveNumber,
|
||||
PULONGLONG StartSector,
|
||||
PULONGLONG SectorCount,
|
||||
int *FsType)
|
||||
{
|
||||
return MachVtbl.DiskGetSystemVolume(SystemPath, RemainingPath, Device,
|
||||
DriveNumber, StartSector, SectorCount,
|
||||
FsType);
|
||||
}
|
||||
|
||||
BOOL
|
||||
MachDiskGetBootPath(char *BootPath, unsigned Size)
|
||||
{
|
||||
return MachVtbl.DiskGetBootPath(BootPath, Size);
|
||||
}
|
||||
|
||||
VOID
|
||||
MachDiskGetBootDevice(PULONG BootDevice)
|
||||
{
|
||||
MachVtbl.DiskGetBootDevice(BootDevice);
|
||||
}
|
||||
|
||||
BOOL
|
||||
MachDiskBootingFromFloppy()
|
||||
{
|
||||
return MachVtbl.DiskBootingFromFloppy();
|
||||
}
|
||||
|
||||
BOOL
|
||||
MachDiskReadLogicalSectors(ULONG DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer)
|
||||
{
|
||||
|
@@ -38,6 +38,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
*/
|
||||
#ifdef __i386__
|
||||
#include "i386.h"
|
||||
#elif defined(_M_PPC)
|
||||
#include "powerpc.h"
|
||||
#endif
|
||||
#define L_clz
|
||||
#define L_udivdi3
|
||||
|
3208
reactos/boot/freeldr/freeldr/math/powerpc.h
Normal file
3208
reactos/boot/freeldr/freeldr/math/powerpc.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -33,10 +33,9 @@ VOID LoadAndBootBootSector(PUCHAR OperatingSystemName)
|
||||
{
|
||||
PFILE FilePointer;
|
||||
UCHAR SettingName[80];
|
||||
UCHAR SettingValue[80];
|
||||
ULONG SectionId;
|
||||
ULONG SectionId;
|
||||
UCHAR FileName[260];
|
||||
ULONG BytesRead;
|
||||
ULONG BytesRead;
|
||||
|
||||
// Find all the message box settings and run them
|
||||
UiShowMessageBoxesInSection(OperatingSystemName);
|
||||
@@ -49,27 +48,13 @@ VOID LoadAndBootBootSector(PUCHAR OperatingSystemName)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
|
||||
{
|
||||
UiMessageBox("Boot drive not specified for selected OS!");
|
||||
return;
|
||||
}
|
||||
|
||||
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
|
||||
|
||||
BootPartition = 0;
|
||||
if (IniReadSettingByName(SectionId, "BootPartition", SettingValue, 80))
|
||||
{
|
||||
BootPartition = atoi(SettingValue);
|
||||
}
|
||||
|
||||
if (!IniReadSettingByName(SectionId, "BootSectorFile", FileName, 260))
|
||||
{
|
||||
UiMessageBox("Boot sector file not specified for selected OS!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!FsOpenVolume(BootDrive, BootPartition))
|
||||
if (!FsOpenSystemVolume(FileName, FileName, NULL))
|
||||
{
|
||||
UiMessageBox("Failed to open boot drive.");
|
||||
return;
|
||||
@@ -111,10 +96,12 @@ VOID LoadAndBootBootSector(PUCHAR OperatingSystemName)
|
||||
|
||||
VOID LoadAndBootPartition(PUCHAR OperatingSystemName)
|
||||
{
|
||||
UCHAR SettingName[80];
|
||||
UCHAR SettingValue[80];
|
||||
ULONG SectionId;
|
||||
UCHAR SettingName[80];
|
||||
UCHAR SettingValue[80];
|
||||
ULONG SectionId;
|
||||
PARTITION_TABLE_ENTRY PartitionTableEntry;
|
||||
ULONG DriveNumber;
|
||||
ULONG PartitionNumber;
|
||||
|
||||
// Find all the message box settings and run them
|
||||
UiShowMessageBoxesInSection(OperatingSystemName);
|
||||
@@ -134,7 +121,7 @@ VOID LoadAndBootPartition(PUCHAR OperatingSystemName)
|
||||
return;
|
||||
}
|
||||
|
||||
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
|
||||
DriveNumber = DriveMapGetBiosDriveNumber(SettingValue);
|
||||
|
||||
// Read the boot partition
|
||||
if (!IniReadSettingByName(SectionId, "BootPartition", SettingValue, 80))
|
||||
@@ -143,17 +130,17 @@ VOID LoadAndBootPartition(PUCHAR OperatingSystemName)
|
||||
return;
|
||||
}
|
||||
|
||||
BootPartition = atoi(SettingValue);
|
||||
PartitionNumber = atoi(SettingValue);
|
||||
|
||||
// Get the partition table entry
|
||||
if (!DiskGetPartitionEntry(BootDrive, BootPartition, &PartitionTableEntry))
|
||||
if (!DiskGetPartitionEntry(DriveNumber, PartitionNumber, &PartitionTableEntry))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Now try to read the partition boot sector
|
||||
// If this fails then abort
|
||||
if (!MachDiskReadLogicalSectors(BootDrive, PartitionTableEntry.SectorCountBeforePartition, 1, (PVOID)0x7C00))
|
||||
if (!MachDiskReadLogicalSectors(DriveNumber, PartitionTableEntry.SectorCountBeforePartition, 1, (PVOID)0x7C00))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -182,7 +169,8 @@ VOID LoadAndBootDrive(PUCHAR OperatingSystemName)
|
||||
{
|
||||
UCHAR SettingName[80];
|
||||
UCHAR SettingValue[80];
|
||||
ULONG SectionId;
|
||||
ULONG SectionId;
|
||||
ULONG DriveNumber;
|
||||
|
||||
// Find all the message box settings and run them
|
||||
UiShowMessageBoxesInSection(OperatingSystemName);
|
||||
@@ -201,11 +189,11 @@ VOID LoadAndBootDrive(PUCHAR OperatingSystemName)
|
||||
return;
|
||||
}
|
||||
|
||||
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
|
||||
DriveNumber = DriveMapGetBiosDriveNumber(SettingValue);
|
||||
|
||||
// Now try to read the boot sector (or mbr)
|
||||
// If this fails then abort
|
||||
if (!MachDiskReadLogicalSectors(BootDrive, 0, 1, (PVOID)0x7C00))
|
||||
if (!MachDiskReadLogicalSectors(DriveNumber, 0, 1, (PVOID)0x7C00))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@@ -22,11 +22,11 @@
|
||||
#define __MEM_H
|
||||
|
||||
|
||||
#ifdef __i386__
|
||||
#if defined(__i386__) || defined(_PPC_)
|
||||
|
||||
#define MM_PAGE_SIZE 4096
|
||||
|
||||
#endif // defined __i386__
|
||||
#endif // defined __i386__ or _PPC_
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@@ -164,9 +164,7 @@ FrLdrStartup(ULONG Magic)
|
||||
/* Re-initalize EFLAGS */
|
||||
Ke386EraseFlags();
|
||||
|
||||
/* Get Kernel Base and Set MmSystemRangeStart */
|
||||
FrLdrGetKernelBase();
|
||||
|
||||
/* Get the PAE Mode */
|
||||
FrLdrGetPaeMode();
|
||||
|
||||
/* Initialize the page directory */
|
||||
@@ -531,6 +529,14 @@ FrLdrMapKernel(FILE *KernelImage)
|
||||
ULONG_PTR TargetSection;
|
||||
ULONG SectionSize;
|
||||
LONG i;
|
||||
PIMAGE_DATA_DIRECTORY RelocationDDir;
|
||||
PIMAGE_BASE_RELOCATION RelocationDir, RelocationEnd;
|
||||
ULONG Count;
|
||||
ULONG_PTR Address, MaxAddress;
|
||||
PUSHORT TypeOffset;
|
||||
ULONG_PTR Delta;
|
||||
PUSHORT ShortPtr;
|
||||
PULONG LongPtr;
|
||||
|
||||
/* Allocate 1024 bytes for PE Header */
|
||||
ImageHeader = (PIMAGE_DOS_HEADER)MmAllocateMemory(1024);
|
||||
@@ -552,8 +558,9 @@ FrLdrMapKernel(FILE *KernelImage)
|
||||
/* Now read the MZ header to get the offset to the PE Header */
|
||||
NtHeader = (PIMAGE_NT_HEADERS)((PCHAR)ImageHeader + ImageHeader->e_lfanew);
|
||||
|
||||
/* Save the Image Base */
|
||||
KernelBase = NtHeader->OptionalHeader.ImageBase;
|
||||
/* Get Kernel Base */
|
||||
KernelBase = NtHeader->OptionalHeader.ImageBase;
|
||||
FrLdrGetKernelBase();
|
||||
|
||||
/* Save Entrypoint */
|
||||
KernelEntry = RaToPa(NtHeader->OptionalHeader.AddressOfEntryPoint);
|
||||
@@ -603,9 +610,64 @@ FrLdrMapKernel(FILE *KernelImage)
|
||||
Section->Misc.VirtualSize - Section->SizeOfRawData);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get the Relocation Data Directory */
|
||||
RelocationDDir = &NtHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_BASERELOC];
|
||||
|
||||
/* Now relocate the file */
|
||||
/* FIXME: ADD RELOC CODE */
|
||||
/* Get the Relocation Section Start and End*/
|
||||
RelocationDir = (PIMAGE_BASE_RELOCATION)(KERNEL_BASE_PHYS + RelocationDDir->VirtualAddress);
|
||||
RelocationEnd = (PIMAGE_BASE_RELOCATION)((ULONG_PTR)RelocationDir + RelocationDDir->Size);
|
||||
|
||||
/* Calculate Difference between Real Base and Compiled Base*/
|
||||
Delta = KernelBase - NtHeader->OptionalHeader.ImageBase;;
|
||||
|
||||
/* Determine how far we shoudl relocate */
|
||||
MaxAddress = KERNEL_BASE_PHYS + ImageSize;
|
||||
|
||||
/* Relocate until we've processed all the blocks */
|
||||
while (RelocationDir < RelocationEnd && RelocationDir->SizeOfBlock > 0) {
|
||||
|
||||
/* See how many Relocation Blocks we have */
|
||||
Count = (RelocationDir->SizeOfBlock - sizeof(IMAGE_BASE_RELOCATION)) / sizeof(USHORT);
|
||||
|
||||
/* Calculate the Address of this Directory */
|
||||
Address = KERNEL_BASE_PHYS + RelocationDir->VirtualAddress;
|
||||
|
||||
/* Calculate the Offset of the Type */
|
||||
TypeOffset = (PUSHORT)(RelocationDir + 1);
|
||||
|
||||
for (i = 0; i < Count; i++) {
|
||||
|
||||
ShortPtr = (PUSHORT)(Address + (*TypeOffset & 0xFFF));
|
||||
|
||||
/* Don't relocate after the end of the loaded driver */
|
||||
if ((ULONG_PTR)ShortPtr >= MaxAddress) break;
|
||||
|
||||
switch (*TypeOffset >> 12) {
|
||||
|
||||
case IMAGE_REL_BASED_ABSOLUTE:
|
||||
break;
|
||||
|
||||
case IMAGE_REL_BASED_HIGH:
|
||||
*ShortPtr += HIWORD(Delta);
|
||||
break;
|
||||
|
||||
case IMAGE_REL_BASED_LOW:
|
||||
*ShortPtr += LOWORD(Delta);
|
||||
break;
|
||||
|
||||
case IMAGE_REL_BASED_HIGHLOW:
|
||||
LongPtr = (PULONG)ShortPtr;
|
||||
*LongPtr += Delta;
|
||||
break;
|
||||
}
|
||||
|
||||
TypeOffset++;
|
||||
}
|
||||
|
||||
/* Move to the next Relocation Table */
|
||||
RelocationDir = (PIMAGE_BASE_RELOCATION)((ULONG_PTR)RelocationDir + RelocationDir->SizeOfBlock);
|
||||
}
|
||||
|
||||
/* Increase the next Load Base */
|
||||
NextModuleBase = ROUND_UP(KERNEL_BASE_PHYS + ImageSize, PAGE_SIZE);
|
||||
|
@@ -43,7 +43,21 @@ BOOL DissectArcPath(char *ArcPath, char *BootPath, ULONG* BootDrive, ULONG* Boot
|
||||
if (p == NULL)
|
||||
return FALSE;
|
||||
p++;
|
||||
*BootPartition = 0;
|
||||
*BootPartition = 0xff;
|
||||
}
|
||||
else if (strnicmp(p, "cdrom(", 6) == 0)
|
||||
{
|
||||
/*
|
||||
* cdrom path:
|
||||
* multi(0)disk(0)cdrom(x)\path
|
||||
*/
|
||||
p = p + 6;
|
||||
*BootDrive = atoi(p);
|
||||
p = strchr(p, ')');
|
||||
if (p == NULL)
|
||||
return FALSE;
|
||||
p++;
|
||||
*BootPartition = 0xff;
|
||||
}
|
||||
else if (strnicmp(p, "rdisk(", 6) == 0)
|
||||
{
|
||||
|
@@ -15,16 +15,6 @@
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#define IsRecognizedPartition(P) \
|
||||
((P) == PARTITION_FAT_12 || \
|
||||
(P) == PARTITION_FAT_16 || \
|
||||
(P) == PARTITION_HUGE || \
|
||||
(P) == PARTITION_IFS || \
|
||||
(P) == PARTITION_EXT2 || \
|
||||
(P) == PARTITION_FAT32 || \
|
||||
(P) == PARTITION_FAT32_XINT13 || \
|
||||
(P) == PARTITION_XINT13)
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
FrLdrLoadKernel(PCHAR szFileName,
|
||||
@@ -564,6 +554,7 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
|
||||
PFILE FilePointer;
|
||||
CHAR name[1024];
|
||||
CHAR value[1024];
|
||||
CHAR SystemPath[1024];
|
||||
CHAR szKernelName[1024];
|
||||
CHAR szHalName[1024];
|
||||
CHAR szFileName[1024];
|
||||
@@ -574,12 +565,10 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
|
||||
|
||||
ULONG_PTR Base;
|
||||
ULONG Size;
|
||||
|
||||
PARTITION_TABLE_ENTRY PartitionTableEntry;
|
||||
ULONG rosPartition;
|
||||
|
||||
extern ULONG PageDirectoryStart;
|
||||
extern ULONG PageDirectoryEnd;
|
||||
extern ULONG PageDirectoryStart;
|
||||
extern ULONG PageDirectoryEnd;
|
||||
extern BOOLEAN AcpiPresent;
|
||||
|
||||
//
|
||||
// Open the operating system section
|
||||
@@ -596,8 +585,8 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
|
||||
* Setup multiboot information structure
|
||||
*/
|
||||
LoaderBlock.Flags = MB_INFO_FLAG_MEM_SIZE | MB_INFO_FLAG_BOOT_DEVICE | MB_INFO_FLAG_COMMAND_LINE | MB_INFO_FLAG_MODULES;
|
||||
LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart;
|
||||
LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd;
|
||||
LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart;
|
||||
LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd;
|
||||
LoaderBlock.BootDevice = 0xffffffff;
|
||||
LoaderBlock.CommandLine = (unsigned long)multiboot_kernel_cmdline;
|
||||
LoaderBlock.ModsCount = 0;
|
||||
@@ -644,7 +633,7 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
|
||||
/*
|
||||
* Make sure the system path is set in the .ini file
|
||||
*/
|
||||
if (!IniReadSettingByName(SectionId, "SystemPath", value, 1024))
|
||||
if (!IniReadSettingByName(SectionId, "SystemPath", SystemPath, sizeof(SystemPath)))
|
||||
{
|
||||
UiMessageBox("System path not specified for selected operating system.");
|
||||
return;
|
||||
@@ -653,62 +642,20 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
|
||||
/*
|
||||
* Special case for Live CD.
|
||||
*/
|
||||
if (!stricmp(value, "LiveCD"))
|
||||
if (!stricmp(SystemPath, "LiveCD"))
|
||||
{
|
||||
strcpy(szBootPath, "\\reactos");
|
||||
|
||||
/* Set kernel command line */
|
||||
sprintf(multiboot_kernel_cmdline,
|
||||
"multi(0)disk(0)cdrom(%u)\\reactos /MININT",
|
||||
(unsigned int)BootDrive);
|
||||
/* Normalize */
|
||||
MachDiskGetBootPath(SystemPath, sizeof(SystemPath));
|
||||
strcat(SystemPath, "\\reactos");
|
||||
strcat(strcpy(multiboot_kernel_cmdline, SystemPath),
|
||||
" /MININT");
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Verify system path
|
||||
*/
|
||||
if (!DissectArcPath(value, szBootPath, &BootDrive, &BootPartition))
|
||||
{
|
||||
sprintf(MsgBuffer,"Invalid system path: '%s'", value);
|
||||
UiMessageBox(MsgBuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
/* recalculate the boot partition for freeldr */
|
||||
i = 0;
|
||||
rosPartition = 0;
|
||||
while (1)
|
||||
{
|
||||
if (!MachDiskGetPartitionEntry(BootDrive, ++i, &PartitionTableEntry))
|
||||
{
|
||||
BootPartition = 0;
|
||||
break;
|
||||
}
|
||||
if (IsRecognizedPartition(PartitionTableEntry.SystemIndicator))
|
||||
{
|
||||
if (++rosPartition == BootPartition)
|
||||
{
|
||||
BootPartition = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (BootPartition == 0)
|
||||
{
|
||||
sprintf(MsgBuffer,"Invalid system path: '%s'", value);
|
||||
UiMessageBox(MsgBuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
/* copy ARC path into kernel command line */
|
||||
strcpy(multiboot_kernel_cmdline, value);
|
||||
/* copy system path into kernel command line */
|
||||
strcpy(multiboot_kernel_cmdline, SystemPath);
|
||||
}
|
||||
|
||||
/* Set boot drive and partition */
|
||||
((LPSTR )(&LoaderBlock.BootDevice))[0] = (CHAR)BootDrive;
|
||||
((LPSTR )(&LoaderBlock.BootDevice))[1] = (CHAR)BootPartition;
|
||||
|
||||
/*
|
||||
* Read the optional kernel parameters (if any)
|
||||
*/
|
||||
@@ -718,13 +665,6 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
|
||||
strcat(multiboot_kernel_cmdline, value);
|
||||
}
|
||||
|
||||
/* append a backslash */
|
||||
if ((strlen(szBootPath)==0) ||
|
||||
szBootPath[strlen(szBootPath)] != '\\')
|
||||
strcat(szBootPath, "\\");
|
||||
|
||||
DbgPrint((DPRINT_REACTOS,"SystemRoot: '%s'\n", szBootPath));
|
||||
|
||||
|
||||
UiDrawBackdrop();
|
||||
UiDrawStatusText("Detecting Hardware...");
|
||||
@@ -734,19 +674,27 @@ LoadAndBootReactOS(PUCHAR OperatingSystemName)
|
||||
*/
|
||||
MachHwDetect();
|
||||
|
||||
if (AcpiPresent) LoaderBlock.Flags |= MB_INFO_FLAG_ACPI_TABLE;
|
||||
|
||||
UiDrawStatusText("Loading...");
|
||||
UiDrawProgressBarCenter(0, 100, "Loading ReactOS...");
|
||||
|
||||
/*
|
||||
* Try to open boot drive
|
||||
* Try to open system drive
|
||||
*/
|
||||
if (!FsOpenVolume(BootDrive, BootPartition))
|
||||
if (!FsOpenSystemVolume(SystemPath, szBootPath, &LoaderBlock.BootDevice))
|
||||
{
|
||||
UiMessageBox("Failed to open boot drive.");
|
||||
return;
|
||||
}
|
||||
|
||||
/* append a backslash */
|
||||
if ((strlen(szBootPath)==0) ||
|
||||
szBootPath[strlen(szBootPath)] != '\\')
|
||||
strcat(szBootPath, "\\");
|
||||
|
||||
DbgPrint((DPRINT_REACTOS,"SystemRoot: '%s'\n", szBootPath));
|
||||
|
||||
/*
|
||||
* Find the kernel image name
|
||||
* and try to load the kernel off the disk
|
||||
|
@@ -312,13 +312,11 @@ VOID RunLoader(VOID)
|
||||
UiDrawStatusText("");
|
||||
#endif
|
||||
|
||||
/* set boot drive and partition */
|
||||
((char *)(&LoaderBlock.BootDevice))[0] = (char)BootDrive;
|
||||
((char *)(&LoaderBlock.BootDevice))[1] = (char)BootPartition;
|
||||
|
||||
/* set boot device */
|
||||
MachDiskGetBootDevice(&LoaderBlock.BootDevice);
|
||||
|
||||
/* Open boot drive */
|
||||
if (!FsOpenVolume(BootDrive, BootPartition))
|
||||
if (!FsOpenBootVolume())
|
||||
{
|
||||
#ifdef USE_UI
|
||||
UiMessageBox("Failed to open boot drive.");
|
||||
@@ -330,7 +328,7 @@ VOID RunLoader(VOID)
|
||||
|
||||
/* Open 'txtsetup.sif' */
|
||||
if (!InfOpenFile (&InfHandle,
|
||||
(BootDrive < 0x80) ? "\\txtsetup.sif" : "\\reactos\\txtsetup.sif",
|
||||
MachDiskBootingFromFloppy() ? "\\txtsetup.sif" : "\\reactos\\txtsetup.sif",
|
||||
&ErrorLine))
|
||||
{
|
||||
printf("Failed to open 'txtsetup.sif'\n");
|
||||
@@ -358,7 +356,7 @@ VOID RunLoader(VOID)
|
||||
printf("LoadOptions: '%s'\n", LoadOptions);
|
||||
#endif
|
||||
|
||||
if (BootDrive < 0x80)
|
||||
if (MachDiskBootingFromFloppy())
|
||||
{
|
||||
/* Boot from floppy disk */
|
||||
SourcePath = "\\";
|
||||
@@ -370,12 +368,9 @@ VOID RunLoader(VOID)
|
||||
}
|
||||
|
||||
/* Set kernel command line */
|
||||
sprintf(multiboot_kernel_cmdline,
|
||||
"multi(0)disk(0)%s(%u)%s %s",
|
||||
(BootDrive < 0x80) ? "fdisk" : "cdrom",
|
||||
(unsigned int)BootDrive,
|
||||
SourcePath,
|
||||
LoadOptions);
|
||||
MachDiskGetBootPath(multiboot_kernel_cmdline, sizeof(multiboot_kernel_cmdline));
|
||||
strcat(strcat(strcat(multiboot_kernel_cmdline, SourcePath), " "),
|
||||
LoadOptions);
|
||||
|
||||
/* Load ntoskrnl.exe */
|
||||
if (!LoadKernel(SourcePath, "ntoskrnl.exe"))
|
||||
@@ -400,7 +395,7 @@ for(;;);
|
||||
#endif
|
||||
|
||||
/* Insert boot disk 2 */
|
||||
if (BootDrive < 0x80)
|
||||
if (MachDiskBootingFromFloppy())
|
||||
{
|
||||
#ifdef USE_UI
|
||||
UiMessageBox("Please insert \"ReactOS Boot Disk 2\" and press ENTER");
|
||||
@@ -410,7 +405,7 @@ for(;;);
|
||||
#endif
|
||||
|
||||
/* Open boot drive */
|
||||
if (!FsOpenVolume(BootDrive, BootPartition))
|
||||
if (!FsOpenBootVolume())
|
||||
{
|
||||
#ifdef USE_UI
|
||||
UiMessageBox("Failed to open boot drive.");
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include <freeldr.h>
|
||||
#include <machine.h>
|
||||
#include <rtl.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
/*
|
||||
* print() - prints unformatted text to stdout
|
||||
@@ -38,12 +39,11 @@ void print(char *str)
|
||||
*/
|
||||
void printf(char *format, ... )
|
||||
{
|
||||
int *dataptr = (int *)(void *)&format;
|
||||
va_list ap;
|
||||
va_start(ap,format);
|
||||
char c, *ptr, str[16];
|
||||
int ll;
|
||||
|
||||
dataptr++;
|
||||
|
||||
while ((c = *(format++)))
|
||||
{
|
||||
if (c != '%')
|
||||
@@ -66,11 +66,11 @@ void printf(char *format, ... )
|
||||
case 'd': case 'u': case 'x':
|
||||
if (ll)
|
||||
{
|
||||
*convert_i64_to_ascii(str, c, *((unsigned long long *) dataptr++)) = 0;
|
||||
*convert_i64_to_ascii(str, c, va_arg(ap, unsigned long long)) = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*convert_to_ascii(str, c, *((unsigned long *) dataptr++)) = 0;
|
||||
*convert_to_ascii(str, c, va_arg(ap, unsigned long)) = 0;
|
||||
}
|
||||
|
||||
ptr = str;
|
||||
@@ -81,10 +81,10 @@ void printf(char *format, ... )
|
||||
}
|
||||
break;
|
||||
|
||||
case 'c': MachConsPutChar((*(dataptr++))&0xff); break;
|
||||
case 'c': MachConsPutChar((va_arg(ap,int))&0xff); break;
|
||||
|
||||
case 's':
|
||||
ptr = (char *)(*(dataptr++));
|
||||
ptr = va_arg(ap,char *);
|
||||
|
||||
while ((c = *(ptr++)))
|
||||
{
|
||||
@@ -100,16 +100,18 @@ void printf(char *format, ... )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
void sprintf(char *buffer, char *format, ... )
|
||||
{
|
||||
int *dataptr = (int *)(void *)&format;
|
||||
va_list ap;
|
||||
char c, *ptr, str[16];
|
||||
char *p = buffer;
|
||||
int ll;
|
||||
|
||||
dataptr++;
|
||||
va_start(ap,format);
|
||||
|
||||
while ((c = *(format++)))
|
||||
{
|
||||
@@ -134,11 +136,11 @@ void sprintf(char *buffer, char *format, ... )
|
||||
case 'd': case 'u': case 'x':
|
||||
if (ll)
|
||||
{
|
||||
*convert_i64_to_ascii(str, c, *((unsigned long long*) dataptr++)) = 0;
|
||||
*convert_i64_to_ascii(str, c, va_arg(ap, unsigned long long)) = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*convert_to_ascii(str, c, *((unsigned long *) dataptr++)) = 0;
|
||||
*convert_to_ascii(str, c, va_arg(ap, unsigned long)) = 0;
|
||||
}
|
||||
|
||||
ptr = str;
|
||||
@@ -151,12 +153,12 @@ void sprintf(char *buffer, char *format, ... )
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
*p = (*(dataptr++))&0xff;
|
||||
*p = va_arg(ap,int)&0xff;
|
||||
p++;
|
||||
break;
|
||||
|
||||
case 's':
|
||||
ptr = (char *)(*(dataptr++));
|
||||
ptr = va_arg(ap,char *);
|
||||
|
||||
while ((c = *(ptr++)))
|
||||
{
|
||||
@@ -174,5 +176,6 @@ void sprintf(char *buffer, char *format, ... )
|
||||
}
|
||||
}
|
||||
}
|
||||
va_end(ap);
|
||||
*p=0;
|
||||
}
|
||||
|
@@ -17,16 +17,15 @@
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* convert_to_ascii() - converts a number to it's ascii equivalent
|
||||
* from:
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1996 Erich Boleyn <erich@uruk.org>
|
||||
*/
|
||||
char *convert_to_ascii(char *buf, int c, ...)
|
||||
char *convert_to_ascii(char *buf, int c, int num)
|
||||
{
|
||||
unsigned long num = *((&c) + 1), mult = 10;
|
||||
unsigned long mult = 10;
|
||||
char *ptr = buf;
|
||||
|
||||
if (c == 'x')
|
||||
@@ -63,9 +62,8 @@ char *convert_to_ascii(char *buf, int c, ...)
|
||||
return ptr;
|
||||
}
|
||||
|
||||
char *convert_i64_to_ascii(char *buf, int c, ...)
|
||||
char *convert_i64_to_ascii(char *buf, int c, unsigned long long num)
|
||||
{
|
||||
unsigned long long num = *(long long*)((&c) + 1);
|
||||
int mult = 10;
|
||||
char *ptr = buf;
|
||||
|
||||
|
@@ -344,4 +344,133 @@ HKCR,"NDS\Clsid","",0x00000002,"{323991f0-7bad-11cf-b03d-00aa006e0975}"
|
||||
|
||||
HKCR,"WinNT\Clsid","",0x00000002,"{8b20cd60-0f29-11cf-abc4-02608c9e7553}"
|
||||
|
||||
|
||||
; For language support:
|
||||
|
||||
HKCR,"MIME",,0x00000012
|
||||
HKCR,"MIME\Database",,0x00000012
|
||||
HKCR,"MIME\Database\Rfc1766",,0x00000012
|
||||
HKCR,"MIME\Database\Rfc1766","0436",0x00000000,"af;Afrikaans"
|
||||
HKCR,"MIME\Database\Rfc1766","041C",0x00000000,"sq;Albanian"
|
||||
HKCR,"MIME\Database\Rfc1766","0001",0x00000000,"ar;Arabic"
|
||||
HKCR,"MIME\Database\Rfc1766","0401",0x00000000,"ar-sa;Arabic (Saudi Arabia)"
|
||||
HKCR,"MIME\Database\Rfc1766","0801",0x00000000,"ar-iq;Arabic (Iraq)"
|
||||
HKCR,"MIME\Database\Rfc1766","0C01",0x00000000,"ar-eg;Arabic (Egypt)"
|
||||
HKCR,"MIME\Database\Rfc1766","1001",0x00000000,"ar-ly;Arabic (Libya)"
|
||||
HKCR,"MIME\Database\Rfc1766","1401",0x00000000,"ar-dz;Arabic (Algeria)"
|
||||
HKCR,"MIME\Database\Rfc1766","1801",0x00000000,"ar-ma;Arabic (Morocco)"
|
||||
HKCR,"MIME\Database\Rfc1766","1C01",0x00000000,"ar-tn;Arabic (Tunisia)"
|
||||
HKCR,"MIME\Database\Rfc1766","2001",0x00000000,"ar-om;Arabic (Oman)"
|
||||
HKCR,"MIME\Database\Rfc1766","2401",0x00000000,"ar-ye;Arabic (Yemen)"
|
||||
HKCR,"MIME\Database\Rfc1766","2801",0x00000000,"ar-sy;Arabic (Syria)"
|
||||
HKCR,"MIME\Database\Rfc1766","2C01",0x00000000,"ar-jo;Arabic (Jordan)"
|
||||
HKCR,"MIME\Database\Rfc1766","3001",0x00000000,"ar-lb;Arabic (Lebanon)"
|
||||
HKCR,"MIME\Database\Rfc1766","3401",0x00000000,"ar-kw;Arabic (Kuwait)"
|
||||
HKCR,"MIME\Database\Rfc1766","3801",0x00000000,"ar-ae;Arabic (U.A.E.)"
|
||||
HKCR,"MIME\Database\Rfc1766","3C01",0x00000000,"ar-bh;Arabic (Bahrain)"
|
||||
HKCR,"MIME\Database\Rfc1766","4001",0x00000000,"ar-qa;Arabic (Qatar)"
|
||||
HKCR,"MIME\Database\Rfc1766","042D",0x00000000,"eu;Basque"
|
||||
HKCR,"MIME\Database\Rfc1766","0402",0x00000000,"bg;Bulgarian"
|
||||
HKCR,"MIME\Database\Rfc1766","0423",0x00000000,"be;Belarusian"
|
||||
HKCR,"MIME\Database\Rfc1766","0403",0x00000000,"ca;Catalan"
|
||||
HKCR,"MIME\Database\Rfc1766","0004",0x00000000,"zh;Chinese"
|
||||
HKCR,"MIME\Database\Rfc1766","0404",0x00000000,"zh-tw;Chinese (Taiwan)"
|
||||
HKCR,"MIME\Database\Rfc1766","0804",0x00000000,"zh-cn;Chinese (China)"
|
||||
HKCR,"MIME\Database\Rfc1766","0C04",0x00000000,"zh-hk;Chinese (Hong Kong SAR)"
|
||||
HKCR,"MIME\Database\Rfc1766","1004",0x00000000,"zh-sg;Chinese (Singapore)"
|
||||
HKCR,"MIME\Database\Rfc1766","041A",0x00000000,"hr;Croatian"
|
||||
HKCR,"MIME\Database\Rfc1766","0405",0x00000000,"cs;Czech"
|
||||
HKCR,"MIME\Database\Rfc1766","0406",0x00000000,"da;Danish"
|
||||
HKCR,"MIME\Database\Rfc1766","0413",0x00000000,"nl;Dutch (Netherlands)"
|
||||
HKCR,"MIME\Database\Rfc1766","0813",0x00000000,"nl-be;Dutch (Belgium)"
|
||||
HKCR,"MIME\Database\Rfc1766","0009",0x00000000,"en;English"
|
||||
HKCR,"MIME\Database\Rfc1766","0409",0x00000000,"en-us;English (United States)"
|
||||
HKCR,"MIME\Database\Rfc1766","0809",0x00000000,"en-gb;English (United Kingdom)"
|
||||
HKCR,"MIME\Database\Rfc1766","0C09",0x00000000,"en-au;English (Australia)"
|
||||
HKCR,"MIME\Database\Rfc1766","1009",0x00000000,"en-ca;English (Canada)"
|
||||
HKCR,"MIME\Database\Rfc1766","1409",0x00000000,"en-nz;English (New Zealand)"
|
||||
HKCR,"MIME\Database\Rfc1766","1809",0x00000000,"en-ie;English (Ireland)"
|
||||
HKCR,"MIME\Database\Rfc1766","1C09",0x00000000,"en-za;English (South Africa)"
|
||||
HKCR,"MIME\Database\Rfc1766","2009",0x00000000,"en-jm;English (Jamaica)"
|
||||
HKCR,"MIME\Database\Rfc1766","2809",0x00000000,"en-bz;English (Belize)"
|
||||
HKCR,"MIME\Database\Rfc1766","2C09",0x00000000,"en-tt;English (Trinidad)"
|
||||
HKCR,"MIME\Database\Rfc1766","0425",0x00000000,"et;Estonian"
|
||||
HKCR,"MIME\Database\Rfc1766","0438",0x00000000,"fo;Faeroese"
|
||||
HKCR,"MIME\Database\Rfc1766","0429",0x00000000,"fa;Farsi"
|
||||
HKCR,"MIME\Database\Rfc1766","040B",0x00000000,"fi;Finnish"
|
||||
HKCR,"MIME\Database\Rfc1766","040C",0x00000000,"fr;French (France)"
|
||||
HKCR,"MIME\Database\Rfc1766","080C",0x00000000,"fr-be;French (Belgium)"
|
||||
HKCR,"MIME\Database\Rfc1766","0C0C",0x00000000,"fr-ca;French (Canada)"
|
||||
HKCR,"MIME\Database\Rfc1766","100C",0x00000000,"fr-ch;French (Switzerland)"
|
||||
HKCR,"MIME\Database\Rfc1766","140C",0x00000000,"fr-lu;French (Luxembourg)"
|
||||
HKCR,"MIME\Database\Rfc1766","043C",0x00000000,"gd;Gaelic"
|
||||
HKCR,"MIME\Database\Rfc1766","0407",0x00000000,"de;German (Germany)"
|
||||
HKCR,"MIME\Database\Rfc1766","0807",0x00000000,"de-ch;German (Switzerland)"
|
||||
HKCR,"MIME\Database\Rfc1766","0C07",0x00000000,"de-at;German (Austria)"
|
||||
HKCR,"MIME\Database\Rfc1766","1007",0x00000000,"de-lu;German (Luxembourg)"
|
||||
HKCR,"MIME\Database\Rfc1766","1407",0x00000000,"de-li;German (Liechtenstein)"
|
||||
HKCR,"MIME\Database\Rfc1766","0408",0x00000000,"el;Greek"
|
||||
HKCR,"MIME\Database\Rfc1766","040D",0x00000000,"he;Hebrew"
|
||||
HKCR,"MIME\Database\Rfc1766","0439",0x00000000,"hi;Hindi"
|
||||
HKCR,"MIME\Database\Rfc1766","040E",0x00000000,"hu;Hungarian"
|
||||
HKCR,"MIME\Database\Rfc1766","040F",0x00000000,"is;Icelandic"
|
||||
HKCR,"MIME\Database\Rfc1766","0421",0x00000000,"in;Indonesian"
|
||||
HKCR,"MIME\Database\Rfc1766","0410",0x00000000,"it;Italian (Italy)"
|
||||
HKCR,"MIME\Database\Rfc1766","0810",0x00000000,"it-ch;Italian (Switzerland)"
|
||||
HKCR,"MIME\Database\Rfc1766","0411",0x00000000,"ja;Japanese"
|
||||
HKCR,"MIME\Database\Rfc1766","0412",0x00000000,"ko;Korean"
|
||||
HKCR,"MIME\Database\Rfc1766","0426",0x00000000,"lv;Latvian"
|
||||
HKCR,"MIME\Database\Rfc1766","0427",0x00000000,"lt;Lithuanian"
|
||||
HKCR,"MIME\Database\Rfc1766","042F",0x00000000,"mk;FYRO Macedonian"
|
||||
HKCR,"MIME\Database\Rfc1766","043E",0x00000000,"ms;Malay (Malaysia)"
|
||||
HKCR,"MIME\Database\Rfc1766","043A",0x00000000,"mt;Maltese"
|
||||
HKCR,"MIME\Database\Rfc1766","0414",0x00000000,"no;Norwegian (Bokmal)"
|
||||
HKCR,"MIME\Database\Rfc1766","0814",0x00000000,"no;Norwegian (Nynorsk)"
|
||||
HKCR,"MIME\Database\Rfc1766","0415",0x00000000,"pl;Polish"
|
||||
HKCR,"MIME\Database\Rfc1766","0416",0x00000000,"pt-br;Portuguese (Brazil)"
|
||||
HKCR,"MIME\Database\Rfc1766","0816",0x00000000,"pt;Portuguese (Portugal)"
|
||||
HKCR,"MIME\Database\Rfc1766","0417",0x00000000,"rm;Rhaeto-Romanic"
|
||||
HKCR,"MIME\Database\Rfc1766","0418",0x00000000,"ro;Romanian"
|
||||
HKCR,"MIME\Database\Rfc1766","0818",0x00000000,"ro-mo;Romanian (Moldova)"
|
||||
HKCR,"MIME\Database\Rfc1766","0419",0x00000000,"ru;Russian"
|
||||
HKCR,"MIME\Database\Rfc1766","0819",0x00000000,"ru-mo;Russian (Moldova)"
|
||||
HKCR,"MIME\Database\Rfc1766","0C1A",0x00000000,"sr;Serbian (Cyrillic)"
|
||||
HKCR,"MIME\Database\Rfc1766","081A",0x00000000,"sr;Serbian (Latin)"
|
||||
HKCR,"MIME\Database\Rfc1766","041B",0x00000000,"sk;Slovak"
|
||||
HKCR,"MIME\Database\Rfc1766","0424",0x00000000,"sl;Slovenian"
|
||||
HKCR,"MIME\Database\Rfc1766","042E",0x00000000,"sb;Sorbian"
|
||||
HKCR,"MIME\Database\Rfc1766","040A",0x00000000,"es;Spanish (Traditional Sort)"
|
||||
HKCR,"MIME\Database\Rfc1766","080A",0x00000000,"es-mx;Spanish (Mexico)"
|
||||
HKCR,"MIME\Database\Rfc1766","0C0A",0x00000000,"es;Spanish (International Sort)"
|
||||
HKCR,"MIME\Database\Rfc1766","100A",0x00000000,"es-gt;Spanish (Guatemala)"
|
||||
HKCR,"MIME\Database\Rfc1766","140A",0x00000000,"es-cr;Spanish (Costa Rica)"
|
||||
HKCR,"MIME\Database\Rfc1766","180A",0x00000000,"es-pa;Spanish (Panama)"
|
||||
HKCR,"MIME\Database\Rfc1766","1C0A",0x00000000,"es-do;Spanish (Dominican Republic)"
|
||||
HKCR,"MIME\Database\Rfc1766","200A",0x00000000,"es-ve;Spanish (Venezuela)"
|
||||
HKCR,"MIME\Database\Rfc1766","240A",0x00000000,"es-co;Spanish (Colombia)"
|
||||
HKCR,"MIME\Database\Rfc1766","280A",0x00000000,"es-pe;Spanish (Peru)"
|
||||
HKCR,"MIME\Database\Rfc1766","2C0A",0x00000000,"es-ar;Spanish (Argentina)"
|
||||
HKCR,"MIME\Database\Rfc1766","300A",0x00000000,"es-ec;Spanish (Ecuador)"
|
||||
HKCR,"MIME\Database\Rfc1766","340A",0x00000000,"es-cl;Spanish (Chile)"
|
||||
HKCR,"MIME\Database\Rfc1766","380A",0x00000000,"es-uy;Spanish (Uruguay)"
|
||||
HKCR,"MIME\Database\Rfc1766","3C0A",0x00000000,"es-py;Spanish (Paraguay)"
|
||||
HKCR,"MIME\Database\Rfc1766","400A",0x00000000,"es-bo;Spanish (Bolivia)"
|
||||
HKCR,"MIME\Database\Rfc1766","440A",0x00000000,"es-sv;Spanish (El Salvador)"
|
||||
HKCR,"MIME\Database\Rfc1766","480A",0x00000000,"es-hn;Spanish (Honduras)"
|
||||
HKCR,"MIME\Database\Rfc1766","4C0A",0x00000000,"es-ni;Spanish (Nicaragua)"
|
||||
HKCR,"MIME\Database\Rfc1766","500A",0x00000000,"es-pr;Spanish (Puerto Rico)"
|
||||
HKCR,"MIME\Database\Rfc1766","0430",0x00000000,"sx;Sutu"
|
||||
HKCR,"MIME\Database\Rfc1766","041D",0x00000000,"sv;Swedish"
|
||||
HKCR,"MIME\Database\Rfc1766","081D",0x00000000,"sv-fi;Swedish (Finland)"
|
||||
HKCR,"MIME\Database\Rfc1766","041E",0x00000000,"th;Thai"
|
||||
HKCR,"MIME\Database\Rfc1766","0431",0x00000000,"ts;Tsonga"
|
||||
HKCR,"MIME\Database\Rfc1766","0432",0x00000000,"tn;Tswana"
|
||||
HKCR,"MIME\Database\Rfc1766","041F",0x00000000,"tr;Turkish"
|
||||
HKCR,"MIME\Database\Rfc1766","0422",0x00000000,"uk;Ukrainian"
|
||||
HKCR,"MIME\Database\Rfc1766","0420",0x00000000,"ur;Urdu"
|
||||
HKCR,"MIME\Database\Rfc1766","042A",0x00000000,"vi;Vietnamese"
|
||||
HKCR,"MIME\Database\Rfc1766","0434",0x00000000,"xh;Xhosa"
|
||||
HKCR,"MIME\Database\Rfc1766","043D",0x00000000,"ji;Yiddish"
|
||||
HKCR,"MIME\Database\Rfc1766","0435",0x00000000,"zu;Zulu"
|
||||
|
||||
; EOF
|
||||
|
@@ -13,9 +13,9 @@ HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall",,0x00000010
|
||||
HKLM,"SOFTWARE\Microsoft\Rpc",,0x00000012
|
||||
|
||||
; Version Information
|
||||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentVersion",0x00020000,"4.0"
|
||||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CSDVersion",0x00020000,"Service Pack 6"
|
||||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentBuildNumber",0x00020000,"1381"
|
||||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentVersion",0x00020000,"5.0"
|
||||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CSDVersion",0x00020000,"Service Pack 3"
|
||||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion","CurrentBuildNumber",0x00020000,"2195"
|
||||
|
||||
|
||||
; Image File Execution Options (NtGlobalFlag with FLG_SHOW_LDR_SNAPS set for loadlib.exe)
|
||||
|
@@ -64,10 +64,14 @@ HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\00010409","Layout File",0
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\00010409","Layout Text",0x00000000,"US-Dvorak"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\0000040c","Layout File",0x00000000,"kbdfr.dll"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\0000040c","Layout Text",0x00000000,"FR"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\00000419","Layout File",0x00000000,"kbdru.dll"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\00000419","Layout Text",0x00000000,"Russian"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\0000041d","Layout File",0x00000000,"kbdse.dll"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\0000041d","Layout Text",0x00000000,"SE"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\00000809","Layout File",0x00000000,"kbduk.dll"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\00000809","Layout Text",0x00000000,"UK"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\00000807","Layout File",0x00000000,"kbdsg.dll"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\KeyboardLayouts\00000807","Layout Text",0x00000000,"SG"
|
||||
|
||||
; Network
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}",,0x00000000,"Network Adapters"
|
||||
@@ -168,6 +172,7 @@ HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","040f",0x00000000,"l_intl.n
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0410",0x00000000,"l_intl.nls"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","041d",0x00000000,"l_intl.nls"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0809",0x00000000,"l_intl.nls"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","0807",0x00000000,"l_intl.nls"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","Default",0x00000000,"0409"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\NLS\Language","InstallLanguage",0x00000000,"0409"
|
||||
|
||||
@@ -257,10 +262,10 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management","Pagin
|
||||
; Subsystems
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Debug",0x00020000,""
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Kmode",0x00020000,"%SystemRoot%\system32\win32k.sys"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Optional",0x00070001,50,00,6f,00,73,00,69,00,78,00,00,00,4f,00,73,00,32,00,00,00,00,00
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Optional",0x00010000,"Posix","Os2"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Os2",0x00020000,"%SystemRoot%\system32\os2ss.exe"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Posix",0x00020000,"%SystemRoot%\system32\psxss.exe"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Required",0x00070001,44,00,65,00,62,00,75,00,67,00,00,00,57,00,69,00,6e,00,64,00,6f,00,77,00,73,00,00,00,00,00
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Required",0x00010000,"Debug","Windows"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\Subsystems","Windows",0x00020000,"%SystemRoot%\system32\csrss.exe"
|
||||
|
||||
; 3Com 3c905 Driver
|
||||
@@ -288,9 +293,9 @@ HKLM,"SYSTEM\CurrentControlSet\Services\3c90x1\Linkage","Export",0x00010000,"\De
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\3c90x1\Linkage","Route",0x00010000,"3c90x1"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\3c90x1\Parameters","SlotNumber",0x00000000,"10"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\3c90x1\Parameters","BusNumber",0x00000000,"0"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\3c90x1\Parameters\Tcpip","DefaultGateway",0x00010000,"10.0.0.1"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\3c90x1\Parameters\Tcpip","IPAddress",0x00010000,"10.0.0.100"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\3c90x1\Parameters\Tcpip","SubnetMask",0x00010000,"255.255.255.0"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\3c90x1\Parameters\Tcpip","DefaultGateway",0x00010000,"0.0.0.0"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\3c90x1\Parameters\Tcpip","IPAddress",0x00010000,"0.0.0.0"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\3c90x1\Parameters\Tcpip","SubnetMask",0x00010000,"0.0.0.0"
|
||||
|
||||
; Afd driver
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Afd","ErrorControl",0x00010001,0x00000001
|
||||
@@ -441,6 +446,13 @@ HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","ImagePath",0x00020000,"%Syste
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","Start",0x00010001,0x00000002
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\EventLog","Type",0x00010001,0x00000010
|
||||
|
||||
; DHCP client service
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","ErrorControl",0x00010001,0x00000000
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Group",0x00000000,"Network"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","ImagePath",0x00020000,"%SystemRoot%\system32\dhcp.exe"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Start",0x00010001,0x00000002
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\DHCP","Type",0x00010001,0x00000010
|
||||
|
||||
; Floppy driver
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","ErrorControl",0x00010001,0x00000000
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Floppy","Group",0x00000000,"Primary Disk"
|
||||
@@ -469,6 +481,19 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Keyboard","ImagePath",0x00020000,"system
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Keyboard","Start",0x00010001,0x00000001
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Keyboard","Type",0x00010001,0x00000001
|
||||
|
||||
; Serial port enumerator
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\serenum","ErrorControl",0x00010001,0x00000001
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\serenum","Group",0x00000000,"PNP Filter"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\serenum","ImagePath",0x00020000,"system32\drivers\serenum.sys"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\serenum","Start",0x00010001,0x00000003
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\serenum","Type",0x00010001,0x00000001
|
||||
;hard coded values
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\serenum\Enum","0",0x00000000,"ACPI\PNP0501"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\serenum\Enum","Count",0x00010001,0x00000001
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\serenum\Enum","NextInstance",0x00010001,0x00000001
|
||||
HKLM,"SYSTEM\CurrentControlSet\Enum\ACPI\PNP0501\1","UpperFilters",0x00010000,"serenum"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Enum\ACPI\PNP0501\2","UpperFilters",0x00010000,"serenum"
|
||||
|
||||
; SB16 driver
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","Group",0x00000000,"Base"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\sndblst","ServiceType",0x00010001,0x00000001
|
||||
@@ -554,9 +579,9 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE103
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0001","Port",0x00000000,"280"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0001","Irq",0x00000000,"9"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0001","NetworkAddress",0x00000000,"001122334455"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Ne20001\Parameters\Tcpip","DefaultGateway",0x00010000,"10.0.0.1"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Ne20001\Parameters\Tcpip","IPAddress",0x00010000,"10.0.0.100"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Ne20001\Parameters\Tcpip","SubnetMask",0x00010000,"255.255.255.0"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Ne20001\Parameters\Tcpip","DefaultGateway",0x00010000,"0.0.0.0"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Ne20001\Parameters\Tcpip","IPAddress",0x00010000,"0.0.0.0"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Ne20001\Parameters\Tcpip","SubnetMask",0x00010000,"0.0.0.0"
|
||||
|
||||
; one day this will happen automatically; until then we need this since ndis5 drivers
|
||||
; rely on the fact that their resources are handed to them by ndis, so we have to find
|
||||
@@ -645,9 +670,9 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE103
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0000","BusNumber",0x00000000,"0"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\{RANDOMCFGGUIDFOR_PCNET1}",,0x00000000,"Network Adapters"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\{RANDOMCFGGUIDFOR_PCNET1}\Connection","Name",0x00000000,"AMD PCNet (static Registry entry)"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\PCNet1\Parameters\Tcpip","DefaultGateway",0x00010000,"10.0.0.1"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\PCNet1\Parameters\Tcpip","IPAddress",0x00010000,"10.0.0.100"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\PCNet1\Parameters\Tcpip","SubnetMask",0x00010000,"255.255.255.0"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\PCNet1\Parameters\Tcpip","DefaultGateway",0x00010000,"0.0.0.0"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\PCNet1\Parameters\Tcpip","IPAddress",0x00010000,"0.0.0.0"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\PCNet1\Parameters\Tcpip","SubnetMask",0x00010000,"0.0.0.0"
|
||||
|
||||
; Named Pipe filesystem driver
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Npfs","ErrorControl",0x00010001,0x00000000
|
||||
@@ -676,6 +701,12 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Serial","Group",0x00000000,"Base"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Serial","ImagePath",0x00020000,"system32\drivers\serial.sys"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Serial","Start",0x00010001,0x00000001
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Serial","Type",0x00010001,0x00000001
|
||||
;hard coded values
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Serial\Enum","0",0x00000000,"ACPI\PNP0501"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Serial\Enum","Count",0x00010001,0x00000001
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Serial\Enum","NextInstance",0x00010001,0x00000001
|
||||
HKLM,"SYSTEM\CurrentControlSet\Enum\ACPI\PNP0501\1","Service",0x00000000,"serial"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Enum\ACPI\PNP0501\2","Service",0x00000000,"serial"
|
||||
|
||||
; Packet driver
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Packet","ErrorControl",0x00010001,0x00000001
|
||||
@@ -775,6 +806,15 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Vfatfs","ImagePath",0x00020000,"system32
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Vfatfs","Start",0x00010001,0x00000000
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\Vfatfs","Type",0x00010001,0x00000002
|
||||
|
||||
; Xbox Nvidia driver
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\XboxVmp","ErrorControl",0x00010001,0x00000000
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\XboxVmp","Group",0x00000000,"Video"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\XboxVmp","ImagePath",0x00020000,"system32\drivers\xboxvmp.sys"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\XboxVmp","Start",0x00010001,0x00000001
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\XboxVmp","Type",0x00010001,0x00000001
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\XboxVmp\Device0","InstalledDisplayDrivers",0x00010000,"framebuf"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Enum\PCI\VEN_10DE&DEV_02A0&SUBSYS_00000000&REV_A1\0000","Service",0x00000000,"XboxVmp"
|
||||
|
||||
; VBE SVGA driver
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\VBE","ErrorControl",0x00010001,0x00000000
|
||||
HKLM,"SYSTEM\CurrentControlSet\Services\VBE","Group",0x00000000,"Video Save SVGA"
|
||||
@@ -834,100 +874,4 @@ HKLM,"SYSTEM\Setup","OsLoaderPath",0x00000000,"\"
|
||||
HKLM,"SYSTEM\Setup","SetupType",0x00010001,0x00000001
|
||||
HKLM,"SYSTEM\Setup","SystemPartition",0x00000000,"\Device\Harddisk0\Partition1"
|
||||
HKLM,"SYSTEM\Setup","SystemSetupInProgress",0x00010001,0x00000000
|
||||
|
||||
; ----------------------------- KJS Init ----------------------------
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","kjsinit",0x00010000,\
|
||||
"function init(v) { var rk = '\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Kdb'; eval(System.regread(rk,v)); } for( i = 1; i <= 45; i++ ) { init((new Number(i)).toString()); }"
|
||||
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","1",0x00010000,\
|
||||
"function write(x) { System.print(x); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","2",0x00010000,\
|
||||
"function regs(n) { return System.regs(n); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","3",0x00010000,\
|
||||
"function debugebp() { return regs(0); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","4",0x00010000,\
|
||||
"function debugeip() { return regs(1); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","5",0x00010000,\
|
||||
"function tf_argmark() { return regs(2); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","6",0x00010000,\
|
||||
"function tf_pointer() { return regs(3); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","7",0x00010000,\
|
||||
"function tf_tempcs() { return regs(4); } "
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","8",0x00010000,\
|
||||
"function tf_tempeip() { return regs(5); } "
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","9",0x00010000,\
|
||||
"function dr0() { return regs(6); } "
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","10",0x00010000,\
|
||||
"function dr1() { return regs(7); } "
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","11",0x00010000,\
|
||||
"function dr2() { return regs(8); } "
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","12",0x00010000,\
|
||||
"function dr3() { return regs(9); } "
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","13",0x00010000,\
|
||||
"function dr6() { return regs(10); } "
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","14",0x00010000,\
|
||||
"function dr7() { return regs(11); } "
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","15",0x00010000,\
|
||||
"function gs() { return regs(12) & 0xffff; }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","16",0x00010000,\
|
||||
"function es() { return regs(13) & 0xffff; }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","17",0x00010000,\
|
||||
"function ds() { return regs(14) & 0xffff; }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","18",0x00010000,\
|
||||
"function edx() { return regs(15); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","19",0x00010000,\
|
||||
"function ecx() { return regs(16); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","20",0x00010000,\
|
||||
"function eax() { return regs(17); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","21",0x00010000,\
|
||||
"function tf_pmode() { return regs(18); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","22",0x00010000,\
|
||||
"function tf_exl() { return regs(19); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","23",0x00010000,\
|
||||
"function fs() { return regs(20) & 0xffff; }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","24",0x00010000,\
|
||||
"function edi() { return regs(21); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","25",0x00010000,\
|
||||
"function esi() { return regs(22); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","26",0x00010000,\
|
||||
"function ebx() { return regs(23); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","27",0x00010000,\
|
||||
"function ebp() { return regs(24); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","28",0x00010000,\
|
||||
"function error_code() { return regs(25); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","29",0x00010000,\
|
||||
"function eip() { return regs(26); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","30",0x00010000,\
|
||||
"function cs() { return regs(27) & 0xffff; }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","31",0x00010000,\
|
||||
"function eflags() { return regs(28); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","32",0x00010000,\
|
||||
"function esp() { return regs(29); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","33",0x00010000,\
|
||||
"function ss() { return regs(30) & 0xffff; }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","34",0x00010000,\
|
||||
"function v86_es() { return regs(31) & 0xffff; }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","35",0x00010000,\
|
||||
"function v86_ds() { return regs(32) & 0xffff; }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","36",0x00010000,\
|
||||
"function v86_fs() { return regs(33) & 0xffff; }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","37",0x00010000,\
|
||||
"function v86_gs() { return regs(34) & 0xffff; }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","38",0x00010000,\
|
||||
"function peekl(a) { return System.mread(4,a); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","39",0x00010000,\
|
||||
"function pokel(a,b) { return System.mwrite(4,a,b); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","40",0x00010000,\
|
||||
"function peekw(a) { return System.mread(2,a); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","41",0x00010000,\
|
||||
"function pokew(a,b) { return System.mwrite(2,a,b); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","42",0x00010000,\
|
||||
"function peek(a) { return System.mread(1,a); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","43",0x00010000,\
|
||||
"function poke(a,b) { return System.mwrite(1,a,b); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","44",0x00010000,\
|
||||
"function regread(x,y) { return System.regread(x,y); }"
|
||||
HKLM,"SYSTEM\CurrentControlSet\Control\Kdb","45",0x00010000,\
|
||||
"write('JS Registry Init Complete. Welcome to ReactOS kernel scripting');"
|
||||
|
||||
; EOF
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 25 KiB |
@@ -29,6 +29,7 @@ Signature = "$ReactOS$"
|
||||
drivers\bus\acpi\acpi.sys 2
|
||||
drivers\bus\isapnp\isapnp.sys 2
|
||||
drivers\bus\pci\pci.sys 2
|
||||
drivers\bus\serenum\serenum.sys 2
|
||||
drivers\dd\beep\beep.sys 2
|
||||
drivers\dd\bootvid\bootvid.sys 2
|
||||
drivers\dd\null\null.sys 2
|
||||
@@ -87,7 +88,9 @@ lib\kbddv\kbddv.dll 1
|
||||
lib\kbdes\kbdes.dll 1
|
||||
lib\kbdfr\kbdfr.dll 1
|
||||
lib\kbdgr\kbdgr.dll 1
|
||||
lib\kbdru\kbdru.dll 1
|
||||
lib\kbdse\kbdse.dll 1
|
||||
lib\kbdsg\kbdsg.dll 1
|
||||
lib\kbduk\kbduk.dll 1
|
||||
lib\kbdus\kbdus.dll 1
|
||||
lib\kernel32\kernel32.dll 1
|
||||
@@ -99,6 +102,7 @@ lib\mpr\mpr.dll 1
|
||||
lib\msacm\msacm32.dll 1
|
||||
lib\msafd\msafd.dll 1
|
||||
lib\msgina\msgina.dll 1
|
||||
lib\msi\msi.dll 1
|
||||
lib\msimg32\msimg32.dll 1
|
||||
lib\msvcrt\msvcrt.dll 1
|
||||
lib\msvcrt20\msvcrt20.dll 1
|
||||
@@ -108,10 +112,12 @@ lib\ole32\ole32.dll 1
|
||||
lib\oleaut32\oleaut32.dll 1
|
||||
lib\olepro32\olepro32.dll 1
|
||||
lib\psapi\psapi.dll 1
|
||||
lib\riched20\riched20.dll 1
|
||||
lib\richedit\riched32.dll 1
|
||||
lib\rpcrt4\rpcrt4.dll 1
|
||||
lib\samlib\samlib.dll 1
|
||||
lib\secur32\secur32.dll 1
|
||||
lib\serialui\serialui.dll 1
|
||||
lib\setupapi\setupapi.dll 1
|
||||
lib\shdocvw\shdocvw.dll 1
|
||||
lib\shell32\shell32.dll 1
|
||||
@@ -146,8 +152,9 @@ subsys\system\cmd\cmd.exe 1
|
||||
subsys\system\explorer\explorer.exe 4
|
||||
subsys\system\explorer\explorer-cfg-template.xml 4
|
||||
subsys\system\explorer\notifyhook\notifyhook.dll 1
|
||||
subsys\system\ibrowser\ibrowser.exe 1
|
||||
subsys\system\format\format.exe 1
|
||||
subsys\system\ibrowser\ibrowser.exe 1
|
||||
subsys\system\msiexec\msiexec.exe 1
|
||||
subsys\system\notepad\notepad.exe 1
|
||||
subsys\system\regedit\regedit.exe 4
|
||||
subsys\system\regsvr32\regsvr32.exe 1
|
||||
@@ -160,6 +167,7 @@ subsys\system\userinit\userinit.exe 1
|
||||
subsys\system\vmwinst\vmwinst.exe 1
|
||||
subsys\system\winlogon\winlogon.exe 1
|
||||
subsys\system\winefile\winefile.exe 1
|
||||
subsys\system\dhcp\dhcp.exe 1
|
||||
services\eventlog\eventlog.exe 1
|
||||
services\rpcss\rpcss.exe 1
|
||||
services\umpnpmgr\umpnpmgr.exe 1
|
||||
|
@@ -35,7 +35,7 @@ Cabinet=reactos.cab
|
||||
[SetupData]
|
||||
DefaultPath = \ReactOS
|
||||
OsLoadOptions = "/NOGUIBOOT /NODEBUG"
|
||||
;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=COM1"
|
||||
;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=COM1 /BAUDRATE=19200 /IRQ=4"
|
||||
;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=SCREEN"
|
||||
;OsLoadOptions = "/NOGUIBOOT /DEBUGPORT=BOCHS"
|
||||
|
||||
@@ -77,18 +77,22 @@ Default = "XT-, AT- or extended keyboard (83-105 keys)"
|
||||
00010409 = "English (USA-Dvorak)"
|
||||
0000040C = "French (France)"
|
||||
00000407 = "German (Germany)"
|
||||
00000419 = "Russian"
|
||||
0000040A = "Spanish (traditional short)"
|
||||
0000041D = "Swedish (Sweden)"
|
||||
00000807 = "German (Swiss)"
|
||||
|
||||
[Files.KeyboardLayout]
|
||||
00000406 = kbdda.dll
|
||||
00000407 = kbdgr.dll
|
||||
00000409 = kbdus.dll
|
||||
00010409 = kbddv.dll
|
||||
0000040C = kbdfr.dll
|
||||
0000041D = kbdse.dll
|
||||
00000809 = kgbgb.dll
|
||||
0000040A = kbdes.dll
|
||||
0000040C = kbdfr.dll
|
||||
00000419 = kbdru.dll
|
||||
0000041D = kbdse.dll
|
||||
00000809 = kbduk.dll
|
||||
00000807 = kbdsg.dll
|
||||
|
||||
[Mouse]
|
||||
;<id> = <user friendly name>,<spare>,<service key name>
|
||||
|
@@ -5,7 +5,6 @@
|
||||
# Possible values in the future: alpha,i386,m68k,mips,powerpc
|
||||
ARCH := i386
|
||||
|
||||
|
||||
#
|
||||
# Which cpu should reactos optimize for
|
||||
# example : i486, i586, pentium, pentium2, pentium3, pentium4
|
||||
@@ -27,26 +26,11 @@ KDBG := 0
|
||||
#
|
||||
DBG := 0
|
||||
|
||||
#
|
||||
# Whether to compile with optimizations
|
||||
#
|
||||
OPTIMIZED := 0
|
||||
|
||||
#
|
||||
# Whether to compile a multiprocessor or single processor version
|
||||
#
|
||||
CONFIG_SMP := 0
|
||||
|
||||
#
|
||||
# Whether to compile for ACPI compliant systems
|
||||
#
|
||||
ACPI := 0
|
||||
|
||||
#
|
||||
# whether to use a 3GB User, 1GB Kernel memory map
|
||||
#
|
||||
3GB := 0
|
||||
|
||||
#
|
||||
# Which version of NDIS do we support up to?
|
||||
#
|
||||
|
@@ -26,52 +26,55 @@ This will allow you to use the WINE tools and librarys with very little
|
||||
work to import a new dll.
|
||||
|
||||
The following build tools are derived from Wine.
|
||||
reactos/tools/unicode # Synced to Wine-20050310
|
||||
reactos/tools/wpp # Synced to Wine-20050310
|
||||
reactos/tools/bin2res # Resource to binary converter
|
||||
reactos/tools/winebuild # Synced to Wine-20050211
|
||||
reactos/tools/winebuild # Synced to Wine-20050310
|
||||
reactos/tools/wmc # Wine Message Compiler
|
||||
reactos/tools/wrc # Synced to Wine-20050211
|
||||
reactos/tools/wrc # Synced to Wine-20050310
|
||||
reactos/tools/widl # Synced to Wine-20050310
|
||||
|
||||
The following shared libraries are a 100% port from Winehq sources.
|
||||
|
||||
reactos/lib/cabinet # Synced to Wine-20050211
|
||||
reactos/lib/comctl32 # Synced to Wine-20050211
|
||||
reactos/lib/comdlg32 # Synced to Wine-20050211
|
||||
reactos/lib/dinput # Synced to Wine-20050211
|
||||
reactos/lib/dinput8 # Synced to Wine-20050211
|
||||
reactos/lib/icmp # Synced to Wine-20050211
|
||||
reactos/lib/cabinet # Synced to Wine-20050310
|
||||
reactos/lib/comctl32 # Synced to Wine-20050310
|
||||
reactos/lib/comdlg32 # Synced to Wine-20050310
|
||||
reactos/lib/dinput # Synced to Wine-20050310
|
||||
reactos/lib/dinput8 # Synced to Wine-20050310
|
||||
reactos/lib/icmp # Synced to Wine-20050310
|
||||
reactos/lib/iphlpapi # Out of sync
|
||||
reactos/lib/imagehlp # Patches for BindImage need review and submission to winehq.
|
||||
reactos/lib/msvcrt20 # Out of sync
|
||||
reactos/lib/mpr # Synced to Wine-20050211
|
||||
reactos/lib/mpr # Synced to Wine-20050310
|
||||
reactos/lib/msacm # Out of sync
|
||||
reactos/lib/msimg32 # Synced to Wine-20050211
|
||||
reactos/lib/msi # Synced to Wine-20050211
|
||||
reactos/lib/msimg32 # Synced to Wine-20050310
|
||||
reactos/lib/msi # Synced to Wine-20050310
|
||||
reactos/lib/msvideo # Out of sync
|
||||
reactos/lib/netapi32 # Out of sync
|
||||
reactos/lib/odbc32 # In sync. Depends on port of Linux ODBC.
|
||||
reactos/lib/ole32 # Synced to Wine-20050211
|
||||
reactos/lib/oleaut32 # Synced to Wine-20050211
|
||||
reactos/lib/oledlg # Synced to Wine-20050211
|
||||
reactos/lib/olepro32 # Synced to Wine-20050211
|
||||
reactos/lib/richedit # Synced to Wine-20050211
|
||||
reactos/lib/rpcrt4 # Synced to Wine-20050211
|
||||
reactos/lib/setupapi # Synced to Wine-20050125 # CVS
|
||||
reactos/lib/shell32 # Synced to Wine-20050211
|
||||
reactos/lib/shdocvw # Synced to Wine-20050211
|
||||
reactos/lib/shlwapi # Synced to Wine-20050211
|
||||
reactos/lib/ole32 # Synced to Wine-20050310
|
||||
reactos/lib/oleaut32 # Synced to Wine-20050310
|
||||
reactos/lib/oledlg # Synced to Wine-20050310
|
||||
reactos/lib/olepro32 # Synced to Wine-20050310
|
||||
reactos/lib/riched20 # Synced to Wine-20050310
|
||||
reactos/lib/richedit # Synced to Wine-20050310
|
||||
reactos/lib/rpcrt4 # Synced to Wine-20050310
|
||||
reactos/lib/setupapi # Synced to Wine-20050310
|
||||
reactos/lib/shell32 # Synced to Wine-20050310
|
||||
reactos/lib/shdocvw # Synced to Wine-20050310
|
||||
reactos/lib/shlwapi # Synced to Wine-20050310
|
||||
reactos/lib/twain # Out of sync
|
||||
reactos/lib/unicode # Dependancy on this lib needs to be removed. Synced to Wine-20050211
|
||||
reactos/lib/urlmon # Synced to Wine-20050211
|
||||
reactos/lib/urlmon # Synced to Wine-20050310
|
||||
reactos/lib/version # Out of sync
|
||||
reactos/lib/wininet # Out of sync
|
||||
reactos/lib/winmm # Synced to Wine-20050211
|
||||
reactos/lib/winmm/midimap # Synced to Wine-20050211
|
||||
reactos/lib/winmm/wavemap # Synced to Wine-20050211
|
||||
reactos/lib/winmm # Synced to Wine-20050310
|
||||
reactos/lib/winmm/midimap # Synced to Wine-20050310
|
||||
reactos/lib/winmm/wavemap # Synced to Wine-20050310
|
||||
|
||||
ReactOS shares the following programs with Winehq.
|
||||
reactos/subsys/system/regedit # Out of sync
|
||||
reactos/subsys/system/expand # Out of sync
|
||||
reactos/subsys/system/msiexec # Synced to Wine-20050211
|
||||
reactos/subsys/system/msiexec # Synced to Wine-20050311
|
||||
|
||||
In addition the following libs, dlls and source files are mostly based on code ported
|
||||
from Winehq CVS. If you are looking to update something in these files
|
||||
|
@@ -6,7 +6,7 @@ PATH_TO_TOP = ../..
|
||||
|
||||
include $(PATH_TO_TOP)/rules.mak
|
||||
|
||||
DRIVERS = acpi isapnp pci
|
||||
DRIVERS = acpi isapnp pci serenum
|
||||
|
||||
all: $(DRIVERS)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user