Importing games/fortune

Replaces commands/fortune. No Minix specific changes needed.

Change-Id: Iac79ea82dedd12e80377c85954da5e2d8eee74af
This commit is contained in:
Thomas Cort 2014-03-16 09:39:21 -04:00 committed by Lionel Sambuc
parent c1f592a24c
commit bd0f8badfa
53 changed files with 104142 additions and 282 deletions

View file

@ -9,7 +9,7 @@ SUBDIR= add_route arp ash at backup btrace \
dd decomp16 DESCRIBE devmand devsize dhcpd \
dhrystone diff diskctl \
eject fbdctl \
find fix format fortune fsck.mfs \
find fix format fsck.mfs \
gcov-pull grep host \
hostaddr ifconfig ifdef \
intr ipcrm ipcs irdpd isoread \

View file

@ -1,6 +0,0 @@
PROG= fortune
MAN=
FILESDIR= /usr/lib
FILES= fortune.dat
.include <bsd.prog.mk>

View file

@ -1,77 +0,0 @@
/* fortune - hand out Chinese fortune cookies Author: Bert Reuling */
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#define COOKIEJAR "/usr/lib/fortune.dat"
#if 0
static char *Copyright = "\0Copyright (c) 1990 Bert Reuling";
#endif
static unsigned long seed;
int main(int argc, char **argv);
unsigned long magic(unsigned long range);
int main(argc, argv)
int argc;
char *argv[];
{
int c1, c2, c3;
struct stat cookie_stat;
FILE *cookie;
if ((cookie = fopen(COOKIEJAR, "r")) == NULL) {
printf("\nSome things better stay closed.\n - %s\n", argv[0]);
exit (-1);
}
/* Create seed from : date, time, user-id and process-id. we can't get
* the position of the moon, unfortunately.
*/
seed = time( (time_t *) 0) ^ (long) getuid() ^ (long) getpid();
if (stat(COOKIEJAR, &cookie_stat) != 0) {
printf("\nIt furthers one to see the super guru.\n - %s\n", argv[0]);
exit (-1);
}
fseek(cookie, magic((unsigned long) cookie_stat.st_size), 0); /* m ove bu magic... */
c2 = c3 = '\n';
while (((c1 = getc(cookie)) != EOF) && ((c1 != '%') || (c2 != '%') || (c3 != '\n'))) {
c3 = c2;
c2 = c1;
}
if (c1 == EOF) {
printf("\nSomething unexpected has happened.\n - %s", argv[0]);
exit (-1);
}
c2 = c3 = '\n';
while (((c1 = getc(cookie)) != '%') || (c2 != '%') || (c3 != '\n')) {
if (c1 == EOF) {
rewind(cookie);
continue;
}
putc(c2, stdout);
c3 = c2;
c2 = c1;
}
putc('\n', stdout);
fclose(cookie);
return (0);
}
/* magic - please study carefull: there is more than meets the eye */
unsigned long magic(range)
unsigned long range;
{
seed = 9065531L * (seed % 9065533L) - 2 * (seed / 9065531L) + 1L;
return (seed % range);
}

View file

@ -1,167 +0,0 @@
A bore is a man who, when you ask him how he is, tells you.
- B. L. Taylor
%%
Oh gracious, why wasn't I born old and ugly?
- Dickens
%%
Weather is a literary specialty, and no untrained hand
can turn out a good article on it.
- M. Twain
%%
A verbal contract isn't worth the paper it's written on.
- S. Goldwyn
%%
"Classic." A book which people praise and don't read.
- M. Twain
%%
Three may keep a secret, if two of them are dead.
- Benjamin Franklin
%%
Everything is funny as long as it is happening
to someone else.
- Will Rogers
%%
I never forget a face, but in your case I'll make an exception.
- Groucho Marx
%%
One of the most striking differences between a cat and a lie
is that a cat has only nine lives.
- M. Twain
%%
Why is it that we rejoice at a birth and grieve at a funeral?
It is because we are not the person involved.
- M. Twain
%%
When angry, count four;
when very angry, swear.
- M. Twain
%%
A perfect vacuum exists only in the minds of men.
- P. H. Beck
%%
Those whose courses are different cannot lay plans for one another.
- Confucian Analects Bk. 15:39
%%
Learning without thought is labor lost;
thought without learning is perilous.
- Confucian Analects Bk. 2:15
%%
The falsely dramatic drives out the truly dull.
- Gennerat's Law
%%
Our universe is simply one of those things that happen from time to time.
- Edward Tryon
%%
When you have eliminated the impossible, whatever remains,
however improbable, must be the truth.
- Sherlock Holmes
%%
admiration, n.
Our polite recognition of another's resemblance to ourselves.
- Ambrose Bierce, "The Devil's Dictionary"
%%
bore, n.
A person who talks when you wish him to listen.
- Ambrose Bierce, "The Devil's Dictionary"
%%
coward, n.
One who in a perilous emergency thinks with his legs.
- Ambrose Bierce, "The Devil's Dictionary"
%%
What is worth doing is worth the trouble of asking somebody to do it.
%%
Famous remarks are very seldom quoted correctly.
- Simeon Strunsky
%%
To go beyond is as wrong as to fall short.
- Confucian Analects, Bk. 11:15,iii
%%
He who speaks without modesty will find
it difficult to make his words good.
- Confucian Analects, Bk. 14:21
%%
Heaven and earth are not humane.
They regard all things as straw dogs.
- Lao Tzu
%%
He who knows others is wise.
He who knows himself is enlightened.
- Lao Tzu
%%
He who knows does not speak.
He who speaks does not know.
- Lao Tzu
%%
To know that you do not know is the best.
To pretend to know when you do not know is a disease.
- Lao Tzu
%%
Time is the most valuable thing a man can spend.
- Theophrastus
%%
You cannot put the same shoe on every foot.
- Publilius Syrus
%%
If I have seen further it is by standing on the shoulders of giants.
- Sir Isaac Newton
%%
The probability of someone watching you is
proportional to the stupidity of your action.
- A. Kindsvater
%%
The various forms of worship, which prevailed in the Roman world,
were all considered by the people as equally true; by the philosopher,
as equally false; and by the magistrate, as equally useful.
- Edward Gibbon, "The Decline and Fall of the Roman Empire"
%%
Of course you realize this means war!
- Bugs Bunny
%%
The optimist proclaims that we live in the best of all possible worlds;
and the pessimist fears this is true.
- James Branch Cabell
%%
Never underestimate the power of human stupidity.
- From the "Notebooks of Lazarus Long" by Robert Heinlein
%%
Only a mediocre person is always at his best.
- W. Somerset Maugham
%%
Life is a continuing series of multiple-choice questions, with the answers
torn out of the back of the book.
- Sydney J. Harris
%%
There is a theory which states that if ever anyone discovers exactly what
the Universe is for and why it is here. it will instantly disappear and
be replaced by something even more bizarre and inexplicable.
There is another theory which states that this has already happened.
- Douglas Adams, "The Restaurant at the end of the Universe"
%%
The following sentence is false.
The preceding sentence is true.
%%
A well-frog cannot imagine the ocean, nor can a
summer insect conceive of ice. How can a scholar
understand the Tao? He is restricted by his own
learning.
- Chung-tse
%%
panic: can't spare any memory for you today.
%%
!XINIM ni deppart m'I !pleH
%%
panic: page segment violation
%%
panic: not enough memory (hey, I've got some very cheap 41256's for you)
%%
Heaven wheels above you
Displaying to you eternal glories
And still your eyes are on the ground.
- Dante
%%
When the mind is disturbed, the multiplicity of things is
produced, but when the mind is quieted, the multiplicity
of things disappears.
- Ashvaghosha, "The Awakening of Faith.
%%

