1 /* @(#)printmsg.c 2.1 88/08/11 4.0 RPCSRC */
4 * printmsg.c: print a message on the console
16 fprintf(stderr, "usage: %s <message>\n", argv[0]);
21 if (!printmessage(message)) {
22 fprintf(stderr, "%s: sorry, couldn't print your message\n",
26 printf("Message delivered!\n");
30 * Print a message to the console.
31 * Return a boolean indicating whether the message was actually printed.
38 f = fopen(_PATH_CONSOLE, "w");
42 fprintf(f, "%s\n", msg);