-/* $NetBSD: fortune.c,v 1.4 1997/10/18 20:03:18 christos Exp $ */
+/* $NetBSD: fortune.c,v 1.7 2009/08/12 08:04:05 dholland Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
#if 0
static char sccsid[] = "@(#)fortune.c 5.5 (Berkeley) 6/10/91";
#else
-__RCSID("$NetBSD: fortune.c,v 1.4 1997/10/18 20:03:18 christos Exp $");
+__RCSID("$NetBSD: fortune.c,v 1.7 2009/08/12 08:04:05 dholland Exp $");
#endif
#endif /* not lint */
* function to return a random fortune from the fortune file
*/
-char *flines[] = {
+static const char *flines[] = {
"gem value = gem * 2 ^ perfection",
"sitting down can have unexpected results",
"don't pry into the affairs of others",
#define NFORTUNES 34
-char *
-fortune()
+const char *
+fortune(void)
{
return (flines[random() % NFORTUNES]);
}