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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pils.c

?? linux集群服務器軟件代碼包
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* $Id: pils.c,v 1.47 2005/02/17 05:49:24 alan Exp $ *//* * Copyright (C) 2001 Alan Robertson <alanr@unix.sh> * This software licensed under the GNU LGPL. * * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. *  * This library 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 * Lesser General Public License for more details. *  * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA * */#include <portability.h>#include <unistd.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <dirent.h>#include <errno.h>#include <stdarg.h>#include <sys/stat.h>/* Dumbness... */#define time FooTimeParameter#define index FooIndexParameter#	include <glib.h>#undef time#undef index#define ENABLE_PIL_DEFS_PRIVATE#define ENABLE_PLUGIN_MANAGER_PRIVATE#ifndef STRLEN_CONST#	define STRLEN_CONST(con)	(sizeof(con)-1)#endif#include <pils/interface.h>#define NEW(type)	(g_new(type,1))#define	ZAP(obj)	memset(obj, 0, sizeof(*obj))#define DELETE(obj)	{g_free(obj); obj = NULL;}#ifdef LTDL_SHLIB_EXT#	define PLUGINSUFFIX	LTDL_SHLIB_EXT#else#	define PLUGINSUFFIX	".so"#endifstatic int	PluginDebugLevel = 0;#define DEBUGPLUGIN	(PluginDebugLevel > 0)static PIL_rc InterfaceManager_plugin_init(PILPluginUniv* univ);static char** PILPluginTypeListPlugins(PILPluginType* pitype, int* picount);static PILInterface* FindIF(PILPluginUniv* universe, const char *iftype,	const char * ifname);static PIL_rc PluginExists(const char * PluginPath);static char * PILPluginPath(PILPluginUniv* universe, const char * plugintype,	const char *	pluginname);void	DelPILPluginUniv(PILPluginUniv*);/* *	These RmA* functions primarily called from hash_table_foreach, *	functions, so they have gpointer arguments.  When calling *	them by hand, take special care to pass the right argument types. * *	They all follow the same calling sequence though.  It is: *		String name"*" type object *		"*" type object with the name given by 1st argument *		NULL * *	For example: *		RmAPILPluginType takes *			string name *			PILPluginType* object with the given name. */static gboolean	RmAPILPluginType(	gpointer pitname	/* Name of this plugin type */,	gpointer pitype	/* PILPluginType* */,	gpointer notused);static void RemoveAPILPluginType(PILPluginType*);static PILPluginType* NewPILPluginType(	PILPluginUniv* pluginuniv,	const char *	plugintype);static void DelPILPluginType(PILPluginType*);/* *	These RmA* functions primarily called from hash_table_foreach, *	so they have gpointer arguments.  When calling *	them by hand, take special care to pass the right argument types. */static gboolean	RmAPILPlugin(	gpointer piname	/* Name of this plugin  */,	gpointer plugin		/* PILPlugin* */,	gpointer notused);static void RemoveAPILPlugin(PILPlugin*);static PILPlugin* NewPILPlugin(PILPluginType* pitype	,	const char *	plugin_name	,	lt_dlhandle	dlhand	,	PILPluginInitFun PluginSym);static void	DelPILPlugin(PILPlugin*);struct MemStat {	unsigned long	news;	unsigned long	frees;};static struct PluginStats {	struct MemStat	plugin;	struct MemStat	pitype;	struct MemStat	piuniv;	struct MemStat	interface;	struct MemStat	interfacetype;	struct MemStat	interfaceuniv;}PILstats;#define	STATNEW(t)	{PILstats.t.news ++; }#define	STATFREE(t)	{PILstats.t.frees ++; }static PILInterfaceUniv*	NewPILInterfaceUniv(PILPluginUniv*);static void		DelPILInterfaceUniv(PILInterfaceUniv*);/* *	These RmA* functions primarily called from hash_table_foreach, but *	not necessarily, so they have gpointer arguments.  When calling *	them by hand, take special care to pass the right argument types. */static gboolean		RmAPILInterfaceType(	gpointer iftypename	/* Name of this interface type  */,	gpointer iftype		/* PILInterfaceType* */,	gpointer notused);static void RemoveAPILInterfaceType(PILInterfaceType*, PILInterfaceType*);static PILInterfaceType*	NewPILInterfaceType(	PILInterfaceUniv*,	const char * typename,	void* ifexports, void* user_data);static void		DelPILInterfaceType(PILInterfaceType*);/* *	These RmA* functions are designed to be  called from *	hash_table_foreach, so they have gpointer arguments.  When calling *	them by hand, take special care to pass the right argument types. *	They can be called from other places safely also. */static gboolean		RmAPILInterface(	gpointer ifname		/* Name of this interface */,	gpointer plugin		/* PILInterface* */,	gpointer notused);static PIL_rc RemoveAPILInterface(PILInterface*);static void DelPILPluginType(PILPluginType*);static PILInterface*	NewPILInterface(	PILInterfaceType*	interfacetype,	const char*	interfacename,	void *		exports,	PILInterfaceFun	closefun,	void*		ud_interface,	PILPlugin*	loading_plugin	/* The plugin that loaded us */);static void		DelPILInterface(PILInterface*);static PIL_rc	close_ifmgr_interface(PILInterface*, void*);/* *	For consistency, we show up as a plugin in our our system. * *	Here are our exports as a plugin. * */static const char *	PIL_PILPluginVersion(void);static void		PIL_PILPluginClose (PILPlugin*);void			PILpisysSetDebugLevel (int level);int			PILpisysGetDebugLevel(void);static const char * PIL_PILPluginLicense (void);static const char * PIL_PILPluginLicenseUrl (void);static const PILPluginOps PluginExports ={	PIL_PILPluginVersion,	PILpisysGetDebugLevel,	PILpisysSetDebugLevel,	PIL_PILPluginLicense,	PIL_PILPluginLicenseUrl,	PIL_PILPluginClose};/*	Prototypes for the functions that we export to every plugin */static PIL_rc PILregister_plugin(PILPlugin* piinfo, const PILPluginOps* mops);static PIL_rc PILunregister_plugin(PILPlugin* piinfo);static PIL_rcPILRegisterInterface(	PILPlugin*	piinfo,	const char *	interfacetype	/* Type of interface		*/,	const char *	interfacename	/* Name of interface		*/,	void*		Ops		/* Ops exported by this interface */,	PILInterfaceFun	closefunc	/* Ops exported by this interface */,	PILInterface**	interfaceid	/* Interface id 	(OP)	*/,	void**		Imports		/* Functions imported by	*/					/* this interface	(OP)	*/,	void*		ud_interface	/* interface user data 		*/);static PIL_rc	PILunregister_interface(PILInterface* interfaceid);static void	PILLog(PILLogLevel priority, const char * fmt, ...);/* *	This is the set of functions that we export to every plugin * *	That also makes it the set of functions that every plugin imports. * */static PILPluginImports PILPluginImportSet ={	PILregister_plugin	/* register_plugin */,	PILunregister_plugin	/* unregister_plugin */,	PILRegisterInterface	/* register_interface */,	RemoveAPILInterface	/* unregister_interface */,	PILLoadPlugin		/* load_plugin */,	PILLog			/* Logging function */,	g_malloc		/* Malloc function */,	g_realloc		/* realloc function */,	g_free			/* Free function */,	g_strdup		/* Strdup function */};static PIL_rc	ifmgr_register_interface(PILInterface* newif		,		void** imports);static PIL_rc	ifmgr_unregister_interface(PILInterface* interface);/* *	For consistency, the master interface manager is a interface in the *	system.   Below is our set of exported Interface functions. * *	Food for thought:  This is the interface manager whose name is *	interface.  This makes it the Interface Interface interface ;-) *		(or the Interface/Interface interface if you prefer) */static PILInterfaceOps  IfExports ={	ifmgr_register_interface,	ifmgr_unregister_interface};/* * Below is the set of functions we export to every interface manager. */static int	IfRefCount(PILInterface * ifh);static int	IfIncrRefCount(PILInterface*eifinfo,int plusminus);static int	PluginIncrRefCount(PILPlugin*eifinfo,int plusminus);#if 0static int	PluginRefCount(PILPlugin * ifh);#endifstatic void	IfForceUnregister(PILInterface *eifinfo);static void	IfForEachClientRemove(PILInterface* manangerif	,	gboolean(*f)(PILInterface* clientif, void * other)	,	void* other);static PILInterfaceImports IFManagerImports ={	IfRefCount,	IfIncrRefCount,	IfForceUnregister,	IfForEachClientRemove};static void PILValidatePlugin(gpointer key, gpointer plugin, gpointer pitype);static void PILValidatePluginType(gpointer key, gpointer pitype, gpointer piuniv);static void PILValidatePluginUniv(gpointer key, gpointer pitype, gpointer);static void PILValidateInterface(gpointer key, gpointer interface, gpointer iftype);static void PILValidateInterfaceType(gpointer key, gpointer iftype, gpointer ifuniv);static void PILValidateInterfaceUniv(gpointer key, gpointer puniv, gpointer);/***************************************************************************** * * This code is for managing plugins, and interacting with them... * ****************************************************************************/static PILPlugin*NewPILPlugin(	PILPluginType* pitype	,	const char *	plugin_name	,	lt_dlhandle	dlhand	,	PILPluginInitFun PluginSym){	PILPlugin*	ret = NEW(PILPlugin);	if (DEBUGPLUGIN) {		PILLog(PIL_DEBUG, "NewPILPlugin(0x%x)", (unsigned long)ret);	}	STATNEW(plugin);	ret->MagicNum = PIL_MAGIC_PLUGIN;	ret->plugin_name = g_strdup(plugin_name);	ret->plugintype = pitype;	ret->refcnt = 0;	ret->dlhandle = dlhand;	ret->dlinitfun = PluginSym;	PILValidatePlugin(ret->plugin_name, ret, pitype);	return ret;}static voidDelPILPlugin(PILPlugin*pi){	if (pi->refcnt > 0) {		PILLog(PIL_INFO, "DelPILPlugin: Non-zero refcnt");	}	if (pi->dlhandle) {		if (DEBUGPLUGIN) {			PILLog(PIL_DEBUG, "Closing dlhandle for (%s/%s)"			, pi->plugintype->plugintype,  pi->plugin_name);		}		lt_dlclose(pi->dlhandle);	}else if (DEBUGPLUGIN) {		PILLog(PIL_DEBUG, "NO dlhandle for (%s/%s)!"		,	pi->plugintype->plugintype,  pi->plugin_name);	}	DELETE(pi->plugin_name);	ZAP(pi);	DELETE(pi);	STATFREE(plugin);}static PILPluginType dummymlpitype ={	PIL_MAGIC_PLUGINTYPE,	NULL				/*plugintype*/,	NULL				/*piuniv*/,	NULL				/*Plugins*/,	PILPluginTypeListPlugins	/* listplugins */};static PILPluginType*NewPILPluginType(PILPluginUniv* pluginuniv	,	const char *	plugintype){	PILPluginType*	ret = NEW(PILPluginType);	if (DEBUGPLUGIN) {		PILLog(PIL_DEBUG, "NewPILPlugintype(0x%x)", (unsigned long)ret);	}	STATNEW(pitype);	*ret = dummymlpitype;	ret->plugintype = g_strdup(plugintype);	ret->piuniv = pluginuniv;	ret->Plugins = g_hash_table_new(g_str_hash, g_str_equal);	g_hash_table_insert(pluginuniv->PluginTypes	,	g_strdup(ret->plugintype), ret);	PILValidatePluginType(ret->plugintype, ret, pluginuniv);	return ret;}static voidDelPILPluginType(PILPluginType*pitype){	PILValidatePluginType(NULL, pitype, NULL);	if (DEBUGPLUGIN) {		PILLog(PIL_DEBUG, "DelPILPluginType(%s)", pitype->plugintype);	}	STATFREE(pitype);	g_hash_table_foreach_remove(pitype->Plugins, RmAPILPlugin, NULL);	g_hash_table_destroy(pitype->Plugins);	DELETE(pitype->plugintype);	ZAP(pitype);	DELETE(pitype);}/* *	These RmA* functions primarily called from hash_table_foreach,  *	so they have gpointer arguments.  This *not necessarily* clause *	is why they do the g_hash_table_lookup_extended call instead of *	just deleting the key.  When called from outside, the key * *	may not be pointing at the key to actually free, but a copy *	of the key. */static gbooleanRmAPILPlugin	/* IsA GHFunc: required for g_hash_table_foreach_remove() */(	gpointer piname		/* Name of this plugin  */,	gpointer plugin		/* PILPlugin* */,	gpointer notused	){	PILPlugin*	Plugin = plugin;	PILPluginType*	Pitype = Plugin->plugintype;	PILValidatePlugin(piname, plugin, NULL);	PILValidatePluginType(NULL, Pitype, NULL);	g_assert(IS_PILPLUGIN(Plugin));		if (DEBUGPLUGIN) {		PILLog(PIL_DEBUG, "RmAPILPlugin(%s/%s)", Pitype->plugintype		,	Plugin->plugin_name);	}	/* Normally  called from g_hash_table_foreachremove or equivalent */	DelPILPlugin(plugin);	DELETE(piname);	return TRUE;}static voidRemoveAPILPlugin(PILPlugin*Plugin){	PILPluginType*	Pitype = Plugin->plugintype;	gpointer	key;	if (DEBUGPLUGIN) {		PILLog(PIL_DEBUG, "RemoveAPILPlugin(%s/%s)"		,	Pitype->plugintype		,	Plugin->plugin_name);	}	if (g_hash_table_lookup_extended(Pitype->Plugins	,	Plugin->plugin_name, &key, (void*)&Plugin)) {		g_hash_table_remove(Pitype->Plugins, key);		RmAPILPlugin(key, Plugin, NULL);		key = NULL;		Plugin = NULL;	}else{		g_assert_not_reached();	}	if (g_hash_table_size(Pitype->Plugins) == 0) {		RemoveAPILPluginType(Pitype);		/* Pitype is now invalid */		Pitype = NULL;	}}PILPluginUniv*NewPILPluginUniv(const char * basepluginpath){	PILPluginUniv*	ret = NEW(PILPluginUniv);	/* The delimiter separating search path components */	const char*	path_delim = G_SEARCHPATH_SEPARATOR_S;	char *		fullpath;	STATNEW(piuniv);	if (DEBUGPLUGIN) {		PILLog(PIL_DEBUG, "NewPILPluginUniv(0x%x)"		,	(unsigned long)ret);	}	if (!g_path_is_absolute(basepluginpath)) {		DELETE(ret);		return(ret);	}	ret->MagicNum = PIL_MAGIC_PLUGINUNIV;	fullpath = g_strdup_printf("%s%s%s", basepluginpath	,	path_delim, PILS_BASE_PLUGINDIR);	if (DEBUGPLUGIN) {		PILLog(PIL_DEBUG		,	"PILS: Plugin path = %s", fullpath);	}	/* Separate the root directory PATH into components */	ret->rootdirlist = g_strsplit(fullpath, path_delim, 100);	g_free(fullpath);	ret->PluginTypes = g_hash_table_new(g_str_hash, g_str_equal);	ret->imports = &PILPluginImportSet;	ret->ifuniv = NewPILInterfaceUniv(ret);	PILValidatePluginUniv(NULL, ret, NULL);	return ret;}/* Change memory allocation functions immediately  after creating universe */voidPilPluginUnivSetMemalloc(PILPluginUniv* u,	void*	(*allocfun)(unsigned long size),	void*	(*reallocfun)(void * ptr, unsigned long size),	void	(*freefun)(void* space),	char*	(*strdupfun)(const char *s)){	u->imports->alloc	= allocfun;	u->imports->mrealloc	= reallocfun;	u->imports->mfree	= freefun;	u->imports->mstrdup	= strdupfun;}/* Change logging functions - preferably right after creating universe */voidPilPluginUnivSetLog(PILPluginUniv* u,	void	(*logfun)	(PILLogLevel priority, const char * fmt, ...)){	u->imports->log	= logfun;}voidDelPILPluginUniv(PILPluginUniv* piuniv){	if (DEBUGPLUGIN) {		PILLog(PIL_DEBUG, "DelPILPluginUniv(0x%lx)"		,	(unsigned long)piuniv);	}	STATFREE(piuniv);	PILValidatePluginUniv(NULL, piuniv, NULL);	DelPILInterfaceUniv(piuniv->ifuniv);	piuniv->ifuniv = NULL;	g_hash_table_foreach_remove(piuniv->PluginTypes	,	RmAPILPluginType, NULL);	g_hash_table_destroy(piuniv->PluginTypes);	g_strfreev(piuniv->rootdirlist);	ZAP(piuniv);	DELETE(piuniv);}/* *	These RmA* functions primarily called from hash_table_foreach, 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜乳av一区二区三区| 亚洲1区2区3区4区| 欧美日韩不卡视频| 国产成人鲁色资源国产91色综| 国产精品第五页| 日韩亚洲欧美成人一区| 成人动漫一区二区在线| 天天综合日日夜夜精品| 国产精品久久久久一区二区三区共| 中文av字幕一区| 日韩一区二区免费高清| 色综合久久久网| 国产精品一区二区不卡| 天天av天天翘天天综合网| 国产精品乱子久久久久| 精品久久久久久久久久久久包黑料 | 国产麻豆欧美日韩一区| 亚洲午夜免费视频| 中文字幕在线不卡视频| 久久九九久久九九| 91精品国产综合久久香蕉麻豆| 色呦呦国产精品| 成人免费高清在线| 国产一区不卡在线| 青青草原综合久久大伊人精品优势| 亚洲激情中文1区| 亚洲日本va午夜在线电影| 亚洲国产成人自拍| 日本一区二区三区四区在线视频 | 精品理论电影在线观看 | 久久精品一区八戒影视| 日韩欧美一区在线观看| 69p69国产精品| 欧美久久高跟鞋激| 欧美老年两性高潮| 亚洲精品乱码久久久久久久久 | aaa欧美色吧激情视频| 久久精品国产77777蜜臀| 日韩成人av影视| 亚洲第一综合色| 中文字幕欧美一| 国产欧美一区二区三区在线看蜜臀 | 欧美一区二区三区色| 国产成人亚洲综合a∨婷婷图片| 亚洲一区二区三区自拍| 一区免费观看视频| 欧美经典三级视频一区二区三区| 欧美成人欧美edvon| 欧美三级在线看| 日本丰满少妇一区二区三区| www.爱久久.com| 国产精品亚洲专一区二区三区 | 国产91丝袜在线播放九色| 久久99精品久久久久婷婷| 日本成人在线视频网站| 中文字幕一区二区三区在线播放 | 色综合久久久网| 91色porny在线视频| heyzo一本久久综合| 久久精品国产免费看久久精品| 一区二区三区色| 亚洲黄色录像片| 有码一区二区三区| 亚洲欧美日韩人成在线播放| 精品国产99国产精品| 26uuu欧美日本| 久久天天做天天爱综合色| 久久久亚洲午夜电影| 欧美一二三区精品| 久久久久国产一区二区三区四区| 日韩精品一区二区三区中文精品 | 国产日韩欧美精品电影三级在线| xnxx国产精品| 久久婷婷久久一区二区三区| 久久亚洲综合色| 国产农村妇女毛片精品久久麻豆| 国产精品免费观看视频| 中文字幕一区二区三区在线不卡 | 一区二区视频免费在线观看| 亚洲一区在线免费观看| 亚洲一区国产视频| 日本91福利区| 国产乱国产乱300精品| 成人亚洲一区二区一| 99国产一区二区三精品乱码| 91老师片黄在线观看| 欧美日韩国产在线观看| 日韩精品一区二区三区中文不卡 | 日韩欧美美女一区二区三区| 久久亚洲一级片| 国产精品国产三级国产专播品爱网| 亚洲天堂精品视频| 亚洲chinese男男1069| 久久99久久99小草精品免视看| 精品一区二区日韩| 国产成人精品亚洲777人妖| 欧美三级韩国三级日本三斤| 日韩欧美中文字幕精品| 国产精品女同一区二区三区| 夜夜嗨av一区二区三区网页| 久久99热这里只有精品| 99久久国产综合精品麻豆| 欧美精品在欧美一区二区少妇| 26uuu国产一区二区三区| 一区二区三区在线观看网站| 日本大胆欧美人术艺术动态| 成人激情综合网站| 欧美一区二区三区视频在线观看 | 91麻豆精品国产91久久久久久久久 | 一区二区三区国产| 老司机精品视频导航| av中文一区二区三区| 91精品国产综合久久精品性色| 国产欧美日韩视频一区二区| 亚洲国产美女搞黄色| 日韩专区欧美专区| 99精品久久免费看蜜臀剧情介绍| 欧美一级片在线看| 一区二区三区在线看| 蜜桃视频免费观看一区| 色av综合在线| 久久青草欧美一区二区三区| 亚洲妇女屁股眼交7| 国产成人一区在线| 日韩欧美亚洲一区二区| 一区二区三区色| 成人app在线| 亚洲精品一区二区三区精华液| 亚洲欧美福利一区二区| 国产高清精品久久久久| 日韩一区二区免费在线观看| 一区二区三区日韩欧美精品| 成人av网在线| 色婷婷av一区二区三区之一色屋| 久久亚洲精品小早川怜子| 亚洲影视在线观看| 97久久精品人人爽人人爽蜜臀| 久久看人人爽人人| 黄色小说综合网站| 日韩色视频在线观看| 调教+趴+乳夹+国产+精品| 色综合久久精品| 欧美激情资源网| 国产在线国偷精品产拍免费yy | 久久99久久久久久久久久久| 色菇凉天天综合网| 亚洲精选视频在线| 一本大道久久a久久综合| 欧美国产一区在线| 国产成人aaaa| 久久老女人爱爱| 国产黄色91视频| 国产亚洲欧美日韩在线一区| 91原创在线视频| 亚洲愉拍自拍另类高清精品| 色美美综合视频| 一区二区国产盗摄色噜噜| 91在线视频网址| 一区二区三区日韩欧美| 91电影在线观看| 夜夜夜精品看看| 欧美日韩在线一区二区| 舔着乳尖日韩一区| 日韩欧美另类在线| 国产真实乱对白精彩久久| 久久综合九色综合欧美亚洲| 久久er99热精品一区二区| 精品福利视频一区二区三区| 韩国一区二区在线观看| 精品久久久久久久久久久久久久久 | 久久无码av三级| 国产成人av福利| 国产午夜精品一区二区三区四区| 久久精品国产秦先生| 久久综合九色综合97_久久久| 国产精品影音先锋| 国产精品婷婷午夜在线观看| 91天堂素人约啪| 亚洲国产综合视频在线观看| 欧美乱熟臀69xxxxxx| 老鸭窝一区二区久久精品| 精品国产精品网麻豆系列| 大桥未久av一区二区三区中文| ㊣最新国产の精品bt伙计久久| 色综合一个色综合| 亚洲一级片在线观看| 欧美日韩一区二区欧美激情| 日本sm残虐另类| 亚洲国产精品ⅴa在线观看| 91性感美女视频| 日本中文字幕一区| 国产三级一区二区三区| 色8久久人人97超碰香蕉987| 日韩av电影免费观看高清完整版| 欧美激情艳妇裸体舞| 在线免费精品视频| 另类小说一区二区三区| 成人欧美一区二区三区小说| 欧美老肥妇做.爰bbww| 国产精品亚洲一区二区三区妖精 |