View file

@ -302,7 +302,6 @@
./usr/bin/flex minix-sys
./usr/bin/fold minix-sys
./usr/bin/format minix-sys
./usr/bin/fortune minix-sys
./usr/bin/fpr minix-sys
./usr/bin/from minix-sys
./usr/bin/fsplit minix-sys
@ -558,8 +557,11 @@
./usr/games minix-sys
./usr/games/adventure minix-sys
./usr/games/factor minix-sys
./usr/games/fortune minix-sys
./usr/games/hide minix-sys
./usr/games/primes minix-sys
./usr/games/strfile minix-sys
./usr/games/unstr minix-sys
./usr/include minix-sys
./usr/include/aio.h minix-sys
./usr/include/a.out.h minix-sys
@ -1682,7 +1684,6 @@
./usr/lib/fonts/koi8-r.fnt minix-sys
./usr/lib/fonts/koi8-u.fnt minix-sys
./usr/lib/fonts/polish.fnt minix-sys
./usr/lib/fortune.dat minix-sys
./usr/lib/gcrt0.o minix-sys
./usr/lib/keymaps minix-sys
./usr/lib/keymaps/abnt2.map minix-sys
@ -2052,7 +2053,6 @@
./usr/man/man1/fold.1 minix-sys
./usr/man/man1/for.1 minix-sys
./usr/man/man1/format.1 minix-sys
./usr/man/man1/fortune.1 minix-sys
./usr/man/man1/fpr.1 minix-sys
./usr/man/man1/from.1 minix-sys
./usr/man/man1/fsck.mfs.1 minix-sys
@ -4751,6 +4751,7 @@
./usr/man/man6 minix-sys
./usr/man/man6/adventure.6 minix-sys
./usr/man/man6/factor.6 minix-sys
./usr/man/man6/fortune.6 minix-sys
./usr/man/man6/primes.6 minix-sys
./usr/man/man7 minix-sys
./usr/man/man7/ascii.7 minix-sys
@ -4841,11 +4842,13 @@
./usr/man/man8/shutdown.8 minix-sys
./usr/man/man8/slip.8 minix-sys
./usr/man/man8/srccrc.8 minix-sys
./usr/man/man8/strfile.8 minix-sys
./usr/man/man8/sync.8 minix-sys
./usr/man/man8/syslogd.8 minix-sys
./usr/man/man8/tcpd.8 minix-sys
./usr/man/man8/unix.8 minix-sys
./usr/man/man8/unlink.8 minix-sys
./usr/man/man8/unstr.8 minix-sys
./usr/man/man8/update.8 minix-sys
./usr/man/man8/usage.8 minix-sys
./usr/man/man8/user.8 minix-sys
@ -4997,6 +5000,33 @@
./usr/share/examples/lutok/interpreter.cpp minix-sys kyua
./usr/share/examples/lutok/raii.cpp minix-sys kyua
./usr/share/games minix-sys
./usr/share/games/fortune minix-sys
./usr/share/games/fortune/farber minix-sys
./usr/share/games/fortune/farber.dat minix-sys
./usr/share/games/fortune/fortunes minix-sys
./usr/share/games/fortune/fortunes-o minix-sys
./usr/share/games/fortune/fortunes-o.dat minix-sys
./usr/share/games/fortune/fortunes.dat minix-sys
./usr/share/games/fortune/fortunes2 minix-sys
./usr/share/games/fortune/fortunes2-o minix-sys
./usr/share/games/fortune/fortunes2-o.dat minix-sys
./usr/share/games/fortune/fortunes2.dat minix-sys
./usr/share/games/fortune/limerick minix-sys
./usr/share/games/fortune/limerick-o minix-sys
./usr/share/games/fortune/limerick-o.dat minix-sys
./usr/share/games/fortune/limerick.dat minix-sys
./usr/share/games/fortune/netbsd minix-sys
./usr/share/games/fortune/netbsd-o minix-sys
./usr/share/games/fortune/netbsd-o.dat minix-sys
./usr/share/games/fortune/netbsd-tips minix-sys
./usr/share/games/fortune/netbsd-tips.dat minix-sys
./usr/share/games/fortune/netbsd.dat minix-sys
./usr/share/games/fortune/startrek minix-sys
./usr/share/games/fortune/startrek.dat minix-sys
./usr/share/games/fortune/unamerican-o minix-sys
./usr/share/games/fortune/unamerican-o.dat minix-sys
./usr/share/games/fortune/zippy minix-sys
./usr/share/games/fortune/zippy.dat minix-sys
./usr/share/info minix-sys
./usr/share/info/as.info minix-sys binutils
./usr/share/info/bfd.info minix-sys binutils

