add missing files

git-svn-id: file:///srv/svn/joey/trunk/src/packages/bsdgames@9776 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
joey
2003-12-19 20:16:57 +00:00
parent 51eabc017b
commit 8df0f09c16
26 changed files with 96704 additions and 0 deletions

View File

@@ -0,0 +1,77 @@
# $NetBSD: Makefile,v 1.33 2002/10/22 16:14:04 drochner Exp $
# @(#)Makefile 8.2 (Berkeley) 4/19/94
.include <bsd.own.mk> # for INSTALL_OFFENSIVE_FORTUNES
SRCFILES= fortunes fortunes2 startrek zippy unamerican-o limerick \
netbsd farber
DATFILES= fortunes.dat fortunes2.dat startrek.dat zippy.dat \
fortunes-o fortunes-o.dat fortunes2-o fortunes2-o.dat \
limerick.dat limerick-o limerick-o.dat unamerican-o \
unamerican-o.dat netbsd.dat netbsd-o netbsd-o.dat \
farber.dat
# TO AVOID INSTALLING THE POTENTIALLY OFFENSIVE FORTUNES, RUN 'make' with
# "INSTALL_OFFENSIVE_FORTUNES=NO", or set "INSTALL_OFFENSIVE_FORTUNES=NO"
# IN bsd.own.mk OR /etc/mk.conf.
INSTALL_OFFENSIVE_FORTUNES?= YES
.if (${INSTALL_OFFENSIVE_FORTUNES} == "YES")
TYPE= real
.else
TYPE= fake
.endif
CLEANFILES+=${DATFILES}
STRFILEDIR!=cd $(.CURDIR)/../strfile; ${PRINTOBJDIR}
STRFILE=${STRFILEDIR}/strfile
.if ${MKSHARE} != "no"
FILES=${SRCFILES} ${DATFILES}
FILESDIR=/usr/share/games/fortune
.endif
realall: ${DATFILES}
# Normal fortunes: build directly from data files.
fortunes.dat fortunes2.dat startrek.dat zippy.dat limerick.dat netbsd.dat farber.dat:
${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET}
fortunes.dat: fortunes
fortunes2.dat: fortunes2
startrek.dat: startrek
zippy.dat: zippy
limerick.dat: limerick
netbsd.dat: netbsd
farber.dat: farber
# Obscene fortunes: we have to build source and data files
fortunes-o: fortunes-o.${TYPE}
tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
fortunes-o.dat: fortunes-o
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
fortunes2-o: fortunes2-o.${TYPE}
tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
fortunes2-o.dat: fortunes2-o
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
limerick-o: limerick-o.${TYPE}
tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
limerick-o.dat: limerick-o
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
unamerican-o: unamerican-o.${TYPE}
tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
unamerican-o.dat: unamerican-o
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
netbsd-o: netbsd-o.${TYPE}
tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
netbsd-o.dat: netbsd-o
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
.include <bsd.prog.mk>

16287
fortune/datfiles/fortunes Normal file

File diff suppressed because it is too large Load Diff

55876
fortune/datfiles/fortunes2 Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

50
fortune/datfiles/limerick Normal file
View File

@@ -0,0 +1,50 @@
A computer called Illiac4
Had a rather tough bug in its core.
It chewed up its cards
And spewed yards and yards
Of illegible tape on the floor.
%
A computer, to print out a fact,
Will divide, multiply, and subtract.
But this output can be
No more than debris,
If the input was short of exact.
-- Gigo
%
A dreary young bank clerk named Fennis
Wished to foster an aura of menace;
To make people afraid
He wore gloves of grey suede
And white footgear intended for tennis.
-- Edward Gorey
%
A hacker who screwed a mag tape
Was caught and convicted of rape.
To jail he did go,
From which, to his woe
He couldn't get out with ESC.
%
A linguist thought it a farce
That memory space was so sparse.
One day they increased it.
Said he as he seized it:
"At last! Enough core for the parse".
%
A progressive professor named Winners
Held classes each evening for sinners.
They were graded and spaced
So the vile and debased
Would not be held back by beginners.
%
A very intelligent turtle
Found programming UNIX a hurdle
The system, you see,
Ran as slow as did he,
And that's not saying much for the turtle.
%
There was a young lady from Niger
Who smiled as she rode on a tiger;
They returned from the ride
With the lady inside,
And the smile on the face of the tiger.
%

