mirror of
https://github.com/vattam/BSDGames.git
synced 2025-12-20 19:04:49 +00:00
Initial revision
git-svn-id: file:///srv/svn/joey/bsdgames-trunk@5086 a4a2c43b-8ac3-0310-8836-e0e880c912e2
This commit is contained in:
8
fortune/Makefile.bsd
Normal file
8
fortune/Makefile.bsd
Normal file
@@ -0,0 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.7 1997/10/22 04:56:11 lukem Exp $
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
|
||||
SUBDIR= fortune strfile datfiles
|
||||
|
||||
all-datfiles: all-strfile
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
5
fortune/Makefrag
Normal file
5
fortune/Makefrag
Normal file
@@ -0,0 +1,5 @@
|
||||
# Makefrag - makefile fragment for fortune
|
||||
|
||||
fortune_all:
|
||||
|
||||
fortune_install:
|
||||
178
fortune/Notes
Normal file
178
fortune/Notes
Normal file
@@ -0,0 +1,178 @@
|
||||
# $NetBSD: Notes,v 1.2 1995/03/23 08:28:26 cgd Exp $
|
||||
# @(#)Notes 8.1 (Berkeley) 5/31/93
|
||||
|
||||
Warning:
|
||||
The fortunes contained in the fortune database have been collected
|
||||
haphazardly from a cacophony of sources, in number so huge it
|
||||
boggles the mind. It is impossible to do any meaningful quality
|
||||
control on attributions, or lack thereof, or exactness of the quote.
|
||||
Since this database is not used for profit, and since entire works
|
||||
are not published, it falls under fair use, as we understand it.
|
||||
However, if any half-assed idiot decides to make a profit off of
|
||||
this, they will need to double check it all, and nobody not involved
|
||||
of such an effort makes any warranty that anything in the database
|
||||
bears any relation to the real world of literature, law, or other
|
||||
bizzarrity.
|
||||
|
||||
==> GENERAL INFORMATION
|
||||
By default, fortune retrieves its fortune files from the directory
|
||||
/usr/share/games/fortune. A fortune file has two parts: the source file
|
||||
(which contains the fortunes themselves) and the data file which describes
|
||||
the fortunes. The data fil always has the same name as the fortune file
|
||||
with the string ".dat" concatenated, i.e. "fort" is the standard fortune
|
||||
database, and "fort.dat" is the data file which describes it. See
|
||||
strfile(8) for more information on creating the data files.
|
||||
Fortunes are split into potentially offensive and not potentially
|
||||
offensive parts. The offensive version of a file has the same name as the
|
||||
non-offensive version with "-o" concatenated, i.e. "fort" is the standard
|
||||
fortune database, and "fort-o" is the standard offensive database. The
|
||||
fortune program automatically assumes that any file with a name ending in
|
||||
"-o" is potentially offensive, and should therefore only be displayed if
|
||||
explicitly requested, either with the -o option or by specifying a file name
|
||||
on the command line.
|
||||
Potentially offensive fortune files should NEVER be maintained in
|
||||
clear text on the system. They are rotated (see caesar(6)) 13 positions.
|
||||
To create a new, potentially offensive database, use caesar to rotate it,
|
||||
and then create its data file with the -x option to strfile(8). The fortune
|
||||
program automatically decrypts the text when it prints entries from such
|
||||
databases.
|
||||
Anything which would not make it onto network prime time programming
|
||||
(or which would only be broadcast if some discredited kind of guy said it)
|
||||
MUST be in the potentially offensive database. Fortunes containing any
|
||||
explicit language (see George Carlin's recent updated list) MUST be in the
|
||||
potentially offensive database. Political and religious opinions are often
|
||||
sequestered in the potentially offensive section as well. Anything which
|
||||
assumes as a world view blatantly racist, mysogynist (sexist), or homophobic
|
||||
ideas should not be in either, since they are not really funny unless *you*
|
||||
are racist, mysogynist, or homophobic.
|
||||
The point of this is that people have should have a reasonable
|
||||
expectation that, should they just run "fortune", they will not be offended.
|
||||
We know that some people take offense at anything, but normal people do have
|
||||
opinions, too, and have a right not to have their sensibilities offended by
|
||||
a program which is supposed to be entertaining. People who run "fortune
|
||||
-o" or "fortune -a" are saying, in effect, that they are willing to have
|
||||
their sensibilities tweaked. However, they should not have their personal
|
||||
worth seriously (i.e., not in jest) assaulted. Jokes which depend for their
|
||||
humor on racist, mysogynist, or homophobic stereotypes *do* seriously
|
||||
assault individual personal worth, and in an general entertainment medium
|
||||
we should be able to get by without it.
|
||||
|
||||
==> FORMATTING
|
||||
This file describes the format for fortunes in the database. This
|
||||
is done in detail to make it easier to keep track of things. Any rule given
|
||||
here may be broken to make a better joke.
|
||||
|
||||
[All examples are indented by one tab stop -- KCRCA]
|
||||
|
||||
Numbers should be given in parentheses, e.g.,
|
||||
|
||||
(1) Everything depends.
|
||||
(2) Nothing is always.
|
||||
(3) Everything is sometimes.
|
||||
|
||||
Attributions are two tab stops, followed by two hyphens, followed by a
|
||||
space, followed by the attribution, and are *not* preceded by blank
|
||||
lines. Book, journal, movie, and all other titles are in quotes, e.g.,
|
||||
|
||||
$100 invested at 7% interest for 100 years will become $100,000, at
|
||||
which time it will be worth absolutely nothing.
|
||||
-- Lazarus Long, "Time Enough for Love"
|
||||
|
||||
Attributions which do not fit on one (72 char) line should be continued
|
||||
on a line which lines up below the first text of the attribution, e.g.,
|
||||
|
||||
-- A very long attribution which might not fit on one
|
||||
line, "Ken Arnold's Stupid Sayings"
|
||||
|
||||
Single paragraph fortunes are in left justified (non-indented) paragraphs
|
||||
unless they fall into another category listed below (see example above).
|
||||
Longer fortunes should also be in left justified paragraphs, but if this
|
||||
makes it too long, try indented paragraphs, with indentations of either one
|
||||
tab stop or 5 chars. Indentations of less than 5 are too hard to read.
|
||||
|
||||
Laws have the title left justified and capitalized, followed by a colon,
|
||||
with all the text of the law itself indented one tab stop, initially
|
||||
capitalized, e.g.,
|
||||
|
||||
A Law of Computer Programming:
|
||||
Make it possible for programmers to write in English and
|
||||
you will find the programmers cannot write in English.
|
||||
|
||||
Limericks are indented as follows, all lines capitalized:
|
||||
|
||||
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.
|
||||
|
||||
Accents precede the letter they are over, e.g., "`^He" for e with a grave
|
||||
accent. Underlining is done on a word-by-word basis, with the underlines
|
||||
preceding the word, e.g., "__^H^Hhi ____^H^H^H^Hthere".
|
||||
|
||||
No fortune should run beyond 72 characters on a single line without good
|
||||
justification (er, no pun intended). And no right margin justification,
|
||||
either. Sorry. For BSD people, there is a program called "fmt" which can
|
||||
make this kind of formatting easier.
|
||||
|
||||
Definitions are given with the word or phrase left justified, followed by
|
||||
the part of speech (if appropriate) and a colon. The definition starts
|
||||
indented by one tab stop, with subsequent lines left justified, e.g.,
|
||||
|
||||
Afternoon, n.:
|
||||
That part of the day we spend worrying about how we wasted
|
||||
the morning.
|
||||
|
||||
Quotes are sometimes put around statements which are funnier or make more
|
||||
sense if they are understood as being spoken, rather than written,
|
||||
communication, e.g.,
|
||||
|
||||
"All my friends and I are crazy. That's the only thing that
|
||||
keeps us sane."
|
||||
|
||||
Ellipses are always surrounded by spaces, except when next to punctuation,
|
||||
and are three dots long.
|
||||
|
||||
"... all the modern inconveniences ..."
|
||||
-- Mark Twain
|
||||
|
||||
Human initials always have spaces after the periods, e.g, "P. T. Barnum",
|
||||
not "P.T. Barnum". However, "P.T.A.", not "P. T. A.".
|
||||
|
||||
All fortunes should be attributed, but if and only if they are original with
|
||||
somebody. Many people have said things that are folk sayings (i.e., are
|
||||
common among the folk (i.e., us common slobs)). There is nothing wrong with
|
||||
this, of course, but such statements should not be attributed to individuals
|
||||
who did not invent them.
|
||||
|
||||
Horoscopes should have the sign indented by one tab stop, followed by the
|
||||
dates of the sign, with the text left justified below it, e.g.,
|
||||
|
||||
AQUARIUS (Jan 20 - Feb 18)
|
||||
You have an inventive mind and are inclined to be progressive. You
|
||||
lie a great deal. On the other hand, you are inclined to be
|
||||
careless and impractical, causing you to make the same mistakes over
|
||||
and over again. People think you are stupid.
|
||||
|
||||
Single quotes should not be used except as quotes within quotes. Not even
|
||||
single quotes masquerading as double quotes are to be used, e.g., don't say
|
||||
``hi there'' or `hi there' or 'hi there', but "hi there". However, you
|
||||
*can* say "I said, `hi there'".
|
||||
|
||||
A long poem or song can be ordered as follows in order to make it fit on a
|
||||
screen (fortunes should be 19 lines or less if at all possible) (numbers
|
||||
here are stanza numbers):
|
||||
|
||||
11111111111111111111
|
||||
11111111111111111111
|
||||
11111111111111111111 22222222222222222222
|
||||
11111111111111111111 22222222222222222222
|
||||
22222222222222222222
|
||||
33333333333333333333 22222222222222222222
|
||||
33333333333333333333
|
||||
33333333333333333333 44444444444444444444
|
||||
33333333333333333333 44444444444444444444
|
||||
44444444444444444444
|
||||
44444444444444444444
|
||||
|
||||
|
||||
41
fortune/README
Normal file
41
fortune/README
Normal file
@@ -0,0 +1,41 @@
|
||||
# $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
|
||||
systems. If you're absolutely, *positively*, without-a-shadow-of-a-doubt
|
||||
sure that your user community wants them installed, whack the Makefile
|
||||
in the subdirectory datfiles, and do "make all install".
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
Some years ago, my neighbor Avery said to me: "There has not been an
|
||||
adequate jokebook published since "Joe_Miller", which came out in 1739 and
|
||||
which, incidentally, was the most miserable no-good ... jokebook in the
|
||||
history of the printed word."
|
||||
In a subsequent conversation, Avery said: "A funny story is a funny
|
||||
story, no matter who is in it - whether it's about Catholics or Protestants,
|
||||
Jews or Gentiles, blacks or whites, browns or yellows. If a story is genuinely
|
||||
funny it makes no difference how dirty it is. Shout it from the rooftops.
|
||||
Let the chips fall all over the prairie and let the bonehead wowsers yelp.
|
||||
... on them."
|
||||
It is a nice thing to have a neighbor of Avery's grain. He has
|
||||
believed in the aforestated principles all his life. A great many other
|
||||
people nowadays are casting aside the pietistic attitude that has led them
|
||||
to plug up their ears against the facts of life. We of The Brotherhood
|
||||
believe as Avery believes; we have never been intimidated by the pharisaical
|
||||
meddlers who have been smelling up the American landscape since the time of
|
||||
the bundling board. Neither has any one of our members ever been called a
|
||||
racist. Still, we have been in unremitting revolt against the ignorant
|
||||
propensity which ordains, in effect, that "The Green Pastures" should never
|
||||
have been written; the idiot attitude which compelled Arthur Kober to abandon
|
||||
his delightful Bella Gross, and Octavius Roy Cohen to quit writing about the
|
||||
splendiferous Florian Slappey; the moronic frame of mind which, if carried
|
||||
to its logical end, would have forbidden Ring Lardner from writing in the
|
||||
language of the masses.
|
||||
-- H. Allen Smith, "Rude Jokes"
|
||||
|
||||
... 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.
|
||||
-- H. Allen Smith, "Rude Jokes"
|
||||
22
fortune/README.linux
Normal file
22
fortune/README.linux
Normal file
@@ -0,0 +1,22 @@
|
||||
README.linux for fortune
|
||||
========================
|
||||
|
||||
Here is one port of fortune for Linux. Alternatively, you may wish to
|
||||
use the enhanced version available from
|
||||
<ftp://sunsite.unc.edu/pub/Linux/games/amusements/fortune-mod.tar.gz>.
|
||||
|
||||
unstr is not installed by default. If you want to install it,
|
||||
uncomment the relevant lines (installation command and definition of
|
||||
fortune_unstr_DIRS) in unstr/Makefrag before doing the top level `make
|
||||
install'.
|
||||
|
||||
Offensive fortunes:
|
||||
|
||||
The "offensive" fortunes (not very offensive) are disabled by default.
|
||||
If you want the "offensive" fortunes, answer 'y' to the question when
|
||||
running configure.
|
||||
|
||||
Have fun!
|
||||
Andy
|
||||
|
||||
[ This README.linux subsequently extensively modified - JSM ]
|
||||
59
fortune/datfiles/Makefile.bsd
Normal file
59
fortune/datfiles/Makefile.bsd
Normal file
@@ -0,0 +1,59 @@
|
||||
# $NetBSD: Makefile,v 1.20 1997/10/10 13:04:33 lukem Exp $
|
||||
# @(#)Makefile 8.2 (Berkeley) 4/19/94
|
||||
|
||||
.include <bsd.own.mk> # for INSTALL_OFFENSIVE_FORTUNES
|
||||
|
||||
SRCFILES= fortunes fortunes2 startrek zippy
|
||||
DATFILES= fortunes.dat fortunes2.dat startrek.dat zippy.dat \
|
||||
fortunes-o fortunes-o.dat fortunes2-o fortunes2-o.dat \
|
||||
limerick limerick.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}
|
||||
|
||||
STRFILE!=cd $(.CURDIR)/../strfile; \
|
||||
printf "xxx: .MAKE\n\t@echo \$${.OBJDIR}/strfile\n" | ${MAKE} -s -f-
|
||||
|
||||
FILES=${SRCFILES} ${DATFILES}
|
||||
FILESDIR=/usr/share/games/fortune
|
||||
|
||||
all: ${DATFILES}
|
||||
|
||||
# Normal fortunes: build directly from data files.
|
||||
|
||||
fortunes.dat fortunes2.dat startrek.dat zippy.dat:
|
||||
${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET}
|
||||
fortunes.dat: fortunes
|
||||
fortunes2.dat: fortunes2
|
||||
startrek.dat: startrek
|
||||
zippy.dat: zippy
|
||||
|
||||
# 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: limerick.${TYPE}
|
||||
tr [a-zA-Z] [n-za-mN-ZA-M] < ${.ALLSRC} > ${.TARGET}
|
||||
limerick.dat: limerick
|
||||
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
|
||||
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
39
fortune/datfiles/Makefrag
Normal file
39
fortune/datfiles/Makefrag
Normal file
@@ -0,0 +1,39 @@
|
||||
# Makefrag - makefile fragment for fortune/datfiles
|
||||
|
||||
fortune_datfiles_DATFILES := fortunes.dat fortunes2.dat startrek.dat zippy.dat
|
||||
fortune_datfiles_DATFILES_off := fortunes-o.dat fortunes2-o.dat limerick.dat
|
||||
fortune_datfiles_GENSRCFILES := fortunes-o fortunes2-o limerick
|
||||
fortune_datfiles_SRCFILES := fortunes fortunes2 startrek zippy
|
||||
|
||||
fortune_datfiles_DATFILESp := fortune/datfiles/fortunes.dat \
|
||||
fortune/datfiles/fortunes2.dat fortune/datfiles/startrek.dat \
|
||||
fortune/datfiles/zippy.dat
|
||||
fortune_datfiles_DATFILES_offp := fortune/datfiles/fortunes-o.dat \
|
||||
fortune/datfiles/fortunes2-o.dat fortune/datfiles/limerick.dat
|
||||
fortune_datfiles_GENSRCFILESp := fortune/datfiles/fortunes-o \
|
||||
fortune/datfiles/fortunes2-o fortune/datfiles/limerick
|
||||
fortune_datfiles_SRCFILESp := fortune/datfiles/fortunes \
|
||||
fortune/datfiles/fortunes2 fortune/datfiles/startrek \
|
||||
fortune/datfiles/zippy
|
||||
|
||||
fortune_datfiles_CLEANFILES := $(fortune_datfiles_DATFILES) $(fortune_datfiles_DATFILES_off) $(fortune_datfiles_GENSRCFILES)
|
||||
fortune_datfiles_DIRS := $(LIBDIR)/fortunes
|
||||
|
||||
fortune_datfiles_all: $(fortune_datfiles_DATFILESp) $(fortune_datfiles_DATFILES_offp) $(fortune_datfiles_SRCFILESp) $(fortune_datfiles_GENSRCFILESp)
|
||||
|
||||
fortune_datfiles_install: fortune_datfiles_all
|
||||
set -e; for f in $(fortune_datfiles_SRCFILES) \
|
||||
$(fortune_datfiles_GENSRCFILES) $(fortune_datfiles_DATFILES) \
|
||||
$(fortune_datfiles_DATFILES_off); do \
|
||||
$(INSTALL_DATA) fortune/datfiles/$$f \
|
||||
$(INSTALL_PREFIX)$(LIBDIR)/fortunes/$$f; \
|
||||
done
|
||||
|
||||
$(fortune_datfiles_DATFILESp): fortune/datfiles/%.dat: fortune/datfiles/% fortune/strfile/strfile
|
||||
fortune/strfile/strfile -rs $< $@
|
||||
|
||||
$(fortune_datfiles_DATFILES_offp): fortune/datfiles/%.dat: fortune/datfiles/% fortune/strfile/strfile
|
||||
fortune/strfile/strfile -rsx $< $@
|
||||
|
||||
$(fortune_datfiles_GENSRCFILESp): %: %.$(FORTUNE_TYPE)
|
||||
tr a-zA-Z n-za-mN-ZA-M <$< >$@
|
||||
16287
fortune/datfiles/fortunes
Normal file
16287
fortune/datfiles/fortunes
Normal file
File diff suppressed because it is too large
Load Diff
2
fortune/datfiles/fortunes-o.fake
Normal file
2
fortune/datfiles/fortunes-o.fake
Normal file
@@ -0,0 +1,2 @@
|
||||
There are no potentially offensive fortunes installed on this
|
||||
system. For further details, contact your system administrator.
|
||||
2029
fortune/datfiles/fortunes-o.real
Normal file
2029
fortune/datfiles/fortunes-o.real
Normal file
File diff suppressed because it is too large
Load Diff
299
fortune/datfiles/fortunes-o.sp.ok
Normal file
299
fortune/datfiles/fortunes-o.sp.ok
Normal file
@@ -0,0 +1,299 @@
|
||||
A.I
|
||||
ACLU's
|
||||
Aire
|
||||
Alzheimer's
|
||||
Andropov
|
||||
Angina
|
||||
Ansel
|
||||
Artz
|
||||
Aw
|
||||
BULLSHIT
|
||||
Begorrah
|
||||
Benchley
|
||||
Bierce
|
||||
Blore
|
||||
Bogart
|
||||
Bormann
|
||||
Byrn
|
||||
COUNTERFACTUAL
|
||||
Callay
|
||||
Calooh
|
||||
Caspar
|
||||
Castlereagh
|
||||
Cheerios
|
||||
Cianci
|
||||
Clair
|
||||
Coito
|
||||
Como
|
||||
Condoms
|
||||
Cosell's
|
||||
Counterfactual
|
||||
Crisco
|
||||
Crotels
|
||||
Cunnilingus
|
||||
DEMO
|
||||
Dalmatians
|
||||
Dammit
|
||||
Darjeeling
|
||||
Deferrals
|
||||
Degen
|
||||
Diddley
|
||||
Durcan
|
||||
Ermintrude's
|
||||
Ewald
|
||||
F.B.I
|
||||
FUCKING
|
||||
Fagin
|
||||
Faire
|
||||
Falwell
|
||||
Feiffer
|
||||
Fie
|
||||
Fornication
|
||||
Fredrick's
|
||||
Friants
|
||||
Froats
|
||||
Fuck
|
||||
Fumets
|
||||
GREAAAAAAT
|
||||
Galbraith
|
||||
Geis
|
||||
Gimme
|
||||
Goy's
|
||||
Graffito
|
||||
Greenway
|
||||
Groucho
|
||||
Haggis
|
||||
Heathcote
|
||||
Hefner
|
||||
Hitchhiker's
|
||||
Jewry
|
||||
Jr.'s
|
||||
KRON
|
||||
Kasha
|
||||
Krazy
|
||||
LeGuin
|
||||
Lehrer
|
||||
Li
|
||||
Libbers
|
||||
Liddy
|
||||
Lyth
|
||||
MOVs
|
||||
MX
|
||||
Mairowitz
|
||||
Mama
|
||||
Mannis
|
||||
Martina
|
||||
Masturbation
|
||||
McAmeter
|
||||
Methadone
|
||||
Milo
|
||||
Milpitas
|
||||
N'wam
|
||||
N.H
|
||||
Nader
|
||||
Naiman
|
||||
Navratilova
|
||||
Nope
|
||||
Nuke
|
||||
O'Riordan's
|
||||
Ozy
|
||||
PDP
|
||||
PUSHJ
|
||||
Penis
|
||||
Perelman
|
||||
Ph.D
|
||||
Ploughwright
|
||||
Purmal's
|
||||
Putrid
|
||||
Q.E.D
|
||||
Queensboro
|
||||
Randel
|
||||
Raygun
|
||||
Reaganomics
|
||||
Ren
|
||||
Rosten
|
||||
SMOORPLAY
|
||||
SMUCK
|
||||
SMURFS
|
||||
Sahl
|
||||
Schlafly
|
||||
Seldes
|
||||
Shits
|
||||
Sittin
|
||||
Spraints
|
||||
Stamboul
|
||||
Stickin
|
||||
Suckin
|
||||
Susiasm
|
||||
Tocata
|
||||
Tomlin
|
||||
Toynbee
|
||||
Tsk
|
||||
Twas
|
||||
Twinkie
|
||||
Twinkies
|
||||
Twiss
|
||||
U.S
|
||||
UFOs
|
||||
UUOs
|
||||
Valby
|
||||
Vasser
|
||||
Vidal
|
||||
Vidi
|
||||
Visme
|
||||
Waggying
|
||||
Wellesleysnatch
|
||||
Werderobe
|
||||
What'll
|
||||
Wiggam
|
||||
Wilde
|
||||
Wildebeest
|
||||
Wimley
|
||||
Ybarra
|
||||
Yoric
|
||||
Yuletide
|
||||
Zappa
|
||||
Zukav
|
||||
amnesia
|
||||
apoplexy
|
||||
asshole
|
||||
assholes
|
||||
basewoman
|
||||
belies
|
||||
bible
|
||||
bleed'n
|
||||
boobs
|
||||
bras
|
||||
brutish
|
||||
buffaloes
|
||||
bullshit
|
||||
bullshitting
|
||||
bungee
|
||||
busiasm
|
||||
carnivorous
|
||||
castration
|
||||
catgut
|
||||
cervical
|
||||
chromosome
|
||||
coitus
|
||||
commie
|
||||
containeth
|
||||
counterfactual
|
||||
countess
|
||||
creole
|
||||
cubits
|
||||
cunnilingus
|
||||
cunt
|
||||
dah
|
||||
de
|
||||
deb
|
||||
defendin
|
||||
dem
|
||||
di
|
||||
dong
|
||||
doric
|
||||
dumbfounded
|
||||
dunno
|
||||
ekil
|
||||
elihW
|
||||
enchillada
|
||||
ergo
|
||||
eschatological
|
||||
excrement
|
||||
eyeing
|
||||
farting
|
||||
feces
|
||||
ferkin
|
||||
fetcheth
|
||||
fiesty
|
||||
findeth
|
||||
flunkers
|
||||
forsight
|
||||
frat
|
||||
freakout
|
||||
fuck
|
||||
fucked
|
||||
fucking
|
||||
galumphing
|
||||
gangrenous
|
||||
genital
|
||||
gimme
|
||||
girlfriend
|
||||
gniyl
|
||||
goin
|
||||
gonna
|
||||
grandee
|
||||
hansome
|
||||
hexahedronical
|
||||
husbandryman
|
||||
i.e
|
||||
iht
|
||||
intestinal
|
||||
jeered
|
||||
jerkin
|
||||
k'honi
|
||||
kaloo
|
||||
kasha
|
||||
lassie
|
||||
leapy
|
||||
lecherous
|
||||
lesbian
|
||||
limerick
|
||||
mah
|
||||
maidenhead
|
||||
mali
|
||||
masturbate
|
||||
masturbation
|
||||
methedrine
|
||||
millions
|
||||
miniskirt
|
||||
mod
|
||||
motherfucker
|
||||
motherfuckers
|
||||
mousetrap
|
||||
munchies
|
||||
ne'er
|
||||
ok
|
||||
ole
|
||||
penis
|
||||
pentameter
|
||||
pere
|
||||
peyote
|
||||
poena
|
||||
pox
|
||||
provideth
|
||||
qui
|
||||
rabbinical
|
||||
rabelaisian
|
||||
racquet
|
||||
rhumba
|
||||
saideth
|
||||
schlemiel
|
||||
shalt
|
||||
shit
|
||||
shithead's
|
||||
shits
|
||||
showgirls
|
||||
sissies
|
||||
sleaze
|
||||
soit
|
||||
spake
|
||||
sphincter
|
||||
spikey
|
||||
strewed
|
||||
suckin
|
||||
sucky
|
||||
suh
|
||||
tonsillectomy
|
||||
tooties
|
||||
trashcan
|
||||
truckloads
|
||||
ulcerous
|
||||
veni
|
||||
vici
|
||||
whimsy
|
||||
wildebeest
|
||||
yamalchas
|
||||
ylbatrofmoc
|
||||
yogurt
|
||||
zits
|
||||
1978
fortune/datfiles/fortunes.sp.ok
Normal file
1978
fortune/datfiles/fortunes.sp.ok
Normal file
File diff suppressed because it is too large
Load Diff
55888
fortune/datfiles/fortunes2
Normal file
55888
fortune/datfiles/fortunes2
Normal file
File diff suppressed because it is too large
Load Diff
2
fortune/datfiles/fortunes2-o.fake
Normal file
2
fortune/datfiles/fortunes2-o.fake
Normal file
@@ -0,0 +1,2 @@
|
||||
There are no potentially offensive fortunes installed on this
|
||||
system. For further details, contact your system administrator.
|
||||
15338
fortune/datfiles/fortunes2-o.real
Normal file
15338
fortune/datfiles/fortunes2-o.real
Normal file
File diff suppressed because it is too large
Load Diff
2
fortune/datfiles/limerick.fake
Normal file
2
fortune/datfiles/limerick.fake
Normal file
@@ -0,0 +1,2 @@
|
||||
There are no potentially offensive fortunes installed on this
|
||||
system. For further details, contact your system administrator.
|
||||
5388
fortune/datfiles/limerick.real
Normal file
5388
fortune/datfiles/limerick.real
Normal file
File diff suppressed because it is too large
Load Diff
756
fortune/datfiles/startrek
Normal file
756
fortune/datfiles/startrek
Normal file
@@ -0,0 +1,756 @@
|
||||
A father doesn't destroy his children.
|
||||
-- Lt. Carolyn Palamas, "Who Mourns for Adonais?",
|
||||
stardate 3468.1.
|
||||
%
|
||||
A little suffering is good for the soul.
|
||||
-- Kirk, "The Corbomite Maneuver", stardate 1514.0
|
||||
%
|
||||
A man either lives life as it happens to him, meets it head-on and
|
||||
licks it, or he turns his back on it and starts to wither away.
|
||||
-- Dr. Boyce, "The Menagerie" ("The Cage"), stardate unknown
|
||||
%
|
||||
A princess should not be afraid -- not with a brave knight to protect
|
||||
her.
|
||||
-- McCoy, "Shore Leave", stardate 3025.3
|
||||
%
|
||||
A star captain's most solemn oath is that he will give his life, even
|
||||
his entire crew, rather than violate the Prime Directive.
|
||||
-- Kirk, "The Omega Glory", stardate unknown
|
||||
%
|
||||
A Vulcan can no sooner be disloyal than he can exist without
|
||||
breathing.
|
||||
-- Kirk, "The Menagerie", stardate 3012.4
|
||||
%
|
||||
A woman should have compassion.
|
||||
-- Kirk, "Catspaw", stardate 3018.2
|
||||
%
|
||||
Actual war is a very messy business. Very, very messy business.
|
||||
-- Kirk, "A Taste of Armageddon", stardate 3193.0
|
||||
%
|
||||
After a time, you may find that "having" is not so pleasing a thing,
|
||||
after all, as "wanting." It is not logical, but it is often true.
|
||||
-- Spock, "Amok Time", stardate 3372.7
|
||||
%
|
||||
All your people must learn before you can reach for the stars.
|
||||
-- Kirk, "The Gamesters of Triskelion", stardate 3259.2
|
||||
%
|
||||
Another Armenia, Belgium ... the weak innocents who always seem to be
|
||||
located on a natural invasion route.
|
||||
-- Kirk, "Errand of Mercy", stardate 3198.4
|
||||
%
|
||||
Another dream that failed. There's nothing sadder.
|
||||
-- Kirk, "This side of Paradise", stardate 3417.3
|
||||
%
|
||||
Another war ... must it always be so? How many comrades have we lost
|
||||
in this way? ... Obedience. Duty. Death, and more death ...
|
||||
-- Romulan Commander, "Balance of Terror", stardate 1709.2
|
||||
%
|
||||
... bacteriological warfare ... hard to believe we were once foolish
|
||||
enough to play around with that.
|
||||
-- McCoy, "The Omega Glory", stardate unknown
|
||||
%
|
||||
"Beauty is transitory."
|
||||
"Beauty survives."
|
||||
-- Spock and Kirk, "That Which Survives", stardate unknown
|
||||
%
|
||||
Behind every great man, there is a woman -- urging him on.
|
||||
-- Harry Mudd, "I, Mudd", stardate 4513.3
|
||||
%
|
||||
Blast medicine anyway! We've learned to tie into every organ in the
|
||||
human body but one. The brain! The brain is what life is all about.
|
||||
-- McCoy, "The Menagerie", stardate 3012.4
|
||||
%
|
||||
But it's real. And if it's real it can be affected ... we may not be
|
||||
able to break it, but, I'll bet you credits to Navy Beans we can put a
|
||||
dent in it.
|
||||
-- deSalle, "Catspaw", stardate 3018.2
|
||||
%
|
||||
"Can you imagine how life could be improved if we could do away with
|
||||
jealousy, greed, hate ..."
|
||||
|
||||
"It can also be improved by eliminating love, tenderness, sentiment --
|
||||
the other side of the coin"
|
||||
-- Dr. Roger Corby and Kirk, "What are Little Girls Made Of?",
|
||||
stardate 2712.4
|
||||
%
|
||||
Change is the essential process of all existence.
|
||||
-- Spock, "Let That Be Your Last Battlefield", stardate 5730.2
|
||||
%
|
||||
Compassion -- that's the one things no machine ever had. Maybe it's
|
||||
the one thing that keeps men ahead of them.
|
||||
-- McCoy, "The Ultimate Computer", stardate 4731.3
|
||||
%
|
||||
Computers make excellent and efficient servants, but I have no wish to
|
||||
serve under them. Captain, a starship also runs on loyalty to one
|
||||
man. And nothing can replace it or him.
|
||||
-- Spock, "The Ultimate Computer", stardate 4729.4
|
||||
%
|
||||
Conquest is easy. Control is not.
|
||||
-- Kirk, "Mirror, Mirror", stardate unknown
|
||||
%
|
||||
Death, when unnecessary, is a tragic thing.
|
||||
-- Flint, "Requiem for Methuselah", stardate 5843.7
|
||||
%
|
||||
Death. Destruction. Disease. Horror. That's what war is all about.
|
||||
That's what makes it a thing to be avoided.
|
||||
-- Kirk, "A Taste of Armageddon", stardate 3193.0
|
||||
%
|
||||
Do you know about being with somebody? Wanting to be? If I had the
|
||||
whole universe, I'd give it to you, Janice. When I see you, I feel
|
||||
like I'm hungry all over. Do you know how that feels?
|
||||
-- Charlie Evans, "Charlie X", stardate 1535.8
|
||||
%
|
||||
Do you know the one -- "All I ask is a tall ship, and a star to steer
|
||||
her by ..." You could feel the wind at your back, about you ... the
|
||||
sounds of the sea beneath you. And even if you take away the wind and
|
||||
the water, it's still the same. The ship is yours ... you can feel her
|
||||
... and the stars are still there.
|
||||
-- Kirk, "The Ultimate Computer", stardate 4729.4
|
||||
%
|
||||
[Doctors and Bartenders], We both get the same two kinds of customers
|
||||
-- the living and the dying.
|
||||
-- Dr. Boyce, "The Menagerie" ("The Cage"), stardate unknown
|
||||
%
|
||||
Each kiss is as the first.
|
||||
-- Miramanee, Kirk's wife, "The Paradise Syndrome",
|
||||
stardate 4842.6
|
||||
%
|
||||
Earth -- mother of the most beautiful women in the universe.
|
||||
-- Apollo, "Who Mourns for Adonais?" stardate 3468.1
|
||||
%
|
||||
Either one of us, by himself, is expendable. Both of us are not.
|
||||
-- Kirk, "The Devil in the Dark", stardate 3196.1
|
||||
%
|
||||
Emotions are alien to me. I'm a scientist.
|
||||
-- Spock, "This Side of Paradise", stardate 3417.3
|
||||
%
|
||||
Even historians fail to learn from history -- they repeat the same
|
||||
mistakes.
|
||||
-- John Gill, "Patterns of Force", stardate 2534.7
|
||||
%
|
||||
Every living thing wants to survive.
|
||||
-- Spock, "The Ultimate Computer", stardate 4731.3
|
||||
%
|
||||
"Evil does seek to maintain power by suppressing the truth."
|
||||
"Or by misleading the innocent."
|
||||
-- Spock and McCoy, "And The Children Shall Lead",
|
||||
stardate 5029.5.
|
||||
%
|
||||
Extreme feminine beauty is always disturbing.
|
||||
-- Spock, "The Cloud Minders", stardate 5818.4
|
||||
%
|
||||
Fascinating is a word I use for the unexpected.
|
||||
-- Spock, "The Squire of Gothos", stardate 2124.5
|
||||
%
|
||||
Fascinating, a totally parochial attitude.
|
||||
-- Spock, "Metamorphosis", stardate 3219.8
|
||||
%
|
||||
First study the enemy. Seek weakness.
|
||||
-- Romulan Commander, "Balance of Terror", stardate 1709.2
|
||||
%
|
||||
Four thousand throats may be cut in one night by a running man.
|
||||
-- Klingon Soldier, "Day of the Dove", stardate unknown
|
||||
%
|
||||
"... freedom ... is a worship word..."
|
||||
"It is our worship word too."
|
||||
-- Cloud William and Kirk, "The Omega Glory", stardate unknown
|
||||
%
|
||||
Genius doesn't work on an assembly line basis. You can't simply say,
|
||||
"Today I will be brilliant."
|
||||
-- Kirk, "The Ultimate Computer", stardate 4731.3
|
||||
%
|
||||
"Get back to your stations!"
|
||||
"We're beaming down to the planet, sir."
|
||||
-- Kirk and Mr. Leslie, "This Side of Paradise",
|
||||
stardate 3417.3
|
||||
%
|
||||
He's dead, Jim
|
||||
-- McCoy, "The Devil in the Dark", stardate 3196.1
|
||||
%
|
||||
History tends to exaggerate.
|
||||
-- Col. Green, "The Savage Curtain", stardate 5906.4
|
||||
%
|
||||
Humans do claim a great deal for that particular emotion (love).
|
||||
-- Spock, "The Lights of Zetar", stardate 5725.6
|
||||
%
|
||||
I am pleased to see that we have differences. May we together become
|
||||
greater than the sum of both of us.
|
||||
-- Surak of Vulcan, "The Savage Curtain", stardate 5906.4
|
||||
%
|
||||
I have never understood the female capacity to avoid a direct answer to
|
||||
any question.
|
||||
-- Spock, "This Side of Paradise", stardate 3417.3
|
||||
%
|
||||
I object to intellect without discipline; I object to power without
|
||||
constructive purpose.
|
||||
-- Spock, "The Squire of Gothos", stardate 2124.5
|
||||
%
|
||||
I realize that command does have its fascination, even under
|
||||
circumstances such as these, but I neither enjoy the idea of command
|
||||
nor am I frightened of it. It simply exists, and I will do whatever
|
||||
logically needs to be done.
|
||||
-- Spock, "The Galileo Seven", stardate 2812.7
|
||||
%
|
||||
"I think they're going to take all this money that we spend now on war
|
||||
and death --"
|
||||
"And make them spend it on life."
|
||||
-- Edith Keeler and Kirk, "The City on the Edge of Forever",
|
||||
stardate unknown.
|
||||
%
|
||||
I thought my people would grow tired of killing. But you were right,
|
||||
they see it is easier than trading. And it has its pleasures. I feel
|
||||
it myself. Like the hunt, but with richer rewards.
|
||||
-- Apella, "A Private Little War", stardate 4211.8
|
||||
%
|
||||
I'm a soldier, not a diplomat. I can only tell the truth.
|
||||
-- Kirk, "Errand of Mercy", stardate 3198.9
|
||||
%
|
||||
I'm frequently appalled by the low regard you Earthmen have for life.
|
||||
-- Spock, "The Galileo Seven", stardate 2822.3
|
||||
%
|
||||
I've already got a female to worry about. Her name is the Enterprise.
|
||||
-- Kirk, "The Corbomite Maneuver", stardate 1514.0
|
||||
%
|
||||
If a man had a child who'd gone anti-social, killed perhaps, he'd still
|
||||
tend to protect that child.
|
||||
-- McCoy, "The Ultimate Computer", stardate 4731.3
|
||||
%
|
||||
If I can have honesty, it's easier to overlook mistakes.
|
||||
-- Kirk, "Space Seed", stardate 3141.9
|
||||
%
|
||||
If some day we are defeated, well, war has its fortunes, good and bad.
|
||||
-- Commander Kor, "Errand of Mercy", stardate 3201.7
|
||||
%
|
||||
If there are self-made purgatories, then we all have to live in them.
|
||||
-- Spock, "This Side of Paradise", stardate 3417.7
|
||||
%
|
||||
Immortality consists largely of boredom.
|
||||
-- Zefrem Cochrane, "Metamorphosis", stardate 3219.8
|
||||
%
|
||||
In the strict scientific sense we all feed on death -- even
|
||||
vegetarians.
|
||||
-- Spock, "Wolf in the Fold", stardate 3615.4
|
||||
%
|
||||
Insufficient facts always invite danger.
|
||||
-- Spock, "Space Seed", stardate 3141.9
|
||||
%
|
||||
Insults are effective only where emotion is present.
|
||||
-- Spock, "Who Mourns for Adonais?" stardate 3468.1
|
||||
%
|
||||
Intuition, however illogical, is recognized as a command prerogative.
|
||||
-- Kirk, "Obsession", stardate 3620.7
|
||||
%
|
||||
Is not that the nature of men and women -- that the pleasure is in the
|
||||
learning of each other?
|
||||
-- Natira, the High Priestess of Yonada, "For the World is
|
||||
Hollow and I Have Touched the Sky", stardate 5476.3.
|
||||
%
|
||||
Is truth not truth for all?
|
||||
-- Natira, "For the World is Hollow and I have Touched
|
||||
the Sky", stardate 5476.4.
|
||||
%
|
||||
It [being a Vulcan] means to adopt a philosophy, a way of life which is
|
||||
logical and beneficial. We cannot disregard that philosophy merely for
|
||||
personal gain, no matter how important that gain might be.
|
||||
-- Spock, "Journey to Babel", stardate 3842.4
|
||||
%
|
||||
It is a human characteristic to love little animals, especially if
|
||||
they're attractive in some way.
|
||||
-- McCoy, "The Trouble with Tribbles", stardate 4525.6
|
||||
%
|
||||
It is more rational to sacrifice one life than six.
|
||||
-- Spock, "The Galileo Seven", stardate 2822.3
|
||||
%
|
||||
It is necessary to have purpose.
|
||||
-- Alice #1, "I, Mudd", stardate 4513.3
|
||||
%
|
||||
It is undignified for a woman to play servant to a man who is not
|
||||
hers.
|
||||
-- Spock, "Amok Time", stardate 3372.7
|
||||
%
|
||||
It would be illogical to assume that all conditions remain stable
|
||||
-- Spock, "The Enterprise" Incident", stardate 5027.3
|
||||
%
|
||||
It would be illogical to kill without reason
|
||||
-- Spock, "Journey to Babel", stardate 3842.4
|
||||
%
|
||||
It would seem that evil retreats when forcibly confronted
|
||||
-- Yarnek of Excalbia, "The Savage Curtain", stardate 5906.5
|
||||
%
|
||||
"It's hard to believe that something which is neither seen nor felt can
|
||||
do so much harm."
|
||||
|
||||
"That's true. But an idea can't be seen or felt. And that's what kept
|
||||
the Troglytes in the mines all these centuries. A mistaken idea."
|
||||
-- Vanna and Kirk, "The Cloud Minders", stardate 5819.0
|
||||
%
|
||||
Killing is stupid; useless!
|
||||
-- McCoy, "A Private Little War", stardate 4211.8
|
||||
%
|
||||
Killing is wrong.
|
||||
-- Losira, "That Which Survives", stardate unknown
|
||||
%
|
||||
Knowledge, sir, should be free to all!
|
||||
-- Harry Mudd, "I, Mudd", stardate 4513.3
|
||||
%
|
||||
Landru! Guide us!
|
||||
-- A Beta 3-oid, "The Return of the Archons", stardate 3157.4
|
||||
%
|
||||
Leave bigotry in your quarters; there's no room for it on the bridge.
|
||||
-- Kirk, "Balance of Terror", stardate 1709.2
|
||||
%
|
||||
"Life and death are seldom logical."
|
||||
"But attaining a desired goal always is."
|
||||
-- McCoy and Spock, "The Galileo Seven", stardate 2821.7
|
||||
%
|
||||
Live long and prosper.
|
||||
-- Spock, "Amok Time", stardate 3372.7
|
||||
%
|
||||
"Logic and practical information do not seem to apply here."
|
||||
"You admit that?"
|
||||
"To deny the facts would be illogical, Doctor"
|
||||
-- Spock and McCoy, "A Piece of the Action", stardate unknown
|
||||
%
|
||||
Lots of people drink from the wrong bottle sometimes.
|
||||
-- Edith Keeler, "The City on the Edge of Forever",
|
||||
stardate unknown
|
||||
%
|
||||
Love sometimes expresses itself in sacrifice.
|
||||
-- Kirk, "Metamorphosis", stardate 3220.3
|
||||
%
|
||||
Madness has no purpose. Or reason. But it may have a goal.
|
||||
-- Spock, "The Alternative Factor", stardate 3088.7
|
||||
%
|
||||
Many Myths are based on truth
|
||||
-- Spock, "The Way to Eden", stardate 5832.3
|
||||
%
|
||||
Men don't talk peace unless they're ready to back it up with war.
|
||||
-- Col. Green, "The Savage Curtain", stardate 5906.4
|
||||
%
|
||||
Men of peace usually are [brave].
|
||||
-- Spock, "The Savage Curtain", stardate 5906.5
|
||||
%
|
||||
Men will always be men -- no matter where they are.
|
||||
-- Harry Mudd, "Mudd's Women", stardate 1329.8
|
||||
%
|
||||
Military secrets are the most fleeting of all.
|
||||
-- Spock, "The Enterprise Incident", stardate 5027.4
|
||||
%
|
||||
Most legends have their basis in facts.
|
||||
-- Kirk, "And The Children Shall Lead", stardate 5029.5
|
||||
%
|
||||
Murder is contrary to the laws of man and God.
|
||||
-- M-5 Computer, "The Ultimate Computer", stardate 4731.3
|
||||
%
|
||||
No more blah, blah, blah!
|
||||
-- Kirk, "Miri", stardate 2713.6
|
||||
%
|
||||
No one can guarantee the actions of another.
|
||||
-- Spock, "Day of the Dove", stardate unknown
|
||||
%
|
||||
No one may kill a man. Not for any purpose. It cannot be condoned.
|
||||
-- Kirk, "Spock's Brain", stardate 5431.6
|
||||
%
|
||||
"No one talks peace unless he's ready to back it up with war."
|
||||
"He talks of peace if it is the only way to live."
|
||||
-- Colonel Green and Surak of Vulcan, "The Savage Curtain",
|
||||
stardate 5906.5.
|
||||
%
|
||||
No one wants war.
|
||||
-- Kirk, "Errand of Mercy", stardate 3201.7
|
||||
%
|
||||
No problem is insoluble.
|
||||
-- Dr. Janet Wallace, "The Deadly Years", stardate 3479.4
|
||||
%
|
||||
Not one hundred percent efficient, of course ... but nothing ever is.
|
||||
-- Kirk, "Metamorphosis", stardate 3219.8
|
||||
%
|
||||
Oblivion together does not frighten me, beloved.
|
||||
-- Thalassa (in Anne Mulhall's body), "Return to Tomorrow",
|
||||
stardate 4770.3.
|
||||
%
|
||||
Oh, that sound of male ego. You travel halfway across the galaxy and
|
||||
it's still the same song.
|
||||
-- Eve McHuron, "Mudd's Women", stardate 1330.1
|
||||
%
|
||||
On my planet, to rest is to rest -- to cease using energy. To me, it
|
||||
is quite illogical to run up and down on green grass, using energy,
|
||||
instead of saving it.
|
||||
-- Spock, "Shore Leave", stardate 3025.2
|
||||
%
|
||||
One does not thank logic.
|
||||
-- Sarek, "Journey to Babel", stardate 3842.4
|
||||
%
|
||||
One of the advantages of being a captain is being able to ask for
|
||||
advice without necessarily having to take it.
|
||||
-- Kirk, "Dagger of the Mind", stardate 2715.2
|
||||
%
|
||||
Only a fool fights in a burning house.
|
||||
-- Kank the Klingon, "Day of the Dove", stardate unknown
|
||||
%
|
||||
Our missions are peaceful -- not for conquest. When we do battle, it
|
||||
is only because we have no choice.
|
||||
-- Kirk, "The Squire of Gothos", stardate 2124.5
|
||||
%
|
||||
Our way is peace.
|
||||
-- Septimus, the Son Worshiper, "Bread and Circuses",
|
||||
stardate 4040.7.
|
||||
%
|
||||
Pain is a thing of the mind. The mind can be controlled.
|
||||
-- Spock, "Operation -- Annihilate!" stardate 3287.2
|
||||
%
|
||||
Peace was the way.
|
||||
-- Kirk, "The City on the Edge of Forever", stardate unknown
|
||||
%
|
||||
Power is danger.
|
||||
-- The Centurion, "Balance of Terror", stardate 1709.2
|
||||
%
|
||||
Prepare for tomorrow -- get ready.
|
||||
-- Edith Keeler, "The City On the Edge of Forever",
|
||||
stardate unknown
|
||||
%
|
||||
Punishment becomes ineffective after a certain point. Men become
|
||||
insensitive.
|
||||
-- Eneg, "Patterns of Force", stardate 2534.7
|
||||
%
|
||||
Respect is a rational process
|
||||
-- McCoy, "The Galileo Seven", stardate 2822.3
|
||||
%
|
||||
Romulan women are not like Vulcan females. We are not dedicated to
|
||||
pure logic and the sterility of non-emotion.
|
||||
-- Romulan Commander, "The Enterprise Incident",
|
||||
stardate 5027.3
|
||||
%
|
||||
Schshschshchsch.
|
||||
-- The Gorn, "Arena", stardate 3046.2
|
||||
%
|
||||
Sometimes a feeling is all we humans have to go on.
|
||||
-- Kirk, "A Taste of Armageddon", stardate 3193.9
|
||||
%
|
||||
Sometimes a man will tell his bartender things he'll never tell his doctor.
|
||||
-- Dr. Phillip Boyce, "The Menagerie" ("The Cage"),
|
||||
stardate unknown.
|
||||
%
|
||||
Star Trek Lives!
|
||||
%
|
||||
Suffocating together ... would create heroic camaraderie.
|
||||
-- Khan Noonian Singh, "Space Seed", stardate 3142.8
|
||||
%
|
||||
Superior ability breeds superior ambition.
|
||||
-- Spock, "Space Seed", stardate 3141.9
|
||||
%
|
||||
"That unit is a woman."
|
||||
"A mass of conflicting impulses."
|
||||
-- Spock and Nomad, "The Changeling", stardate 3541.9
|
||||
%
|
||||
"The combination of a number of things to make existence worthwhile."
|
||||
"Yes, the philosophy of 'none,' meaning 'all.'"
|
||||
-- Spock and Lincoln, "The Savage Curtain", stardate 5906.4
|
||||
%
|
||||
The face of war has never changed. Surely it is more logical to heal
|
||||
than to kill.
|
||||
-- Surak of Vulcan, "The Savage Curtain", stardate 5906.5
|
||||
%
|
||||
The games have always strengthened us. Death becomes a familiar
|
||||
pattern. We don't fear it as you do.
|
||||
-- Proconsul Marcus Claudius, "Bread and Circuses",
|
||||
stardate 4041.2
|
||||
%
|
||||
"The glory of creation is in its infinite diversity."
|
||||
"And in the way our differences combine to create meaning and beauty."
|
||||
-- Dr. Miranda Jones and Spock, "Is There in Truth No Beauty?",
|
||||
stardate 5630.8
|
||||
%
|
||||
The heart is not a logical organ.
|
||||
-- Dr. Janet Wallace, "The Deadly Years", stardate 3479.4
|
||||
%
|
||||
The idea of male and female are universal constants.
|
||||
-- Kirk, "Metamorphosis", stardate 3219.8
|
||||
%
|
||||
The joys of love made her human and the agonies of love destroyed her.
|
||||
-- Spock, "Requiem for Methuselah", stardate 5842.8
|
||||
%
|
||||
The man on tops walks a lonely street; the "chain" of command is often
|
||||
a noose.
|
||||
%
|
||||
The more complex the mind, the greater the need for the simplicity of
|
||||
play.
|
||||
-- Kirk, "Shore Leave", stardate 3025.8
|
||||
%
|
||||
The only solution is ... a balance of power. We arm our side with
|
||||
exactly that much more. A balance of power -- the trickiest, most
|
||||
difficult, dirtiest game of them all. But the only one that preserves
|
||||
both sides.
|
||||
-- Kirk, "A Private Little War", stardate 4211.8
|
||||
%
|
||||
The people of Gideon have always believed that life is sacred. That
|
||||
the love of life is the greatest gift ... We are incapable of
|
||||
destroying or interfering with the creation of that which we love so
|
||||
deeply -- life in every form from fetus to developed being.
|
||||
-- Hodin of Gideon, "The Mark of Gideon", stardate 5423.4
|
||||
%
|
||||
... The prejudices people feel about each other disappear when then get
|
||||
to know each other.
|
||||
-- Kirk, "Elaan of Troyius", stardate 4372.5
|
||||
%
|
||||
"The release of emotion is what keeps us health. Emotionally healthy."
|
||||
|
||||
"That may be, Doctor. However, I have noted that the healthy release
|
||||
of emotion is frequently unhealthy for those closest to you."
|
||||
-- McCoy and Spock, "Plato's Stepchildren", stardate 5784.3
|
||||
%
|
||||
The sight of death frightens them [Earthers].
|
||||
-- Kras the Klingon, "Friday's Child", stardate 3497.2
|
||||
%
|
||||
The sooner our happiness together begins, the longer it will last.
|
||||
-- Miramanee, "The Paradise Syndrome", stardate 4842.6
|
||||
%
|
||||
... The things love can drive a man to -- the ecstasies, the
|
||||
the miseries, the broken rules, the desperate chances, the glorious
|
||||
failures and the glorious victories.
|
||||
-- McCoy, "Requiem for Methuselah", stardate 5843.7
|
||||
%
|
||||
There are always alternatives.
|
||||
-- Spock, "The Galileo Seven", stardate 2822.3
|
||||
%
|
||||
There are certain things men must do to remain men.
|
||||
-- Kirk, "The Ultimate Computer", stardate 4929.4
|
||||
%
|
||||
There are some things worth dying for.
|
||||
-- Kirk, "Errand of Mercy", stardate 3201.7
|
||||
%
|
||||
There comes to all races an ultimate crisis which you have yet to face
|
||||
.... One day our minds became so powerful we dared think of ourselves
|
||||
as gods.
|
||||
-- Sargon, "Return to Tomorrow", stardate 4768.3
|
||||
%
|
||||
There is a multi-legged creature crawling on your shoulder.
|
||||
-- Spock, "A Taste of Armageddon", stardate 3193.9
|
||||
%
|
||||
There is an old custom among my people. When a woman saves a man's
|
||||
life, he is grateful.
|
||||
-- Nona, the Kanuto which woman, "A Private Little War",
|
||||
stardate 4211.8.
|
||||
%
|
||||
There is an order of things in this universe.
|
||||
-- Apollo, "Who Mourns for Adonais?" stardate 3468.1
|
||||
%
|
||||
There's a way out of any cage.
|
||||
-- Captain Christopher Pike, "The Menagerie" ("The Cage"),
|
||||
stardate unknown.
|
||||
%
|
||||
There's another way to survive. Mutual trust -- and help.
|
||||
-- Kirk, "Day of the Dove", stardate unknown
|
||||
%
|
||||
There's no honorable way to kill, no gentle way to destroy. There is
|
||||
nothing good in war. Except its ending.
|
||||
-- Abraham Lincoln, "The Savage Curtain", stardate 5906.5
|
||||
%
|
||||
There's nothing disgusting about it [the Companion]. It's just another
|
||||
life form, that's all. You get used to those things.
|
||||
-- McCoy, "Metamorphosis", stardate 3219.8
|
||||
%
|
||||
"There's only one kind of woman ..."
|
||||
"Or man, for that matter. You either believe in yourself or you don't."
|
||||
-- Kirk and Harry Mudd, "Mudd's Women", stardate 1330.1
|
||||
%
|
||||
This cultural mystique surrounding the biological function -- you
|
||||
realize humans are overly preoccupied with the subject.
|
||||
-- Kelinda the Kelvan, "By Any Other Name", stardate 4658.9
|
||||
%
|
||||
Those who hate and fight must stop themselves -- otherwise it is not
|
||||
stopped.
|
||||
-- Spock, "Day of the Dove", stardate unknown
|
||||
%
|
||||
Time is fluid ... like a river with currents, eddies, backwash.
|
||||
-- Spock, "The City on the Edge of Forever", stardate 3134.0
|
||||
%
|
||||
To live is always desirable.
|
||||
-- Eleen the Capellan, "Friday's Child", stardate 3498.9
|
||||
%
|
||||
Too much of anything, even love, isn't necessarily a good thing.
|
||||
-- Kirk, "The Trouble with Tribbles", stardate 4525.6
|
||||
%
|
||||
Totally illogical, there was no chance.
|
||||
-- Spock, "The Galileo Seven", stardate 2822.3
|
||||
%
|
||||
Uncontrolled power will turn even saints into savages. And we can all
|
||||
be counted on to live down to our lowest impulses.
|
||||
-- Parmen, "Plato's Stepchildren", stardate 5784.3
|
||||
%
|
||||
Violence in reality is quite different from theory.
|
||||
-- Spock, "The Cloud Minders", stardate 5818.4
|
||||
%
|
||||
Virtue is a relative term.
|
||||
-- Spock, "Friday's Child", stardate 3499.1
|
||||
%
|
||||
Vulcans believe peace should not depend on force.
|
||||
-- Amanda, "Journey to Babel", stardate 3842.3
|
||||
%
|
||||
Vulcans do not approve of violence.
|
||||
-- Spock, "Journey to Babel", stardate 3842.4
|
||||
%
|
||||
Vulcans never bluff.
|
||||
-- Spock, "The Doomsday Machine", stardate 4202.1
|
||||
%
|
||||
Vulcans worship peace above all.
|
||||
-- McCoy, "Return to Tomorrow", stardate 4768.3
|
||||
%
|
||||
Wait! You have not been prepared!
|
||||
-- Mr. Atoz, "Tomorrow is Yesterday", stardate 3113.2
|
||||
%
|
||||
War is never imperative.
|
||||
-- McCoy, "Balance of Terror", stardate 1709.2
|
||||
%
|
||||
War isn't a good life, but it's life.
|
||||
-- Kirk, "A Private Little War", stardate 4211.8
|
||||
%
|
||||
[War] is instinctive. But the instinct can be fought. We're human
|
||||
beings with the blood of a million savage years on our hands! But we
|
||||
can stop it. We can admit that we're killers ... but we're not going
|
||||
to kill today. That's all it takes! Knowing that we're not going to
|
||||
kill today!
|
||||
-- Kirk, "A Taste of Armageddon", stardate 3193.0
|
||||
%
|
||||
We do not colonize. We conquer. We rule. There is no other way for
|
||||
us.
|
||||
-- Rojan, "By Any Other Name", stardate 4657.5
|
||||
%
|
||||
We fight only when there is no other choice. We prefer the ways of
|
||||
peaceful contact.
|
||||
-- Kirk, "Spectre of the Gun", stardate 4385.3
|
||||
%
|
||||
We have found all life forms in the galaxy are capable of superior
|
||||
development.
|
||||
-- Kirk, "The Gamesters of Triskelion", stardate 3211.7
|
||||
%
|
||||
We have phasers, I vote we blast 'em!
|
||||
-- Bailey, "The Corbomite Maneuver", stardate 1514.2
|
||||
%
|
||||
"We have the right to survive!"
|
||||
"Not be killing others."
|
||||
-- Deela and Kirk, "Wink of An Eye", stardate 5710.5
|
||||
%
|
||||
We Klingons believe as you do -- the sick should die. Only the strong
|
||||
should live.
|
||||
-- Kras, "Friday's Child", stardate 3497.2
|
||||
%
|
||||
We're all sorry for the other guy when he loses his job to a machine.
|
||||
But when it comes to your job -- that's different. And it always will
|
||||
be different.
|
||||
-- McCoy, "The Ultimate Computer", stardate 4729.4
|
||||
%
|
||||
"What happened to the crewman?"
|
||||
|
||||
"The M-5 computer needed a new power source, the crewman merely got in
|
||||
the way."
|
||||
-- Kirk and Dr. Richard Daystrom, "The Ultimate Computer",
|
||||
stardate 4731.3.
|
||||
%
|
||||
What kind of love is that? Not to be loved; never to have shown love.
|
||||
-- Commissioner Nancy Hedford, "Metamorphosis",
|
||||
stardate 3219.8
|
||||
%
|
||||
"What terrible way to die."
|
||||
"There are no good ways."
|
||||
-- Sulu and Kirk, "That Which Survives", stardate unknown
|
||||
%
|
||||
When a child is taught ... its programmed with simple instructions --
|
||||
and at some point, if its mind develops properly, it exceeds the sum of
|
||||
what it was taught, thinks independently.
|
||||
-- Dr. Richard Daystrom, "The Ultimate Computer",
|
||||
stardate 4731.3.
|
||||
%
|
||||
When dreams become more important than reality, you give up travel,
|
||||
building, creating; you even forget how to repair the machines left
|
||||
behind by your ancestors. You just sit living and reliving other lives
|
||||
left behind in the thought records.
|
||||
-- Vina, "The Menagerie" ("The Cage"), stardate unknown
|
||||
%
|
||||
Where there's no emotion, there's no motive for violence.
|
||||
-- Spock, "Dagger of the Mind", stardate 2715.1
|
||||
%
|
||||
Witch! Witch! They'll burn ya!
|
||||
-- Hag, "Tomorrow is Yesterday", stardate unknown
|
||||
%
|
||||
Without facts, the decision cannot be made logically. You must rely on
|
||||
your human intuition.
|
||||
-- Spock, "Assignment: Earth", stardate unknown
|
||||
%
|
||||
Without followers, evil cannot spread.
|
||||
-- Spock, "And The Children Shall Lead", stardate 5029.5
|
||||
%
|
||||
Without freedom of choice there is no creativity.
|
||||
-- Kirk, "The return of the Archons", stardate 3157.4
|
||||
%
|
||||
Women are more easily and more deeply terrified ... generating more
|
||||
sheer horror than the male of the species.
|
||||
-- Spock, "Wolf in the Fold", stardate 3615.4
|
||||
%
|
||||
Women professionals do tend to over-compensate.
|
||||
-- Dr. Elizabeth Dehaver, "Where No Man Has Gone Before",
|
||||
stardate 1312.9.
|
||||
%
|
||||
Worlds are conquered, galaxies destroyed -- but a woman is always a
|
||||
woman.
|
||||
-- Kirk, "Conscience of the King", stardate unknown
|
||||
%
|
||||
Worlds may change, galaxies disintegrate, but a woman always remains a
|
||||
woman.
|
||||
-- Kirk, "The Conscience of the King", stardate 2818.9
|
||||
%
|
||||
Yes, it is written. Good shall always destroy evil.
|
||||
-- Sirah the Yang, "The Omega Glory", stardate unknown
|
||||
%
|
||||
You are an excellent tactician, Captain. You let your second in
|
||||
command attack while you sit and watch for weakness.
|
||||
-- Khan Noonian Singh, "Space Seed", stardate 3141.9
|
||||
%
|
||||
You can't evaluate a man by logic alone.
|
||||
-- McCoy, "I, Mudd", stardate 4513.3
|
||||
%
|
||||
You Earth people glorified organized violence for forty centuries. But
|
||||
you imprison those who employ it privately.
|
||||
-- Spock, "Dagger of the Mind", stardate 2715.1
|
||||
%
|
||||
You go slow, be gentle. It's no one-way street -- you know how you
|
||||
feel and that's all. It's how the girl feels too. Don't press. If
|
||||
the girl feels anything for you at all, you'll know.
|
||||
-- Kirk, "Charlie X", stardate 1535.8
|
||||
%
|
||||
You humans have that emotional need to express gratitude. "You're
|
||||
welcome," I believe, is the correct response.
|
||||
-- Spock, "Bread and Circuses", stardate 4041.2
|
||||
%
|
||||
You say you are lying. But if everything you say is a lie, then you
|
||||
are telling the truth. You cannot tell the truth because everything
|
||||
you say is a lie. You lie, you tell the truth ... but you cannot, for
|
||||
you lie.
|
||||
-- Norman the android, "I, Mudd", stardate 4513.3
|
||||
%
|
||||
You speak of courage. Obviously you do not know the difference between
|
||||
courage and foolhardiness. Always it is the brave ones who die, the
|
||||
soldiers.
|
||||
-- Kor, the Klingon Commander, "Errand of Mercy",
|
||||
stardate 3201.7
|
||||
%
|
||||
You! What PLANET is this!
|
||||
-- McCoy, "The City on the Edge of Forever", stardate 3134.0
|
||||
%
|
||||
You'll learn something about men and women -- the way they're supposed
|
||||
to be. Caring for each other, being happy with each other, being good
|
||||
to each other. That's what we call love. You'll like that a lot.
|
||||
-- Kirk, "The Apple", stardate 3715.6
|
||||
%
|
||||
You're dead, Jim.
|
||||
-- McCoy, "Amok Time", stardate 3372.7
|
||||
%
|
||||
You're dead, Jim.
|
||||
-- McCoy, "The Tholian Web", stardate unknown
|
||||
%
|
||||
You're too beautiful to ignore. Too much woman.
|
||||
-- Kirk to Yeoman Rand, "The Enemy Within", stardate unknown
|
||||
%
|
||||
Youth doesn't excuse everything.
|
||||
-- Dr. Janice Lester (in Kirk's body), "Turnabout Intruder",
|
||||
stardate 5928.5.
|
||||
86
fortune/datfiles/startrek.sp.ok
Normal file
86
fortune/datfiles/startrek.sp.ok
Normal file
@@ -0,0 +1,86 @@
|
||||
Adonais
|
||||
Amanda
|
||||
Apella
|
||||
Archons
|
||||
Armenia
|
||||
Atoz
|
||||
Capellan
|
||||
Catspaw
|
||||
Centurion
|
||||
Changeling
|
||||
Claudius
|
||||
Corbomite
|
||||
Corby
|
||||
Daystrom
|
||||
Deela
|
||||
Dehaver
|
||||
Elaan
|
||||
Eleen
|
||||
Eneg
|
||||
Excalbia
|
||||
Galileo
|
||||
Gorn
|
||||
Gothos
|
||||
Hag
|
||||
Hedford
|
||||
Hodin
|
||||
Kank
|
||||
Kanuto
|
||||
Kelinda
|
||||
Kelvan
|
||||
Klingon
|
||||
Klingons
|
||||
Kor
|
||||
Kras
|
||||
Landru
|
||||
Losira
|
||||
Lt
|
||||
McHuron
|
||||
Miramanee
|
||||
Miri
|
||||
Mulhall's
|
||||
Natira
|
||||
Nomad
|
||||
Nona
|
||||
Noonian
|
||||
Palamas
|
||||
Parmen
|
||||
Phillip
|
||||
Priestess
|
||||
Proconsul
|
||||
Requiem
|
||||
Rojan
|
||||
Romulan
|
||||
Sarek
|
||||
Sargon
|
||||
Schshschshchsch
|
||||
Septimus
|
||||
Singh
|
||||
Sirah
|
||||
Spectre
|
||||
Spock
|
||||
Spock's
|
||||
Stepchildren
|
||||
Sulu
|
||||
Surak
|
||||
Thalassa
|
||||
Tholian
|
||||
Tribbles
|
||||
Triskelion
|
||||
Troglytes
|
||||
Troyius
|
||||
Vanna
|
||||
Vina
|
||||
Yarnek
|
||||
Yonada
|
||||
Zefrem
|
||||
Zetar
|
||||
android
|
||||
backwash
|
||||
bacteriological
|
||||
blah
|
||||
deSalle
|
||||
oid
|
||||
stardate
|
||||
tactician
|
||||
ya
|
||||
1333
fortune/datfiles/zippy
Normal file
1333
fortune/datfiles/zippy
Normal file
File diff suppressed because it is too large
Load Diff
210
fortune/datfiles/zippy.sp.ok
Normal file
210
fortune/datfiles/zippy.sp.ok
Normal file
@@ -0,0 +1,210 @@
|
||||
ANAL
|
||||
ASEXUAL
|
||||
Astro
|
||||
B.C
|
||||
BANKHEAD
|
||||
BI
|
||||
BIO
|
||||
BORSCHT
|
||||
BRAINPAN
|
||||
BURRITO
|
||||
BURRITOS
|
||||
Barbie
|
||||
Bo
|
||||
Bonzo
|
||||
CARCRASH
|
||||
CASIO
|
||||
CHAINSAWS
|
||||
CHIVAS
|
||||
COM
|
||||
CORDOVANS
|
||||
COSELL
|
||||
CROATIAN
|
||||
Carlsbad
|
||||
Clift
|
||||
Cosell
|
||||
Cupcake
|
||||
DAQUIRI
|
||||
DELI
|
||||
DIDI
|
||||
DISCO
|
||||
DISNEYWORLD
|
||||
DONUT
|
||||
DOUGHBOY
|
||||
Darvon
|
||||
Di
|
||||
Disco
|
||||
Donnie
|
||||
EDSELS
|
||||
EMOTE
|
||||
EUBIE
|
||||
Enema
|
||||
FALAFEL
|
||||
FISHNET
|
||||
FISHWICH
|
||||
FLEMMING
|
||||
FLOATATION
|
||||
FROLICSOME
|
||||
Feinstein
|
||||
GOLDIE
|
||||
GORRY
|
||||
GUCCIONE
|
||||
GUIDELIGHT
|
||||
Gibble
|
||||
Ginzberg
|
||||
HAIRPIECE
|
||||
HAWN
|
||||
HAYWORTH
|
||||
HITCHHIKING
|
||||
HOAX
|
||||
HOUSECAT
|
||||
Hmmm
|
||||
I.Q
|
||||
INTESTINAL
|
||||
Iranian
|
||||
JELL
|
||||
JELLO
|
||||
JILLIAN'S
|
||||
JULIENNED
|
||||
Jodie
|
||||
KATRINKA
|
||||
KNOCKWURST
|
||||
LBJ
|
||||
LING
|
||||
LONI
|
||||
LUGOSI
|
||||
Loni
|
||||
Lycra
|
||||
MALIBU
|
||||
MCMAHON
|
||||
MELBA
|
||||
MERYL
|
||||
MMM
|
||||
MOGULS
|
||||
MONTALBAN'S
|
||||
MOUSSE
|
||||
MSG
|
||||
MT
|
||||
MTV
|
||||
MYSTERIANS
|
||||
Macy's
|
||||
Meese
|
||||
Monkees
|
||||
NABOBS
|
||||
NAGEELA
|
||||
NEBULATION
|
||||
NICKLES
|
||||
NUTRA
|
||||
Niro
|
||||
OLFACTORY
|
||||
OMNIVERSAL
|
||||
OVULAR
|
||||
Osmond
|
||||
Osmonds
|
||||
PAISLEY
|
||||
PASTA
|
||||
PG
|
||||
Pharoahs
|
||||
Provolone
|
||||
R.V.'S
|
||||
RAPHAELITE
|
||||
RICARDO
|
||||
RITA
|
||||
Rom
|
||||
Roni
|
||||
SAGAN
|
||||
SANFORIZE
|
||||
SCHROON
|
||||
SCIENTOLOGIST
|
||||
SERBO
|
||||
SHOPLIFT
|
||||
SINATRA
|
||||
SKEE
|
||||
SODOMIZE
|
||||
SONTAG
|
||||
STREEP
|
||||
Safeway
|
||||
Slezak
|
||||
Spandex
|
||||
T.V
|
||||
TACO
|
||||
TAILFINS
|
||||
TALLULAH
|
||||
TINA
|
||||
TRANSSEXUAL
|
||||
TRYNEL
|
||||
Tenafly
|
||||
Tex
|
||||
Th
|
||||
Tylenol
|
||||
Uh
|
||||
VASELINE
|
||||
VELVEETA
|
||||
WESSON
|
||||
YEH
|
||||
YUBBA
|
||||
Yum
|
||||
ZIPPY
|
||||
Zippy
|
||||
Zippy's
|
||||
barbequeued
|
||||
chr
|
||||
co
|
||||
cranial
|
||||
creme
|
||||
devalue
|
||||
disco
|
||||
donut
|
||||
donuts
|
||||
dusenjet
|
||||
einem
|
||||
einige
|
||||
frolicking
|
||||
fuschia
|
||||
gladiatoren
|
||||
gothic
|
||||
graphisticator
|
||||
hors
|
||||
houseboy
|
||||
ich
|
||||
im
|
||||
jahr
|
||||
kidnapped
|
||||
lande
|
||||
laundromat
|
||||
laundromats
|
||||
lesbian
|
||||
li'l
|
||||
manicurist
|
||||
matic
|
||||
meatball
|
||||
meltdown
|
||||
naugahide
|
||||
obstetrician
|
||||
poindexter
|
||||
pre
|
||||
psilocybin
|
||||
quaaludes
|
||||
quadrophonic
|
||||
rieche
|
||||
s'posed
|
||||
scientology
|
||||
skintight
|
||||
skydiving
|
||||
solarium
|
||||
spielen
|
||||
telex
|
||||
th
|
||||
th'HOLIDAY
|
||||
th'MAMBO
|
||||
th'RAIN
|
||||
th'WRENCH
|
||||
th'cute
|
||||
thru
|
||||
thumbtack
|
||||
uh
|
||||
um
|
||||
urinate
|
||||
vaseline
|
||||
vor
|
||||
zzzzzzzzz
|
||||
9
fortune/fortune/Makefile.bsd
Normal file
9
fortune/fortune/Makefile.bsd
Normal file
@@ -0,0 +1,9 @@
|
||||
# $NetBSD: Makefile,v 1.11 1998/02/04 10:16:19 christos Exp $
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
|
||||
PROG= fortune
|
||||
MAN= fortune.6
|
||||
CPPFLAGS+= -I${.CURDIR}/../strfile -DHAVE_REGCOMP
|
||||
|
||||
.include "../../Makefile.inc"
|
||||
.include <bsd.prog.mk>
|
||||
12
fortune/fortune/Makefrag
Normal file
12
fortune/fortune/Makefrag
Normal file
@@ -0,0 +1,12 @@
|
||||
# Makefrag - makefile fragment for fortune/fortune
|
||||
|
||||
fortune_fortune_DEFS := -DHAVE_REGCOMP
|
||||
fortune_fortune_DIRS := $(GAMESDIR) $(MAN6DIR)
|
||||
fortune_fortune_INCS := -Ifortune/strfile
|
||||
|
||||
fortune_fortune_all: fortune/fortune/fortune fortune/fortune/fortune.6
|
||||
|
||||
fortune_fortune_install: fortune_fortune_all
|
||||
$(INSTALL_BINARY) fortune/fortune/fortune $(INSTALL_PREFIX)$(GAMESDIR)/fortune
|
||||
$(HIDE_GAME) fortune
|
||||
$(INSTALL_MANUAL) fortune/fortune/fortune.6
|
||||
173
fortune/fortune/fortune.6.in
Normal file
173
fortune/fortune/fortune.6.in
Normal file
@@ -0,0 +1,173 @@
|
||||
.\" $NetBSD: fortune.6,v 1.7 1997/10/10 13:04:37 lukem 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 @usrlibdir@/fortunes
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr regex 3
|
||||
1374
fortune/fortune/fortune.c
Normal file
1374
fortune/fortune/fortune.c
Normal file
File diff suppressed because it is too large
Load Diff
38
fortune/fortune/pathnames.h.in
Normal file
38
fortune/fortune/pathnames.h.in
Normal file
@@ -0,0 +1,38 @@
|
||||
/* $NetBSD: pathnames.h,v 1.3 1995/03/23 08:28:42 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* 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
|
||||
* 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.
|
||||
*
|
||||
* @(#)pathnames.h 8.1 (Berkeley) 5/31/93
|
||||
*/
|
||||
|
||||
#define FORTDIR "@usrlibdir@"
|
||||
17
fortune/strfile/Makefile.bsd
Normal file
17
fortune/strfile/Makefile.bsd
Normal file
@@ -0,0 +1,17 @@
|
||||
# $NetBSD: Makefile,v 1.7 1997/05/07 15:59:10 mycroft Exp $
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
|
||||
PROG= strfile
|
||||
MAN= strfile.8
|
||||
|
||||
# only needed during build
|
||||
proginstall::
|
||||
|
||||
# Override these rules for cross-compilation
|
||||
.c.o:
|
||||
${HOST_COMPILE.c} ${.IMPSRC}
|
||||
|
||||
${PROG}: ${OBJS}
|
||||
${HOST_LINK.c} -o ${.TARGET} ${OBJS}
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
9
fortune/strfile/Makefrag
Normal file
9
fortune/strfile/Makefrag
Normal file
@@ -0,0 +1,9 @@
|
||||
# Makefrag - makefile fragment for fortune/strfile
|
||||
|
||||
fortune_strfile_DIRS := $(USRBINDIR) $(MAN8DIR)
|
||||
|
||||
fortune_strfile_all: fortune/strfile/strfile fortune/strfile/strfile.8
|
||||
|
||||
fortune_strfile_install: fortune_strfile_all
|
||||
$(INSTALL_BINARY) fortune/strfile/strfile $(INSTALL_PREFIX)$(USRBINDIR)/strfile
|
||||
$(INSTALL_MANUAL) fortune/strfile/strfile.8
|
||||
149
fortune/strfile/strfile.8
Normal file
149
fortune/strfile/strfile.8
Normal file
@@ -0,0 +1,149 @@
|
||||
.\" $NetBSD: strfile.8,v 1.4 1998/02/03 20:45:00 perry 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 BSD 4
|
||||
.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 Strfile
|
||||
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 cypher.
|
||||
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 network 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 Pa .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 .
|
||||
475
fortune/strfile/strfile.c
Normal file
475
fortune/strfile/strfile.c
Normal file
@@ -0,0 +1,475 @@
|
||||
/* $NetBSD: strfile.c,v 1.8 1998/09/13 15:27:28 hubertf Exp $ */
|
||||
|
||||
/*-
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
|
||||
The Regents of the University of California. All rights reserved.\n");
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: strfile.c,v 1.8 1998/09/13 15:27:28 hubertf Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
# include <sys/types.h>
|
||||
# include <sys/param.h>
|
||||
# include <err.h>
|
||||
# include <ctype.h>
|
||||
# include <netinet/in.h>
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <string.h>
|
||||
# include <time.h>
|
||||
# include <unistd.h>
|
||||
# include "strfile.h"
|
||||
|
||||
# ifndef MAXPATHLEN
|
||||
# define MAXPATHLEN 1024
|
||||
# endif /* MAXPATHLEN */
|
||||
|
||||
/*
|
||||
* This program takes a file composed of strings seperated by
|
||||
* lines starting with two consecutive delimiting character (default
|
||||
* character is '%') and creates another file which consists of a table
|
||||
* describing the file (structure from "strfile.h"), a table of seek
|
||||
* pointers to the start of the strings, and the strings, each terminated
|
||||
* by a null byte. Usage:
|
||||
*
|
||||
* % strfile [-iorsx] [ -cC ] sourcefile [ datafile ]
|
||||
*
|
||||
* c - Change delimiting character from '%' to 'C'
|
||||
* s - Silent. Give no summary of data processed at the end of
|
||||
* the run.
|
||||
* o - order the strings in alphabetic order
|
||||
* i - if ordering, ignore case
|
||||
* r - randomize the order of the strings
|
||||
* x - set rotated bit
|
||||
*
|
||||
* Ken Arnold Sept. 7, 1978 --
|
||||
*
|
||||
* Added ordering options.
|
||||
*/
|
||||
|
||||
# define TRUE 1
|
||||
# define FALSE 0
|
||||
|
||||
# define STORING_PTRS (Oflag || Rflag)
|
||||
# define CHUNKSIZE 512
|
||||
|
||||
#ifdef lint
|
||||
# define ALWAYS atoi("1")
|
||||
#else
|
||||
# define ALWAYS 1
|
||||
#endif
|
||||
# define ALLOC(ptr,sz) do { \
|
||||
if (ptr == NULL) \
|
||||
ptr = malloc((unsigned int) (CHUNKSIZE * sizeof *ptr)); \
|
||||
else if (((sz) + 1) % CHUNKSIZE == 0) \
|
||||
ptr = realloc((void *) ptr, ((unsigned int) ((sz) + CHUNKSIZE) * sizeof *ptr)); \
|
||||
if (ptr == NULL) \
|
||||
errx(1, "out of space"); \
|
||||
} while (0)
|
||||
|
||||
#ifdef NO_VOID
|
||||
# define void char
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
char first;
|
||||
off_t pos;
|
||||
} STR;
|
||||
|
||||
char *Infile = NULL, /* input file name */
|
||||
Outfile[MAXPATHLEN] = "", /* output file name */
|
||||
Delimch = '%'; /* delimiting character */
|
||||
|
||||
int Sflag = FALSE; /* silent run flag */
|
||||
int Oflag = FALSE; /* ordering flag */
|
||||
int Iflag = FALSE; /* ignore case flag */
|
||||
int Rflag = FALSE; /* randomize order flag */
|
||||
int Xflag = FALSE; /* set rotated bit */
|
||||
long Num_pts = 0; /* number of pointers/strings */
|
||||
|
||||
off_t *Seekpts;
|
||||
|
||||
FILE *Sort_1, *Sort_2; /* pointers for sorting */
|
||||
|
||||
STRFILE Tbl; /* statistics table */
|
||||
|
||||
STR *Firstch; /* first chars of each string */
|
||||
|
||||
void add_offset __P((FILE *, off_t));
|
||||
int cmp_str __P((const void *, const void *));
|
||||
void do_order __P((void));
|
||||
void getargs __P((int, char *[]));
|
||||
int main __P((int, char *[]));
|
||||
void randomize __P((void));
|
||||
char *unctrl __P((char));
|
||||
void usage __P((void)) __attribute__((__noreturn__));
|
||||
|
||||
|
||||
/*
|
||||
* main:
|
||||
* Drive the sucker. There are two main modes -- either we store
|
||||
* the seek pointers, if the table is to be sorted or randomized,
|
||||
* or we write the pointer directly to the file, if we are to stay
|
||||
* in file order. If the former, we allocate and re-allocate in
|
||||
* CHUNKSIZE blocks; if the latter, we just write each pointer,
|
||||
* and then seek back to the beginning to write in the table.
|
||||
*/
|
||||
int
|
||||
main(ac, av)
|
||||
int ac;
|
||||
char *av[];
|
||||
{
|
||||
char *sp, dc;
|
||||
FILE *inf, *outf;
|
||||
off_t last_off, length, pos, *p;
|
||||
int first, cnt;
|
||||
char *nsp;
|
||||
STR *fp;
|
||||
static char string[257];
|
||||
|
||||
getargs(ac, av); /* evalute arguments */
|
||||
dc = Delimch;
|
||||
if ((inf = fopen(Infile, "r")) == NULL)
|
||||
err(1, "open `%s'", Infile);
|
||||
|
||||
if ((outf = fopen(Outfile, "w")) == NULL)
|
||||
err(1, "open `%s'", Outfile);
|
||||
if (!STORING_PTRS)
|
||||
(void) fseek(outf, sizeof Tbl, 0);
|
||||
|
||||
/*
|
||||
* Write the strings onto the file
|
||||
*/
|
||||
|
||||
Tbl.str_longlen = 0;
|
||||
Tbl.str_shortlen = (unsigned int) 0xffffffff;
|
||||
Tbl.str_delim = dc;
|
||||
Tbl.str_version = VERSION;
|
||||
first = Oflag;
|
||||
add_offset(outf, ftell(inf));
|
||||
last_off = 0;
|
||||
do {
|
||||
sp = fgets(string, 256, inf);
|
||||
if (sp == NULL || (sp[0] == dc && sp[1] == '\n')) {
|
||||
pos = ftell(inf);
|
||||
length = pos - last_off - (sp ? strlen(sp) : 0);
|
||||
last_off = pos;
|
||||
if (!length)
|
||||
continue;
|
||||
add_offset(outf, pos);
|
||||
if ((off_t)Tbl.str_longlen < length)
|
||||
Tbl.str_longlen = length;
|
||||
if ((off_t)Tbl.str_shortlen > length)
|
||||
Tbl.str_shortlen = length;
|
||||
first = Oflag;
|
||||
}
|
||||
else if (first) {
|
||||
for (nsp = sp; !isalnum(*nsp); nsp++)
|
||||
continue;
|
||||
ALLOC(Firstch, Num_pts);
|
||||
fp = &Firstch[Num_pts - 1];
|
||||
if (Iflag && isupper(*nsp))
|
||||
fp->first = tolower(*nsp);
|
||||
else
|
||||
fp->first = *nsp;
|
||||
fp->pos = Seekpts[Num_pts - 1];
|
||||
first = FALSE;
|
||||
}
|
||||
} while (sp != NULL);
|
||||
|
||||
/*
|
||||
* write the tables in
|
||||
*/
|
||||
|
||||
(void) fclose(inf);
|
||||
|
||||
if (Oflag)
|
||||
do_order();
|
||||
else if (Rflag)
|
||||
randomize();
|
||||
|
||||
if (Xflag)
|
||||
Tbl.str_flags |= STR_ROTATED;
|
||||
|
||||
if (!Sflag) {
|
||||
printf("\"%s\" created\n", Outfile);
|
||||
if (Num_pts == 2)
|
||||
puts("There was 1 string");
|
||||
else
|
||||
printf("There were %d strings\n", (int)(Num_pts - 1));
|
||||
printf("Longest string: %lu byte%s\n", Tbl.str_longlen,
|
||||
Tbl.str_longlen == 1 ? "" : "s");
|
||||
printf("Shortest string: %lu byte%s\n", Tbl.str_shortlen,
|
||||
Tbl.str_shortlen == 1 ? "" : "s");
|
||||
}
|
||||
|
||||
(void) fseek(outf, (off_t) 0, 0);
|
||||
Tbl.str_version = htonl(Tbl.str_version);
|
||||
Tbl.str_numstr = htonl(Num_pts - 1);
|
||||
Tbl.str_longlen = htonl(Tbl.str_longlen);
|
||||
Tbl.str_shortlen = htonl(Tbl.str_shortlen);
|
||||
Tbl.str_flags = htonl(Tbl.str_flags);
|
||||
(void) fwrite((char *) &Tbl, sizeof Tbl, 1, outf);
|
||||
if (STORING_PTRS) {
|
||||
for (p = Seekpts, cnt = Num_pts; cnt--; ++p)
|
||||
*p = htonl(*p);
|
||||
(void) fwrite((char *) Seekpts, sizeof *Seekpts, (int) Num_pts, outf);
|
||||
}
|
||||
(void) fclose(outf);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/*
|
||||
* This routine evaluates arguments from the command line
|
||||
*/
|
||||
void
|
||||
getargs(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
int ch;
|
||||
|
||||
while ((ch = getopt(argc, argv, "c:iorsx")) != -1)
|
||||
switch(ch) {
|
||||
case 'c': /* new delimiting char */
|
||||
Delimch = *optarg;
|
||||
if (!isascii(Delimch)) {
|
||||
printf("bad delimiting character: '\\%o\n'",
|
||||
Delimch);
|
||||
}
|
||||
break;
|
||||
case 'i': /* ignore case in ordering */
|
||||
Iflag++;
|
||||
break;
|
||||
case 'o': /* order strings */
|
||||
Oflag++;
|
||||
break;
|
||||
case 'r': /* randomize pointers */
|
||||
Rflag++;
|
||||
break;
|
||||
case 's': /* silent */
|
||||
Sflag++;
|
||||
break;
|
||||
case 'x': /* set the rotated bit */
|
||||
Xflag++;
|
||||
break;
|
||||
case '?':
|
||||
default:
|
||||
usage();
|
||||
}
|
||||
argv += optind;
|
||||
|
||||
if (*argv) {
|
||||
Infile = *argv;
|
||||
if (*++argv)
|
||||
(void) strcpy(Outfile, *argv);
|
||||
}
|
||||
if (!Infile) {
|
||||
puts("No input file name");
|
||||
usage();
|
||||
}
|
||||
if (*Outfile == '\0') {
|
||||
(void) strcpy(Outfile, Infile);
|
||||
(void) strcat(Outfile, ".dat");
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
usage()
|
||||
{
|
||||
(void) fprintf(stderr,
|
||||
"strfile [-iorsx] [-c char] sourcefile [datafile]\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/*
|
||||
* add_offset:
|
||||
* Add an offset to the list, or write it out, as appropriate.
|
||||
*/
|
||||
void
|
||||
add_offset(fp, off)
|
||||
FILE *fp;
|
||||
off_t off;
|
||||
{
|
||||
off_t net;
|
||||
|
||||
if (!STORING_PTRS) {
|
||||
net = htonl(off);
|
||||
fwrite(&net, 1, sizeof net, fp);
|
||||
} else {
|
||||
ALLOC(Seekpts, Num_pts + 1);
|
||||
Seekpts[Num_pts] = off;
|
||||
}
|
||||
Num_pts++;
|
||||
}
|
||||
|
||||
/*
|
||||
* do_order:
|
||||
* Order the strings alphabetically (possibly ignoring case).
|
||||
*/
|
||||
void
|
||||
do_order()
|
||||
{
|
||||
int i;
|
||||
off_t *lp;
|
||||
STR *fp;
|
||||
|
||||
Sort_1 = fopen(Infile, "r");
|
||||
Sort_2 = fopen(Infile, "r");
|
||||
qsort((char *) Firstch, (int) Tbl.str_numstr, sizeof *Firstch, cmp_str);
|
||||
i = Tbl.str_numstr;
|
||||
lp = Seekpts;
|
||||
fp = Firstch;
|
||||
while (i--)
|
||||
*lp++ = fp++->pos;
|
||||
(void) fclose(Sort_1);
|
||||
(void) fclose(Sort_2);
|
||||
Tbl.str_flags |= STR_ORDERED;
|
||||
}
|
||||
|
||||
/*
|
||||
* cmp_str:
|
||||
* Compare two strings in the file
|
||||
*/
|
||||
char *
|
||||
unctrl(c)
|
||||
char c;
|
||||
{
|
||||
static char buf[3];
|
||||
|
||||
if (isprint(c)) {
|
||||
buf[0] = c;
|
||||
buf[1] = '\0';
|
||||
}
|
||||
else if (c == 0177) {
|
||||
buf[0] = '^';
|
||||
buf[1] = '?';
|
||||
}
|
||||
else {
|
||||
buf[0] = '^';
|
||||
buf[1] = c + 'A' - 1;
|
||||
}
|
||||
return buf;
|
||||
}
|
||||
|
||||
int
|
||||
cmp_str(vp1, vp2)
|
||||
const void *vp1, *vp2;
|
||||
{
|
||||
const STR *p1, *p2;
|
||||
int c1, c2;
|
||||
int n1, n2;
|
||||
|
||||
p1 = (const STR *)vp1;
|
||||
p2 = (const STR *)vp2;
|
||||
|
||||
# define SET_N(nf,ch) (nf = (ch == '\n'))
|
||||
# define IS_END(ch,nf) (ch == Delimch && nf)
|
||||
|
||||
c1 = p1->first;
|
||||
c2 = p2->first;
|
||||
if (c1 != c2)
|
||||
return c1 - c2;
|
||||
|
||||
(void) fseek(Sort_1, p1->pos, 0);
|
||||
(void) fseek(Sort_2, p2->pos, 0);
|
||||
|
||||
n1 = FALSE;
|
||||
n2 = FALSE;
|
||||
while (!isalnum(c1 = getc(Sort_1)) && c1 != '\0')
|
||||
SET_N(n1, c1);
|
||||
while (!isalnum(c2 = getc(Sort_2)) && c2 != '\0')
|
||||
SET_N(n2, c2);
|
||||
|
||||
while (!IS_END(c1, n1) && !IS_END(c2, n2)) {
|
||||
if (Iflag) {
|
||||
if (isupper(c1))
|
||||
c1 = tolower(c1);
|
||||
if (isupper(c2))
|
||||
c2 = tolower(c2);
|
||||
}
|
||||
if (c1 != c2)
|
||||
return c1 - c2;
|
||||
SET_N(n1, c1);
|
||||
SET_N(n2, c2);
|
||||
c1 = getc(Sort_1);
|
||||
c2 = getc(Sort_2);
|
||||
}
|
||||
if (IS_END(c1, n1))
|
||||
c1 = 0;
|
||||
if (IS_END(c2, n2))
|
||||
c2 = 0;
|
||||
return c1 - c2;
|
||||
}
|
||||
|
||||
/*
|
||||
* randomize:
|
||||
* Randomize the order of the string table. We must be careful
|
||||
* not to randomize across delimiter boundaries. All
|
||||
* randomization is done within each block.
|
||||
*/
|
||||
void
|
||||
randomize()
|
||||
{
|
||||
int cnt, i;
|
||||
off_t tmp;
|
||||
off_t *sp;
|
||||
|
||||
srandom((int)(time((time_t *) NULL) + getpid()));
|
||||
|
||||
Tbl.str_flags |= STR_RANDOM;
|
||||
cnt = Tbl.str_numstr;
|
||||
|
||||
/*
|
||||
* move things around randomly
|
||||
*/
|
||||
|
||||
for (sp = Seekpts; cnt > 0; cnt--, sp++) {
|
||||
i = random() % cnt;
|
||||
tmp = sp[0];
|
||||
sp[0] = sp[i];
|
||||
sp[i] = tmp;
|
||||
}
|
||||
}
|
||||
56
fortune/strfile/strfile.h
Normal file
56
fortune/strfile/strfile.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/* $NetBSD: strfile.h,v 1.3 1995/03/23 08:28:49 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* 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.
|
||||
*
|
||||
* 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.h 8.1 (Berkeley) 5/31/93
|
||||
*/
|
||||
|
||||
#define STR_ENDSTRING(line,tbl) \
|
||||
((line)[0] == (tbl).str_delim && (line)[1] == '\n')
|
||||
|
||||
typedef struct { /* information table */
|
||||
#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 */
|
||||
unsigned char stuff[4]; /* long aligned space */
|
||||
#define str_delim stuff[0] /* delimiting character */
|
||||
} STRFILE;
|
||||
11
fortune/tools/Do_spell
Normal file
11
fortune/tools/Do_spell
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh -
|
||||
# $NetBSD: Do_spell,v 1.2 1995/03/23 08:28:50 cgd Exp $
|
||||
#
|
||||
# @(#)Do_spell 8.1 (Berkeley) 5/31/93
|
||||
#
|
||||
|
||||
F=_spell.$$
|
||||
echo $1
|
||||
spell < $1 > $F
|
||||
sort $F $1.sp.ok | uniq -u | column
|
||||
rm -f $F
|
||||
11
fortune/tools/Do_troff
Normal file
11
fortune/tools/Do_troff
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/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
|
||||
#
|
||||
|
||||
set file=$1
|
||||
shift
|
||||
( echo ".ds Se $file" ; cat Troff.mac ; sed -f Troff.sed $file ) | \
|
||||
$* -me >& $file.tr
|
||||
echo troff output in $file.tr
|
||||
28
fortune/tools/Troff.mac
Normal file
28
fortune/tools/Troff.mac
Normal file
@@ -0,0 +1,28 @@
|
||||
.\" $NetBSD: Troff.mac,v 1.2 1995/03/23 08:28:53 cgd Exp $
|
||||
.\"
|
||||
.nr tp 8
|
||||
.nr hm 3v
|
||||
.nr fm 2v
|
||||
.nr tm 5v
|
||||
.nr bm 4v
|
||||
.cs R
|
||||
.sc
|
||||
.sz 6
|
||||
.ll +10n
|
||||
.lt \n(.l
|
||||
.de $h
|
||||
.tl 'Fortune Database'\\*(Se'\*(td'
|
||||
..
|
||||
.de $f
|
||||
.tl ''- % -''
|
||||
..
|
||||
.2c
|
||||
.nf
|
||||
.ta
|
||||
.ta 8n 16n 24n 32n 40n 48n 56n 64n 72n 80n
|
||||
.de %%
|
||||
.sp .3
|
||||
.ce
|
||||
\(sq\|\(sq\|\(sq\|\(sq\|\(sq\|\(sq\|\(sq\|\(sq\|\(sq
|
||||
.sp .2
|
||||
..
|
||||
13
fortune/tools/Troff.sed
Normal file
13
fortune/tools/Troff.sed
Normal file
@@ -0,0 +1,13 @@
|
||||
/^['.]/s//\\\&&/
|
||||
/^%%/s//.&/
|
||||
/--/s//\\*-/g
|
||||
/_a-squared cos 2(phi)/s//\\fIa\\fP\\u2\\d cos 2\\(*f/
|
||||
/__**\([a-zA-Z]*\)/s//\\fI\1\\fP/g
|
||||
/"\(.\)/s//\1\\*:/g
|
||||
/`\(.\)/s//\1\\*`/g
|
||||
/'\(.\)/s//\1\\*'/g
|
||||
/~\(.\)/s//\1\\*~/g
|
||||
/\^\(.\)/s//\1\\*^/g
|
||||
/,\(.\)/s//\1\\*,/g
|
||||
/\(.\)\(.\)/s//\\o_\1\2_/g
|
||||
/*/s//\\(bs/g
|
||||
12
fortune/tools/do_sort
Normal file
12
fortune/tools/do_sort
Normal file
@@ -0,0 +1,12 @@
|
||||
#! /bin/sh
|
||||
# $NetBSD: do_sort,v 1.2 1995/03/23 08:28:54 cgd Exp $
|
||||
#
|
||||
# @(#)do_sort 8.1 (Berkeley) 5/31/93
|
||||
#
|
||||
# an aggressive little script for sorting the fortune files
|
||||
# depends on octal 02 and 03 not being anywhere in the files.
|
||||
|
||||
sp="/usr/bin/sort -bdfu -T /var/tmp"
|
||||
|
||||
sed 's/^%$//' | tr '\12' '\3' | tr '\2' '\12' | $sp | sed 'a\
|
||||
%' | sed -e 's/^//' -e 's/$//' | tr '\3' '\12'
|
||||
8
fortune/unstr/Makefile.bsd
Normal file
8
fortune/unstr/Makefile.bsd
Normal file
@@ -0,0 +1,8 @@
|
||||
# $NetBSD: Makefile,v 1.4 1997/10/22 04:56:21 lukem Exp $
|
||||
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
||||
|
||||
PROG= unstr
|
||||
NOMAN= noman
|
||||
CPPFLAGS+= -I${.CURDIR}/../strfile
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
10
fortune/unstr/Makefrag
Normal file
10
fortune/unstr/Makefrag
Normal file
@@ -0,0 +1,10 @@
|
||||
# Makefrag - makefile fragment for fortune/unstr
|
||||
|
||||
# fortune_unstr_DIRS := $(USRBINDIR)
|
||||
fortune_unstr_INCS := -Ifortune/strfile
|
||||
|
||||
fortune_unstr_all: fortune/unstr/unstr
|
||||
|
||||
# We don't install unstr.
|
||||
fortune_unstr_install: fortune_unstr_all
|
||||
# $(INSTALL_BINARY) fortune/unstr/unstr $(INSTALL_PREFIX)$(USRBINDIR)/unstr
|
||||
157
fortune/unstr/unstr.c
Normal file
157
fortune/unstr/unstr.c
Normal file
@@ -0,0 +1,157 @@
|
||||
/* $NetBSD: unstr.c,v 1.4 1997/10/11 07:59:09 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* 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.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__COPYRIGHT("@(#) Copyright (c) 1991, 1993\n\
|
||||
The Regents of the University of California. All rights reserved.\n");
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef lint
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)unstr.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: unstr.c,v 1.4 1997/10/11 07:59:09 lukem Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
* This program un-does what "strfile" makes, thereby obtaining the
|
||||
* original file again. This can be invoked with the name of the output
|
||||
* file, the input file, or both. If invoked with only a single argument
|
||||
* ending in ".dat", it is pressumed to be the input file and the output
|
||||
* file will be the same stripped of the ".dat". If the single argument
|
||||
* doesn't end in ".dat", then it is presumed to be the output file, and
|
||||
* the input file is that name prepended by a ".dat". If both are given
|
||||
* they are treated literally as the input and output files.
|
||||
*
|
||||
* Ken Arnold Aug 13, 1978
|
||||
*/
|
||||
|
||||
# include <sys/types.h>
|
||||
# include <sys/param.h>
|
||||
# ifndef __linux__
|
||||
# include <machine/endian.h>
|
||||
# endif
|
||||
# include <ctype.h>
|
||||
# include <err.h>
|
||||
# include <netinet/in.h>
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include "strfile.h"
|
||||
|
||||
# ifndef MAXPATHLEN
|
||||
# define MAXPATHLEN 1024
|
||||
# endif /* MAXPATHLEN */
|
||||
|
||||
char *Infile, /* name of input file */
|
||||
Datafile[MAXPATHLEN], /* name of data file */
|
||||
Delimch; /* delimiter character */
|
||||
|
||||
FILE *Inf, *Dataf;
|
||||
|
||||
void getargs __P((char *[]));
|
||||
int main __P((int, char *[]));
|
||||
void order_unstr __P((STRFILE *));
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
main(ac, av)
|
||||
int ac __attribute__((unused));
|
||||
char **av;
|
||||
{
|
||||
static STRFILE tbl; /* description table */
|
||||
|
||||
getargs(av);
|
||||
if ((Inf = fopen(Infile, "r")) == NULL)
|
||||
err(1, "fopen %s", Infile);
|
||||
if ((Dataf = fopen(Datafile, "r")) == NULL)
|
||||
err(1, "fopen %s", Datafile);
|
||||
(void) fread((char *) &tbl, sizeof tbl, 1, Dataf);
|
||||
tbl.str_version = ntohl(tbl.str_version);
|
||||
tbl.str_numstr = ntohl(tbl.str_numstr);
|
||||
tbl.str_longlen = ntohl(tbl.str_longlen);
|
||||
tbl.str_shortlen = ntohl(tbl.str_shortlen);
|
||||
tbl.str_flags = ntohl(tbl.str_flags);
|
||||
if (!(tbl.str_flags & (STR_ORDERED | STR_RANDOM))) {
|
||||
fprintf(stderr, "nothing to do -- table in file order\n");
|
||||
exit(1);
|
||||
}
|
||||
Delimch = tbl.str_delim;
|
||||
order_unstr(&tbl);
|
||||
(void) fclose(Inf);
|
||||
(void) fclose(Dataf);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
getargs(av)
|
||||
char *av[];
|
||||
{
|
||||
if (!*++av) {
|
||||
(void) fprintf(stderr, "usage: unstr datafile\n");
|
||||
exit(1);
|
||||
}
|
||||
Infile = *av;
|
||||
(void) strcpy(Datafile, Infile);
|
||||
(void) strcat(Datafile, ".dat");
|
||||
}
|
||||
|
||||
void
|
||||
order_unstr(tbl)
|
||||
STRFILE *tbl;
|
||||
{
|
||||
unsigned int i;
|
||||
char *sp;
|
||||
off_t pos;
|
||||
char buf[BUFSIZ];
|
||||
|
||||
for (i = 0; i < tbl->str_numstr; i++) {
|
||||
(void) fread((char *) &pos, 1, sizeof pos, Dataf);
|
||||
(void) fseek(Inf, ntohl(pos), 0);
|
||||
if (i != 0)
|
||||
(void) printf("%c\n", Delimch);
|
||||
for (;;) {
|
||||
sp = fgets(buf, sizeof buf, Inf);
|
||||
if (sp == NULL || STR_ENDSTRING(sp, *tbl))
|
||||
break;
|
||||
else
|
||||
fputs(sp, stdout);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user