亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? profile.h

?? 一個類似與Windows環(huán)境下的softice的源代碼
?? H
字號:
/******************************************************************************/
/*                                                                            */
/*               Profile (C) by Gerhard W. Gruber in Vienna 2003              */
/*                          All rights reserved                               */
/*                                                                            */
/******************************************************************************/

/******************************************************************************
 *
 * PROJECT: Profile helper module
 * $Source: /cvsroot/pice/pice/module/profile.h,v $
 * $Revision: 1.1 $
 * $Date: 2004/02/17 23:12:26 $
 * $Author: lightweave $
 * $Name:  $
 *
 * $Log: profile.h,v $ * Revision 1.1  2004/02/17 23:12:26  lightweave * New configuration handler for reading config files. See CHANGES.txt for * details. *
 *
 *****************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 file provides a module to read and write profile entries similar to 
	Windows 3.x INI files. It is written in plain C, so it is possible to
	use it in environments where C++ is not usable (like Linux kernel code).

	The structure of such a file is:
	# comment
	[SectionName]
	key = value		# comment
	key = value
	...

	# comment
	[AnotherSection]	# comment
	key = value
	...

	...
*/

#ifndef _PROFILE_H
#define _PROFILE_H

typedef struct {
	char *Key;
	char *Value;
} PROFILE_MAP;

typedef struct {
	char *SectionName;
	PROFILE_MAP **MapEntry;
	ULONG MapEntries;	// size of array (not neccessarily the number of entries in the array)
} PROFILE_SECTION;

typedef struct {
	FILE *FileHandle;
	char *Path;
	char *Buffer;
	ULONG BufferLen;
	ULONG BufferIndex;
	PROFILE_SECTION **Section;	// size of array (not neccessarily the number of entries in the array)
	ULONG Sections;
	BOOLEAN Case;			// TRUE if sectionhandling is casesensitive
} PROFILE_HANDLE;