543
fortune/datfiles/netbsd Normal file
View File

@@ -0,0 +1,543 @@
%____ __ _ ____ __ __ ___ ___ ___
___ / | / /__ _/ /_ / |/ __\ / _ |
__ / |/ // _\/_ _/ / ' / \_ \ / / /
_ / /| // __/ / /_ / , | __/ // / ,/
/_/ |__/_\__/__\__//___/__\__//___'
-- Greywolf
%
- What's up?
- All the NetBSD servers, of course..
-- Gavan Fantom
%
A _Real_ Operating System for _Real_ Hackers.
-- Greywolf
%
Anagrams for NetBSD core team:
Breasted cot men
Embraces dot net
Strobed teen cam
Aborted men sect
Emtomb DEC tears
-- Julian Assange
%
Anagrams for NetBSD core team:
Crested Boatmen
Resented Combat
Boast Decrement
Basement DEC rot
-- Julian Assange
%
Anagrams for NetBSD-core:
Bent Coders
Secret Bond
Robs DECNet
Cost Bender
-- Julian Assange
%
Anagrams for NetBSD-core:
Cot Benders
Be stern, Doc.
Net robs DEC
DEC robs Net
-- Julian Assange
%
http://www.imrryr.org/NetBSD/logo
-- R. C. Dowdeswell
%
I didn't get where I am today without using NetBSD
-- Dave Tyson
%
My other computer runs NetBSD
-- Allen Briggs
%
NetBSD - a devil of an operating system.
-- Julian Assange
%
NetBSD - A Mycroft in every port.
-- Julian Assange
%
NetBSD - a server in every port.
-- Julian Assange
%
NetBSD - because Unix isn't just #include <linux.h>, i386, ELF, ...!
-- Hubert Feyrer
%
NetBSD - big, isn't it?
-- Julian Assange
%
NetBSD - daemonic power
-- R. C. Dowdeswell
%
NetBSD: Flying into the heart of the Sun. And the i386, and alpha,
and mac, and powerpc, and...
-- Greywolf
%
NetBSD - free yourself from all Stallmanist thought!
-- Julian Assange
%
NetBSD: Got source?
%
NetBSD - hackers tested, mom approved
-- Ken Nakata
%
NetBSD - here today and in the middle of 2038 tomorrow.
-- Julian Assange
%
NetBSD - Mach 3 stealthOS, undetectable by media radar.
-- Julian Assange
%
NetBSD - more is more.
-- Julian Assange
%
NetBSD: No Windows or Gates, but lots of doors, portals and tunnels.
-- Greywolf
%
NetBSD - penguin flesh never tasted so good.
-- Julian Assange
%
NetBSD - posix me harder.
-- Julian Assange
%
NetBSD: Post No Bills.
-- Greywolf
%
NetBSD - safe ports in a storm.
-- Julian Assange
%
NetBSD - Scalability Does Matter.
-- Julian Assange
%
NetBSD - Serious Other, or Serious Operating system. Your choice.
-- Julian Assange
%
NetBSD - the Berkeley redemption.
-- Julian Assange
%
NetBSD - the cathedral versus the bizarre.
-- Julian Assange
%
NetBSD - the cure.
-- Julian Assange
%
NetBSD - the devil finds work for idle cycles.
-- Julian Assange
%
NetBSD - the devil made me do it.
-- Julian Assange
%
NetBSD - the devil's advocate.
-- Julian Assange
%
NetBSD - the devil's not just in vaudeville.
-- Julian Assange
%
NetBSD - the power to suave.
-- Julian Assange
%
NetBSD - the power to swerve (penguins, worse than cane toads).
-- Julian Assange
%
NetBSD: The Source is out there.
-- Greywolf
%
NetBSD - The undiscriminated geek UNIX
-- Richard Rauch
%
NetBSD - we have nothing to declare but our benchmarks.
-- Julian Assange
%
NetBSD - we put the Net in NetBSD.
-- Julian Assange
%
NetBSD - We're not in canvas anymore, toto
-- Julian Assange
%
NetBSD - where do you want to go Tuesday?
-- Julian Assange
%
NetBSD - Will even run on i386
-- Brian Hechinger
%
NetBSD - your basement or mine?
-- Julian Assange
%
NetBSD: A drinking group with a serious computing problem.
%
NetBSD: A pmap for every occasion.
-- David Brownlee
%
NetBSD: Abandon all hype, oh ye who enter here.
%
NetBSD: Agnostics in the Platform Religious Wars.
-- Erik E. Fair
%
NetBSD: An Operating System For Everyone
-- Mike Latinovich
%
NetBSD: Are you old enough to run it?
-- Tom Harvey
%
NetBSD: Beyond Windows
-- Johan Ihren
%
NetBSD: CD-ROMs? We don't need no stinkin' CD-ROMs!
-- Tom Harvey
%
NetBSD: Choose Your Own Slogan
-- Dirk Myers
%
NetBSD: Compatible with the Real World.
-- Greywolf
%
NetBSD: Dave Barry is working on our motto
-- Tom Harvey
%
NetBSD: demonic power.
-- R. C. Dowdeswell
%
NetBSD: Designed to be {secure, reliable, portable, CORRECT}
-- Matthew Orgass
%
NetBSD: Download one, get ${NUMPORTS}-1 for free.
%
NetBSD: Empowering the VAX generation.
-- Andy Doran
%
NetBSD: Everyone else is doin' it. But we're doin' it right.
-- Herb Peyerl
%
NetBSD, Feed The Computer.
-- Andrew Gillham
%
NetBSD: Flexible and free!
-- Lars-Johan Liman
%
NetBSD: For The Network Generation
-- Andrew Gillham
%
NetBSD: Get Over It.
-- Andrew Gillham
%
NetBSD: Groovy Baby!
-- Andrew Gillham
%
NetBSD home page: Ultra-heavy use of blink text, hot colours, and
Flash plug-ins. All shockwave, all the time. Background music
ought to be a mixture of Phillip Glass overlaid on top of
Sublime.
-- Mason Loring Bliss
%
NetBSD: I Wanna Be Sedated
-- Curt Sampson
%
NetBSD: If you look through Windows
-- Johan Ihren
%
NetBSD: If your server could choose, it would choose NetBSD
-- Tim Rightnour
%
NetBSD, In Stalls Anywhere
-- Andrew Gillham
%
NetBSD is full. Go away.
-- Chris Baird <cjb@brushtail.apana.org.au>
%
NetBSD is much like a tipi: No windows, no gates, and an apache inside.
%
NetBSD is PAR -- Powerful, Advanced, Reliable. Is your OS up to PAR?
-- Frank Warren
%
NetBSD is the bomb. (ok, bad idea)
-- Andrew Gillham
%
NetBSD: It keeps on going...and going...and going...
-- Tom Harvey
%
NetBSD: It spanks the knickers off those other operating systems
-- Brian D Chase
%
NetBSD: it'll be there when you're ready for it
-- Greg Lehey
%
NetBSD: it's not free beer, but it's free
%
NetBSD: Its not Windows.
-- Paul Wain
%
NetBSD: It's...uh...well...have you heard of linux?
-- Tom Harvey
%
NetBSD: lets get it right
-- David Brownlee
%
NetBSD: Linux without the hype.
-- Hubert Feyrer
%
NetBSD: making all computer hardware a commodity.
-- Erik E. Fair
%
NetBSD: Making your net work, and its free to boot!
-- Steve Woodford
%
NetBSD: Masterly with distinction. Striking also.
-- Andy Doran
%
NetBSD: May the Source be with you
-- Greg Earle
%
NetBSD: Microsoft ask you where you want to go, NetBSD gets you there
-- David Brownlee
%
NetBSD, More Nines.
-- Andrew Gillham
%
NetBSD: Multi-platform OS
%
NetBSD: My Computer Runs!
-- Andrew Gillham
%
NetBSD: My Computer Works!
-- Andrew Gillham
%
NetBSD: My other computer also runs NetBSD.
-- David Brownlee
%
NetBSD, Net Improvement.
-- Andrew Gillham
%
NetBSD, Net Profit.
-- Andrew Gillham
%
NetBSD, Net Some Nines.
-- Andrew Gillham
%
NetBSD: Network Power Unleashed.
-- Andrew Gillham
%
NetBSD: Network Your World.
-- Andrew Gillham
%
NetBSD: Networking Space
-- Andrew Gillham
%
NetBSD: No hype required.
-- David Brownlee
%
NetBSD, No Worries!
-- Andrew Gillham
%
NetBSD: Not all of the First Ones have gone away.
%
NetBSD. Not Guano.
-- Hubert Feyrer
%
NetBSD: Not your mother's OS (unless you are P. Seebach)
-- Tom Harvey
%
NetBSD: Oh my god! They support my hardware! You hackers!
%
NetBSD: Perpetual performance!
-- Lars-Johan Liman
%
NetBSD: Pink fluffy chunks or green bits - the choice is yours.
-- Andy Doran
%
NetBSD: Ports to * boards.
-- Steve Woodford
%
NetBSD: Power Your Net.
-- Andrew Gillham
%
NetBSD: preferred by Rocket Scientists and Moms!
-- Steven J. Dovich
%
NetBSD: priapic OS
-- Perry Metzger
%
NetBSD: Professionalpower!
-- Lars-Johan Liman
%
NetBSD: "Progress on your system is closer than it appears."
%
NetBSD: Raiders of the Lost Arch
%
NetBSD: Re: NetBSD Slogans
-- Mirian Crzig Lennox
%
NetBSD: Resistance is futile! You will be supported.
-- Peter Seebach
%
NetBSD: Resistance is NOT futile!
-- Hubert Feyrer
%
NetBSD: Rock solid!
-- Lars-Johan Liman
%
NetBSD: Servers' choice!
-- Lars-Johan Liman
%
NetBSD: serves you right.
-- Herb Peyerl
%
NetBSD short theme, for stickers and tattoos: NetBSD... Bitchin'!
-- Mason Loring Bliss
%
NetBSD, SIMMs Like Good Code
-- Andrew Gillham
%
NetBSD: Someday, we won't burn your toast
-- Herb Peyerl
%
NetBSD: Stable and strong!
-- Lars-Johan Liman
%
NetBSD: Stop, Drop, and Load
-- Andrew Gillham
%
NetBSD, Tap The Power
-- Andrew Gillham
%
NetBSD: The choice of hundreds worldwide
-- Tom Harvey
%
NetBSD: The Final Frontier
-- Chris Jones
%
NetBSD: The free OS with a money back guarantee!
-- Tim Rightnour
%
NetBSD: the free unix for the rest of us
-- Bob Nestor
%
NetBSD: The Last Bastion of the true UNIX Religion.
-- Miles Nordin
%
NetBSD: The OS WORM - Write Once, Run Many
%
NetBSD: The Power of Code
-- Mason Loring Bliss
%
NetBSD: The power to Connect
-- Feico Dillema
%
NetBSD: The power to serve, also
-- Tom Harvey
%
NetBSD: The power to serve, on the platform of your choice
-- John Darrow
%
NetBSD: the second best thing you can get for free
%
NetBSD: the server is up
-- David Brownlee
%
NetBSD: The Worlds Most Portable Operating System
%
NetBSD/toaster: we wish the toaster to be happy too.
%
NetBSD: To serve the power.
-- Herb Peyerl
%
NetBSD: true inheritors of the UNIX(tm) legacy.
-- Erik E. Fair
%
NetBSD: Twice the Bits-Clean of other Leading OSes
-- Tom Harvey
%
NetBSD: Two guys with a vax
-- Tom Harvey
%
NetBSD: u_long uptime;
-- Herb Peyerl
%
NetBSD: unshackling hardware designers and users from the bondage
of WinTel.
-- Erik E. Fair
%
NetBSD: Use the ENTIRE computer!
-- Andrew Gillham
%
NetBSD: userland included
%
NetBSD: We Come In Peace.
-- Andrew Gillham
%
NetBSD: We come in peace. We offer reliability.
-- David Maxwell
%
NetBSD: We do it right.
-- Perry Metzger
%
NetBSD: We don't negotiate with terrorists.
-- Miles Nordin
%
NetBSD: We put the "Net" in "BSD", and took out the "Free"
-- Tom Harvey
%
NetBSD: We Stay Up.
-- Andrew Gillham
%
NetBSD: We Suck Less
%
NetBSD: We're so committed to it being free, we won't sell it to you
even if you ask!
-- Charles M. Hannum
%
NetBSD: What do you want to serve today?
-- Hubert Feyrer
%
NetBSD: When Linux ports to that platform, they will discover -
WE HAVE ALWAYS BEEN HERE
-- David Maxwell
%
NetBSD: Where do you want to have the power to serve, tomorrow?
-- Tom Harvey
%
NetBSD: Who do you Serve? And who do you Trust?
-- David Maxwell
%
NetBSD will put hair on a UNIX admin's chest
-- Jason R. Fink
%
NetBSD: Write Once, Run Everywhere. Java optional.
-- Todd Whitesel
%
NetBSD: You can't handle it.
-- Paul Newhouse
%
NetBSD: You choose the hardware, we'll bring the OS.
-- David Brownlee
%
Of course it runs NetBSD.
%
Portable. Supportable. NetBSD.
-- Jim Wise
%
Software is like sex - it should be free
-- Hubert Feyrer
%
We're BSD. If you want System V, you know where to get it.
-- Greywolf
%
Where would you have rather been today, tomorrow? NetBSD.
-- Allen Briggs
%
With many thanks to the core team and UCB CSRG.
-- Greywolf
%
Young or old; cutting edge or yesterday's NeWS, NetBSD is the UNIX for you.
It can be a hulking monster in your basement, or fit in the palm
of your hand.
-- Richard Rauch
%
#netbsd - where monks recite their internal dialogue while debugging.
-- Bernhard Riedel
%
I held off from Uni until NetBSD came out.
I decided, ``if there's no NetBSD then I'll just flip burgers''
-- Roland Dowdeswell
%
NetBSD - love all, serve all.
-- Silke Mueller
%