View file

@ -114,6 +114,7 @@
./usr/share/doc/psd/19.curses
./usr/share/info
./usr/share/games
./usr/share/games/fortune
./usr/share/misc
./usr/share/mk
./usr/share/nvi

View file

@ -10,7 +10,7 @@
SUBDIR= adventure \
\
\
factor \
factor fortune \
\
primes

6
games/fortune/Makefile Normal file
View file

@ -0,0 +1,6 @@
# $NetBSD: Makefile,v 1.10 2008/09/26 18:56:43 apb Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
SUBDIR= fortune strfile unstr .WAIT datfiles
.include <bsd.subdir.mk>

178
games/fortune/Notes Normal file
View 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
games/fortune/README Normal file
View 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"

View file

@ -0,0 +1,88 @@
# $NetBSD: Makefile,v 1.38 2008/09/26 18:23:09 apb Exp $
# @(#)Makefile 8.2 (Berkeley) 4/19/94
.include <bsd.own.mk> # for INSTALL_OFFENSIVE_FORTUNES
SRCFILES= fortunes fortunes2 startrek zippy unamerican-o limerick \
netbsd farber netbsd-tips
DATFILES= fortunes.dat fortunes2.dat startrek.dat zippy.dat \
fortunes-o fortunes-o.dat fortunes2-o fortunes2-o.dat \
limerick.dat limerick-o limerick-o.dat unamerican-o \
unamerican-o.dat netbsd.dat netbsd-o netbsd-o.dat \
farber.dat netbsd-tips.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=${TOOL_STRFILE}
.if ${MKSHARE} != "no"
FILES=${SRCFILES} ${DATFILES}
FILESDIR=/usr/share/games/fortune
.endif
realall: ${DATFILES}
# Normal fortunes: build directly from data files.
fortunes.dat fortunes2.dat startrek.dat zippy.dat limerick.dat netbsd.dat farber.dat netbsd-tips.dat:
${_MKTARGET_CREATE}
${STRFILE} -rs ${.CURDIR}/${.TARGET:R} ${.TARGET}
fortunes.dat: fortunes
fortunes2.dat: fortunes2
startrek.dat: startrek
zippy.dat: zippy
limerick.dat: limerick
netbsd.dat: netbsd
farber.dat: farber
netbsd-tips.dat: netbsd-tips
# Obscene fortunes: we have to build source and data files
fortunes-o: fortunes-o.${TYPE}
${_MKTARGET_CREATE}
tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
fortunes-o.dat: fortunes-o
${_MKTARGET_CREATE}
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
fortunes2-o: fortunes2-o.${TYPE}
${_MKTARGET_CREATE}
tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
fortunes2-o.dat: fortunes2-o
${_MKTARGET_CREATE}
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
limerick-o: limerick-o.${TYPE}
${_MKTARGET_CREATE}
tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
limerick-o.dat: limerick-o
${_MKTARGET_CREATE}
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
unamerican-o: unamerican-o.${TYPE}
${_MKTARGET_CREATE}
tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
unamerican-o.dat: unamerican-o
${_MKTARGET_CREATE}
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
netbsd-o: netbsd-o.${TYPE}
${_MKTARGET_CREATE}
tr 'a-zA-Z' 'n-za-mN-ZA-M' < ${.ALLSRC} > ${.TARGET}
netbsd-o.dat: netbsd-o
${_MKTARGET_CREATE}
${STRFILE} -rsx ${.ALLSRC} ${.TARGET}
.include <bsd.prog.mk>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,2 @@
There are no potentially offensive fortunes installed on this
system. For further details, contact your system administrator.

File diff suppressed because it is too large Load diff

View 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
foresight
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

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,2 @@
There are no potentially offensive fortunes installed on this
system. For further details, contact your system administrator.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,160 @@
A UNIX saleslady, Lenore,
Enjoys work, but she likes the beach more.
She found a good way
To combine work and play:
She sells C shells by the seashore.
%
A computer, to print out a fact,
Will divide, multiply, and subtract.
But this output can be
No more than debris,
If the input was short of exact.
-- Gigo
%
A crusader's wife slipped from the garrison
And had an affair with a Saracen.
She was not oversexed,
Or jealous or vexed,
She just wanted to make a comparison.
%
A dozen, a gross, and a score,
Plus three times the square root of four,
Divided by seven,
Plus five times eleven,
Equals nine squared plus zero, no more.
%
A dreary young bank clerk named Fennis
Wished to foster an aura of menace;
To make people afraid
He wore gloves of grey suede
And white footgear intended for tennis.
-- Edward Gorey
%
A hacker who screwed a mag tape
Was caught and convicted of rape.
To jail he did go,
From which, to his woe
He couldn't get out with ESC.
%
A limerick packs laughs anatomical
Into space that is quite economical.
But the good ones I've seen
So seldom are clean,
And the clean ones so seldom are comical.
%
A linguist thought it a farce
That memory space was so sparse.
One day they increased it.
Said he as he seized it:
"At last! Enough core for the parse".
%
A new dramatist of the absurd
Has a voice that will shortly be heard.
I learn from my spies
He's about to devise
An unprintable three-letter word.
%
A progressive professor named Winners
Held classes each evening for sinners.
They were graded and spaced
So the vile and debased
Would not be held back by beginners.
%
A very intelligent turtle
Found programming UNIX a hurdle
The system, you see,
Ran as slow as did he,
And that's not saying much for the turtle.
%
A wonderful bird is the pelican.
His mouth can hold more than his belican.
He can take in his beak
Enough food for a week.
And I'm darned if I know how the helican.
%
Despising machines to a man,
The Luddites joined up with the Klan,
And ride out by night
In a sheeting of white
To lynch all the robots they can.
-- C. M. and G. A. Maxson
%
Flappity, floppity, flip
The mouse on the m"obius strip;
The strip revolved,
The mouse dissolved
In a chronodimensional skip.
%
If you stick a stock of liquor in your locker,
It is slick to stick a lock upon your stock.
Or some joker who is slicker,
Will trick you of your liquor,
If you fail to lock your liquor with a lock.
%
Limericks are art forms complex,
Their topics run chiefly to sex.
They usually have virgins,
And masculine urgin's,
And other erotic effects.
%
System/3! System/3!
See how it runs! See how it runs!
Its monitor loses so totally!
It runs all its programs in RPG!
It's made by our favorite monopoly!
System/3!
%
There once was a girl named Irene
Who lived on distilled kerosene
But she started absorbin'
A new hydrocarbon
And since then has never benzene.
%
There once was a member of Mensa
Who was a most excellent fencer.
The sword that he used
Was his -- (line is refused,
And has now been removed by the censor).
%
There once was an old man from Esser,
Who's knowledge grew lesser and lesser.
It at last grew so small,
He knew nothing at all,
And now he's a College Professor.
%
There was a young lady from Hyde
Who ate a green apple and died.
While her lover lamented
The apple fermented
And made cider inside her inside.
%
There was a young lady from Niger
Who smiled as she rode on a tiger;
They returned from the ride
With the lady inside,
And the smile on the face of the tiger.
%
There was a young man who said "God,
I find it exceedingly odd,
That the willow oak tree
Continues to be,
When there's no one about in the Quad."
"Dear Sir, your astonishment's odd,
For I'm always about in the Quad;
And that's why the tree,
Continues to be,"
Signed "Yours faithfully, God."
%
There was a young poet named Dan,
Whose poetry never would scan.
When told this was so,
He said, "Yes, I know.
It's because I try to put every possible syllable into that last line that I can."
%
A computer called Illiac4
Had a rather tough bug in its core.
It chewed up its cards
And spewed yards and yards
Of illegible tape on the floor.
%

View file

@ -0,0 +1,2 @@
There are no potentially offensive fortunes installed on this
system. For further details, contact your system administrator.

File diff suppressed because it is too large Load diff

View file

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

View file

@ -0,0 +1,2 @@
There are no potentially offensive fortunes installed on this
system. For further details, contact your system administrator.

View file

@ -0,0 +1,53 @@
Anagrams for NetBSD core team:
Strobe mased net
Strobe mased ten
Erect teen bonds
A boned cream test
Cremate no debts
-- Julian Assange
%
NetBSD - Bits for Tits.
-- Julian Assange
%
NetBSD - Multiple Architectures lead to Multiple Orgasms.
-- Julian Assange
%
NetBSD - We put the OS in OrgaSm.
-- Julian Assange
%
NetBSD - We sell rope.
%
NetBSD - more ports than a Norwegian crack whore.
-- Julian Assange
%
NetBSD - the semen in the money shot.
-- Julian Assange
%
NetBSD - we're on a mission from Hell.
-- Julian Assange
%
NetBSD logo: Kiss-painted (w/tongue) Beastie stabbing a pitchfork
through a bloodied and obviously-in-horrible-pain Tux.
-- Mason Loring Bliss
%
NetBSD long theme: "Eat a queer fetus for Jesus, and run NetBSD!"
-- Mason Loring Bliss
%
NetBSD, stupid.
-- Julian Assange
%
NetBSD: More Ports That A Cheap Whore
-- Andrew Gillham
%
NetBSD: No Sh;t!
-- Andrew Gillham
%
NetBSD: Unix With Balls.
-- Andrew Gillham
%
NetBSD: better for your uptime than Viagra.
-- Daniel Carosone
%
Never mind the bollocks, here's NetBSD.
-- Julian Assange
%

View file

