⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mblib.c

📁 操作系统SunOS 4.1.3版本的源码
💻 C
字号:
/* * misc routines */#if !defined(lint) && defined(SCCSIDS)static  char *sccsid = "@(#)mblib.c 1.1 92/07/30 SMI";#endif #include <stdio.h>#include <sys/types.h>#include "codeset.h"#include "mbextern.h"#include <dlfcn.h>static void *handle = (void *)NULL;	/* initialize it with -1 *//* * Close current library library */_ml_close_library(){#ifdef PIC	if (handle == (void *)NULL) {		_code_set_info.open_flag = NULL;		return;	}	dlclose(handle);  	_code_set_info.open_flag = NULL;	handle = (void *)NULL;#endif PIC	return(0);}/* * Open the given library */void *_ml_open_library(){	char buf[BUFSIZ];#ifdef PIC	if (handle != (void *)NULL) /* This library is already opened */		return(handle);	/*	 * Open the given library	 */	strcpy(buf, LIBRARY_PATH);	strcat(buf, _code_set_info.code_name);	strcat(buf, ".so");#ifdef DEBUG	printf ("ml_open_library: buf = '%s'\n", buf);#endif	handle = dlopen(buf, 1);	if (handle != (void *)NULL)		_code_set_info.open_flag = 1;#ifdef DEBUG	else		printf ("_ml_open_library: dlopen failed\n");#endif#endif PIC	return(handle);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -