1 /* @(#)printmsg.c 2.1 88/08/11 4.0 RPCSRC */
2 /* $FreeBSD: src/share/examples/sunrpc/msg/printmsg.c,v 1.2.12.1 2000/12/11 01:03:27 obrien Exp $ */
3 /* $DragonFly: src/share/examples/sunrpc/msg/printmsg.c,v 1.2 2003/06/17 04:36:58 dillon Exp $ */
5 * printmsg.c: print a message on the console
17 fprintf(stderr, "usage: %s <message>\n", argv[0]);
22 if (!printmessage(message)) {
23 fprintf(stderr, "%s: sorry, couldn't print your message\n",
27 printf("Message delivered!\n");
31 * Print a message to the console.
32 * Return a boolean indicating whether the message was actually printed.
39 f = fopen(_PATH_CONSOLE, "w");
43 fprintf(f, "%s\n", msg);