@ -0,0 +1,143 @@
List 20 largest files (larger than 5 MB) sorted by megabytes:
find / -type f -size +10000 -print0 | xargs -0 du -m | sort -nr | head -20
%
You can keep specific rc.conf configurations in individual files
under /etc/rc.conf.d/ where each file is named after the $name of
the rc.d script. Some configurations may have different names than
the script; see the $name variable to check.
%
You can see the total used buffers in megabytes with:
vmstat -s | awk '
/ bytes per page$/ { bpp = $1 }
/ cached file pages$/ { cfp = $1 }
/ cached executable pages$/ { cep = $1 }
END { print((cfp + cep) * bpp / 1024 / 1024); }'
%
You can view a value of a variable in pkgsrc by using the show-var
target, for example:
make show-var VARNAME=MAINTAINER
%
You can view the basic order of your rc.d scripts with:
rcorder /etc/rc.d/*
%
You can ask questions about NetBSD at the netbsd-users@NetBSD.org
mailing list. Be sure to clearly explain your problem, what you
tried, what results you had, and what you expected.
%
You can view your non-default Postfix settings with:
postconf -n
%
To report about installed packages with known vulnerabilities,
fetch the latest pkg-vulnerabilities file as the superuser with:
download-vulnerability-list
And then run:
audit-packages
%
The following shows an example of temporarily adding 10MB more swap
space for virtual memory:
dd if=/dev/zero of=/root/swapfile bs=1024 count=10240
chmod go= /root/swapfile
swapctl -a /root/swapfile
%
If your console ever gets broken, you can try resetting it to its
initial state with:
printf "\033c
%
If you installed a package, but don't know what the software is
called or what executables to run, use pkg_info with the -L switch
to list the package's files and search for /bin:
pkg_info -L PACKAGE-NAME | grep /bin
%
A new user can be added by using the useradd tool with the -m switch
to create the home directory. Then set the password. For example:
useradd -m susan
passwd susan
%
To modify user account information use the chpass or usermod tools.
If you need to edit the user database directly, use the vipw command.
%
You can temporarily start the SSH server by running the following
as root:
/etc/rc.d/sshd onestart
%
Several IP Filter and ipnat examples are available in the
/usr/share/examples/ipf/ directory.
%
Want to dual boot using a bluetooth mouse or keyboard? Use btkey(1)
to store the link key in the hardware.
%
If you are having trouble connecting to a remote bluetooth device,
try the btconfig(8) inquiry command. The kernel will retain some
clock offset information that may help.
%
You can download files via HTTP using the ftp(1) command; for example:
ftp http://www.NetBSD.org/images/NetBSD.png
%
The mtree(8) tool can be used to check permissions, ownerships,
file changes, and more when compared against a specification. For
example to check directory ownership and permissions for standard
NetBSD directories, run:
/usr/sbin/mtree -e -p / -f /etc/mtree/NetBSD.dist
%
If you need reminders on your console to leave, use the leave(1)
tool. For example to receive reminders to leave in one hour:
leave +0100
%
To stop non-superuser logins until next boot, as root:
touch /etc/nologin
%
When extracting distribution tar sets, be sure to use the pax -pe
option or the tar -p switch to preserve the user and group and file
modes (including setuid and setgid). This is needed, for example,
so su(1) will work after extracting the base.tgz set.
%
Math can be done within the sh(1) and ksh(1) shells or with expr(1),
dc(1), bc(1), or awk(1). Here are some simple examples:
echo $((431 * 79))
expr 60 \* 60 \* 24 \* 7
%
You can view network connections with the fstat, netstat -a, sockstat,
and "systat netstat" commands.
%
Visit the NetBSD Security website to keep track of advisories:
http://www.NetBSD.org/support/security/
Or join the security-announce mailing list for alerts:
http://www.netbsd.org/mailinglists/#security-announce
%
Here's an example of finding what package a file belongs to:
pkg_info -Fe /usr/pkg/bin/inw
%
Many log files are checked for rotation every hour by newsyslog(8).
It is configured in /etc/newsyslog.conf.
%
NetBSD's default cron jobs are defined in the /var/cron/tabs/root
file. As the superuser, use "crontab -l" to view it. To edit it,
use "crontab -e" (which defaults to using the vi(1) editor).
%
You can make sure that your system is stable and behaves correctly by
running the tests in /usr/tests (which come from the tests.tgz set).
To do so:
vi /etc/atf/NetBSD.conf
cd /usr/tests
atf-run | atf-report
%

View file

@ -0,0 +1,753 @@
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.
-- Kang 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.
-- McCoy, "The Conscience of the King," stardate 2818.9
%
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 they get
to know each other.
-- Kirk, "Elaan of Troyius", stardate 4372.5
%
"The release of emotion is what keeps us healthy. 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
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 witch 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 by 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 ... it's 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 Dehner, "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.

View 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
Kang
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

View file

@ -0,0 +1,2 @@
There are no potentially offensive fortunes installed on this
system. For further details, contact your system administrator.

View file

@ -0,0 +1,385 @@
SHUT UP HIPPY
%
YOU'RE ALL SHEEP
%
SELL ME DRUGS
%
TELEVISION LOVES ME
%
DON'T POSTPONE JOY
%
FUCK SLOGANS
%
COFFEE NOW DAMMIT
%
THIS WORLD IS SHIT
%
SMASH THE STATE
%
DARN THE GOV'T
%
WHITEY WILL PAY
%
MY JOB SUCKS ASS
%
BAD SEX SUCKS
%
I'M FUCKING METAL
%
I WORSHIP SATAN HA HA
%
ADULTS ARE DUMB
%
WE'RE DOOMED
%
DON'T GET CAUGHT
%
THE END IS NEAR
%
GOD IS OBSOLETE
%
FUCK YOU, GOD
%
NO MORE BULLSHIT
%
WARM THE GLOBE
%
JESUS HATES ME
%
FUCK WORK
%
DRUGS HELP ALOT
%
COPS SMELL FUNNY
%
WEIRDOS UNITE!
%
MICROSOFT MUST DIE
%
WHY DOES SCHOOL SUCK?
%
MY BOSS IS A JERK
%
JESUS JUST LEFT
%
REBOOT AMERICA
%
DESTROY CAPITALISM
%
I HATE THE RICH
%
I AM AN ANARCHIST
%
BOMB THE MALL
%
WAKE THE FUCK UP
%
DOPE SMOKIN' MORON
%
KIDS LOVE SATAN
%
THE SYSTEM'S FUCKED
%
WOMEN WILL RISE
%
FUCK SCHOOL
%
I HATE COMPUTERS
%
LIFE ISN'T FAIR
%
POLITICS ARE BORING
%
NO CHANGE SORRY
%
GOOD FOR NOTHING
%
RACISM IS TYPICAL
%
YOU'RE A SEXIST
%
BORED
%
BROKE
%
WAGE-SLAVE
%
MAKE IT STOP
%
FUCK ART LET'S KILL
%
END CIVILIZATION
%
CALL IN SICK
%
TWENTYNOTHING
%
GOAT-BOY
%
My dad's a cop too,
couldja let me go now?
%
KEEP MUSIC EVIL
%
FUCK FAST FOOD
%
ORGASMS ARE GOOD
%
BREAK SOME LAWS
%
STAMP OUT REALITY
%
LIVE THE CHAOS
%
WE'RE ALL PERVERTS
%
UNEMPLOYABLE
%
LEGALIZE YOURSELF
%
T.V. CASUALTY
%
BE NOT HALF-ASSED
%
ANNOY THE BORING
%
PUNK ROCK GIRL
%
GOD MASTURBATES
%
DIE MTV DIE
%
I AM A POSEUR
%
TOUCH ME I'M SICK
%
ANTI-FASHION
%
PIGS VS. PEOPLE
%
NOT OF THIS EARTH
%
DRUGS SUCK ALOT
%
Sex with you would suck.
%
I'm killing the Earth!
%
I guess I was punk once.
%
i represent
GOD
you fuck
%
My world is cold
and without hope.
%
GIMME GIMME
FOOD STAMPS
%
THIS ISN'T ME
%
FUCK DECAF
%
DEFEATED
%
Blow up Disneyland.
%
California is overrated.
%
UNAMERICAN
%
I AM CONFUSED
%
SEX TOYS ROCK
%
GO FUCKING PRAY
%
NATURE IS PISSED
%
FUGAZIFY YOURSELF
%
I'M IN SCENESTER HELL
%
RESIST DESPAIR
%
EVIL WILL TRIUMPH
%
FUCK YOUR LAME ADS
%
RACE MIXING IS COOL
%
EMBRACE VIOLENCE
%
AMERICAN WASTE
%
FUCKING HOSTILE
%
SEIZE LIBERTY
%
DESTROY WHAT
BORES YOU
ON SIGHT
%
FUCK YEAH I'M WEIRD
%
FUCK CENSORSHIP
%
WE'RE NOT DUMB
%
DEMAND JUSTICE
%
FREAK PRIDE
%
CULT MEMBER
%
CONFORMIST
REVOLUTION
%
FUCK SHIT UP
%
DON'T LET ME FAIL
%
GROOVE MATTERS
%
SURVIVE Y2K SOMEHOW
%
TAX THE RICH
%
MAKE YUPPIES SUFFER
%
GET A JOB JUNKIE
%
ARM THE HOMELESS
%
BOYCOTT GEN-X CRAP
%
GODLESS COMMIE SCUM
%
I STILL BELIEVE
%
SCARE THE SQUARE
%
I AM A BAD ASS
%
UNLEASH INFINITY
%
ESTROGEN POWER
%
HEDONISM NOW!
%
SOMEBODY DOSE ME
%
REAGAN WAS WORSE
%
children know everything
%
TRAITOR
%
SINNER
%
UNITY
%
UNDERSTAND
%
GO CORPORATE
%
You LIVE in that head?
%
JUST BE PURE
%
PIGS SHOULDN'T RULE
%
Go work on your website.
%
America eats its young.
%
LAUGH AT ASSHOLES
%
PEOPLE ARE MIRACLES
%
DESTINATION UNKNOWN
%
HEAL YOUR FUCKERS
%
CONSIDER SOBREITY
%
INHERIT THE EARTH
%
DROP THE ATTITUDE
%
ALL POLITICIANS LIE
%
GOTTA LOVE HOTTIES
%
what's stopping you?
%
IMPEACH 'EM ALL
%
HOOK ME UP BABY
%
i'm so fucking beautiful
%
SO MANY FEELINGS
%
QUIT BEING PASSIVE
%
GO BEYOND COMFORT
%
STOP LIVING LIKE VEAL
%
ask me about my pain
%
OVERTHROW THAT SHIT
%
BORN TO CHILL
%
Whose future is it, anyway?
%
This is a nation of whores.
%
YOUR KIDS ARE TRIPPING
%
FUCK ALL PREJUDICE
%
SHHHHHH. LISTEN.
%
FIGHT FAT PHOBIA
%
VICTORY OVER HORSESHIT
%
everyone is a prostitute
%
DON'T STOP BELIEVING
%
YOU'RE BISEXUAL
%
MINIMIZE BAD THINGS
%
YOU'RE MY RELIGION
%
I WORSHIP YOU
%
MY MACINTOSH RULES
%
CHEER UP EMO KID
%
LIVE FREE OR DIE
%
TELEVISION IS TORTURE
%
BRING THAT BEAT BACK
%
HUG A REVOLUTIONARY
%
DON'T FEAR THE REAPER
%
SHOW ME THE WAY
%
I CAN MAKE YOU GOD
%
WOMEN TAKE OVER
%
SO FUCKING DEEP
%
WHY OBEY MORONS?

1363
games/fortune/datfiles/zippy Normal file

File diff suppressed because it is too large Load diff

View 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
DAIQUIRI
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

View file

@ -0,0 +1,9 @@
# $NetBSD: Makefile,v 1.12 2009/08/27 03:12:16 dholland Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= fortune
MAN= fortune.6
CPPFLAGS+= -I${.CURDIR}/../strfile
.include "../../Makefile.inc"
.include <bsd.prog.mk>

View file

@ -0,0 +1,183 @@
.\" $NetBSD: fortune.6,v 1.13 2012/08/04 22:29:59 jdf 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. 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 September 9, 2004
.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 i
Ignore case for
.Fl m
patterns.
.It Fl l
Long dictums only.
.It Fl m Ar pattern
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.
.Ed
.Bd -filled -offset indent-two -compact
--H. Allen Smith, "Rude Jokes"
.Ed
.It Fl s
Short apothegms only.
.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
.Sq %
character.
If it is, there will be an
.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
.Dq 10%
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-funny
.Ed
.Pp
Datafiles for
.Nm
are created by the
.Xr strfile 8
utility, which is not installed by default,
The source code for this utility
can be found in
.Pa /usr/src/games/fortune/strfile ,
if it exists.
.Sh FILES
.Bl -tag -width XX/usr/share/games/fortune/*XX -compact
.It Pa /usr/share/games/fortune/*
Fortune files.
.El
.Sh SEE ALSO
.Xr regex 3 ,
.Xr random 6 ,
.Xr rot13 6 ,
.Xr strfile 8

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,34 @@
/* $NetBSD: pathnames.h,v 1.4 2003/08/07 09:37:14 agc 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. 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 "/usr/share/games/fortune"

View file

@ -0,0 +1,9 @@
# $NetBSD: Makefile,v 1.10 2008/09/26 18:56:43 apb Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
PROG= strfile
MAN= strfile.8
MLINKS= strfile.8 unstr.8
.include "../../Makefile.inc"
.include <bsd.prog.mk>

View file

@ -0,0 +1,143 @@
.\" $NetBSD: strfile.8,v 1.16 2013/09/19 00:58:11 uwe 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. 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 January 17, 2010
.Dt STRFILE 8
.Os
.Sh NAME
.Nm strfile ,
.Nm unstr
.Nd "create a random access file for storing strings"
.Sh SYNOPSIS
.Nm
.Op Fl iorsx
.Op Fl c Ar char
.Ar source_file
.Op Ar output_file
.Nm unstr
.Ar source_file
.Sh DESCRIPTION
.Nm
reads a file containing groups of lines separated by a line containing
a single percent
.Ql \&%
sign and creates a data file which contains
a header structure and a table of file offsets for each group of lines.
This allows random access of the strings.
.Pp
The output file, if not specified on the command line, is named
.Ar source_file Ns Sy .dat .
.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
.Fa 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
.Fa str_flags
field to be set.
.It Fl s
Run silently; don't give a summary message when finished.
.It Fl x
Note that each alphabetic character in the groups of lines is rotated
13 positions in a simple caesar cipher.
This option causes the
.Dv STR_ROTATED
bit in the header
.Fa str_flags
field to be set.
.El
.Pp
The format of the header is:
.Bd -literal -offset indent
#define VERSION 1
unsigned long str_version; /* version number */
unsigned long str_numstr; /* # of strings in the file */
unsigned long str_longlen; /* length of longest string */
unsigned long str_shortlen; /* length of shortest string */
#define STR_RANDOM 0x1 /* randomized pointers */
#define STR_ORDERED 0x2 /* ordered pointers */
#define STR_ROTATED 0x4 /* rot-13'd text */
unsigned long str_flags; /* bit field for flags */
char str_delim; /* delimiting character */
.Ed
.Pp
All fields are written in big-endian byte order.
.Pp
The purpose of
.Nm unstr
is to undo the work of
.Nm .
It prints out the strings contained in the file
.Ar source_file
in the order that they are listed in the header file
.Ar source_file Ns Sy .dat
to standard output.
It is possible to create sorted versions of input files by using
.Fl o
when
.Nm
is run and then using
.Nm unstr
to dump them out in the table order.
.Sh FILES
.Bl -tag -width strfile.out -compact
.It Pa strfile.dat
default output file.
.El
.Sh SEE ALSO
.Xr byteorder 3 ,
.Xr fortune 6
.Sh HISTORY
The
.Nm
utility first appeared in
.Bx 4.4 .

