ndet_fd.c

来自「操作系统SunOS 4.1.3版本的源码」· C语言 代码 · 共 35 行

C
35 行
字号
#ifndef	lint#ifdef sccsstatic	char sccsid[] = "@(#)ndet_fd.c 1.1 92/07/30 Copyr 1985 Sun Micro";#endif#endif/* * Copyright (c) 1985 by Sun Microsystems, Inc. *//* * Ndet_fd.c - Implement file descriptor specific calls that are shared among * NTFY_INPUT, NTFY_OUTPUT and NTFY_EXCEPTION. */#include <sunwindow/ntfy.h>#include <sunwindow/ndet.h>/* performance: global cache of getdtablesize() */extern int dtablesize_cache;#define GETDTABLESIZE() \	(dtablesize_cache?dtablesize_cache:(dtablesize_cache=getdtablesize()))pkg_private intndet_check_fd(fd)	int fd;{	if (fd < 0 || fd >= GETDTABLESIZE()) {		ntfy_set_errno(NOTIFY_BADF);		return(-1);	}	return(0);}

⌨️ 快捷键说明

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