msg_proc.c

来自「早期freebsd实现」· C语言 代码 · 共 29 行

C
29
字号
/* @(#)msg_proc.c	2.1 88/08/11 4.0 RPCSRC *//* * msg_proc.c: implementation of the remote procedure "printmessage" */#include <stdio.h>#include <rpc/rpc.h>	/* always need this here */#include "msg.h"	/* need this too: msg.h will be generated by rpcgen *//* * Remote verson of "printmessage" */int *		printmessage_1(msg)	char **msg;	{	static int result; /* must be static! */	FILE *f;	f = fopen("/dev/console", "w");	if (f == NULL) {		result = 0;		return (&result);	}	fprintf(f, "%s\n", *msg);	fclose(f);	result = 1;	return (&result);}

⌨️ 快捷键说明

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