View file

@ -0,0 +1,476 @@
/* $NetBSD: strfile.c,v 1.38 2013/09/19 00:34:00 uwe 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. 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.
*/
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif
#ifdef __NetBSD__
#include <sys/cdefs.h>
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1989, 1993\
The Regents of the University of California. All rights reserved.");
#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.38 2013/09/19 00:34:00 uwe Exp $");
#endif
#endif /* not lint */
#endif /* __NetBSD__ */
#include <sys/types.h>
#include <sys/param.h>
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <inttypes.h>
#include <err.h>
#include "strfile.h"
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif /* MAXPATHLEN */
/*
* This program takes a file composed of strings separated 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 STORING_PTRS (Oflag || Rflag)
# define CHUNKSIZE 512
# define ALLOC(ptr,sz) do { \
if (ptr == NULL) \
ptr = malloc(CHUNKSIZE * sizeof *ptr); \
else if (((sz) + 1) % CHUNKSIZE == 0) \
ptr = realloc(ptr, ((sz) + CHUNKSIZE) * sizeof *ptr); \
if (ptr == NULL) \
err(1, "out of space"); \
} while (0)
typedef struct {
char first;
off_t pos;
} STR;
static char *Infile = NULL; /* input file name */
static char Outfile[MAXPATHLEN] = ""; /* output file name */
static char Delimch = '%'; /* delimiting character */
static int Sflag = 0; /* silent run flag */
static int Oflag = 0; /* ordering flag */
static int Iflag = 0; /* ignore case flag */
static int Rflag = 0; /* randomize order flag */
static int Xflag = 0; /* set rotated bit */
static long Num_pts = 0; /* number of pointers/strings */
static off_t *Seekpts;
static FILE *Sort_1, *Sort_2; /* pointers for sorting */
static STRFILE Tbl; /* statistics table */
static STR *Firstch; /* first chars of each string */
static uint32_t h2nl(uint32_t h);
static void getargs(int argc, char **argv);
static void usage(void) __dead;
static void add_offset(FILE *fp, off_t off);
static void do_order(void);
static int cmp_str(const void *vp1, const void *vp2);
static void randomize(void);
static void fwrite_be_offt(off_t off, FILE *f);
/*
* 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(int ac, char **av)
{
char *sp, dc;
FILE *inf, *outf;
off_t last_off, length, pos;
int first;
char *nsp;
STR *fp;
static char string[257];
long i;
/* sanity test */
if (sizeof(uint32_t) != 4)
errx(1, "sizeof(uint32_t) != 4");
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, SEEK_SET);
/*
* Write the strings onto the file
*/
Tbl.str_longlen = 0;
Tbl.str_shortlen = (unsigned int) 0x7fffffff;
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((unsigned char)*nsp); nsp++)
continue;
ALLOC(Firstch, Num_pts);
fp = &Firstch[Num_pts - 1];
if (Iflag && isupper((unsigned char)*nsp))
fp->first = tolower((unsigned char)*nsp);
else
fp->first = *nsp;
fp->pos = Seekpts[Num_pts - 1];
first = 0;
}
} 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", (unsigned long)Tbl.str_longlen,
Tbl.str_longlen == 1 ? "" : "s");
printf("Shortest string: %lu byte%s\n", (unsigned long)Tbl.str_shortlen,
Tbl.str_shortlen == 1 ? "" : "s");
}
(void) fseek(outf, (off_t) 0, SEEK_SET);
Tbl.str_version = h2nl(Tbl.str_version);
Tbl.str_numstr = h2nl(Num_pts - 1);
Tbl.str_longlen = h2nl(Tbl.str_longlen);
Tbl.str_shortlen = h2nl(Tbl.str_shortlen);
Tbl.str_flags = h2nl(Tbl.str_flags);
(void) fwrite((char *) &Tbl, sizeof Tbl, 1, outf);
if (STORING_PTRS) {
for (i = 0; i < Num_pts; i++)
fwrite_be_offt(Seekpts[i], outf);
}
fflush(outf);
if (ferror(outf))
err(1, "fwrite %s", Outfile);
(void) fclose(outf);
exit(0);
}
/*
* This routine evaluates arguments from the command line
*/
static void
getargs(int argc, char **argv)
{
int ch;
extern int optind;
extern char *optarg;
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");
}
}
static void
usage(void)
{
(void) fprintf(stderr,
"Usage: %s [-iorsx] [-c char] sourcefile [datafile]\n",
getprogname());
exit(1);
}
/*
* add_offset:
* Add an offset to the list, or write it out, as appropriate.
*/
static void
add_offset(FILE *fp, off_t off)
{
if (!STORING_PTRS) {
fwrite_be_offt(off, fp);
} else {
ALLOC(Seekpts, Num_pts + 1);
Seekpts[Num_pts] = off;
}
Num_pts++;
}
/*
* do_order:
* Order the strings alphabetically (possibly ignoring case).
*/
static void
do_order(void)
{
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;
}
static int
cmp_str(const void *vp1, const void *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, SEEK_SET);
(void) fseek(Sort_2, p2->pos, SEEK_SET);
n1 = 0;
n2 = 0;
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.
*/
static void
randomize(void)
{
int cnt, i;
off_t tmp;
off_t *sp;
srandom((int)(time(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;
}
}
/*
* fwrite_be_offt:
* Write out the off paramater as a 64 bit big endian number
*/
static void
fwrite_be_offt(off_t off, FILE *f)
{
int i;
unsigned char c[8];
for (i = 7; i >= 0; i--) {
c[i] = off & 0xff;
off >>= 8;
}
fwrite(c, sizeof(c), 1, f);
}
static uint32_t
h2nl(uint32_t h)
{
unsigned char c[4];
uint32_t rv;
c[0] = (h >> 24) & 0xff;
c[1] = (h >> 16) & 0xff;
c[2] = (h >> 8) & 0xff;
c[3] = (h >> 0) & 0xff;
memcpy(&rv, c, sizeof rv);
return (rv);
}

View file

@ -0,0 +1,54 @@
/* $NetBSD: strfile.h,v 1.7 2008/10/19 07:56:42 apb 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. 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
*/
#include <stdint.h>
#define STR_ENDSTRING(line,tbl) \
((line)[0] == (tbl).str_delim && (line)[1] == '\n')
typedef struct { /* information table */
#define VERSION 1
uint32_t str_version; /* version number */
uint32_t str_numstr; /* # of strings in the file */
uint32_t str_longlen; /* length of longest string */
uint32_t 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 */
uint32_t str_flags; /* bit field for flags */
unsigned char stuff[4]; /* long aligned space */
#define str_delim stuff[0] /* delimiting character */
} STRFILE;

View 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

View 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

View 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
..

View 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

View 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'

View file

@ -0,0 +1,10 @@
# $NetBSD: Makefile,v 1.8 2008/09/26 18:56:43 apb Exp $
# @(#)Makefile 8.1 (Berkeley) 5/31/93
NOMAN= # defined
PROG= unstr
CPPFLAGS+= -I${.CURDIR}/../strfile
.include "../../Makefile.inc"
.include <bsd.prog.mk>

147
games/fortune/unstr/unstr.c Normal file
View file

@ -0,0 +1,147 @@
/* $NetBSD: unstr.c,v 1.14 2012/06/19 05:46:08 dholland 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. 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\
The Regents of the University of California. All rights reserved.");
#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.14 2012/06/19 05:46:08 dholland 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>
# include <sys/endian.h>
# include <ctype.h>
# include <err.h>
# include <stdio.h>
# include <stdlib.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(char *[]);
int main(int, char *[]);
void order_unstr(STRFILE *);
/* ARGSUSED */
int
main(int ac __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);
BE32TOH(tbl.str_version);
BE32TOH(tbl.str_numstr);
BE32TOH(tbl.str_longlen);
BE32TOH(tbl.str_shortlen);
BE32TOH(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(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(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, be64toh(pos), SEEK_SET);
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);
}
}
}

