1 // Uses hard-coded filenames to require a minimum of input.
2 // You think this file should be licensed? OK then,
3 // Copyright (C) 2004, Mike Nordell. Use as you whish.
8 const char szSrc1
[] = "..\\..\\reactos\\ntoskrnl\\ntoskrnl.def";
9 const char szDst1
[] = "..\\ntoskrnl\\ntoskrnl.def";
10 const char szSrc2
[] = "..\\..\\reactos\\hal\\hal\\hal.def";
11 const char szDst2
[] = "..\\hal\\hal.def";
19 std::string
do_kernel_replacements(std::string
& s
)
21 std::string s2
= s
.c_str(); // to fixup size after replacements
22 if (s2
== "ExAllocateFromPagedLookasideList") {
23 s2
+= "=ExiAllocateFromPagedLookasideList";
25 if (s2
== "ExFreeToPagedLookasideList") {
26 s2
+= "=ExiFreeToPagedLookasideList";
28 if (s2
== "MmLockPagableImageSection") {
29 s2
+= "=MmLockPagableDataSection";
34 void convert_def(const char* szSrc
, const char* szDst
, File file
)
40 while (getline(in
, s
).good()) {
44 if (s
[0] != ';') { // only replace non-comment lines
48 replace(s
.begin(), s
.end(), '@', '\0');
50 s
= do_kernel_replacements(s
);
60 convert_def(szSrc1
, szDst1
, Kernel
);
61 convert_def(szSrc2
, szDst2
, HAL
);