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

📄 io.c

📁 操作系统SunOS 4.1.3版本的源码
💻 C
字号:
#ifndef lint#ifdef sccsstatic  char sccsid[] = "@(#)io.c 1.1 92/07/30 Copyr 1985 Sun Micro";#endif#endif/* * Copyright (c) 1985 by Sun Microsystems, Inc. */#include <sunwindow/io_stream.h>/* GENERIC FUNCTIONS THAT APPLY TO BOTH INPUT AND OUTPUT */voidstream_close(stream)	STREAM         *stream;{	switch (stream->stream_type) {	    case Input:	{		struct input_ops_vector *ops = stream->ops.input_ops;		(*(ops->close)) (stream);		goto out;		}	    case Output:	{		struct output_ops_vector *ops = stream->ops.output_ops;		(*(ops->close)) (stream);		goto out;		}	    default:		exit(1);	}out:	free((char *) stream);		/* client should have freed the client data */}struct posrecstream_get_pos(stream)	STREAM         *stream;{	switch (stream->stream_type) {	    case Input:	{		struct input_ops_vector *ops = stream->ops.input_ops;		return (*ops->get_pos) (stream);		}	    case Output: {		struct output_ops_vector *ops = stream->ops.output_ops;		return (*ops->get_pos) (stream);		}	    default:		exit(1);		/* NOTREACHED */	}}

⌨️ 快捷键说明

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