View file

@ -4,7 +4,7 @@ MAN= ash.1 at.1 \
cp.1 crc.1 crontab.1 dd.1 \
dhrystone.1 dosdir.1 dosread.1 doswrite.1 \
eject.1 \
flexdoc.1 format.1 fortune.1 \
flexdoc.1 format.1 \
fsck.mfs.1 host.1 hostaddr.1 ifdef.1 \
isodir.1 isoinfo.1 isoread.1 \
loadfont.1 loadkeys.1 logger.1 \

View file

@ -1,25 +0,0 @@
.TH FORTUNE 1
.SH NAME
fortune \- print a fortune
.SH SYNOPSIS
\fBfortune\fR
.br
.de FL
.TP
\\fB\\$1\\fR
\\$2
..
.de EX
.TP 20
\\fB\\$1\\fR
# \\$2
..
.SH EXAMPLES
.TP 20
.B fortune
# Print a fortune
.SH DESCRIPTION
.PP
\fIFortune\fR prints a fortune at random from the fortunes file,
\fI/usr/lib/fortune.dat\fR. This file consists of pieces
of text separated by a line containing only %%.

View file

@ -70,6 +70,7 @@
2013/12/1 12:00:00,external/README
2013/12/1 12:00:00,games/adventure
2013/12/1 12:00:00,games/factor
2013/12/1 12:00:00,games/fortune
2013/12/1 12:00:00,games/Makefile
2013/12/1 12:00:00,games/Makefile.inc
2013/12/1 12:00:00,games/primes

View file

@ -122,7 +122,7 @@ SUBDIR += .WAIT texinfo \
.WAIT \
.WAIT \
.WAIT \
pwd_mkdb stat zic
pwd_mkdb stat strfile zic
.endif
.if defined(__MINIX)
SUBDIR += \

6
tools/strfile/Makefile Normal file
View file

@ -0,0 +1,6 @@
# $NetBSD: Makefile,v 1.1 2008/09/26 18:23:09 apb Exp $
HOSTPROGNAME= ${_TOOL_PREFIX}strfile
HOST_SRCDIR= games/fortune/strfile
.include "${.CURDIR}/../Makefile.host"