#ifdef __cplusplus
extern "C" {
#endif

/**
 * Adds an new entries to an array of pointer.
 * The array is reallocated if not enough space is available.
 *
 * @param Entries [IN] Number of entries the array can hold.
 * @param New [IN] Number of entries the array should be extended
 * @param ArrayPtr [IN/OUT] Pointer to a pointerarry.
 *
 * @result Number of entries
 */
ULONG AddArrayEntry(ULONG *Entries, ULONG New, void **ArrayPtr[]);

/**
 * CompressArray will compress a pointerarray. This means that it moves down all pointer
 * which are not NULL so that there is a contigous array of pointers without NULLs
 * in between. The memory is only reallocated if ReAlloc is set to TRUE. In this case the new
 * array will have the same size as all pointers. The assumption is that all entries, which
 * are not in use, will be set to NULL,.
 */
void **CompressArray(void **Array, ULONG *Entries, BOOLEAN ReAlloc);


/*****  Internal functions   *****/

/**
 * ParseFileBuffer reads the buffer which contains a profile
 * and constructs the sections in the PROFILE_HANDLE.
 */
BOOLEAN ParseFilebuffer(PROFILE_HANDLE *Handle);

/**
 * CreateHandle will allocate and initialze a new handle structure and is basically
 * the constructor in C++.
 */
PROFILE_HANDLE *CreateHandle(void);


/**
 *	Opens a profile and initializes a PROFILE_HANDLE structure which is
 *	used in subsequent calls for reading/writing profile entries.
 *	If bCreate is true then the file is created if it doesn't exist.
 *
 * @param Path [in]			- path that points to the profile file.
 * @param bCreate [in]		- true if the file is to be created in case it doesn't exist.
 *							  In this case a non-NULL pointer is returned.
 * @return					- Returns a PROFILE_HANDLE pointer or NULL if not possible.
 *
 */
PROFILE_HANDLE *OpenProfile(char *Path, BOOLEAN CaseSensitive, BOOLEAN bCreate);
/**
 * This function will try to open the file for the profile.
 */
BOOLEAN ProfOpenFile(PROFILE_HANDLE *h, BOOLEAN bCreate);
BOOLEAN ProfCloseFile(PROFILE_HANDLE *h);

/**
 *	Closes a profile and all the memory is destroyed. You may not use any memory
 *	returned by any Profile call after this point.
 *	If bDelete is true then the file is deleted.
 */
void CloseProfile(PROFILE_HANDLE *h);
/**
 * Writes the current profile to the file
 */
BOOLEAN WriteProfile(PROFILE_HANDLE *h);
/**
 * CompressHandle will compress the array for the sections and all its subobjects.
 */
BOOLEAN CompressProfile(PROFILE_HANDLE *, BOOLEAN ReAlloc);
/**
 * DestroyHandle will free all allocated memory and also call deconstructors for
 * member objects.
 */
PROFILE_HANDLE *DestroyHandle(PROFILE_HANDLE *);
/**
 * Adds a section to a given handle structure. The Section is inserted at the 
 * end of the array. The name has to be provided, otherwise the call fails and NULL
 * is returned. If the section already exists, then pointer of the existing section
 * is returned instead. The number of sections are returned.
 * If CaseSensitive is TRUE then Sectionname != sectionname.
 */
ULONG AddSection(PROFILE_HANDLE *, char *SectionName, PROFILE_SECTION **s);
/**
 * RemoveSection will remove the given section. If more than one section exists
 * with the same name then the only the first one is removed. It is assumed that
 * only one section exists with a given name, but this is no requirement. The pointer
 * in the array is set to NULL. If ReAlloc is set to TRUE then the array will be
 * compressed. The number of sections are returned.
 */
ULONG RemoveSection(PROFILE_HANDLE *, char *SectionName, BOOLEAN ReAlloc);
/**
 * Returns the section for a given sectionname.
 * PROFILE_SECTION may be NULL if the pointer to the section is not needed.
 */
ULONG FindSection(PROFILE_HANDLE *, char *SectionName, PROFILE_SECTION **s);
/**
 * Returns a section with the given index or NULL if the indes doesn't exist.
 * This could be either because the entry at that indes is set to NULL, or the
 * indes is bigger then the array. To make sure you get no NULLs because of empty
 * entries, you should use CompressHandle() first.
 */
PROFILE_SECTION *GetSection(ULONG Index);



/**
 * The constructor for a new section object.
 */
PROFILE_SECTION *CreateSection(char *SectionName);
/**
 * Destructor for a section object. Always returns NULL.
 */
PROFILE_SECTION *DestroySection(PROFILE_SECTION *);
/**
 * Renames the section to the new name
 */
BOOLEAN RenameSection(PROFILE_SECTION *s, char *NewName);
/**
 * Adds a mapping object to a section. 
 */
ULONG AddMap(PROFILE_SECTION *Section, PROFILE_MAP *);
/**
 * Create a new map and add it to the section.
 */
ULONG AddMapEntry(PROFILE_SECTION *Section, char *Key, char *Value, BOOLEAN CaseSensitive, PROFILE_MAP **);
/**
 * Removes a map analog to RemoveSection.
 */
ULONG RemoveMap(PROFILE_SECTION *Section, PROFILE_MAP *, BOOLEAN ReAlloc);
/**
 * Searches for a key in a given section.
 * PROFILE_MAP may be NULL if the pointer to the map is not needed.
 */
ULONG FindMap(PROFILE_SECTION *, char *Key, BOOLEAN CaseSensitiv, PROFILE_MAP **Mapptr);





/**
 * Constrcutor for map objects
 */
PROFILE_MAP *CreateMap(char *Key, char *Value);
/**
 * Desctructor for map objects.
 */
PROFILE_MAP *DestroyMap(PROFILE_MAP *);

/**
 * ReadLine liest <Lines> Zeilen aus dem angegebenen File. Die Zeichen
 * werden in <Buffer> abgelegt. Falls in dem File weniger Zeilen
 * vorhanden sind als angegeben wird die Anzahl der bereits gelesenen
 * Zeilen zurueckgeliefert. errno wird durch die Systemfunktionen
 * entsprechend gesetzt und kann dazu benutzt werden festzustellen warum
 * nicht alle Zeilen gelesen werden konnten. Die Zeilen werden durch 0
 * getrennt. Somit kann einfach mit strlen() die Laenge einer Zeile fest-
 * gestellt werden. Wenn das File zu Ende ist (EOF) und bis zum letzten
 * Zeichen kein CR(LF) gefunden wurde so wird diese Zeile trotzdem als
 * Zeile gezaehlt. Falls eine Zeile laenger ist als in MaxLen angegeben,
 * Wird dieser Teil ebenfalls als eine Zeile angesehen und entsprechend
 * gezaehlt. <TabExpand> enthaelt entweder 0, dann werden Tabulatoren
 * als solche uebernommen. Wenn ein Wert ungleich 0 angegeben wird, dann
 * werden fuer jedes gefundene Tabulatorzeichen, entsprechend viele
 * Blanks eingesetzt. Es werden allerdings nur so viele Blanks eingesetzt
 * wie bis zur naechsten Tabstop Position benoetigt werden.
 *
 * INPUT:	stream	InputStream aus dem gelesen werden soll
 *			Buffer	Speicherblock in den eingelesen werden soll
 *			Lines	Anzahl der Zeilen die gelesen werden sollen
 *			MaxLen	Maximale Laenge einer Zeile.
 *
 * OUTPUT:	LONG		Anzahl der gelesenen Zeilen oder -1
 *				errno		Wenn LONG = -1 ist wird errno gesetzt
 *							EBADF Inputstream ist ungueltig
 *							ENOMEM Nicht genug Speicher vorhanden
 *								In diesem Fall eventuell die Zeilenlaenge
 *                              herabsetzen.
 *							errno kann auch andere Werte enthalten die
 *							durch die Systemfunktionen gesetzt werden.
 *
 * ACHTUNG:	Wenn LONG != -1 ist, ist errno undefiniert
 */
LONG ReadLine(PROFILE_HANDLE *Handle, char *Buffer, LONG Lines, LONG MaxLen, BYTE TabExpand);

#ifdef __cplusplus
};
#endif

