3 * Copyright (C) 1999, 2000 Brian Palmer <brianp@sginet.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 #define VERSION "FreeLoader v0.8"
26 #define COPYRIGHT "Copyright (C) 1999, 2000 Brian Palmer <brianp@sginet.com>"
28 #define ROSLDR_MAJOR_VERSION 0
29 #define ROSLDR_MINOR_VERSION 8
30 #define ROSLDR_PATCH_VERSION 0
32 #define size_t unsigned int
37 #define BYTE unsigned char
38 #define WORD unsigned short
39 #define DWORD unsigned long
41 #define WCHAR unsigned short
43 #define ULONG unsigned long
44 #define PULONG unsigned long *
45 #define PDWORD DWORD *
48 #define OSTYPE_REACTOS 1
49 #define OSTYPE_LINUX 2
50 #define OSTYPE_BOOTSECTOR 3
51 #define OSTYPE_PARTITION 4
52 #define OSTYPE_DRIVE 5
57 int nOSType
; // ReactOS or Linux or a bootsector, etc.
60 extern unsigned int BootDrive
; // BIOS boot drive, 0-A:, 1-B:, 0x80-C:, 0x81-D:, etc.
61 extern unsigned int BootPartition
; // Boot Partition, 1-4
62 extern BOOL bTUILoaded
; // Tells us if the user interface is loaded
64 extern char *pFreeldrIni
; // Load address for freeldr.ini
65 extern char *pScreenBuffer
; // Save address for screen contents
66 extern int nCursorXPos
; // Cursor's X Position
67 extern int nCursorYPos
; // Cursor's Y Position
69 extern OSTYPE OSList
[16]; // The OS list
70 extern int nNumOS
; // Number of OSes listed
72 extern int nTimeOut
; // Time to wait for the user before booting
75 BOOL
ParseIniFile(void);
76 int GetNumSectionItems(char *section
); // returns the number of items in a particular section (i.e. [FREELOADER])
77 BOOL
ReadSectionSettingByNumber(char *section
, int num
, char *name
, char *value
); // Reads the num'th value from section
78 BOOL
ReadSectionSettingByName(char *section
, char *valuename
, char *name
, char *value
); // Reads the value named name from section
79 BOOL
IsValidSetting(char *setting
, char *value
);
80 void SetSetting(char *setting
, char *value
);
82 #endif // defined __FREELDR_H