View File

@@ -0,0 +1,171 @@
.\" $NetBSD: fortune.6,v 1.9 2002/09/26 18:32:01 wiz 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.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 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
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)fortune.6 8.3 (Berkeley) 4/19/94
.\"
.Dd April 19, 1994
.Dt FORTUNE 6
.Os
.Sh NAME
.Nm fortune
.Nd print a random, hopefully interesting, adage
.Sh SYNOPSIS
.Nm
.Op Fl aefilosw
.Op Fl m Ar pattern
.Oo
.Op Ar N%
.Ar file/dir/all
.Oc
.Sh DESCRIPTION
When
.Nm
is run with no arguments it prints out a random epigram.
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 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).
.It Fl f
Print out the list of files which would be searched, but don't
print a fortune.
.It Fl l
Long dictums only.
.It Fl m
Print out all fortunes which match the regular expression
.Ar pattern .
See
.Xr regex 3
for a description of patterns.
.It Fl o
Choose only from potentially offensive aphorisms.
.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
.Fl o
rather than give us grief about it, okay?)
.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
.Ed
.It Fl s
Short apothegms only.
.It Fl i
Ignore case for
.Fl m
patterns.
.It Fl w
Wait before termination for an amount of time calculated from the
number of characters in the message.
This is useful if it is executed as part of the logout procedure
to guarantee that the message can be read before the screen is cleared.
.El
.Pp
The user may specify alternative sayings.
You can specify a specific file, a directory which contains one or
more files, or the special word
.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
.Ar % .
If it is, there will be a
.Ar N
percent probability that an adage will be picked from that file
or directory.
If the percentages do not sum to 100, and there are specifications
without percentages, the remaining percent will apply to those files
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
.Em funny
and
.Em not-funny ,
with
.Em funny
twice as big, saying
.Bd -literal -offset indent
fortune funny not-funny
.Ed
.Pp
will get you fortunes out of
.Em funny
two-thirds of the time.
The command
.Bd -literal -offset indent
fortune 90% funny 10% not-funny
.Ed
.Pp
will pick out 90% of its fortunes from
.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
.Bd -literal -offset indent
fortune -e
.Ed
.Pp
is equivalent to
.Bd -literal -offset indent
fortune 50% funny 50% not
.Em -funny
.Ed
.Sh FILES
.Bl -tag -width Pa -compact
.It Pa @sharedir@/fortunes
.El
.Sh SEE ALSO
.Xr regex 3