#endif // _PROFILE_H

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人动漫一区| 亚洲国产精品成人久久综合一区| 亚洲国产日韩综合久久精品| 欧美伊人久久久久久久久影院 | 在线播放欧美女士性生活| 亚洲影院久久精品| 欧美一三区三区四区免费在线看| 免费不卡在线观看| 久久久精品国产免大香伊| 丁香激情综合国产| 一区二区三区蜜桃网| 91精品国产综合久久婷婷香蕉| 毛片av一区二区| 日本一区二区不卡视频| 在线亚洲+欧美+日本专区| 午夜av一区二区| 久久亚洲春色中文字幕久久久| 懂色av一区二区在线播放| 又紧又大又爽精品一区二区| 91精品在线观看入口| 国产成人精品一区二| 一级日本不卡的影视| 26uuu国产在线精品一区二区| 欧美日韩一区二区三区高清| 日韩av一二三| 亚洲欧美在线另类| 日韩三区在线观看| 一本色道亚洲精品aⅴ| 开心九九激情九九欧美日韩精美视频电影 | 在线观看不卡一区| 国模少妇一区二区三区| 亚洲一区二区三区四区五区黄| 日韩女优制服丝袜电影| 色综合久久久久网| 国产在线精品一区二区不卡了| 亚洲老妇xxxxxx| 久久久久国色av免费看影院| 欧美婷婷六月丁香综合色| 国产福利不卡视频| 日韩av中文字幕一区二区三区| 国产欧美综合色| 欧美一区二区三区播放老司机| 不卡电影一区二区三区| 麻豆国产精品官网| 香蕉成人啪国产精品视频综合网 | 亚洲欧美精品午睡沙发| 久久亚洲欧美国产精品乐播 | 日韩一区二区中文字幕| 在线免费观看不卡av| 成人综合在线视频| 另类欧美日韩国产在线| 亚洲国产日韩一区二区| 亚洲你懂的在线视频| 亚洲激情中文1区| 国产精品蜜臀av| 亚洲精品在线免费观看视频| 欧美久久久久久蜜桃| 色8久久人人97超碰香蕉987| 成人免费黄色在线| 国产精品99久久久久久宅男| 麻豆一区二区三区| 日本sm残虐另类| 首页亚洲欧美制服丝腿| 亚洲大尺度视频在线观看| 综合电影一区二区三区 | 国产一区二区三区在线观看精品| 日产欧产美韩系列久久99| 亚洲综合色丁香婷婷六月图片| 亚洲同性同志一二三专区| 国产女同互慰高潮91漫画| 久久亚洲精品小早川怜子| 精品国产一区二区三区四区四| 日韩午夜激情视频| 欧美一区二区三区小说| 91精品国产品国语在线不卡| 欧美高清激情brazzers| 69p69国产精品| 欧美一区二区三区在线观看视频| 欧美一区二区视频免费观看| 欧美一二三在线| 精品处破学生在线二十三| 精品久久久久久久久久久久久久久久久 | 午夜精品久久久久久久99樱桃| 亚洲亚洲精品在线观看| 午夜不卡av免费| 久久成人免费网| 蜜臀久久99精品久久久画质超高清| 另类成人小视频在线| 国产一二精品视频| 成人av资源站| 欧美亚洲国产一区在线观看网站| 欧美日韩夫妻久久| 亚洲精品一区二区精华| 国产精品理论在线观看| 一区二区在线观看不卡| 丝袜a∨在线一区二区三区不卡| 男男gaygay亚洲| 色综合久久中文综合久久97| 欧美视频在线观看一区| 日韩欧美一二三四区| 国产日本欧美一区二区| 一区二区三区高清| 男人的天堂亚洲一区| 国产成人av资源| 在线观看视频一区| 精品国产伦一区二区三区免费| 欧美精彩视频一区二区三区| 亚洲精品国产视频| 男人的天堂久久精品| 成人免费黄色大片| 在线播放中文一区| 中文字幕不卡在线| 天天色天天操综合| 成人在线视频一区二区| 欧美日韩一区二区电影| 国产日韩欧美在线一区| 午夜日韩在线电影| 成人国产在线观看| 日韩一级二级三级精品视频| 中文字幕亚洲综合久久菠萝蜜| 日韩和欧美一区二区| www.日韩精品| 日韩欧美一区二区三区在线| 亚洲欧美日韩国产一区二区三区 | 色综合久久精品| 久久综合色婷婷| 亚洲欧美另类在线| 国产成人在线免费观看| 欧美日韩国产在线播放网站| 国产精品视频观看| 久久99久久99| 欧美日本一区二区三区| 国产精品久久三| 极品美女销魂一区二区三区| 日韩一区二区精品| 亚洲精品免费电影| 成人av在线网站| 精品日韩一区二区三区| 天天色 色综合| 在线观看亚洲成人| 亚洲欧美在线视频| 岛国一区二区三区| 久久久国产精品午夜一区ai换脸| 午夜av一区二区三区| 色婷婷久久99综合精品jk白丝| 国产日产精品1区| 精品影视av免费| 欧美丰满少妇xxxxx高潮对白| 日韩理论在线观看| 懂色av一区二区三区免费看| 日韩一区二区三区观看| 视频一区二区中文字幕| 欧美综合视频在线观看| 亚洲丝袜精品丝袜在线| 高清成人在线观看| 国产日韩欧美在线一区| 国产一区二区h| 久久综合狠狠综合久久综合88 | 欧美国产视频在线| 国产成人在线观看| 日本一区二区三级电影在线观看 | 国产成人精品一区二 | 亚洲欧洲综合另类| 不卡视频在线看| 1区2区3区欧美| av福利精品导航| 国产精品国产三级国产三级人妇| 国产91精品一区二区麻豆亚洲| 国产日韩高清在线| 丁香另类激情小说| 亚洲欧美激情一区二区| 日本久久一区二区| 亚洲成人在线观看视频| 欧美另类变人与禽xxxxx| 日韩高清在线一区| 日韩欧美中文字幕一区| 国产一区二区女| 国产精品色婷婷| 91久久精品网| 丝袜诱惑制服诱惑色一区在线观看 | 免费精品99久久国产综合精品| 欧美福利视频导航| 91丨九色丨尤物| 亚洲成在线观看| 欧美电影免费观看高清完整版在线观看| 麻豆成人久久精品二区三区小说| 精品成人一区二区三区| 成人免费黄色在线| 亚洲国产成人91porn| 日韩欧美二区三区| 成人夜色视频网站在线观看| 亚洲人成网站精品片在线观看| 欧美日韩免费高清一区色橹橹| 日日夜夜精品视频天天综合网| 精品国产人成亚洲区| 91免费版在线看| 日本不卡免费在线视频| 国产欧美视频在线观看| 一本大道综合伊人精品热热| 免费在线看成人av|