Current Path : /usr/src/share/examples/sunrpc/msg/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //usr/src/share/examples/sunrpc/msg/msg_proc.c |
/* @(#)msg_proc.c 2.1 88/08/11 4.0 RPCSRC */ /* $FreeBSD: release/9.1.0/share/examples/sunrpc/msg/msg_proc.c 69793 2000-12-09 09:35:55Z obrien $ */ /* * msg_proc.c: implementation of the remote procedure "printmessage" */ #include <paths.h> #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(_PATH_CONSOLE, "w"); if (f == NULL) { result = 0; return (&result); } fprintf(f, "%s\n", *msg); fclose(f); result = 1; return (&result); }