1424
fortune/fortune/fortune.c Normal file

File diff suppressed because it is too large Load Diff

147
fortune/strfile/strfile.8 Normal file
View File

@@ -0,0 +1,147 @@
.\" $NetBSD: strfile.8,v 1.10 2002/09/26 18:32:01 wiz 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
.\" Ken Arnold.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 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
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)strfile.8 8.1 (Berkeley) 6/9/93
.\"
.Dd June 9, 1993
.Dt STRFILE 8
.Os
.Sh NAME
.Nm strfile ,
.Nm unstr
.Nd "create a random access file for storing strings"
.Sh SYNOPSIS
.Nm strfile
.Op Fl iorsx
.Op Fl c Ar char
.Ar source_file
.Op Ar output_file
.Nm unstr
.Ar source_file
.Sh DESCRIPTION
.Nm
reads a file containing groups of lines separated by a line containing
a single percent
.Ql \&%
sign and creates a data file which contains
a header structure and a table of file offsets for each group of lines.
This allows random access of the strings.
.Pp
The output file, if not specified on the command line, is named
.Ar source_file Ns Sy .out .
.Pp
The options are as follows:
.Bl -tag -width "-c char"
.It Fl c Ar char
Change the delimiting character from the percent sign to
.Ar char .
.It Fl i
Ignore case when ordering the strings.
.It Fl o
Order the strings in alphabetical order.
The offset table will be sorted in the alphabetical order of the
groups of lines referenced.
Any initial non-alphanumeric characters are ignored.
This option causes the
.Dv STR_ORDERED
bit in the header
.Ar str_flags
field to be set.
.It Fl r
Randomize access to the strings.
Entries in the offset table will be randomly ordered.
This option causes the
.Dv STR_RANDOM
bit in the header
.Ar str_flags
field to be set.
.It Fl s
Run silently; don't give a summary message when finished.
.It Fl x
Note that each alphabetic character in the groups of lines is rotated
13 positions in a simple caesar cipher.
This option causes the
.Dv STR_ROTATED
bit in the header
.Ar str_flags
field to be set.
.El
.Pp
The format of the header is:
.Bd -literal
#define VERSION 1
unsigned long str_version; /* version number */
unsigned long str_numstr; /* # of strings in the file */
unsigned long str_longlen; /* length of longest string */
unsigned long str_shortlen; /* length of shortest string */
#define STR_RANDOM 0x1 /* randomized pointers */
#define STR_ORDERED 0x2 /* ordered pointers */
#define STR_ROTATED 0x4 /* rot-13'd text */
unsigned long str_flags; /* bit field for flags */
char str_delim; /* delimiting character */
.Ed
.Pp
All fields are written in big-endian byte order.
.Pp
The purpose of
.Nm unstr
is to undo the work of
.Nm strfile .
It prints out the strings contained in the file
.Ar source_file
in the order that they are listed in the header file
.Ar source_file Ns Sy .dat
to standard output.
It is possible to create sorted versions of input files by using
.Fl o
when
.Nm strfile
is run and then using
.Nm unstr
to dump them out in the table order.
.Sh SEE ALSO
.Xr byteorder 3 ,
.Xr fortune 6
.Sh FILES
.Bl -tag -width strfile.out -compact
.It Pa strfile.out
default output file.
.El
.Sh HISTORY
The
.Nm strfile
utility first appeared in
.Bx 4.4 .

View File

@@ -0,0 +1,9 @@
# $NetBSD: Makefile,v 1.7 2002/09/18 06:16:40 lukem Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
NOMAN= # defined
PROG= unstr
CPPFLAGS+= -I${.CURDIR}/../strfile
.include <bsd.prog.mk>