Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygeninifile.h
Go to the documentation of this file.
00001 /* 00002 * FreeLoader 00003 * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com> 00004 * 00005 * This program is free software; you can redistribute it and/or modify 00006 * it under the terms of the GNU General Public License as published by 00007 * the Free Software Foundation; either version 2 of the License, or 00008 * (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License along 00016 * with this program; if not, write to the Free Software Foundation, Inc., 00017 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 00018 */ 00019 00020 #pragma once 00021 00022 #define INI_FILE_COMMENT_CHAR ';' 00023 00024 // This structure describes a single .ini file item 00025 // The item format in the .ini file is: 00026 // Name=Value 00027 typedef struct 00028 { 00029 LIST_ENTRY ListEntry; 00030 PCHAR ItemName; 00031 PCHAR ItemValue; 00032 00033 } INI_SECTION_ITEM, *PINI_SECTION_ITEM; 00034 00035 // This structure describes a .ini file section 00036 // The section format in the .ini file is: 00037 // [Section Name] 00038 // This structure has a list of section items with 00039 // one INI_SECTION_ITEM for each line in the section 00040 typedef struct 00041 { 00042 LIST_ENTRY ListEntry; 00043 PCHAR SectionName; 00044 ULONG SectionItemCount; 00045 LIST_ENTRY SectionItemList; // Contains PINI_SECTION_ITEM structures 00046 00047 } INI_SECTION, *PINI_SECTION; 00048 00049 extern LIST_ENTRY IniFileSectionListHead; 00050 extern BOOLEAN IniFileSectionInitialized; 00051 extern ULONG IniFileSectionCount; 00052 extern ULONG IniFileSettingCount; 00053 00054 BOOLEAN IniParseFile(PCHAR IniFileData, ULONG IniFileSize); 00055 ULONG IniGetNextLineSize(PCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset); 00056 ULONG IniGetNextLine(PCHAR IniFileData, ULONG IniFileSize, PCHAR Buffer, ULONG BufferSize, ULONG CurrentOffset); 00057 BOOLEAN IniIsLineEmpty(PCHAR LineOfText, ULONG TextLength); 00058 BOOLEAN IniIsCommentLine(PCHAR LineOfText, ULONG TextLength); 00059 BOOLEAN IniIsSectionName(PCHAR LineOfText, ULONG TextLength); 00060 ULONG IniGetSectionNameSize(PCHAR SectionNameLine, ULONG LineLength); 00061 VOID IniExtractSectionName(PCHAR SectionName, PCHAR SectionNameLine, ULONG LineLength); 00062 BOOLEAN IniIsSetting(PCHAR LineOfText, ULONG TextLength); 00063 ULONG IniGetSettingNameSize(PCHAR SettingNameLine, ULONG LineLength); 00064 ULONG IniGetSettingValueSize(PCHAR SettingValueLine, ULONG LineLength); 00065 VOID IniExtractSettingName(PCHAR SettingName, PCHAR SettingNameLine, ULONG LineLength); 00066 VOID IniExtractSettingValue(PCHAR SettingValue, PCHAR SettingValueLine, ULONG LineLength); 00067 00068 BOOLEAN IniFileInitialize(VOID); 00069 00070 BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR* SectionId); 00071 ULONG IniGetNumSectionItems(ULONG_PTR SectionId); 00072 ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex); 00073 ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex); 00074 BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize); 00075 BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize); 00076 BOOLEAN IniAddSection(PCSTR SectionName, ULONG_PTR* SectionId); 00077 BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue); Generated on Sat May 26 2012 04:17:59 for ReactOS by
1.7.6.1
|