diff options
author | 1995-03-23 08:28:00 +0000 | |
---|---|---|
committer | 1995-03-23 08:28:00 +0000 | |
commit | 94b5353c71e7246077d468afe68d51ce85fc213d (patch) | |
tree | 0b6f70b8110f5d6650a6083460424df854c415f8 /fortune | |
parent | 1c0b80f0fe7a28cd947ace3e69f5fd2ac8ed47cb (diff) | |
download | bsdgames-darwin-94b5353c71e7246077d468afe68d51ce85fc213d.tar.gz bsdgames-darwin-94b5353c71e7246077d468afe68d51ce85fc213d.tar.zst bsdgames-darwin-94b5353c71e7246077d468afe68d51ce85fc213d.zip |
merge with Lite, new RCS id conventions, etc.
Diffstat (limited to 'fortune')
-rw-r--r-- | fortune/Makefile | 4 | ||||
-rw-r--r-- | fortune/Notes | 1 | ||||
-rw-r--r-- | fortune/README | 1 | ||||
-rw-r--r-- | fortune/datfiles/Makefile | 55 | ||||
-rw-r--r-- | fortune/fortune/Makefile | 3 | ||||
-rw-r--r-- | fortune/fortune/fortune.6 | 73 | ||||
-rw-r--r-- | fortune/fortune/fortune.c | 157 | ||||
-rw-r--r-- | fortune/fortune/pathnames.h | 9 | ||||
-rw-r--r-- | fortune/strfile/Makefile | 4 | ||||
-rw-r--r-- | fortune/strfile/strfile.8 | 16 | ||||
-rw-r--r-- | fortune/strfile/strfile.c | 19 | ||||
-rw-r--r-- | fortune/strfile/strfile.h | 9 | ||||
-rw-r--r-- | fortune/tools/Do_spell | 1 | ||||
-rw-r--r-- | fortune/tools/Do_troff | 1 | ||||
-rw-r--r-- | fortune/tools/Troff.mac | 2 | ||||
-rw-r--r-- | fortune/tools/do_sort | 1 | ||||
-rw-r--r-- | fortune/unstr/Makefile | 4 | ||||
-rw-r--r-- | fortune/unstr/unstr.c | 15 |
18 files changed, 223 insertions, 152 deletions
diff --git a/fortune/Makefile b/fortune/Makefile index d912d072..2a951ab1 100644 --- a/fortune/Makefile +++ b/fortune/Makefile @@ -1,5 +1,5 @@ -# from: @(#)Makefile 5.6 (Berkeley) 4/27/91 -# $Id: Makefile,v 1.4 1993/08/01 05:45:23 mycroft Exp $ +# $NetBSD: Makefile,v 1.5 1995/03/23 08:28:23 cgd Exp $ +# @(#)Makefile 8.1 (Berkeley) 5/31/93 SUBDIR= fortune diff --git a/fortune/Notes b/fortune/Notes index 9be4f4d2..717682f0 100644 --- a/fortune/Notes +++ b/fortune/Notes @@ -1,3 +1,4 @@ +# $NetBSD: Notes,v 1.2 1995/03/23 08:28:26 cgd Exp $ # @(#)Notes 8.1 (Berkeley) 5/31/93 Warning: diff --git a/fortune/README b/fortune/README index ee9ef642..29de138b 100644 --- a/fortune/README +++ b/fortune/README @@ -1,3 +1,4 @@ +# $NetBSD: README,v 1.2 1995/03/23 08:28:29 cgd Exp $ # @(#)README 8.1 (Berkeley) 5/31/93 The potentially offensive fortunes are not installed by default on BSD diff --git a/fortune/datfiles/Makefile b/fortune/datfiles/Makefile index d92f8ba4..8c87385b 100644 --- a/fortune/datfiles/Makefile +++ b/fortune/datfiles/Makefile @@ -1,37 +1,44 @@ -# from: @(#)Makefile 5.2 (Berkeley) 5/6/91 -# $Id: Makefile,v 1.10 1994/02/10 02:31:32 cgd Exp $ +# $NetBSD: Makefile,v 1.11 1995/03/23 08:28:33 cgd Exp $ +# @(#)Makefile 8.2 (Berkeley) 4/19/94 -# -# set `OBSCENE' to "real" to have obscene fortunes installed, -# fake to have a note stating that they're not installed -# isntalled in their place -# -OBSCENE=real +SRCS= fortunes fortunes2 startrek zippy +BLDS= fortunes.dat fortunes2.dat startrek.dat zippy.dat \ + fortunes-o fortunes-o.dat -NORMDAT= fortunes.dat startrek.dat zippy.dat -OBSDAT= fortunes-o.dat -DATFILES= ${NORMDAT} ${OBSDAT} +# TO INSTALL THE POTENTIALLY OFFENSIVE FORTUNES, UNCOMMENT THE THREE +# LINES AND COMMENT OUT THE FOURTH LINE. -CLEANFILES+=${DATFILES} +# THE THREE LINES +SRCS+= fortunes2-o limerick +BLDS+= fortunes2-o.dat limerick.dat +TYPE= real + +# THE FOURTH LINE +#TYPE= fake + +CLEANFILES+=${BLDS} STRFILE!=cd $(.CURDIR)/../strfile; \ printf "xxx:\n\techo \$${.OBJDIR}/strfile\n" | ${MAKE} -r -s -f - xxx -all: ${DATFILES} +all: ${BLDS} -install: - install ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${DATFILES} \ - ${DESTDIR}/usr/share/games/fortune +install: ${SRCS} ${BLDS} (cd ${.CURDIR} && install -c -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${NORMDAT:R} ${DESTDIR}/usr/share/games/fortune) - (cd ${.CURDIR} && install -c -o ${BINOWN} -g ${BINGRP} -m 444 \ - ${OBSDAT:R}.${OBSCENE}.rot13 \ - ${DESTDIR}/usr/share/games/fortune/${OBSDAT:R}) - -fortunes-o.dat: ${.TARGET:R}.${OBSCENE}.rot13 - ${STRFILE} -rsx ${.CURDIR}/${.TARGET:R}.${OBSCENE}.rot13 ${.TARGET} + ${SRCS} ${DESTDIR}/usr/share/games/fortune) + install -o ${BINOWN} -g ${BINGRP} -m 444 ${BLDS} \ + ${DESTDIR}/usr/share/games/fortune -fortunes.dat startrek.dat zippy.dat: ${.TARGET:R} +fortunes.dat fortunes2.dat fortunes2-o.dat limerick.dat startrek.dat zippy.dat: ${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET} +fortunes-o.dat: fortunes-o + ${STRFILE} -rsx fortunes-o ${.TARGET} + +#fortunes-o: fortunes-o.${TYPE} +# /usr/games/caesar 13 < ${.ALLSRC} > ${.TARGET} + +fortunes-o: fortunes-o.${TYPE}.rot13 + cat < ${.ALLSRC} > ${.TARGET} + .include <bsd.prog.mk> diff --git a/fortune/fortune/Makefile b/fortune/fortune/Makefile index 71cbf376..51ba8d99 100644 --- a/fortune/fortune/Makefile +++ b/fortune/fortune/Makefile @@ -1,4 +1,5 @@ -# $Id: Makefile,v 1.7 1994/12/22 09:34:12 cgd Exp $ +# $NetBSD: Makefile,v 1.8 1995/03/23 08:28:36 cgd Exp $ +# @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= fortune MAN= fortune.6 diff --git a/fortune/fortune/fortune.6 b/fortune/fortune/fortune.6 index d4876e1a..da994244 100644 --- a/fortune/fortune/fortune.6 +++ b/fortune/fortune/fortune.6 @@ -1,5 +1,7 @@ -.\" Copyright (c) 1985 The Regents of the University of California. -.\" All rights reserved. +.\" $NetBSD: fortune.6,v 1.4 1995/03/23 08:28:37 cgd Exp $ +.\" +.\" Copyright (c) 1985, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Ken Arnold. @@ -32,10 +34,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" from: @(#)fortune.6 6.8 (Berkeley) 6/23/90 -.\" $Id: fortune.6,v 1.3 1993/08/05 02:15:58 jtc Exp $ +.\" @(#)fortune.6 8.3 (Berkeley) 4/19/94 .\" -.Dd June 23, 1990 +.Dd April 19, 1994 .Dt FORTUNE 6 .Os .Sh NAME @@ -57,9 +58,12 @@ Epigrams are divided into several categories, where each category is subdivided into those which are potentially offensive and those which are not. The options are as follows: -.Bl -tag -width indent +.Bl -tag -width flag .It Fl a Choose from all lists of maxims, both offensive and not. +(See the +.Fl o +option for more information on offensive fortunes.) .It Fl e Consider all fortune files to be of equal size (see discussion below on multiple files). @@ -76,22 +80,24 @@ See for a description of patterns. .It Fl o Choose only from potentially offensive aphorisms. -.Pp +.Bf -symbolic Please, please, please request a potentially offensive fortune if and only if you believe, deep down in your heart, that you are willing to be offended. -(And that if you are, you'll just quit using -o rather than give us +(And that if you are, you'll just quit using +.Fl o +rather than give us grief about it, okay?) -.Pp +.Ef .Bd -filled -offset indent \&... let us keep in mind the basic governing philosophy of The Brotherhood, as handsomely summarized in these words: we believe in healthy, hearty laughter -- at the expense of the whole human race, if needs be. Needs be. +.Bd -filled -offset indent-two -compact +--H. Allen Smith, "Rude Jokes" .Ed -.Bd -filled -offset indent-two --- H. Allen Smith, "Rude Jokes" .Ed .It Fl s Short apothegms only. @@ -109,12 +115,12 @@ to guarantee that the message can be read before the screen is cleared. The user may specify alternate sayings. You can specify a specific file, a directory which contains one or more files, or the special word -.Ar all +.Em all which says to use all the standard databases. Any of these may be preceded by a percentage, which is a number .Ar N between 0 and 100 inclusive, followed by a -.Em % . +.Ar % . If it is, there will be a .Ar N percent probability that an adage will be picked from that file @@ -125,35 +131,44 @@ and/or directories, in which case the probability of selecting from one of them will be based on their relative sizes. .Pp As an example, given two databases -.Ar funny +.Em funny and -.Ar not-funny , +.Em not-funny , with -.Ar funny +.Em funny twice as big, saying -.Dl fortune funny not-funny +.Bd -literal -offset indent +fortune funny not-funny +.Ed +.Pp will get you fortunes out of -.Ar funny +.Em funny two-thirds of the time. The command -.Dl fortune 90% funny 10% not-funny +.Bd -literal -offset indent +fortune 90% funny 10% not-funny +.Ed +.Pp will pick out 90% of its fortunes from -.Ar funny -(the -.Dq 10% not-funny -is unnecessary, since 10% is all that's left). +.Em funny +(the ``10% not-funny'' is unnecessary, since 10% is all that's left). The .Fl e option says to consider all files equal; thus -.Dl fortune Fl e +.Bd -literal -offset indent +fortune -e +.Ed +.Pp is equivalent to -.Dl fortune 50% funny 50% not-funny +.Bd -literal -offset indent +fortune 50% funny 50% not +.Em -funny +.Ed .Sh FILES -.Pa /usr/share/games/fortune -.Sh AUTHOR -Ken Arnold +.Bl -tag -width Pa -compact +.It Pa /usr/share/games/fortune +.El .Sh SEE ALSO .Xr regex 3 , .Xr regcmp 3 , -.Xr strfile(8) diff --git a/fortune/fortune/fortune.c b/fortune/fortune/fortune.c index 01811bf0..c8b96eaa 100644 --- a/fortune/fortune/fortune.c +++ b/fortune/fortune/fortune.c @@ -1,6 +1,8 @@ +/* $NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $ */ + /*- - * Copyright (c) 1986 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1986, 1993 + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ken Arnold. @@ -35,54 +37,33 @@ */ #ifndef lint -char copyright[] = -"@(#) Copyright (c) 1986 The Regents of the University of California.\n\ - All rights reserved.\n"; +static char copyright[] = +"@(#) Copyright (c) 1986, 1993\n\ + The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -/*static char sccsid[] = "from: @(#)fortune.c 5.13 (Berkeley) 4/8/91";*/ -static char rcsid[] = "$Id: fortune.c,v 1.7 1993/12/04 02:19:49 jtc Exp $"; +#if 0 +static char sccsid[] = "@(#)fortune.c 8.1 (Berkeley) 5/31/93"; +#else +static char rcsid[] = "$NetBSD: fortune.c,v 1.8 1995/03/23 08:28:40 cgd Exp $"; +#endif #endif /* not lint */ -# include <machine/endian.h> # include <sys/param.h> # include <sys/stat.h> + # include <dirent.h> -# include <stdio.h> +# include <fcntl.h> # include <assert.h> +# include <unistd.h> +# include <stdio.h> +# include <ctype.h> # include <stdlib.h> # include <string.h> -# include <time.h> # include "strfile.h" # include "pathnames.h" -#ifdef SYSV -# define NO_LOCK -# define REGCMP -# ifdef NO_REGEX -# undef NO_REGEX -# endif /* NO_REGEX */ -# define index strchr -# define rindex strrchr -#endif /* SYSV */ - -#ifndef NO_REGEX -# include <ctype.h> -#endif /* NO_REGEX */ - -# ifndef NO_LOCK -# include <sys/file.h> -# endif /* NO_LOCK */ - -# ifndef F_OK -/* codes for access() */ -# define F_OK 0 /* does file exist */ -# define X_OK 1 /* is it executable by caller */ -# define W_OK 2 /* writable by caller */ -# define R_OK 4 /* readable by caller */ -# endif /* F_OK */ - # define TRUE 1 # define FALSE 0 # define bool short @@ -91,21 +72,21 @@ static char rcsid[] = "$Id: fortune.c,v 1.7 1993/12/04 02:19:49 jtc Exp $"; # define CPERS 20 /* # of chars for each sec */ # define SLEN 160 /* # of chars in short fortune */ -# define POS_UNKNOWN ((unsigned long) -1) /* pos for file unknown */ +# define POS_UNKNOWN ((off_t) -1) /* pos for file unknown */ # define NO_PROB (-1) /* no prob specified for file */ # ifdef DEBUG # define DPRINTF(l,x) if (Debug >= l) fprintf x; else # undef NDEBUG -# else /* DEBUG */ +# else # define DPRINTF(l,x) # define NDEBUG 1 -# endif /* DEBUG */ +# endif typedef struct fd { int percent; int fd, datfd; - unsigned long pos; + off_t pos; FILE *inf; char *name; char *path; @@ -145,12 +126,44 @@ FILEDESC *Fortfile; /* Fortune file to use */ STRFILE Noprob_tbl; /* sum of data for all no prob files */ -char *do_malloc(), *copy(), *off_name(); - -FILEDESC *pick_child(), *new_fp(); +int add_dir __P((FILEDESC *)); +int add_file __P((int, + char *, char *, FILEDESC **, FILEDESC **, FILEDESC *)); +void all_forts __P((FILEDESC *, char *)); +char *copy __P((char *, u_int)); +void display __P((FILEDESC *)); +void do_free __P((void *)); +void *do_malloc __P((u_int)); +int form_file_list __P((char **, int)); +int fortlen __P((void)); +void get_fort __P((void)); +void get_pos __P((FILEDESC *)); +void get_tbl __P((FILEDESC *)); +void getargs __P((int, char *[])); +void init_prob __P((void)); +int is_dir __P((char *)); +int is_fortfile __P((char *, char **, char **, int)); +int is_off_name __P((char *)); +int max __P((int, int)); +FILEDESC * + new_fp __P((void)); +char *off_name __P((char *)); +void open_dat __P((FILEDESC *)); +void open_fp __P((FILEDESC *)); +FILEDESC * + pick_child __P((FILEDESC *)); +void print_file_list __P((void)); +void print_list __P((FILEDESC *, int)); +void sum_noprobs __P((FILEDESC *)); +void sum_tbl __P((STRFILE *, STRFILE *)); +void usage __P((void)); +void zero_tbl __P((STRFILE *)); -#ifndef NO_REGEX -char *conv_pat(); +#ifndef NO_REGEX +char *conv_pat __P((char *)); +int find_matches __P((void)); +void matches_in_list __P((FILEDESC *)); +int maxlen_in_list __P((FILEDESC *)); #endif #ifndef NO_REGEX @@ -167,15 +180,10 @@ char *regcmp(), *regex(); # define BAD_COMP(f) ((f) != NULL) # define RE_EXEC(p) re_exec(p) -char *re_comp(); -#ifdef SYSV -char *re_exec(); -#else -int re_exec(); -#endif #endif #endif +int main(ac, av) int ac; char *av[]; @@ -229,6 +237,7 @@ char *av[]; /* NOTREACHED */ } +void display(fp) FILEDESC *fp; { @@ -236,7 +245,7 @@ FILEDESC *fp; char line[BUFSIZ]; open_fp(fp); - (void) fseek(fp->inf, Seekpts[0], 0); + (void) fseek(fp->inf, (long)Seekpts[0], 0); for (Fort_len = 0; fgets(line, sizeof line, fp->inf) != NULL && !STR_ENDSTRING(line, fp->tbl); Fort_len++) { if (fp->tbl.str_flags & STR_ROTATED) @@ -254,6 +263,7 @@ FILEDESC *fp; * fortlen: * Return the length of the fortune. */ +int fortlen() { register int nchar; @@ -263,7 +273,7 @@ fortlen() nchar = (Seekpts[1] - Seekpts[0] <= SLEN); else { open_fp(Fortfile); - (void) fseek(Fortfile->inf, Seekpts[0], 0); + (void) fseek(Fortfile->inf, (long)Seekpts[0], 0); nchar = 0; while (fgets(line, sizeof line, Fortfile->inf) != NULL && !STR_ENDSTRING(line, Fortfile->tbl)) @@ -276,20 +286,20 @@ fortlen() /* * This routine evaluates the arguments on the command line */ +void getargs(argc, argv) register int argc; register char **argv; { register int ignore_case; # ifndef NO_REGEX - register char *pat = NULL; /* 29 Sep 92*/ + register char *pat = NULL; # endif /* NO_REGEX */ extern char *optarg; extern int optind; int ch; ignore_case = FALSE; - /* pat = NULL;*/ /* 29 Sep 92*/ # ifdef DEBUG while ((ch = getopt(argc, argv, "aDefilm:osw")) != EOF) @@ -377,6 +387,7 @@ register char **argv; * form_file_list: * Form the file list from the file specifications. */ +int form_file_list(files, file_cnt) register char **files; register int file_cnt; @@ -436,6 +447,7 @@ register int file_cnt; * add_file: * Add a file to the file list. */ +int add_file(percent, file, dir, head, tail, parent) int percent; register char *file; @@ -602,6 +614,7 @@ char *file; * is_off_name: * Is the file an offensive-style name? */ +int is_off_name(file) char *file; { @@ -616,6 +629,7 @@ char *file; * Modify a FILEDESC element to be the parent of two children if * there are two children to be a parent of. */ +void all_forts(fp, offensive) register FILEDESC *fp; char *offensive; @@ -665,11 +679,12 @@ char *offensive; * add_dir: * Add the contents of an entire directory. */ +int add_dir(fp) register FILEDESC *fp; { register DIR *dir; - register struct dirent *dirent; + register struct dirent *dirent; auto FILEDESC *tailp; auto char *name; @@ -703,6 +718,7 @@ register FILEDESC *fp; * is_dir: * Return TRUE if the file is a directory, FALSE otherwise. */ +int is_dir(file) char *file; { @@ -721,9 +737,9 @@ char *file; * suffixes, as contained in suflist[], are ruled out. */ /* ARGSUSED */ +int is_fortfile(file, datp, posp, check_for_offend) -char *file; -char **datp, **posp; +char *file, **datp, **posp; int check_for_offend; { register int i; @@ -809,11 +825,11 @@ unsigned int len; * do_malloc: * Do a malloc, checking for NULL return. */ -char * +void * do_malloc(size) unsigned int size; { - char *new; + void *new; if ((new = malloc(size)) == NULL) { (void) fprintf(stderr, "fortune: out of memory.\n"); @@ -826,8 +842,9 @@ unsigned int size; * do_free: * Free malloc'ed space, if any. */ +void do_free(ptr) -char *ptr; +void *ptr; { if (ptr != NULL) free(ptr); @@ -837,6 +854,7 @@ char *ptr; * init_prob: * Initialize the fortune probabilities. */ +void init_prob() { register FILEDESC *fp, *last; @@ -908,6 +926,7 @@ init_prob() * get_fort: * Get the fortune data file's seek pointer for the next fortune. */ +void get_fort() { register FILEDESC *fp; @@ -1007,6 +1026,7 @@ FILEDESC *parent; * sum_noprobs: * Sum up all the noprob probabilities, starting with fp. */ +void sum_noprobs(fp) register FILEDESC *fp; { @@ -1023,6 +1043,7 @@ register FILEDESC *fp; did_noprobs = TRUE; } +int max(i, j) register int i, j; { @@ -1033,6 +1054,7 @@ register int i, j; * open_fp: * Assocatiate a FILE * with the given FILEDESC. */ +void open_fp(fp) FILEDESC *fp; { @@ -1046,6 +1068,7 @@ FILEDESC *fp; * open_dat: * Open up the dat file if we need to. */ +void open_dat(fp) FILEDESC *fp; { @@ -1060,6 +1083,7 @@ FILEDESC *fp; * Get the position from the pos file, if there is one. If not, * return a random number. */ +void get_pos(fp) FILEDESC *fp; { @@ -1083,13 +1107,14 @@ FILEDESC *fp; } if (++(fp->pos) >= fp->tbl.str_numstr) fp->pos -= fp->tbl.str_numstr; - DPRINTF(1, (stderr, "pos for %s is %d\n", fp->name, fp->pos)); + DPRINTF(1, (stderr, "pos for %s is %qd\n", fp->name, fp->pos)); } /* * get_tbl: * Get the tbl data file the datfile. */ +void get_tbl(fp) FILEDESC *fp; { @@ -1129,6 +1154,7 @@ FILEDESC *fp; * zero_tbl: * Zero out the fields we care about in a tbl structure. */ +void zero_tbl(tp) register STRFILE *tp; { @@ -1141,6 +1167,7 @@ register STRFILE *tp; * sum_tbl: * Merge the tbl data of t2 into t1. */ +void sum_tbl(t1, t2) register STRFILE *t1, *t2; { @@ -1157,6 +1184,7 @@ register STRFILE *t1, *t2; * print_file_list: * Print out the file list */ +void print_file_list() { print_list(File_list, 0); @@ -1166,6 +1194,7 @@ print_file_list() * print_list: * Print out the actual list, recursively. */ +void print_list(list, lev) register FILEDESC *list; int lev; @@ -1234,6 +1263,7 @@ register char *orig; * find_matches: * Find all the fortunes which match the pattern we've been given. */ +int find_matches() { Fort_len = maxlen_in_list(File_list); @@ -1251,6 +1281,7 @@ find_matches() * maxlen_in_list * Return the maximum fortune len in the file list. */ +int maxlen_in_list(list) FILEDESC *list; { @@ -1276,6 +1307,7 @@ FILEDESC *list; * matches_in_list * Print out the matches from the files in the list. */ +void matches_in_list(list) FILEDESC *list; { @@ -1314,6 +1346,7 @@ FILEDESC *list; } # endif /* NO_REGEX */ +void usage() { (void) fprintf(stderr, "fortune [-a"); diff --git a/fortune/fortune/pathnames.h b/fortune/fortune/pathnames.h index 739cc60c..b74569f8 100644 --- a/fortune/fortune/pathnames.h +++ b/fortune/fortune/pathnames.h @@ -1,6 +1,8 @@ +/* $NetBSD: pathnames.h,v 1.3 1995/03/23 08:28:42 cgd Exp $ */ + /*- - * Copyright (c) 1991 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,8 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: @(#)pathnames.h 5.2 (Berkeley) 4/8/91 - * $Id: pathnames.h,v 1.2 1993/08/01 18:54:47 mycroft Exp $ + * @(#)pathnames.h 8.1 (Berkeley) 5/31/93 */ #define FORTDIR "/usr/share/games/fortune" diff --git a/fortune/strfile/Makefile b/fortune/strfile/Makefile index 8bc08934..a8847445 100644 --- a/fortune/strfile/Makefile +++ b/fortune/strfile/Makefile @@ -1,5 +1,5 @@ -# from: @(#)Makefile 5.1 (Berkeley) 4/27/91 -# $Id: Makefile,v 1.4 1994/12/22 09:34:17 cgd Exp $ +# $NetBSD: Makefile,v 1.5 1995/03/23 08:28:44 cgd Exp $ +# @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= strfile MAN= strfile.8 diff --git a/fortune/strfile/strfile.8 b/fortune/strfile/strfile.8 index 9178f49d..98836103 100644 --- a/fortune/strfile/strfile.8 +++ b/fortune/strfile/strfile.8 @@ -1,5 +1,7 @@ -.\" Copyright (c) 1989, 1991 The Regents of the University of California. -.\" All rights reserved. +.\" $NetBSD: strfile.8,v 1.3 1995/03/23 08:28:45 cgd Exp $ +.\" +.\" Copyright (c) 1989, 1991, 1993 +.\" The Regents of the University of California. All rights reserved. .\" .\" .\" This code is derived from software contributed to Berkeley by @@ -33,10 +35,9 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" from: @(#)strfile.8 5.9 (Berkeley) 3/16/91 -.\" $Id: strfile.8,v 1.2 1993/08/01 07:46:52 mycroft Exp $ +.\" @(#)strfile.8 8.1 (Berkeley) 6/9/93 .\" -.Dd March 16, 1991 +.Dd June 9, 1993 .Dt STRFILE 8 .Os BSD 4 .Sh NAME @@ -143,6 +144,5 @@ default output file. .El .Sh HISTORY The -.Nm -command -.Ud +.Nm strfile +utility first appeared in 4.4BSD. diff --git a/fortune/strfile/strfile.c b/fortune/strfile/strfile.c index 47246c08..3b8b20d8 100644 --- a/fortune/strfile/strfile.c +++ b/fortune/strfile/strfile.c @@ -1,6 +1,8 @@ +/* $NetBSD: strfile.c,v 1.3 1995/03/23 08:28:47 cgd Exp $ */ + /*- - * Copyright (c) 1989 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ken Arnold. @@ -35,14 +37,17 @@ */ #ifndef lint -char copyright[] = -"@(#) Copyright (c) 1989 The Regents of the University of California.\n\ - All rights reserved.\n"; +static char copyright[] = +"@(#) Copyright (c) 1989, 1993\n\ + The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -/*static char sccsid[] = "from: @(#)strfile.c 5.12 (Berkeley) 4/8/91";*/ -static char rcsid[] = "$Id: strfile.c,v 1.2 1993/08/01 18:54:43 mycroft Exp $"; +#if 0 +static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93"; +#else +static char rcsid[] = "$NetBSD: strfile.c,v 1.3 1995/03/23 08:28:47 cgd Exp $"; +#endif #endif /* not lint */ # include <machine/endian.h> diff --git a/fortune/strfile/strfile.h b/fortune/strfile/strfile.h index 1000a886..48efc747 100644 --- a/fortune/strfile/strfile.h +++ b/fortune/strfile/strfile.h @@ -1,6 +1,8 @@ +/* $NetBSD: strfile.h,v 1.3 1995/03/23 08:28:49 cgd Exp $ */ + /*- - * Copyright (c) 1991 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ken Arnold. @@ -33,8 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * from: @(#)strfile.h 5.8 (Berkeley) 4/8/91 - * $Id: strfile.h,v 1.2 1993/08/01 18:54:44 mycroft Exp $ + * @(#)strfile.h 8.1 (Berkeley) 5/31/93 */ #define STR_ENDSTRING(line,tbl) \ diff --git a/fortune/tools/Do_spell b/fortune/tools/Do_spell index d997392e..1961a112 100644 --- a/fortune/tools/Do_spell +++ b/fortune/tools/Do_spell @@ -1,4 +1,5 @@ #!/bin/sh - +# $NetBSD: Do_spell,v 1.2 1995/03/23 08:28:50 cgd Exp $ # # @(#)Do_spell 8.1 (Berkeley) 5/31/93 # diff --git a/fortune/tools/Do_troff b/fortune/tools/Do_troff index 52cb282b..6df4ee62 100644 --- a/fortune/tools/Do_troff +++ b/fortune/tools/Do_troff @@ -1,4 +1,5 @@ #!/bin/csh -f +# $NetBSD: Do_troff,v 1.2 1995/03/23 08:28:52 cgd Exp $ # # @(#)Do_troff 8.1 (Berkeley) 5/31/93 # diff --git a/fortune/tools/Troff.mac b/fortune/tools/Troff.mac index c2b433e1..43231f3b 100644 --- a/fortune/tools/Troff.mac +++ b/fortune/tools/Troff.mac @@ -1,3 +1,5 @@ +.\" $NetBSD: Troff.mac,v 1.2 1995/03/23 08:28:53 cgd Exp $ +.\" .nr tp 8 .nr hm 3v .nr fm 2v diff --git a/fortune/tools/do_sort b/fortune/tools/do_sort index b868a4c2..ddae1ace 100644 --- a/fortune/tools/do_sort +++ b/fortune/tools/do_sort @@ -1,4 +1,5 @@ #! /bin/sh +# $NetBSD: do_sort,v 1.2 1995/03/23 08:28:54 cgd Exp $ # # @(#)do_sort 8.1 (Berkeley) 5/31/93 # diff --git a/fortune/unstr/Makefile b/fortune/unstr/Makefile index c884c67d..2619580a 100644 --- a/fortune/unstr/Makefile +++ b/fortune/unstr/Makefile @@ -1,5 +1,5 @@ -# from: @(#)Makefile 5.1 (Berkeley) 4/27/91 -# $Id: Makefile,v 1.2 1993/08/01 05:45:17 mycroft Exp $ +# $NetBSD: Makefile,v 1.3 1995/03/23 08:28:58 cgd Exp $ +# @(#)Makefile 8.1 (Berkeley) 5/31/93 PROG= unstr NOMAN= noman diff --git a/fortune/unstr/unstr.c b/fortune/unstr/unstr.c index 59bd4b68..5ea33d26 100644 --- a/fortune/unstr/unstr.c +++ b/fortune/unstr/unstr.c @@ -1,6 +1,8 @@ +/* $NetBSD: unstr.c,v 1.3 1995/03/23 08:29:00 cgd Exp $ */ + /*- - * Copyright (c) 1991 The Regents of the University of California. - * All rights reserved. + * Copyright (c) 1991, 1993 + * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * Ken Arnold. @@ -35,14 +37,13 @@ */ #ifndef lint -char copyright[] = -"@(#) Copyright (c) 1991 The Regents of the University of California.\n\ - All rights reserved.\n"; +static char copyright[] = +"@(#) Copyright (c) 1991, 1993\n\ + The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ #ifndef lint -/*static char sccsid[] = "from: @(#)unstr.c 5.8 (Berkeley) 4/8/91";*/ -static char rcsid[] = "$Id: unstr.c,v 1.2 1993/08/01 18:54:39 mycroft Exp $"; +static char sccsid[] = "@(#)unstr.c 8.1 (Berkeley) 5/31/93"; #endif /* not lint */ /* |