home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1989, 1990, John F. Haugh II
- * All rights reserved.
- *
- * Use, duplication, and disclosure prohibited without
- * the express written permission of the author.
- */
-
- #include <stdio.h>
- #ifndef BSD
- #include <string.h>
- #include <memory.h>
- #else
- #include <strings.h>
- #define strchr index
- #define strrchr rindex
- #endif
- #include "config.h"
-
- #ifndef lint
- static char _sccsid[] = "@(#)motd.c 2.2 19:23:58 7/29/90";
- #endif
-
- extern char home[];
- #ifdef HUSHLOGIN
- extern int hushed;
- #endif
-
- #ifdef MOTD
- void motd ()
- {
- FILE *fp;
- register int c;
-
- #ifdef HUSHLOGIN
- if (hushed)
- return;
- #endif
- if ((fp = fopen ("/etc/motd", "r")) == (FILE *) 0)
- return;
-
- while ((c = getc (fp)) != EOF)
- putchar (c);
-
- fclose (fp);
- fflush (stdout);
- }
- #endif
-