- Remove duplicated code in "rtl" and use libstring and librtl instead
(their code is safe for freeldr).
- Fix a PCH bug.
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c
Modified: trunk/reactos/boot/freeldr/freeldr/bootmgr.c
Modified: trunk/reactos/boot/freeldr/freeldr/cmdline.c
Modified: trunk/reactos/boot/freeldr/freeldr/drivemap.c
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr.xml
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_base.xml
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_base64k.xml
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_main.xml
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_startup.xml
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ext2.c
Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c
Modified: trunk/reactos/boot/freeldr/freeldr/fs/iso.c
Modified: trunk/reactos/boot/freeldr/freeldr/inffile/inffile.c
Modified: trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/loader.c
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/registry.c
Modified: trunk/reactos/boot/freeldr/freeldr/rtl/list.c
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/memcmp.c
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/memcpy.c
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/memmove.c
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/memset.c
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/print.c
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/stdlib.c
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/string.c
Modified: trunk/reactos/boot/freeldr/freeldr/ui/tui.c
Modified: trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c
Modified: trunk/reactos/boot/freeldr/freeldr/ui/ui.c
_____
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
2005-11-13 05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
2005-11-13 06:05:06 UTC (rev 19192)
@@ -451,7 +451,7 @@
static char Path[] = "multi(0)disk(0)";
char Device[4];
- itoa(i386BootDrive, Device, 10);
+ _itoa(i386BootDrive, Device, 10);
if (Size <= sizeof(Path) + 6 + strlen(Device))
{
return FALSE;
@@ -491,7 +491,7 @@
}
p = SystemPath;
- while ('\0' != *p && 0 != strnicmp(p, "partition(", 10)) {
+ while ('\0' != *p && 0 != _strnicmp(p, "partition(", 10)) {
p++;
}
p = strchr(p, ')');
_____
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c
2005-11-13 05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcvideo.c
2005-11-13 06:05:06 UTC (rev 19192)
@@ -895,11 +895,11 @@
{
DbgPrint((DPRINT_UI, "VGA display adapter detected.\n"));
- if (0 == stricmp(DisplayModeName, "NORMAL_VGA"))
+ if (0 == _stricmp(DisplayModeName, "NORMAL_VGA"))
{
VideoMode = VIDEOMODE_NORMAL_TEXT;
}
- else if (0 == stricmp(DisplayModeName, "EXTENDED_VGA"))
+ else if (0 == _stricmp(DisplayModeName, "EXTENDED_VGA"))
{
VideoMode = VIDEOMODE_EXTENDED_TEXT;
}
_____
Modified: trunk/reactos/boot/freeldr/freeldr/bootmgr.c
--- trunk/reactos/boot/freeldr/freeldr/bootmgr.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/bootmgr.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -120,23 +120,23 @@
// Install the drive mapper according to this sections
drive mappings
DriveMapMapDrivesInSection(OperatingSystemSectionNames[SelectedOperating
System]);
- if (stricmp(SettingValue, "ReactOS") == 0)
+ if (_stricmp(SettingValue, "ReactOS") == 0)
{
LoadAndBootReactOS(OperatingSystemSectionNames[SelectedOperatingSystem])
;
}
- else if (stricmp(SettingValue, "Linux") == 0)
+ else if (_stricmp(SettingValue, "Linux") == 0)
{
LoadAndBootLinux(OperatingSystemSectionNames[SelectedOperatingSystem],
OperatingSystemDisplayNames[SelectedOperatingSystem]);
}
- else if (stricmp(SettingValue, "BootSector") == 0)
+ else if (_stricmp(SettingValue, "BootSector") == 0)
{
LoadAndBootBootSector(OperatingSystemSectionNames[SelectedOperatingSyste
m]);
}
- else if (stricmp(SettingValue, "Partition") == 0)
+ else if (_stricmp(SettingValue, "Partition") == 0)
{
LoadAndBootPartition(OperatingSystemSectionNames[SelectedOperatingSystem
]);
}
- else if (stricmp(SettingValue, "Drive") == 0)
+ else if (_stricmp(SettingValue, "Drive") == 0)
{
LoadAndBootDrive(OperatingSystemSectionNames[SelectedOperatingSystem]);
}
@@ -174,7 +174,7 @@
{
for (Idx=0; Idx<OperatingSystemCount; Idx++)
{
- if (stricmp(DefaultOSName,
OperatingSystemList[Idx]) == 0)
+ if (_stricmp(DefaultOSName,
OperatingSystemList[Idx]) == 0)
{
DefaultOS = Idx;
break;
_____
Modified: trunk/reactos/boot/freeldr/freeldr/cmdline.c
--- trunk/reactos/boot/freeldr/freeldr/cmdline.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/cmdline.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -92,11 +92,11 @@
{
*s++ = '\0';
}
- if (0 == stricmp(Name, "defaultos"))
+ if (0 == _stricmp(Name, "defaultos"))
{
CmdLineInfo.DefaultOperatingSystem = Value;
}
- else if (0 == stricmp(Name, "timeout"))
+ else if (0 == _stricmp(Name, "timeout"))
{
CmdLineInfo.TimeOut = atoi(Value);
}
_____
Modified: trunk/reactos/boot/freeldr/freeldr/drivemap.c
--- trunk/reactos/boot/freeldr/freeldr/drivemap.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/drivemap.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -56,7 +56,7 @@
// Get the next setting from the .ini file section
if (IniReadSettingByNumber(SectionId, Index,
SettingName, 80, SettingValue, 80))
{
- if (stricmp(SettingName, "DriveMap") == 0)
+ if (_stricmp(SettingName, "DriveMap") == 0)
{
// Make sure we haven't exceeded the
drive map max count
if (DriveMapList.DriveMapCount >= 4)
_____
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr.xml
--- trunk/reactos/boot/freeldr/freeldr/freeldr.xml 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr.xml 2005-11-13
06:05:06 UTC (rev 19192)
@@ -5,4 +5,6 @@
<library>freeldr_base</library>
<library>freeldr_main</library>
<library>rossym</library>
+ <library>string</library>
+ <library>rtl</library>
</module>
_____
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_base.xml
--- trunk/reactos/boot/freeldr/freeldr/freeldr_base.xml 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_base.xml 2005-11-13
06:05:06 UTC (rev 19192)
@@ -3,7 +3,6 @@
<include base="freeldr_base">cache</include>
<include base="ntoskrnl">include</include>
<define name="__USE_W32API" />
- <compilerflag>-nostdlib</compilerflag>
<compilerflag>-ffreestanding</compilerflag>
<compilerflag>-fno-builtin</compilerflag>
<compilerflag>-fno-inline</compilerflag>
@@ -80,13 +79,6 @@
</directory>
<directory name="rtl">
<file>list.c</file>
- <file>memcmp.c</file>
- <file>memcpy.c</file>
- <file>memmove.c</file>
- <file>memset.c</file>
- <file>print.c</file>
- <file>stdlib.c</file>
- <file>string.c</file>
</directory>
<directory name="ui">
<file>gui.c</file>
_____
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_base64k.xml
--- trunk/reactos/boot/freeldr/freeldr/freeldr_base64k.xml
2005-11-13 05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_base64k.xml
2005-11-13 06:05:06 UTC (rev 19192)
@@ -2,7 +2,6 @@
<include base="freeldr_base64k">include</include>
<include base="ntoskrnl">include</include>
<define name="__USE_W32API" />
- <compilerflag>-nostdlib</compilerflag>
<compilerflag>-ffreestanding</compilerflag>
<compilerflag>-fno-builtin</compilerflag>
<compilerflag>-fno-inline</compilerflag>
_____
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_main.xml
--- trunk/reactos/boot/freeldr/freeldr/freeldr_main.xml 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_main.xml 2005-11-13
06:05:06 UTC (rev 19192)
@@ -2,7 +2,6 @@
<include base="freeldr_main">include</include>
<include base="ntoskrnl">include</include>
<define name="__USE_W32API" />
- <compilerflag>-nostdlib</compilerflag>
<compilerflag>-ffreestanding</compilerflag>
<compilerflag>-fno-builtin</compilerflag>
<compilerflag>-fno-inline</compilerflag>
@@ -15,5 +14,4 @@
<file>linuxboot.c</file>
<file>oslist.c</file>
<file>custom.c</file>
- <pch>include/freeldr.h</pch>
</module>
_____
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_startup.xml
--- trunk/reactos/boot/freeldr/freeldr/freeldr_startup.xml
2005-11-13 05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_startup.xml
2005-11-13 06:05:06 UTC (rev 19192)
@@ -2,7 +2,6 @@
<include base="freeldr_startup">include</include>
<include base="ntoskrnl">include</include>
<define name="__USE_W32API" />
- <compilerflag>-nostdlib</compilerflag>
<compilerflag>-ffreestanding</compilerflag>
<compilerflag>-fno-builtin</compilerflag>
<compilerflag>-fno-inline</compilerflag>
_____
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ext2.c
--- trunk/reactos/boot/freeldr/freeldr/fs/ext2.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/fs/ext2.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -306,7 +306,7 @@
DbgPrint((DPRINT_FILESYSTEM, "Dumping directory entry at
offset %d:\n", CurrentOffset));
DbgDumpBuffer(DPRINT_FILESYSTEM, CurrentDirectoryEntry,
CurrentDirectoryEntry->rec_len);
- if ((strnicmp(FileName, CurrentDirectoryEntry->name,
CurrentDirectoryEntry->name_len) == 0) &&
+ if ((_strnicmp(FileName, CurrentDirectoryEntry->name,
CurrentDirectoryEntry->name_len) == 0) &&
(strlen(FileName) ==
CurrentDirectoryEntry->name_len))
{
RtlCopyMemory(DirectoryEntry,
CurrentDirectoryEntry, sizeof(EXT2_DIR_ENTRY));
_____
Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c
--- trunk/reactos/boot/freeldr/freeldr/fs/fat.c 2005-11-13 05:17:17 UTC
(rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/fs/fat.c 2005-11-13 06:05:06 UTC
(rev 19192)
@@ -558,8 +558,8 @@
//
// See if the file name matches either the short or long
name
//
- if (((strlen(FileName) == strlen(LfnNameBuffer)) &&
(stricmp(FileName, LfnNameBuffer) == 0)) ||
- ((strlen(FileName) == strlen(ShortNameBuffer))
&& (stricmp(FileName, ShortNameBuffer) == 0))) {
+ if (((strlen(FileName) == strlen(LfnNameBuffer)) &&
(_stricmp(FileName, LfnNameBuffer) == 0)) ||
+ ((strlen(FileName) == strlen(ShortNameBuffer))
&& (_stricmp(FileName, ShortNameBuffer) == 0))) {
//
// We found the entry, now fill in the
FAT_FILE_INFO struct
//
@@ -633,7 +633,7 @@
continue;
}
if (FileNameLen == DirEntry->FileNameSize &&
- 0 == strnicmp(FileName, DirEntry->FileName,
FileNameLen))
+ 0 == _strnicmp(FileName, DirEntry->FileName,
FileNameLen))
{
/*
* We found the entry, now fill in the
FAT_FILE_INFO struct
_____
Modified: trunk/reactos/boot/freeldr/freeldr/fs/iso.c
--- trunk/reactos/boot/freeldr/freeldr/fs/iso.c 2005-11-13 05:17:17 UTC
(rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/fs/iso.c 2005-11-13 06:05:06 UTC
(rev 19192)
@@ -99,7 +99,7 @@
Name[i] = 0;
DbgPrint((DPRINT_FILESYSTEM, "Name '%s'\n",
Name));
- if (strlen(FileName) == strlen(Name) &&
stricmp(FileName, Name) == 0)
+ if (strlen(FileName) == strlen(Name) &&
_stricmp(FileName, Name) == 0)
{
IsoFileInfoPointer->FileStart =
Record->ExtentLocationL;
IsoFileInfoPointer->FileSize =
Record->DataLengthL;
_____
Modified: trunk/reactos/boot/freeldr/freeldr/inffile/inffile.c
--- trunk/reactos/boot/freeldr/freeldr/inffile/inffile.c
2005-11-13 05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/inffile/inffile.c
2005-11-13 06:05:06 UTC (rev 19192)
@@ -217,7 +217,7 @@
Section = Cache->FirstSection;
while (Section != NULL)
{
- if (stricmp (Section->Name, Name) == 0)
+ if (_stricmp (Section->Name, Name) == 0)
{
return Section;
}
@@ -374,7 +374,7 @@
Line = Section->FirstLine;
while (Line != NULL)
{
- if (Line->Key != NULL && stricmp (Line->Key, Key) == 0)
+ if (Line->Key != NULL && _stricmp (Line->Key, Key) == 0)
{
return Line;
}
@@ -1008,7 +1008,7 @@
// DPRINT("Comparing '%S' and '%S'\n",
CacheSection->Name,
Section);
/* Are the section names the same? */
- if (stricmp(CacheSection->Name, Section) == 0)
+ if (_stricmp(CacheSection->Name, Section) == 0)
{
if (Key != NULL)
{
@@ -1082,7 +1082,7 @@
CacheLine = ((PINFCACHESECTION)(ContextIn->Section))->FirstLine;
while (CacheLine != NULL)
{
- if (CacheLine->Key != NULL && stricmp (CacheLine->Key, Key) == 0)
+ if (CacheLine->Key != NULL && _stricmp (CacheLine->Key, Key) ==
0)
{
if (ContextIn != ContextOut)
@@ -1118,7 +1118,7 @@
CacheLine = (PINFCACHELINE)ContextIn->Line;
while (CacheLine != NULL)
{
- if (CacheLine->Key != NULL && stricmp (CacheLine->Key, Key) == 0)
+ if (CacheLine->Key != NULL && _stricmp (CacheLine->Key, Key) ==
0)
{
if (ContextIn != ContextOut)
@@ -1160,7 +1160,7 @@
// DPRINT("Comparing '%S' and '%S'\n",
CacheSection->Name,
Section);
/* Are the section names the same? */
- if (stricmp(CacheSection->Name, Section) == 0)
+ if (_stricmp(CacheSection->Name, Section) == 0)
{
return CacheSection->LineCount;
}
_____
Modified: trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c
--- trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c
2005-11-13 05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c
2005-11-13 06:05:06 UTC (rev 19192)
@@ -36,7 +36,7 @@
while (Section != NULL)
{
// Compare against the section name
- if (stricmp(SectionName, Section->SectionName) == 0)
+ if (_stricmp(SectionName, Section->SectionName) == 0)
{
// We found it
*SectionId = (ULONG)Section;
@@ -141,7 +141,7 @@
while (SectionItem != NULL)
{
// Check to see if this is the setting they want
- if (stricmp(SettingName, SectionItem->ItemName) == 0)
+ if (_stricmp(SettingName, SectionItem->ItemName) == 0)
{
DbgPrint((DPRINT_INIFILE,
"IniReadSettingByName() Setting \'%s\' found.\n", SettingName));
DbgPrint((DPRINT_INIFILE,
"IniReadSettingByName() Setting value = %s\n", SectionItem->ItemValue));
_____
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c
--- trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c
2005-11-13 05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c
2005-11-13 06:05:06 UTC (rev 19192)
@@ -25,11 +25,11 @@
{
char *p;
- if (strnicmp(ArcPath, "multi(0)disk(0)", 15) != 0)
+ if (_strnicmp(ArcPath, "multi(0)disk(0)", 15) != 0)
return FALSE;
p = ArcPath + 15;
- if (strnicmp(p, "fdisk(", 6) == 0)
+ if (_strnicmp(p, "fdisk(", 6) == 0)
{
/*
* floppy disk path:
@@ -43,7 +43,7 @@
p++;
*BootPartition = 0xff;
}
- else if (strnicmp(p, "cdrom(", 6) == 0)
+ else if (_strnicmp(p, "cdrom(", 6) == 0)
{
/*
* cdrom path:
@@ -57,7 +57,7 @@
p++;
*BootPartition = 0xff;
}
- else if (strnicmp(p, "rdisk(", 6) == 0)
+ else if (_strnicmp(p, "rdisk(", 6) == 0)
{
/*
* hard disk path:
@@ -66,7 +66,7 @@
p = p + 6;
*BootDrive = atoi(p) + 0x80;
p = strchr(p, ')');
- if ((p == NULL) || (strnicmp(p, ")partition(", 11) !=
0))
+ if ((p == NULL) || (_strnicmp(p, ")partition(", 11) !=
0))
return FALSE;
p = p + 11;
*BootPartition = atoi(p);
@@ -126,11 +126,11 @@
char * p;
ULONG DriveNumber = 0;
- if (strnicmp(ArcPath, "multi(0)disk(0)", 15) != 0)
+ if (_strnicmp(ArcPath, "multi(0)disk(0)", 15) != 0)
return 0;
p = ArcPath + 15;
- if (strnicmp(p, "fdisk(", 6) == 0)
+ if (_strnicmp(p, "fdisk(", 6) == 0)
{
/*
* floppy disk path:
@@ -139,7 +139,7 @@
p = p + 6;
DriveNumber = atoi(p);
}
- else if (strnicmp(p, "rdisk(", 6) == 0)
+ else if (_strnicmp(p, "rdisk(", 6) == 0)
{
/*
* hard disk path:
_____
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/loader.c
--- trunk/reactos/boot/freeldr/freeldr/reactos/loader.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/loader.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -243,7 +243,7 @@
while ((p = strchr(p, '/')) != NULL) {
/* Find "/3GB" */
- if (!strnicmp(p + 1, "3GB", 3)) {
+ if (!_strnicmp(p + 1, "3GB", 3)) {
/* Make sure there's nothing following it */
if (p[4] == ' ' || p[4] == 0) {
@@ -303,7 +303,7 @@
p++;
/* Find "PAE" */
- if (!strnicmp(p, "PAE", 3)) {
+ if (!_strnicmp(p, "PAE", 3)) {
/* Make sure there's nothing following it */
if (p[3] == ' ' || p[3] == 0) {
_____
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
--- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
2005-11-13 05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
2005-11-13 06:05:06 UTC (rev 19192)
@@ -453,7 +453,7 @@
/* Make sure it should be started */
if ((StartValue == 0) &&
(TagValue == OrderList[TagIndex]) &&
- (stricmp(DriverGroup, GroupName) == 0)) {
+ (_stricmp(DriverGroup, GroupName) == 0)) {
/* Get the Driver's Location */
ValueSize = 256;
@@ -529,7 +529,7 @@
if ((StartValue == 0) &&
(TagIndex > OrderList[0]) &&
- (stricmp(DriverGroup, GroupName) == 0)) {
+ (_stricmp(DriverGroup, GroupName) == 0)) {
ValueSize = 256;
rc = RegQueryValue(hDriverKey, "ImagePath", NULL,
(PUCHAR)TempImagePath, &ValueSize);
@@ -660,7 +660,7 @@
/*
* Special case for Live CD.
*/
- if (!stricmp(SystemPath, "LiveCD"))
+ if (!_stricmp(SystemPath, "LiveCD"))
{
/* Normalize */
MachDiskGetBootPath(SystemPath, sizeof(SystemPath));
_____
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/registry.c
--- trunk/reactos/boot/freeldr/freeldr/reactos/registry.c
2005-11-13 05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/registry.c
2005-11-13 06:05:06 UTC (rev 19192)
@@ -267,7 +267,7 @@
KeyList);
DbgPrint((DPRINT_REGISTRY, "SearchKey 0x%x\n", SearchKey));
DbgPrint((DPRINT_REGISTRY, "Searching '%s'\n",
SearchKey->Name));
- if (strnicmp(SearchKey->Name, name, subkeyLength) == 0)
+ if (_strnicmp(SearchKey->Name, name, subkeyLength) == 0)
break;
Ptr = Ptr->Flink;
@@ -448,7 +448,7 @@
DbgPrint((DPRINT_REGISTRY, "SearchKey 0x%x\n", SearchKey));
DbgPrint((DPRINT_REGISTRY, "Searching '%s'\n",
SearchKey->Name));
- if (strnicmp(SearchKey->Name, name, subkeyLength) == 0)
+ if (_strnicmp(SearchKey->Name, name, subkeyLength) == 0)
break;
Ptr = Ptr->Flink;
@@ -526,7 +526,7 @@
DbgPrint((DPRINT_REGISTRY, "Value->Name '%s'\n",
Value->Name));
- if (stricmp(Value->Name, ValueName) == 0)
+ if (_stricmp(Value->Name, ValueName) == 0)
break;
Ptr = Ptr->Flink;
@@ -631,7 +631,7 @@
DbgPrint((DPRINT_REGISTRY, "Searching for '%s'. Value name
'%s'\n", ValueName, Value->Name));
- if (stricmp(Value->Name, ValueName) == 0)
+ if (_stricmp(Value->Name, ValueName) == 0)
break;
Ptr = Ptr->Flink;
@@ -692,7 +692,7 @@
Value = CONTAINING_RECORD(Ptr,
VALUE,
ValueList);
- if (stricmp(Value->Name, ValueName) == 0)
+ if (_stricmp(Value->Name, ValueName) == 0)
break;
Ptr = Ptr->Flink;
_____
Modified: trunk/reactos/boot/freeldr/freeldr/rtl/list.c
--- trunk/reactos/boot/freeldr/freeldr/rtl/list.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/rtl/list.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -173,3 +173,4 @@
RtlListRemoveEntry(ListEntry);
RtlListInsertEntry(ListNext, ListEntry);
}
+
_____
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/memcmp.c
--- trunk/reactos/boot/freeldr/freeldr/rtl/memcmp.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/rtl/memcmp.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -1,37 +0,0 @@
-/*
- * FreeLoader
- * Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com>
- *
- * 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>
-
-int memcmp(const void *buf1, const void *buf2, size_t count)
-{
- unsigned int i;
- const char* buffer1 = buf1;
- const char* buffer2 = buf2;
-
- for (i=0; i<count; i++)
- {
- if(buffer1[i] == buffer2[i])
- continue;
- else
- return (buffer1[i] - buffer2[i]);
- }
-
- return 0;
-}
_____
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/memcpy.c
--- trunk/reactos/boot/freeldr/freeldr/rtl/memcpy.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/rtl/memcpy.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -1,50 +0,0 @@
-/*
- * FreeLoader
- * Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com>
- *
- * 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>
-
-#ifdef __i386__
-void *memcpy(void *to, const void *from, size_t count)
-{
- __asm__( \
- "or %%ecx,%%ecx\n\t"\
- "jz .L1\n\t" \
- "cld\n\t" \
- "rep\n\t" \
- "movsb\n\t" \
- ".L1:\n\t"
- :
- : "D" (to), "S" (from), "c" (count));
- return to;
-}
-#else
-void *memcpy(void *to, const void *from, size_t count)
-{
- unsigned int i;
- char* buf1 = to;
- const char* buf2 = from;
-
- for (i=0; i<count; i++)
- {
- buf1[i] = buf2[i];
- }
-
- return to;
-}
-#endif
_____
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/memmove.c
--- trunk/reactos/boot/freeldr/freeldr/rtl/memmove.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/rtl/memmove.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -1,54 +0,0 @@
-/*
- * FreeLoader
- * Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com>
- *
- * 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>
-
-void *memmove(void *dest, const void *src, size_t count)
-{
- char *char_dest = (char *)dest;
- char *char_src = (char *)src;
-
- if ((char_dest <= char_src) || (char_dest >= (char_src+count)))
- {
- /* non-overlapping buffers */
- while(count > 0)
- {
- *char_dest = *char_src;
- char_dest++;
- char_src++;
- count--;
- }
- }
- else
- {
- /* overlaping buffers */
- char_dest = (char *)dest + count - 1;
- char_src = (char *)src + count - 1;
-
- while(count > 0)
- {
- *char_dest = *char_src;
- char_dest--;
- char_src--;
- count--;
- }
- }
-
- return dest;
-}
_____
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/memset.c
--- trunk/reactos/boot/freeldr/freeldr/rtl/memset.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/rtl/memset.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -1,49 +0,0 @@
-/*
- * FreeLoader
- * Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com>
- *
- * 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>
-
-#ifdef __i386__
-void *memset(void *src, int val, size_t count)
-{
- __asm__( \
- "or %%ecx,%%ecx\n\t"\
- "jz .L1\n\t" \
- "cld\t\n" \
- "rep\t\n" \
- "stosb\t\n" \
- ".L1:\n\t"
- :
- : "D" (src), "c" (count), "a" (val));
- return src;
-}
-#else
-void *memset(void *src, int val, size_t count)
-{
- unsigned int i;
- unsigned char* buf1 = src;
-
- for (i=0; i<count; i++)
- {
- buf1[i] = val;
- }
-
- return src;
-}
-#endif
_____
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/print.c
--- trunk/reactos/boot/freeldr/freeldr/rtl/print.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/rtl/print.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -1,182 +0,0 @@
-/*
- * FreeLoader
- * Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com>
- *
- * 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>
-
-/*
- * print() - prints unformatted text to stdout
- */
-void print(char *str)
-{
- size_t i;
-
- for (i = 0; i < strlen(str); i++)
- MachConsPutChar(str[i]);
-}
-
-/*
- * printf() - prints formatted text to stdout
- * originally from GRUB
- */
-int printf(const char *format, ... )
-{
- va_list ap;
- va_start(ap,format);
- char c, *ptr, str[16];
- int ll;
-
- while ((c = *(format++)))
- {
- if (c != '%')
- {
- MachConsPutChar(c);
- }
- else
- {
- if (*format == 'I' && *(format+1) == '6' &&
*(format+2) == '4')
- {
- ll = 1;
- format += 3;
- }
- else
- {
- ll = 0;
- }
- switch (c = *(format++))
- {
- case 'd': case 'u': case 'x':
- if (ll)
- {
- *convert_i64_to_ascii(str, c,
va_arg(ap, unsigned long long)) = 0;
- }
- else
- {
- *convert_to_ascii(str, c,
va_arg(ap, unsigned long)) = 0;
- }
-
- ptr = str;
-
- while (*ptr)
- {
- MachConsPutChar(*(ptr++));
- }
- break;
-
- case 'c':
MachConsPutChar((va_arg(ap,int))&0xff); break;
-
- case 's':
- ptr = va_arg(ap,char *);
-
- while ((c = *(ptr++)))
- {
- MachConsPutChar(c);
- }
- break;
- case '%':
- MachConsPutChar(c);
- break;
- default:
- printf("\nprintf() invalid format
specifier - %%%c\n", c);
- break;
- }
- }
- }
-
- va_end(ap);
-
- return 0;
-}
-
-int sprintf(char *buffer, const char *format, ... )
-{
- va_list ap;
- char c, *ptr, str[16];
- char *p = buffer;
- int ll;
-
- va_start(ap,format);
-
- while ((c = *(format++)))
- {
- if (c != '%')
- {
- *p = c;
- p++;
- }
- else
- {
- if (*format == 'I' && *(format+1) == '6' &&
*(format+2) == '4')
- {
- ll = 1;
- format += 3;
- }
- else
- {
- ll = 0;
- }
- switch (c = *(format++))
- {
- case 'd': case 'u': case 'x':
- if (ll)
- {
- *convert_i64_to_ascii(str, c,
va_arg(ap, unsigned long long)) = 0;
- }
- else
- {
- *convert_to_ascii(str, c,
va_arg(ap, unsigned long)) = 0;
- }
-
- ptr = str;
-
- while (*ptr)
- {
- *p = *(ptr++);
- p++;
- }
- break;
-
- case 'c':
- *p = va_arg(ap,int)&0xff;
- p++;
- break;
-
- case 's':
- ptr = va_arg(ap,char *);
-
- while ((c = *(ptr++)))
- {
- *p = c;
- p++;
- }
- break;
- case '%':
- *p = c;
- p++;
- break;
- default:
- printf("\nsprintf() invalid format
specifier - %%%c\n", c);
- break;
- }
- }
- }
- va_end(ap);
- *p=0;
-
- return 0;
-}
_____
Deleted: trunk/reactos/boot/freeldr/freeldr/rtl/stdlib.c
--- trunk/reactos/boot/freeldr/freeldr/rtl/stdlib.c 2005-11-13
05:17:17 UTC (rev 19191)
+++ trunk/reactos/boot/freeldr/freeldr/rtl/stdlib.c 2005-11-13
06:05:06 UTC (rev 19192)
@@ -1,192 +0,0 @@
-/*
- * FreeLoader
- * Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com>
- *
- * 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>
-
-/*
- * convert_to_ascii() - converts a number to it's ascii equivalent
- * from:
- * GRUB -- GRand Unified Bootloader
- * Copyright (C) 1996 Erich Boleyn <erich(a)uruk.org>
- */
-char *convert_to_ascii(char *buf, int c, int num)
-{
- unsigned long mult = 10;
- char *ptr = buf;
-
- if (c == 'x')
- mult = 16;
-
- if ((num & 0x80000000uL) && c == 'd')
- {
- num = (~num)+1;
- *(ptr++) = '-';
- buf++;
- }
-
- do
- {
- int dig = num % mult;
- *(ptr++) = ( (dig > 9) ? dig + 'a' - 10 : '0' + dig );
- }
- while (num /= mult);
-
- /* reorder to correct direction!! */
- {
- char *ptr1 = ptr-1;
- char *ptr2 = buf;
- while (ptr1 > ptr2)
- {
- int c = *ptr1;
- *ptr1 = *ptr2;
- *ptr2 = c;
- ptr1--;
- ptr2++;
- }
- }
-
- return ptr;
-}
-
-char *convert_i64_to_ascii(char *buf, int c, unsigned long long num)
-{
- int mult = 10;
- char *ptr = buf;
-
- if (c == 'x')
- mult = 16;
-
- if ((num & 0x8000000000000000uLL) && c == 'd')
- {
- num = (~num)+1;
- *(ptr++) = '-';
- buf++;
- }
-
- do
- {
- int dig = num % mult;
- *(ptr++) = ( (dig > 9) ? dig + 'a' - 10 : '0' + dig );
- }
- while (num /= mult);
-
- /* reorder to correct direction!! */
- {
- char *ptr1 = ptr-1;
- char *ptr2 = buf;
- while (ptr1 > ptr2)
- {
- int c = *ptr1;
- *ptr1 = *ptr2;
- *ptr2 = c;
[truncated at 1000 lines; 527 more skipped]