ADDED admin/admin/OSF/OSF.proposal Index: admin/admin/OSF/OSF.proposal ================================================================== --- admin/admin/OSF/OSF.proposal +++ admin/admin/OSF/OSF.proposal @@ -0,0 +1,138 @@ +.\" @(#)OSF.proposal 1.1 89/09/06 +.if n \{\ +.ND +.rm CH +.ll 7i +.nr LL 7i +.ad l +.\} +.HE +.nr PS 11 +.nr VS 13 +.nr LL 6i +.nr OI 0.5i +.in 0.5i +.ps 11p +.ti 4i +.nf + +.LP +.nf +Ira Goldstein +11 Cambridge Center +Cambridge, MA 02142 +.sp 1 +.LP +.nf +Dr. Marshall Kirk McKusick +Computer Systems Research Group +Computer Science Division +Department of Electrical Engineering and Computer Science +University of California, Berkeley +Berkeley, CA 94720 +.sp .5 ++1-415-642-4948 +.sp .5 +email: mckusick@Berkeley.EDU +.sp 2 +.LP +Dear Mr. Goldstein, +.PP +I am writing to you in my role as the head of operating +system and networking research for the \s-1UNIX\s0 project in the Computer +Science Division of the University of California, Berkeley, known as +the Computer Systems Research Group (\s-1CSRG\s0). +Current funding for \s-1CSRG\s0 is provided by the Defense Advanced +Research Projects Agency (\s-1DARPA\s0) via the National Institute for +Science and Technology (\s-1NIST\s0, formerly \s-1NBS\s0). +This funding will expire April 1, 1990. +By mutual agreement, +only minimal additional funding from \s-1DARPA\s0 is expected. +We are seeking alternative funding from other sources so that we +can continue our work at the university. +.PP +Our strategy is to get three sources of funding, +each of which would provide approximately one third of our annual budget. +Annual grants on the order of $400,000 would provide roughly +a third of the budget needed by \s-1CSRG\s0 +for salaries and benefits, maintenance and network access fees, +travel and other expenses. +We have just recently secured funding from Hewlett-Packard +for a third of our budget for next fiscal year. +We are interested in seeking funding from other organizations and +computer companies that use our system. +I hope that \s-1OSF\s0 would be interested in being such an organization. +.PP +I am enclosing a description of our current projects +along with a summary of our current operating budget. +For your convenience, I am providing a brief summary +of this paper in this letter. +.PP +The goal of the \s-1CSRG\s0 project +is to use leading edge research ideas in a stable and reliable +implementation that solves current problems in operating systems research. +The project also includes incorporation of network protocols and other +subsystems into the operating system while maintaining consistency +with the existing system call interface. +The resulting system is widely used by other +researchers in operating systems and network protocols. +The most recent two releases, \s-14.2BSD\s0 +and \s-14.3BSD\s0, provide the +core of the standard networking and/or operating system software for +essentially all vendors of \s-1UNIX\s0-based workstations and minicomputers. +\s-14.3BSD\s0-based network support will be included in the next systems to +be released by both \s-1OSF\s0 and \s-1AT&T\s0. +.PP +\s-1CSRG\s0 includes three full-time research staff (Mike Karels, +Keith Bostic, and myself), one three-quarter-time programmer on loan +from another group (Keith Sklower), and one software engineer +currently on loan from Digital Equipment Corporation (Marc Teitelbaum). +In addition, two full-time administrative and secretarial people +handle licensing and software distribution as well as office support. +.PP +\s-1CSRG\s0 anticipates that its next major release, tentatively called +\s-14.4BSD\s0, will be completed and begin shipment towards the end +of next year. +The file system interface +will be extended to allow greater flexibility and performance, and a +public-domain version of \s-1NFS\s0 is expected to be included. +The new system integrates an implementation of the +\s-1ISO OSI\s0 networking protocols into the existing +socket interface and internal network architecture. +This work will include a revised internal network +architecture incorporating the best features of both the existing +socket support and the ``streams'' layering of the Ninth Edition +research version of \s-1UNIX\s0. +Both file system and networking interfaces +improve upon previous work with better support for caching in layered +architectures. +These caching techniques are based on work done by Van +Jacobson at the Lawrence Berkeley Laboratory, and will be fully +exploited by the \s-1TCP/IP\s0 networking protocols. +The applicability of +these techniques in the \s-1OSI\s0 protocol suite will be investigated as +well. +.PP +The system will also include an \s-1IEEE\s0 P1003.1 \s-1(POSIX)\s0 standard +operating system interface integrated with the existing system +interface in such a way that both interfaces are fully supported and +interoperate fully. +Finally, the system is expected to include a new +virtual memory system derived from that of the +public domain portion of the Mach operating system +from \s-1CMU\s0 and incorporated into \s-14.3BSD\s0 by the University of Utah. +We expect that the products of this work will become the interfaces and +implementations of choice for other operating systems and networking +researchers in the near future. +.sp 2 +.in +1.5i +Sincerely, +.sp .65i +Dr. Marshall Kirk McKusick +.in -1.5i +.sp 2 +.nf +cc: Mike Karels +.fi +.sp +MKM/tl ADDED etc/aliases Index: etc/aliases ================================================================== --- etc/aliases +++ etc/aliases @@ -0,0 +1,37 @@ +# +# Aliases in this file will NOT be expanded in the header from +# Mail, but WILL be visible over networks or from /bin/mail. +# +# >>>>>>>>>> The program "newaliases" must be run after +# >> NOTE >> this file is updated for any changes to +# >>>>>>>>>> show through to sendmail. +# + +# Basic system aliases -- these MUST be present +MAILER-DAEMON: postmaster +postmaster: root + +root: +manager: +dumper: +operator: + +# OFFICIAL CSRG/BUG ADDRESSES + +# FTP BUG ADDRESS +ftp-bugs: bigbug@ucbvax.berkeley.edu + +# DISTRIBUTION PERSON +bsd-dist: bsd-dist@ucbvax.berkeley.edu + +# FORTUNE +fortune: fortune@ucbvax.berkeley.edu + +# TERMCAP +termcap: bigbug@ucbvax.berkeley.edu + +# BUG PERSON +ucb-fixes: bigbug@ucbvax.berkeley.edu +ucb-fixes-request: bigbug@ucbvax.berkeley.edu +bugs: bugs@ucbvax.berkeley.edu +# END OFFICIAL BUG ADDRESSES Index: etc/crontab ================================================================== --- etc/crontab +++ etc/crontab @@ -1,7 +1,7 @@ 0,15,30,45 * * * * root /usr/libexec/atrun 00 1 * * * daemon /usr/new/lib/news/daily 0 0 * * * uucp /usr/local/lib/uucp.daily 7 5,12,18 * * * uucp /usr/local/lib/uucp.6hours -0 2 * * * root /bin/sh /etc/daily 2>&1 | tee /var/log/daily.out | mail karels -30 3 * * 6 root /bin/sh /etc/weekly >/var/log/weekly.out 2>&1 -30 5 1 * * root /bin/sh /etc/monthly >/var/log/monthly.out 2>&1 +0 2 * * * root /bin/sh /etc/daily 2>&1 | tee /var/log/daily.out | mail -s "daily output" root +30 3 * * 6 root /bin/sh /etc/weekly 2>&1 | tee /var/log/weekly.out | mail -s "weekly output" root +30 5 1 * * root /bin/sh /etc/monthly 2>&1 | tee /var/log/monthly.out | mail -s "monthlyoutput" root Index: etc/monthly ================================================================== --- etc/monthly +++ etc/monthly @@ -1,8 +1,8 @@ #!/bin/sh - # -# @(#)monthly 5.2 (Berkeley) 04/17/89 +# @(#)monthly 5.3 (Berkeley) 09/06/89 # host=`hostname -s` echo "Subject: $host monthly run output" @@ -10,14 +10,14 @@ # echo "Doing login accounting:" # ac -p | sort -nr +1 echo "" echo "Rotating wtmp files:" -cd /var/account +cd /var/log if [ -f wtmp.5 ]; then mv -f wtmp.5 wtmp.6; fi if [ -f wtmp.4 ]; then mv -f wtmp.4 wtmp.5; fi if [ -f wtmp.3 ]; then mv -f wtmp.3 wtmp.4; fi if [ -f wtmp.2 ]; then mv -f wtmp.2 wtmp.3; fi if [ -f wtmp.1 ]; then mv -f wtmp.1 wtmp.2; fi if [ -f wtmp.0 ]; then mv -f wtmp.0 wtmp.1; fi mv -f wtmp wtmp.0 cp /dev/null wtmp Index: etc/rc ================================================================== --- etc/rc +++ etc/rc @@ -1,7 +1,7 @@ # -# @(#)rc 5.6 (Berkeley) 08/28/89 +# @(#)rc 5.7 (Berkeley) 09/05/89 # HOME=/; export HOME PATH=/sbin:/bin:/usr/sbin:/usr/bin export PATH @@ -42,35 +42,35 @@ exit 1 ;; esac fi -umount -a -: >/etc/mtab swapon -a >/dev/console 2>&1 + +umount -a mount -a >/dev/console 2>&1 + +# clean up left-over files +rm -f /etc/nologin +rm -f /usr/spool/uucp/LCK.* +rm -f /usr/spool/uucp/STST/* +(cd /var/run; rm -rf *) # set hostname, turn on network . /etc/netstart -echo 'starting system logger' >/dev/console +echo 'starting system logger' >/dev/console rm -f /dev/log syslogd # /var/crash should be a directory or a symbolic link # to the crash directory if core dumps are to be saved. if [ -d /var/crash ]; then - echo 'checking for core dump... ' >/dev/console - savecore /var/crash >/dev/console 2>&1 + echo 'checking for core dump... ' >/dev/console + savecore /var/crash >/dev/console 2>&1 fi -# clean up left-over files -rm -f /etc/nologin -rm -f /usr/spool/uucp/LCK.* -rm -f /usr/spool/uucp/STST/* -(cd /var/run; rm -rf *) - echo -n 'checking quotas:' >/dev/console quotacheck -a -p >/dev/console 2>&1 echo ' done.' >/dev/console quotaon -a ADDED etc/syslog.conf Index: etc/syslog.conf ================================================================== --- etc/syslog.conf +++ etc/syslog.conf @@ -0,0 +1,9 @@ +*.err;kern.debug;auth.notice;mail.crit /dev/console +*.notice;kern.debug;lpr,auth.info;mail.crit /var/log/messages +mail.info /var/log/maillog +lpr.info /var/log/lpd-errs +uucp.info /var/spool/uucp/ERRORS +*.err root +*.notice;auth.debug root +*.alert root +*.emerg * ADDED games/caesar/Makefile Index: games/caesar/Makefile ================================================================== --- games/caesar/Makefile +++ games/caesar/Makefile @@ -0,0 +1,51 @@ +# +# Copyright (c) 1988 Regents of the University of California. +# All rights reserved. +# +# Redistribution and use in source and binary forms are permitted +# provided that the above copyright notice and this paragraph are +# duplicated in all such forms and that any documentation, advertising +# materials, and other materials related to such redistribution and +# use acknowledge that the software was developed by the University +# of California, Berkeley. The name of the University may not be +# used to endorse or promote products derived from this software +# without specific prior written permission. THIS SOFTWARE IS PROVIDED +# ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +# WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND +# FITNESS FOR A PARTICULAR PURPOSE. +# +# @(#)Makefile 5.1 (Berkeley) 09/05/89 +# + +CFLAGS= -O +LIBC= /lib/libc.a +SRCS= caesar.c +OBJS= +MAN= caesar.0 + +all: caesar + +caesar: ${LIBC} + ${CC} -o $@ ${CFLAGS} $@.c -lm + +clean: + rm -f ${OBJS} core caesar + +cleandir: clean + rm -f ${MAN} tags .depend + +depend: ${SRCS} + mkdep -p ${CFLAGS} ${SRCS} + +install: ${MAN} + install -s -o bin -g bin -m 755 caesar ${DESTDIR}/usr/games + install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat6 + rm -f ${DESTDIR}/usr/man/cat6/rot13 + ln ${DESTDIR}/usr/man/cat6/${MAN} ${DESTDIR}/usr/man/cat6/rot13.0 + +lint: ${SRCS} + lint ${CFLAGS} ${SRCS} + +tags: ${SRCS} + ctags ${SRCS} + ADDED games/caesar/caesar.c Index: games/caesar/caesar.c ================================================================== --- games/caesar/caesar.c +++ games/caesar/caesar.c @@ -0,0 +1,138 @@ +/* + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Rick Adams. + * + * Authors: + * Stan King, John Eldridge, based on algorithm suggested by + * Bob Morris + * 29-Sep-82 + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +char copyright[] = +"@(#) Copyright (c) 1989 The Regents of the University of California.\n\ + All rights reserved.\n"; +#endif /* not lint */ + +#ifndef lint +static char sccsid[] = "@(#)caesar.c 5.3 (Berkeley) 09/05/89"; +#endif /* not lint */ + +#include +#include +#include +#include + +#define LINELENGTH 2048 +#define ROTATE(ch, perm) \ + isupper(ch) ? ('A' + (ch - 'A' + perm) % 26) : \ + islower(ch) ? ('a' + (ch - 'a' + perm) % 26) : ch + +/* + * letter frequencies (taken from some unix(tm) documentation) + * (unix is a trademark of Bell Laboratories) + */ +double stdf[26] = { + 7.97, 1.35, 3.61, 4.78, 12.37, 2.01, 1.46, 4.49, 6.39, 0.04, + 0.42, 3.81, 2.69, 5.92, 6.96, 2.91, 0.08, 6.63, 8.77, 9.68, + 2.62, 0.81, 1.88, 0.23, 2.07, 0.06, +}; + +main(argc, argv) + int argc; + char **argv; +{ + extern int errno; + register int ch, dot, i, nread, winnerdot; + register char *inbuf; + int obs[26], try, winner; + char *malloc(), *strerror(); + + if (argc > 1) + printit(argv[1]); + + if (!(inbuf = malloc(LINELENGTH))) { + (void)fprintf(stderr, "caesar: out of memory.\n"); + exit(1); + } + + /* adjust frequency table to weight low probs REAL low */ + for (i = 0; i < 26; ++i) + stdf[i] = log(stdf[i]) + log(26.0 / 100.0); + + /* zero out observation table */ + bzero(obs, 26 * sizeof(int)); + + if ((nread = read(STDIN_FILENO, inbuf, LINELENGTH)) < 0) { + (void)fprintf(stderr, "caesar: %s\n", strerror(errno)); + exit(1); + } + for (i = nread; i--;) { + ch = inbuf[i]; + if (islower(ch)) + ++obs[ch - 'a']; + else if (isupper(ch)) + ++obs[ch - 'A']; + } + + /* + * now "dot" the freqs with the observed letter freqs + * and keep track of best fit + */ + for (try = winner = 0; try < 26; ++try) { /* += 13) { */ + dot = 0; + for (i = 0; i < 26; i++) + dot += obs[i] * stdf[(i + try) % 26]; + /* initialize winning score */ + if (try == 0) + winnerdot = dot; + if (dot > winnerdot) { + /* got a new winner! */ + winner = try; + winnerdot = dot; + } + } + + for (;;) { + for (i = 0; i < nread; ++i) { + ch = inbuf[i]; + putchar(ROTATE(ch, winner)); + } + if (nread < LINELENGTH) + break; + if ((nread = read(STDIN_FILENO, inbuf, LINELENGTH)) < 0) { + (void)fprintf(stderr, "caesar: %s\n", strerror(errno)); + exit(1); + } + } + exit(0); +} + +printit(arg) + char *arg; +{ + register int ch, rot; + + if ((rot = atoi(arg)) < 0) { + (void)fprintf(stderr, "caesar: bad rotation value.\n"); + exit(1); + } + while ((ch = getchar()) != EOF) + putchar(ROTATE(ch, rot)); + exit(0); +} Index: games/cribbage/Makefile ================================================================== --- games/cribbage/Makefile +++ games/cribbage/Makefile @@ -12,11 +12,11 @@ # from this software without specific prior written permission. # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 5.9 (Berkeley) 07/30/89 +# @(#)Makefile 5.10 (Berkeley) 09/05/89 # CFLAGS= -O LIBC= /lib/libc.a LIBS= -lcurses -ltermlib HDRS= cribbage.h deck.h cribcur.h @@ -46,13 +46,14 @@ mkdep ${CFLAGS} ${SRCS} install: ${MAN} install -o games -g bin -m 400 crib.instr ${DESTDIR}/usr/games/lib/crib.instr install -s -o games -g bin -m 4700 cribbage ${DESTDIR}/usr/games/hide - (cd ${DESTDIR}/usr/games; rm -f cribbage; ln -s dm cribbage; chown games.bin cribbage) - install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/games/cat6 + (cd ${DESTDIR}/usr/games; rm -f cribbage; ln -s dm cribbage; \ + chown games.bin cribbage) + install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat6 lint: ${SRCS} lint ${CFLAGS} ${SRCS} tags: ${SRCS} ctags ${SRCS} Index: games/fortune/Notes ================================================================== --- games/fortune/Notes +++ games/fortune/Notes @@ -1,18 +1,22 @@ -Warning: The fortunes contained in the fortune database have - been collected haphazardly from a caphony 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 here bears any relation to the real world - of literature, law, or other bizzarrity. +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. + +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., @@ -20,11 +24,11 @@ (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, +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" @@ -34,11 +38,11 @@ -- 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 -examle above). Longer fortunes should also be in left justified +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 @@ -61,11 +65,12 @@ 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. +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., @@ -74,18 +79,17 @@ 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, +communication, e.g., "All my friends and I are crazy. That's the only thing that keeps us sane." -Elipses are always surrounded by spaces, except when next to -puncuation, and are three dots, unless there is a good reason not to. -(In fact, all these rules can be broken if they make a good joke.) +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. @@ -109,13 +113,13 @@ 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): +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 @@ -131,10 +135,24 @@ offensive, into the files "obscene" and "scene", respectively. Anything which would not make it onto network prime time programming should *not* go into "scene". Also, anything which would only get on if some discredited kind of guy said it should *not* go in scene. Fortunes containing "shit", "fuck", "cock" (not the male version of a -chicken, obviously, but "penis"), "cunt", "pussy", and such like are -*obscene*. Political opinions are supposed to be in "obscene", too. -Antyhing which is blatantly racist, mysoginist, or homophobic, should -not be in either, since they are not really funny unless *you* are -racist, mysoginist, or homophobic. +chicken, obviously, but the slang for penis), "cunt", "pussy", and such +like are "obscene". Political opinions are supposed to be in +"obscene", too. Anything which assumes as a world view blatantly +racist, mysogynist, 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 (sexist), or homophobic stereotypes *do* seriously assault +individual personal worth, and in an general entertainment medium we +should be able to get by without it. Index: games/fortune/datfiles/fortunes ================================================================== --- games/fortune/datfiles/fortunes +++ games/fortune/datfiles/fortunes @@ -9,11 +9,11 @@ Can Rip Right Off, you'd better get it. You may be worried that it might help to encourage your child's antisocial tendencies, but believe me, you have not seen antisocial tendencies until you've seen a child who is convinced that he or she did not get the right gift. -- Dave Barry, "Christmas Shopping: A Survivor's Guide" -%% +% -- Gifts for Men -- Men are amused by almost any idiot thing -- that is why professional ice hockey is so popular -- so buying gifts for them is easy. But you should never buy them clothes. Men believe they already have all the @@ -28,21 +28,21 @@ If you want to give a man something practical, consider tires. More than once, I would have gladly traded all the gifts I got for a new set of tires. -- Dave Barry, "Christmas Shopping: A Survivor's Guide" -%% +% *** NEWSFLASH *** Russian tanks steamrolling through New Jersey!!!! Details at eleven! -%% +% DELETE A FORTUNE! Don't some of these fortunes just drive you nuts?! Wouldn't you like to see some of them deleted from the system? You can! Just mail to "fortune" with the fortune you hate most, and we MIGHT make sure it gets expunged. -%% +% Pittsburgh Driver's Test 7: The car directly in front of you has a flashing right tail light but a steady left tail light. This means @@ -52,11 +52,11 @@ (c) the driver is signaling a left turn. (d) the driver is from out of town. The correct answer is (d). Tail lights are used in some foreign countries to signal turns. -%% +% Pittsburgh Driver's Test 8: Pedestrians are (a) irrelevant. @@ -64,11 +64,11 @@ (c) a nuisance. (d) difficult to clean off the front grille. The correct answer is (a). Pedestrians are not in cars, so they are totally irrelevant to driving; you should ignore them completely. -%% +% Has your family tried 'em? POWDERMILK BISCUITS Heavens, they're tasty and expeditious! @@ -79,11 +79,11 @@ POWDERMILK BISCUITS Buy them ready-made in the big blue box with the picture of the biscuit on the front, or in the brown bag with the dark stains that indicate freshness. -%% +% THE STORY OF CREATION or THE MYTH OF URK In the beginning there was data. The data was without form and null, @@ -92,11 +92,11 @@ registers"; and there were registers. And DEC saw that they carried; and DEC separated the data from the instructions. DEC called the data Stack, and the instructions they called Code. And there was evening and there was morning, one interrupt ... -- Rico Tudor -%% +% JACK AND THE BEANSTACK by Mark Isaak Long ago, in a finite state far away, there lived a JOVIAL character named Jack. Jack and his relations were poor. Often their @@ -116,11 +116,11 @@ he told his busy-waiting parent of the deal, she became so angry she started thrashing. "Don't you even have any artificial intelligence? All these kernels together hardly make up one byte," and she popped them out the window ... -%% +% A Severe Strain on the Credulity As a method of sending a missile to the higher, and even to the highest parts of the earth's atmospheric envelope, Professor Goddard's rocket is a practicable and therefore promising device. It is when one @@ -132,21 +132,21 @@ of the Smithsonian Institution, does not know the relation of action to re-action, and of the need to have something better than a vacuum against which to react ... Of course he only seems to lack the knowledge ladled out daily in high schools. -- New York Times Editorial, 1920 -%% +% AMAZING BUT TRUE ... If all the salmon caught in Canada in one year were laid end to end across the Sahara Desert, the smell would be absolutely awful. -%% +% AMAZING BUT TRUE ... There is so much sand in Northern Africa that if it were spread out it would completely cover the Sahara Desert. -%% +% Another Glitch in the Call ------- ------ -- --- ---- (Sung to the tune of a recent Pink Floyd song.) We don't need no indirection @@ -157,11 +157,11 @@ Hey! Hacker! Leave those lists alone! Chorus: All in all, it's just a pure-LISP function call. All in all, it's just a pure-LISP function call. -%% +% Answers to Last Fortune's Questions: 1. None. (Moses didn't have an ark). 2. Your mother, by the pigeonhole principle. 3. I don't know. @@ -170,11 +170,11 @@ Montana, submitted an interesting solution to Problem 5. 6. There is an interesting solution to this problem on page 1029 of my book, which you can pick up for $23.95 at finer bookstores and bathroom supply outlets (or 99 cents at the table in front of Papyrus Books). -%% +% DETERIORATA Go placidly amid the noise and waste, And remember what comfort there may be in owning a piece thereof. Avoid quiet and passive persons, unless you are in need of sleep. @@ -192,11 +192,11 @@ You are a fluke of the universe ... You have no right to be here. Whether you can hear it or not, the universe Is laughing behind your back. -- National Lampoon -%% +% Gimmie That Old Time Religion We will follow Zarathustra, We will worship like the Druids, Zarathustra like we use to, Dancing naked in the woods, I'm a Zarathustra booster, Drinking strange fermented fluids, And he's good enough for me! And it's good enough for me! @@ -210,11 +210,11 @@ CHORUS: Give me that old time religion, Give me that old time religion, Give me that old time religion, 'Cause it's good enough for me! -%% +% MORE SPORTS RESULTS: The Beverly Hills Freudians tied the Chicago Rogerians 0-0 last Saturday night. The match started with a long period of silence while the Freudians waited for the Rogerians to free associate and the Rogerians waited for the Freudians to say something they could @@ -221,11 +221,11 @@ paraphrase. The stalemate was broken when the Freudians' best player took the offensive and interpreted the Rogerians' silence as reflecting their anal-retentive personalities. At this the Rogerians' star player said "I hear you saying you think we're full of ka-ka." This started a fight and the match was called by officials. -%% +% Safety Tips for the Post-Nuclear Existence 1. Never use an elevator in a building that has been hit by a nuclear bomb; use the stairs. 2. When you're flying through the air, remember to roll when you hit the ground. @@ -242,11 +242,11 @@ staggering illegally. 9. Nutritionally, hundred dollar bills are equal to ones, but more sanitary due to limited circulation. 10. Accumulate mannequins now; spare parts will be in short supply on D-Day. -%% +% The STAR WARS Song Sung to the tune of "Lola", by the Kinks: I met him in a swamp down in Dagobah Where it bubbles all the time like a giant cabinet soda @@ -259,11 +259,11 @@ A guy who looks like a Muppet but he's wrinkled and green Oh my Yoda, Yo-Yo-Yo-Yo Yoda Well I'm not dumb but I can't understand How he can raise me in the air just by raising his hand Oh my Yoda, Yo-Yo-Yo-Yo Yoda, Yo-Yo-Yo-Yo Yoda -%% +% 'Twas the Night before Crisis 'Twas the night before crisis, and all through the house, Not a program was working not even a browse. The programmers were wrung out too mindless to care, @@ -280,11 +280,11 @@ On Batch Jobs! On Closing! On Functions Complete! His eyes were glazed over, his fingers were lean, From Weekends and nights in front of a screen. A wink of his eye, and a twist of his head, Soon gave me to know I had nothing to dread... -%% +% William Safire's Rules for Writers: Remember to never split an infinitive. The passive voice should never be used. Do not put statements in the negative form. Verbs have to agree with their subjects. Proofread carefully to see if you words @@ -300,11 +300,11 @@ metaphors. Avoid trendy locutions that sound flaky. Everyone should be careful to use a singular pronoun with singular nouns in their writing. Always pick on the correct idiom. The adverb always follows the verb. Last but not least, avoid cliches like the plague; seek viable alternatives. -%% +% (to "The Caissons Go Rolling Along") Scratch the disks, dump the core, Shut it down, pull the plug Roll the tapes across the floor, Give the core an extra tug And the system is going to crash. And the system is going to crash. Teletypes smashed to bits. Mem'ry cards, one and all, @@ -315,11 +315,11 @@ You turn the disk readers into trash. And the tape drives will crumble in a flash. Oh, it's so much fun, When the CPU Now the CPU won't run Can print nothing out but "foo," And the system is going to crash. The system is going to crash. -%% +% A Plan for the Improvement of English Spelling by Mark Twain For example, in Year 1 that useless letter "c" would be dropped to be replased either by "k" or "s", and likewise "x" would no longer @@ -334,11 +334,11 @@ Bai Iear 15 or sou, it wud fainali bi posibl tu meik ius ov thi ridandant letez "c", "y" and "x" -- bai now jast a memori in the maindz ov ould doderez -- tu riplais "ch", "sh", and "th" rispektivli. Fainali, xen, aafte sam 20 iers ov orxogrefkl riform, wi wud hev a lojikl, kohirnt speling in ius xrewawt xe Ingliy-spiking werld. -%% +% ... This striving for excellence extends into people's personal lives as well. When '80s people buy something, they buy the best one, as determined by (1) price and (2) lack of availability. Eighties people buy imported dental floss. They buy gourmet baking soda. If an '80s couple goes to a restaurant where they have made a @@ -348,17 +348,17 @@ crowd of excellence-oriented people like themselves waiting, their beepers going off like crickets in the night. An excellent restaurant wouldn't have a table ready immediately for anybody below the rank of Liza Minnelli. -- Dave Barry, "In Search of Excellence" -%% +% A disciple of another sect once came to Drescher as he was eating his morning meal. "I would like to give you this personality test", said the outsider, "because I want you to be happy." Drescher took the paper that was offered him and put it into the toaster -- "I wish the toaster to be happy too". -%% +% A doctor, an architect, and a computer scientist were arguing about whose profession was the oldest. In the course of their arguments, they got all the way back to the Garden of Eden, whereupon the doctor said, "The medical profession is clearly the oldest, because Eve was made from Adam's rib, as the story goes, and that was a simply @@ -367,11 +367,11 @@ Garden itself, in the beginning there was chaos and void, and out of that, the Garden and the world were created. So God must have been an architect." The computer scientist, who had listened to all of this said, "Yes, but where do you think the chaos came from?" -%% +% A man goes to a tailor to try on a new custom-made suit. The first thing he notices is that the arms are too long. "No problem," says the tailor. "Just bend them at the elbow and hold them out in front of you. See, now it's fine." "But the collar is up around my ears!" @@ -383,36 +383,36 @@ So, twisted like a pretzel, the man lurches out onto the street. Reba and Florence see him go by. "Oh, look," says Reba, "that poor man!" "Yes," says Florence, "but what a beautiful suit." -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% A musician of more ambition than talent composed an elegy at the death of composer Edward MacDowell. She played the elegy for the pianist Josef Hoffman, then asked his opinion. "Well, it's quite nice," he replied, but don't you think it would be better if ..." "If what?" asked the composer. "If ... if you had died and MacDowell had written the elegy?" -%% +% A priest was walking along the cliffs at Dover when he came upon two locals pulling another man ashore on the end of a rope. "That's what I like to see", said the priest, "A man helping his fellow man". As he was walking away, one local remarked to the other, "Well, he sure doesn't know the first thing about shark fishing." -%% +% 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. -%% +% ARIES (Mar 21 - Apr 19) You are the pioneer type and hold most people in contempt. You are quick tempered, impatient, and scornful of advice. You are not very nice. -%% +% After his Ignoble Disgrace, Satan was being expelled from Heaven. As he passed through the Gates, he paused a moment in thought, and turned to God and said, "A new creature called Man, I hear, is soon to be created." "This is true," He replied. @@ -421,45 +421,45 @@ right to make his laws?" "Oh, no!" Satan replied, "I ask only that he be allowed to make his own." It was so granted. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% An old Jewish man reads about Einstein's theory of relativity in the newspaper and asks his scientist grandson to explain it to him. "Well, zayda, it's sort of like this. Einstein says that if you're having your teeth drilled without Novocain, a minute seems like an hour. But if you're sitting with a beautiful woman on your lap, an hour seems like a minute." The old man considers this profound bit of thinking for a moment and says, "And from this he makes a living?" -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% "And what will you do when you grow up to be as big as me?" asked the father of his little son. "Diet." -%% +% CANCER (June 21 - July 22) You are sympathetic and understanding to other people's problems. They think you are a sucker. You are always putting things off. That's why you'll never make anything of yourself. Most welfare recipients are Cancer people. -%% +% CAPRICORN (Dec 23 - Jan 19) You are conservative and afraid of taking risks. You don't do much of anything and are lazy. There has never been a Capricorn of any importance. Capricorns should avoid standing still for too long as they take root and become trees. -%% +% COMMENT Oh, life is a glorious cycle of song, A medley of extemporanea; And love is thing that can never go wrong; And I am Marie of Roumania. -- Dorothy Parker -%% +% Deck Us All With Boston Charlie Deck us all with Boston Charlie, Walla Walla, Wash., an' Kalamazoo! Nora's freezin' on the trolley, @@ -468,33 +468,33 @@ Don't we know archaic barrel, Lullaby Lilla Boy, Louisville Lou. Trolley Molly don't love Harold, Boola boola Pensacoola hullabaloo! -- Walt Kelly -%% +% "Deep" is a word like "theory" or "semantic" -- it implies all sorts of marvelous things. It's one thing to be able to say "I've got a theory", quite another to say "I've got a semantic theory", but, ah, those who can claim "I've got a deep semantic theory", they are truly blessed. -- Randy Davis -%% +% During a grouse hunt in North Carolina two intrepid sportsmen were blasting away at a clump of trees near a stone wall. Suddenly a red-faced country squire popped his head over the wall and shouted, "Hey, you almost hit my wife." "Did I?" cried the hunter, aghast. "Terribly sorry. Have a shot at mine, over there." -%% +% Excellence is THE trend of the '80s. Walk into any shopping mall bookstore, go to the rack where they keep the best-sellers such as "Garfield Gets Spayed", and you'll see a half-dozen books telling you how to be excellent: "In Search of Excellence", "Finding Excellence", "Grasping Hold of Excellence", "Where to Hide Your Excellence at Night So the Cleaning Personnel Don't Steal It", etc. -- Dave Barry, "In Search of Excellence" -%% +% FIGHTING WORDS Say my love is easy had, Say I'm bitten raw with pride, Say I am too often sad -- @@ -506,11 +506,11 @@ Still you have my heart to wear. But say my verses do not scan, And I get me another man! -- Dorothy Parker -%% +% Festivity Level 1: Your guests are chatting amiably with each other, admiring your Christmas-tree ornaments, singing carols around the upright piano, sipping at their drinks and nibbling hors d'oeuvres. Festivity Level 2: Your guests are talking loudly -- sometimes @@ -527,41 +527,41 @@ Christmas tree. The piano is missing. You want to keep your party somewhere around level 3, unless you rent your home and own Firearms, in which case you can go to level 4. The best way to get to level 3 is egg-nog. -%% +% "For I perceive that behind this seemingly unrelated sequence of events, there lurks a singular, sinister attitude of mind." "Whose?" "MINE! HA-HA!" -%% +% GEMINI (May 21 - June 20) You are a quick and intelligent thinker. People like you because you are bisexual. However, you are inclined to expect too much for too little. This means you are cheap. Geminis are known for committing incest. -%% +% GREAT MOMENTS IN AMERICAN HISTORY (#21) -- July 30, 1917 On this day, New York City hotel detectives burst in and caught then- Senator Warren G. Harding in bed with an underage girl. He bought them off with a $20 bribe, and later remarked thankfully, "I thought I wouldn't get out of that under $1000!" Always one to learn from his mistakes, in later years President Harding carried on his affairs in a tiny closet in the White House Cabinet Room while Secret Service men stood lookout. -%% +% "Gee, Mudhead, everyone at Morse Science High has an extracurricular activity except you." "Well, gee, doesn't Louise count?" "Only to ten, Mudhead." -- Firesign Theater -%% +% Here is the fact of the week, maybe even the fact of the month. According to probably reliable sources, the Coca-Cola people are experiencing severe marketing anxiety in China. The words "Coca-Cola" translate into Chinese as either (depending on the inflection) "wax-fattened mare" or "bite the wax @@ -571,11 +571,11 @@ The trouble with this fact, as lovely as it is, is that it's hard to get a whole column out of it. I'd like to teach the world to bite a wax tadpole. Coke -- it's the real wax-fattened mare. Not bad, but broad satiric vistas do not open up. -- John Carrol, San Francisco Chronicle -%% +% "I cannot read the fiery letters," said Frodo in a quavering voice. "No," Said Gandalf, "but I can. The letters are Elvish, of course, of an ancient mode, but the language is that of Mordor, which I will not utter here. They are lines of a verse long known in @@ -587,11 +587,11 @@ This is a sleeper that packs quite a wallop. The Power almighty rests in this Lone Ring. The Power, alrighty, for doing your Own Thing. If broken or busted, it cannot be remade. If found, send to Sorhed (with postage prepaid)." -%% +% "I don't know what you mean by `glory,'" Alice said Humpty Dumpty smiled contemptuously. "Of course you don't-- till I tell you. I meant `there's a nice knock-down argument for you!'" "But glory doesn't mean `a nice knock-down argument,'" Alice @@ -602,19 +602,19 @@ "The question is," said Alice, "whether you can make words mean so many different things." "The question is," said Humpty Dumpty, "which is to be master-- that's all." -- Lewis Carrol, "Through the Looking Glass" -%% +% "I quite agree with you," said the Duchess; "and the moral of that is -- `Be what you would seem to be' -- or, if you'd like it put more simply -- `Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.'" -- Lewis Carrol, "Alice in Wonderland" -%% +% INVENTORY Four be the things I am wiser to know: Idleness, sorrow, a friend, and a foe. Four be the things I'd been better without: @@ -623,11 +623,11 @@ Three be the things I shall never attain: Envy, content, and sufficient champagne. Three be the things I shall have till I die: Laughter and hope and a sock in the eye. -%% +% In a forest a fox bumps into a little rabbit, and says, "Hi, junior, what are you up to?" "I'm writing a dissertation on how rabbits eat foxes," said the rabbit. "Come now, friend rabbit, you know that's impossible!" @@ -644,38 +644,38 @@ should have guessed by now, we see a mean-looking, huge lion sitting next to some bloody and furry remnants of the wolf and the fox. The moral: It's not the contents of your thesis that are important -- it's your PhD advisor that really counts. -%% +% It is always preferable to visit home with a friend. Your parents will not be pleased with this plan, because they want you all to themselves and because in the presence of your friend, they will have to act like mature human beings ... -- Playboy, January 1983 -%% +% It was the next morning that the armies of Twodor marched east laden with long lances, sharp swords, and death-dealing hangovers. The thousands were led by Arrowroot, who sat limply in his sidesaddle, nursing a whopper. Goodgulf, Gimlet, and the rest rode by him, praying for their fate to be quick, painless, and if possible, someone else's. Many an hour the armies forged ahead, the war-merinos bleating under their heavy burdens and the soldiers bleating under their melting icepacks. -- The Harvard Lampoon, "Bored of the Rings" -%% +% LEO (July 23 - Aug 22) You consider yourself a born leader. Others think you are pushy. Most Leo people are bullies. You are vain and dislike honest criticism. Your arrogance is disgusting. Leo people are thieves. -%% +% LIBRA (Sept 23 - Oct 22) You are the artistic type and have a difficult time with reality. If you are a man, you are more than likely gay. Chances for employment and monetary gains are excellent. Most Libra women are prostitutes. All Libra people die of Venereal disease. -%% +% Lassie looked brilliant, in part because the farm family she lived with was made up of idiots. Remember? One of them was always getting pinned under the tractor, and Lassie was always rushing back to the farmhouse to alert the other ones. She'd whimper and tug at their sleeves, and they'd always waste precious minutes saying things: "Do @@ -684,11 +684,11 @@ of every week. What with all the time these people spent pinned under the tractor, I don't see how they managed to grow any crops whatsoever. They probably got by on federal crop supports, which Lassie filed the applications for. -- Dave Barry -%% +% Love's Drug My love is like an iron wand That conks me on the head, My love is like the valium @@ -695,11 +695,11 @@ That I take before me bed, My love is like the pint of scotch That I drink when i be dry; And I shall love thee still my dear, Until my wife is wise. -%% +% Murray and Esther, a middle-aged Jewish couple, are touring Chile. Murray just got a new camera and is constantly snapping pictures. One day, without knowing it, he photographs a top-secret military installation. In an instant, armed troops surround Murray and Esther and hustle them off to prison. @@ -715,21 +715,21 @@ possible, and turns to Murray. "This is crazy!" Murray shouts. "We're not spies!" And he spits in the sergeants face. "Murray!" Esther cries. "Please! Don't make trouble." -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% On his first day as a bus driver, Maxey Eckstein handed in receipts of $65. The next day his take was $67. The third day's income was $62. But on the fourth day, Eckstein emptied no less than $283 on the desk before the cashier. "Eckstein!" exclaimed the cashier. "This is fantastic. That route never brought in money like this! What happened?" "Well, after three days on that cockamamie route, I figured business would never improve, so I drove over to Fourteenth Street and worked there. I tell you, that street is a gold mine!" -%% +% Once there lived a village of creatures along the bottom of a great crystal river. Each creature in its own manner clung tightly to the twigs and rocks of the river bottom, for clinging was their way of life, and resisting the current what each had learned from birth. But one creature said at last, "I trust that the current knows where it is @@ -748,11 +748,11 @@ said, "I am no more Messiah than you. The river delight to lift us free, if only we dare let go. Our true work is this voyage, this adventure. But they cried the more, "Saviour!" all the while clinging to the rocks, making legends of a Saviour. -%% +% One of the questions that comes up all the time is: How enthusiastic is our support for UNIX? Unix was written on our machines and for our machines many years ago. Today, much of UNIX being done is done on our machines. Ten percent of our VAXs are going for UNIX use. UNIX is a simple @@ -769,35 +769,35 @@ VMS, no matter what you look for -- it's literally a five-foot shelf of documentation -- if you look long enough it's there. That's the difference -- the beauty of UNIX is it's simple; and the beauty of VMS is that it's all there. -- Ken Olsen, President of DEC, 1984 -%% +% PISCES (Feb. 19 - Mar. 20) You have a vivid imagination and often think you are being followed by the CIA or FBI. You have minor influence over your associates and people resent your flaunting of your power. You lack confidence and you are generally a coward. Pisces people do terrible things to small animals. -%% +% "Reflections on Ice-Breaking" Candy Is dandy But liquor Is quicker. -- Ogden Nash -%% +% SAGITTARIUS (Nov 22 - Dec 21) You are optimistic and enthusiastic. You have a reckless tendency to rely on luck since you lack talent. The majority of Sagittarians are drunks or dope fiends or both. People laugh at you a great deal. -%% +% SCORPIO (Oct 23 - Nov 21) You are shrewd in business and cannot be trusted. You will achieve the pinnacle of success because of your total lack of ethics. Most Scorpio people are murdered. -%% +% "Seven years and six months!" Humpty Dumpty repeated thoughtfully. "An uncomfortable sort of age. Now if you'd asked MY advice, I'd have said `Leave off at seven' -- but it's too late now." "I never ask advice about growing," Alice said indignantly. "Too proud?" the other enquired. @@ -804,16 +804,16 @@ Alice felt even more indignant at this suggestion. "I mean," she said, "that one can't help growing older." "ONE can't, perhaps," said Humpty Dumpty; "but TWO can. With proper assistance, you might have left off at seven." -- Lewis Carroll -%% +% TAURUS (Apr 20 - May 20) You are practical and persistent. You have a dogged determination and work like hell. Most people think you are stubborn and bull headed. You are a Communist. -%% +% THE WOMBAT The wombat lives across the seas, Among the far Antipodes. He may exist on nuts and berries, @@ -820,11 +820,11 @@ Or then again, on missionaries; His distant habitat precludes Conclusive knowledge of his moods. But I would not engage the wombat In any form of mortal combat. -%% +% THEORY Into love and out again, Thus I went and thus I go. Spare your voice, and hold your pen: Well and bitterly I know @@ -831,38 +831,38 @@ All the songs were ever sung, All the words were ever said; Could it be, when I was young, Someone dropped me on my head? -- Dorothy Parker -%% +% Take the folks at Coca-Cola. For many years, they were content to sit back and make the same old carbonated beverage. It was a good beverage, no question about it; generations of people had grown up drinking it and doing the experiment in sixth grade where you put a nail into a glass of Coke and after a couple of days the nail dissolves and the teacher says: "Imagine what it does to your TEETH!" So Coca-Cola was solidly entrenched in the market, and the management saw no need to improve ... -- Dave Barry, "In Search of Excellence" -%% +% The men sat sipping their tea in silence. After a while the klutz said, "Life is like a bowl of sour cream." "Like a bowl of sour cream?" asked the other. "Why?" "How should I know? What am I, a philosopher?" -%% +% The people of Halifax invented the trampoline. During the Victorian period the tripe-dressers of Halifax stretched tripe across a large wooden frame and jumped up and down on it to `tender and dress' it. The tripoline, as they called it, degenerated into becoming the apparatus for a spectator sport. The people of Halifax also invented the harmonium, a device for castrating pigs during Sunday service. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% The seven eyes of Ningauble the Wizard floated back to his hood as he reported to Fafhrd: "I have seen much, yet cannot explain all. The Gray Mouser is exactly twenty-five feet below the deepest cellar in the palace of Gilpkerio Kistomerces. Even though twenty-four parts in twenty-five of him are dead, he is alive. @@ -874,11 +874,11 @@ "How?" demanded Fafhrd. Ningauble shrugged. "You're a hero. You should know." -- Fritz Leiber, from "The Swords of Lankhmar" -%% +% There are some goyisha names that just about guarantee that someone isn't Jewish. For example, you'll never meet a Jew named Johnson or Wright or Jones or Sinclair or Ricks or Stevenson or Reid or Larsen or Jenks. But some goyisha names just about guarantee that every other person you meet with that name will be Jewish. Why is @@ -889,11 +889,11 @@ forbidden to eat crab -- fresh cold crab with mayonnaise -- or lobster -- soft tender morsels of lobster dipped in melted butter. You don't even understand a simple thing like that, and yet you hope to discover why there are more Jews named Miller than Katz? Fat Chance. -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% Thompson, if he is to be believed, has sampled the entire rainbow of legal and illegal drugs in heroic efforts to feel better than he does. As for the truth about his health: I have asked around about it. I am told that he appears to be strong and rosy, and steadily @@ -908,23 +908,23 @@ Thompson's disease. I don't have it this morning. It comes and goes. This morning I don't have Hunter Thompson's disease. -- Kurt Vonnegut Jr. on Dr. Hunter S. Thompson: Excerpt from "A Political Disease", Vonnegut's review of "Fear and Loathing: On the Campaign Trail '72" -%% +% To A Quick Young Fox: Why jog exquisite bulk, fond crazy vamp, Daft buxom jonquil, zephyr's gawky vice? Guy fed by work, quiz Jove's xanthic lamp -- Zow! Qualms by deja vu gyp fox-kin thrice. -- Lazy Dog -%% +% VIRGO (Aug 23 - Sept 22) You are the logical type and hate disorder. This nitpicking is sickening to your friends. You are cold and unemotional and sometimes fall asleep while making love. Virgos make good bus drivers. -%% +% "Verily and forsooth," replied Goodgulf darkly. "In the past year strange and fearful wonders I have seen. Fields sown with barley reap crabgrass and fungus, and even small gardens reject their artichoke hearts. There has been a hot day in December and a blue moon. Calendars are made with a month of Sundays and a blue-ribbon @@ -935,11 +935,11 @@ "But what do all these things mean?" gasped Frito. "Beats me," said Goodgulf with a shrug, "but I thought it made good copy." -- Harvard Lampoon, "Bored of the Rings" -%% +% We were young and our happiness dazzled us with its strength. But there was also a terrible betrayal that lay within me like a Merle Haggard song at a French restaurant. ... I could not tell the girl about the woman of the tollway, of her milk white BMW and her Jordache smile. There had been a fight. I @@ -957,48 +957,48 @@ The next morning our youth was a memory, and our happiness was a lie. Life is like a bad margarita with good tequila, I thought as I poured whiskey onto my granola and faced a new day. -- Peter Applebome, International Imitation Hemingway Competition -%% +% "What do you give a man who has everything?" the pretty teenager asked her mother. "Encouragement, dear," she replied. -%% +% "What's that thing?" "Well, it's a highly technical, sensitive instrument we use in computer repair. Being a layman, you probably can't grasp exactly what it does. We call it a two-by-four." -- Jeff MacNelly, "Shoe" -%% +% When you have shot and killed a man you have in some measure clarified your attitude toward him. You have given a definite answer to a definite problem. For better or worse you have acted decisively. In a way, the next move is up to him. -- R. A. Lafferty -%% +% "You know, it's at times like this when I'm trapped in a Vogon airlock with a man from Betelgeuse and about to die of asphyxiation in deep space that I really wish I'd listened to what my mother told me when I was young!" "Why, what did she tell you?" "I don't know, I didn't listen!" -- Douglas Adams, "Hitchhiker's Guide to the Galaxy" -%% +% ... And malt does more than Milton can To justify God's ways to man -- A. E. Housman -%% +% ... Any resemblance between the above views and those of my employer, my terminal, or the view out my window are purely coincidental. Any resemblance between the above and my own views is non-deterministic. The question of the existence of views in the absence of anyone to hold them is left as an exercise for the reader. The question of the existence of the reader is left as an exercise for the second god coefficient. (A discussion of non-orthogonal, non-integral polytheism is beyond the scope of this article.) -%% +% ... But as records of courts and justice are admissible, it can easily be proved that powerful and malevolent magicians once existed and were a scourge to mankind. The evidence (including confession) upon which certain women were convicted of witchcraft and executed was without a flaw; it is still unimpeachable. The judges' decisions based @@ -1005,11 +1005,11 @@ on it were sound in logic and in law. Nothing in any existing court was ever more thoroughly proved than the charges of witchcraft and sorcery for which so many suffered death. If there were no witches, human testimony and human reason are alike destitute of value. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% ... But if we laugh with derision, we will never understand. Human intellectual capacity has not altered for thousands of years so far as we can tell. If intelligent people invested intense energy in issues that now seem foolish to us, then the failure lies in our understanding of their world, not in their distorted perceptions. Even the standard @@ -1016,14 +1016,14 @@ example of ancient nonsense -- the debate about angels on pinheads -- makes sense once you realize that theologians were not discussing whether five or eighteen would fit, but whether a pin could house a finite or an infinite number. -- S. J. Gould, "Wide Hats and Narrow Minds" -%% +% ... Had this been an actual emergency, we would have fled in terror, and you would not have been informed. -%% +% ... Now you're ready for the actual shopping. Your goal should be to get it over with as quickly as possible, because the longer you stay in the mall, the longer your children will have to listen to holiday songs on the mall public-address system, and many of these songs can damage children emotionally. For example: "Frosty the Snowman" is about a @@ -1036,59 +1036,59 @@ Rudolph to guide his sleigh, as if Rudolph were nothing more than some kind of headlight with legs and a tail. So unless you want your children exposed to this kind of insensitivity, you should shop quickly. -- Dave Barry, "Christmas Shopping: A Survivor's Guide" -%% +% ... Once you're safely in the mall, you should tie your children to you with ropes so the other shoppers won't try to buy them. Holiday shoppers have been whipped into a frenzy by months of holiday advertisements, and they will buy anything small enough to stuff into a shopping bag. If your children object to being tied, threaten to take them to see Santa Claus; that ought to shut them up. -- Dave Barry, "Christmas Shopping: A Survivor's Guide" -%% +% ... The Anarchists' [national] anthem is an international anthem that consists of 365 raspberries blown in very quick succession to the tune of "Camptown Races". Nobody has to stand up for it, nobody has to listen to it, and, even better, nobody has to play it. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% "... all the modern inconveniences ..." -- Mark Twain -%% +% "... an experienced, industrious, ambitious, and often quite often picturesque liar." -- Mark Twain -%% +% ... at least I thought I was dancing, 'til somebody stepped on my hand. -- J. B. White -%% +% ... if forced to travel on an airplane, try and get in the cabin with the Captain, so you can keep an eye on him and nudge him if he falls asleep or point out any mountains looming up ahead ... -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% !07/11 PDP a ni deppart m'I !pleH -%% +% (1) Alexander the Great was a great general. (2) Great generals are forewarned. (3) Forewarned is forearmed. (4) Four is an even number. (5) Four is certainly an odd number of arms for a man to have. (6) The only number that is both even and odd is infinity. Therefore, Alexander the Great had an infinite number of arms. -%% +% (1) Everything depends. (2) Nothing is always. (3) Everything is sometimes. -%% +% $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" -%% +% 101 USES FOR A DEAD MICROPROCESSOR (1) Scarecrow for centipedes (2) Dead cat brush (3) Hair barrettes (4) Cleats @@ -1100,24 +1100,24 @@ . . (99) Window garden harrow (pulled behind Tonka tractors) (100) Killer velcro 101. Currency -%% +% 186,282 miles per second: It isn't just a good idea, it's the law! -%% +% $3,000,000 -%% +% 355/113 -- Not the famous irrational number PI, but an incredible simulation! -%% +% 43rd Law of Computing: Anything that can go wr fortune: Segmentation violation -- Core dumped -%% +% 77. HO HUM -- The Redundant ------- (7) This hexagram refers to a situation of extreme --- --- (8) boredom. Your programs always bomb off. Your wife ------- (7) smells bad. Your children have hives. You are working @@ -1129,153 +1129,153 @@ The yellow bird approaches the malt shop. Misfortune. Six in the third place means: In former times men built altars to honor the Internal Revenue Service. Great Dragons! Are you in trouble! -%% +% 99 blocks of crud on the disk, 99 blocks of crud! You patch a bug, and dump it again: 100 blocks of crud on the disk! 100 blocks of crud on the disk, 100 blocks of crud! You patch a bug, and dump it again: 101 blocks of crud on the disk! ... -%% +% A CONS is an object which cares. -- Bernie Greenberg. -%% +% A LISP programmer knows the value of everything, but the cost of nothing. -%% +% A Law of Computer Programming: Make it possible for programmers to write in English and you will find the programmers cannot write in English. -%% +% 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 baby is an alimentary canal with a loud voice at one end and no responsibility at the other. -%% +% A bachelor is a selfish, undeserving guy who has cheated some woman out of a divorce. -- Don Quinn -%% +% A banker is a fellow who lends you his umbrella when the sun is shining and wants it back the minute it begins to rain. -- Mark Twain -%% +% A billion here, a couple of billion there -- first thing you know it adds up to be real money. -- Everett McKinley Dirksen -%% +% A bird in the bush usually has a friend in there with him. -%% +% A bird in the hand is worth what it will bring. -%% +% A bore is someone who persists in holding his own views after we have enlightened him with ours. -%% +% A budget is just a method of worrying before you spend money, as well as afterward. -%% +% A candidate is a person who gets money from the rich and votes from the poor to protect them from each other. -%% +% A celebrity is a person who is known for his well-knownness. -%% +% A chubby man with a white beard and a red suit will approach you soon. Avoid him. He's a Commie. -%% +% A city is a large community where people are lonesome together -- Herbert Prochnow -%% +% A classic is something that everybody wants to have read and nobody wants to read. -- Mark Twain -%% +% A closed mouth gathers no foot. -%% +% 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 conclusion is simply the place where someone got tired of thinking. -%% +% A countryman between two lawyers is like a fish between two cats. -- Ben Franklin -%% +% 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 day for firm decisions!!!!! Or is it? -%% +% A day without sunshine is like night. -%% +% A diplomat is a man who can convince his wife she'd look stout in a fur coat. -%% +% A diplomat is someone who can tell you to go to hell in such a way that you will look forward to the trip. -%% +% A diva who specializes in risqu'e arias is an off-coloratura soprano ... -%% +% A door is what a dog is perpetually on the wrong side of. -- Ogden Nash -%% +% A dozen, a gross, and a score, Plus three times the square root of four, Divided by seven, Plus five time eleven, Equals nine squared plus zero, no more. -%% +% A famous Lisp Hacker noticed an Undergraduate sitting in front of a Xerox 1108, trying to edit a complex Klone network via a browser. Wanting to help, the Hacker clicked one of the nodes in the network with the mouse, and asked "what do you see?" Very earnestly, the Undergraduate replied "I see a cursor." The Hacker then quickly pressed the boot toggle at the back of the keyboard, while simultaneously hitting the Undergraduate over the head with a thick Interlisp Manual. The Undergraduate was then Enlightened. -%% +% A fanatic is one who can't change his mind and won't change the subject. -- Winston Churchill -%% +% A fool must now and then be right by chance. -%% +% A fool-proof method for sculpting an elephant: first, get a huge block of marble; then you chip away everything that doesn't look like an elephant. -%% +% A fool's brain digests philosophy into folly, science into superstition, and art into pedantry. Hence University education. -- G. B. Shaw -%% +% A formal parsing algorithm should not always be used. -- D. Gries -%% +% A gleekzorp without a tornpee is like a quop without a fertsneet (sort of). -%% +% A great many people think they are thinking when they are merely rearranging their prejudices. -- William James -%% +% A lack of leadership is no substitute for inaction. -%% +% A lady with one of her ears applied To an open keyhole heard, inside, Two female gossips in converse free -- The subject engaging them was she. "I think", said one, "and my husband thinks @@ -1283,72 +1283,72 @@ As soon as no more of it she could hear The lady, indignant, removed her ear. "I will not stay," she said with a pout, "To hear my character lied about!" -- Gopete Sherany -%% +% A language that doesn't affect the way you think about programming is not worth knowing. -%% +% A language that doesn't have everything is actually easier to program in than some that do. -- Dennis M. Ritchie -%% +% A large number of installed systems work by fiat. That is, they work by being declared to work. -- Anatol Holt -%% +% 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 long-forgotten loved one will appear soon. Buy the negatives at any price. -%% +% A lot of people I know believe in positive thinking, and so do I. I believe everything positively stinks. -- Lew Col -%% +% A man said to the Universe: "Sir, I exist!" "However," replied the Universe, "the fact has not created in me a sense of obligation." -- Stephen Crane -%% +% A man wrapped up in himself makes a very small package. -%% +% A mathematician is a machine for converting coffee into theorems. -%% +% 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 new koan: If you have some ice cream, I will give it to you. If you have no ice cream, I will take it away from you. It is an ice cream koan. -%% +% A new supply of round tuits has arrived and are available from Mary. Anyone who has been putting off work until they got a "round tuit" now has no excuse for further procrastination. -%% +% A nuclear war can ruin your whole day. -%% +% A penny saved is ridiculous. -%% +% A person is just about as big as the things that make them angry. -%% +% A physicist is an atom's way of knowing about atoms. -- George Wald -%% +% A pig is a jolly companion, Boar, sow, barrow, or gilt -- A pig is a pal, who'll boost your morale, Though mountains may topple and tilt. When they've blackballed, bamboozled, and burned you, @@ -1355,11 +1355,11 @@ When they've turned on you, Tory and Whig, Though you may be thrown over by Tabby and Rover, You'll never go wrong with a pig, a pig, You'll never go wrong with a pig! -- Thomas Pynchon, "Gravity's Rainbow" -%% +% A priest asked: What is Fate, Master? And he answered: It is that which gives a beast of burden its reason for existence. @@ -1375,13 +1375,13 @@ Fate ... I thought you said Freight, responded the Master. That's all right, said the priest. I wanted to know what Freight was too. -- Kehlog Albran, "The Profit" -%% +% A professor is one who talks in someone else's sleep. -%% +% "A programmer is a person who passes as an exacting expert on the basis of being able to turn out, after innumerable punching, an infinite series of incomprehensive answers calculated with micrometric precisions from vague assumptions based on debatable figures taken from inconclusive documents and carried out on instruments of problematical @@ -1388,182 +1388,182 @@ accuracy by persons of dubious reliability and questionable mentality for the avowed purpose of annoying and confounding a hopelessly defenseless department that was unfortunate enough to ask for the information in the first place." -- IEEE Grid newsmagazine -%% +% A psychiatrist is a person who will give you expensive answers that your wife will give you for free. -%% +% A real patriot is the fellow who gets a parking ticket and rejoices that the system works. -%% +% A real person has two reasons for doing anything ... a good reason and the real reason. -%% +% A recent study has found that concentrating on difficult off-screen objects, such as the faces of loved ones, causes eye strain in computer scientists. Researchers into the phenomenon cite the added concentration needed to "make sense" of such unnatural three dimensional objects ... -%% +% A rock pile ceases to be a rock pile the moment a single man contemplates it, bearing within him the image of a cathedral. -- Antoine de Saint-Exupery -%% +% A sine curve goes off to infinity or at least the end of the blackboard -- Prof. Steiner -%% +% A solemn, unsmiling, sanctimonious old iceberg who looked like he was waiting for a vacancy in the Trinity. -- Mark Twain -%% +% A straw vote only shows which way the hot air blows. -- O'Henry -%% +% A student who changes the course of history is probably taking an exam. -%% +% A successful tool is one that was used to do something undreamed of by its author. -- S. C. Johnson -%% +% A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% A transistor protected by a fast-acting fuse will protect the fuse by blowing first. -%% +% A truly wise man never plays leapfrog with a unicorn. -%% +% A university is what a college becomes when the faculty loses interest in students. -- John Ciardi -%% +% A vacuum is a hell of a lot better than some of the stuff that nature replaces it with. -- Tenessee Williams -%% +% 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 well adjusted person is one who makes the same mistake twice without getting nervous. -%% +% "A witty saying proves nothing." -- Voltaire -%% +% A year spent in artificial intelligence is enough to make one believe in God. -%% +% A.A.A.A.A.: An organization for drunks who drive -%% +% AAAAAAAAAaaaaaaaaaaaaaaaccccccccckkkkkk!!!!!!!!! You brute! Knock before entering a ladies room! -%% +% ADA, n.: Something you need only know the name of to be an Expert in Computing. Useful in sentences like, "We had better develop an ADA awareness." -%% +% Abandon the search for Truth; settle for a good fantasy. -%% +% About the time we think we can make ends meet, somebody moves the ends. -- Herbert Hoover -%% +% Absence makes the heart go wander. -%% +% Absent, adj.: Exposed to the attacks of friends and acquaintances; defamed; slandered. -%% +% Absentee, n.: A person with an income who has had the forethought to remove himself from the sphere of exaction. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Abstainer, n.: A weak person who yields to the temptation of denying himself a pleasure. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Absurdity, n.: A statement or belief manifestly inconsistent with one's own opinion. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Accident, n.: A condition in which presence of mind is good, but absence of body is better. -%% +% Accidents cause History. If Sigismund Unbuckle had taken a walk in 1426 and met Wat Tyler, the Peasant's Revolt would never have happened and the motor car would not have been invented until 2026, which would have meant that all the oil could have been used for lamps, thus saving the electric light bulb and the whale, and nobody would have caught Moby Dick or Billy Budd. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% According to my best recollection, I don't remember. -- Vincent "Jimmy Blue Eyes" Alo -%% +% According to the latest official figures, 43% of all statistics are totally worthless. -%% +% Accordion, n.: A bagpipe with pleats. -%% +% Accuracy, n.: The vice of being right -%% +% Acid -- better living through chemistry. -%% +% Acid absorbs 47 times it's weight in excess Reality. -%% +% Acquaintance, n.: A person whom we know well enough to borrow from, but not well enough to lend to. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% "Acting is an art which consists of keeping the audience from coughing." -%% +% Actor: "I'm a smash hit. Why, yesterday during the last act, I had everyone glued in their seats!" Oliver Herford: "Wonderful! Wonderful! Clever of you to think of it!" -%% +% Actor: So what do you do for a living? Doris: I work for a company that makes deceptively shallow serving dishes for Chinese restaurants. -- Woody Allen, "Without Feathers" -%% +% Admiration, n.: Our polite recognition of another's resemblance to ourselves. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Adolescence, n.: The stage between puberty and adultery. -%% +% "Adopted kids are such a pain -- you have to teach them how to look like you ..." --- Gilda Radner -%% +% Adore, v.: To venerate expectantly. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Adult, n.: One old enough to know better. -%% +% After [Benjamin] Franklin came a herd of Electrical Pioneers whose names have become part of our electrical terminology: Myron Volt, Mary Louise Amp, James Watt, Bob Transformer, etc. These pioneers conducted many important electrical experiments. For example, in 1780 Luigi Galvani discovered (this is the truth) that when he attached two @@ -1574,91 +1574,91 @@ skilled veterinary surgeons can take a frog that has been seriously injured or killed, implant pieces of metal in its muscles, and watch it hop back into the pond just like a normal frog, except for the fact that it sinks like a stone. -- Dave Barry, "What is Electricity?" -%% +% After I run your program, let's make love like crazed weasels, OK? -%% +% After all, all he did was string together a lot of old, well-known quotations. -- H. L. Mencken, on Shakespeare -%% +% After all, what is your hosts' purpose in having a party? Surely not for you to enjoy yourself; if that were their sole purpose, they'd have simply sent champagne and women over to your place by taxi. -- P. J. O'Rourke -%% +% After an instrument has been assembled, extra components will be found on the bench. -%% +% After the last of 16 mounting screws has been removed from an access cover, it will be discovered that the wrong access cover has been removed. -%% +% Afternoon, n.: That part of the day we spend worrying about how we wasted the morning. -%% +% Afternoon very favorable for romance. Try a single person for a change. -%% +% Air is water with holes in it -%% +% Alas, I am dying beyond my means. -- Oscar Wilde, as he sipped champagne on his deathbed -%% +% Albert Einstein, when asked to describe radio, replied: "You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat." -%% +% Aleph-null bottles of beer on the wall, Aleph-null bottles of beer, You take one down, and pass it around, Aleph-null bottles of beer on the wall. -%% +% Alex Haley was adopted! -%% +% Alexander Graham Bell is alive and well in New York, and still waiting for a dial tone. -%% +% Alimony is a system by which, when two people make a mistake, one of them keeps paying for it. -- Peggy Joyce -%% +% All I ask is a chance to prove that money can't make me happy. -%% +% All I ask of life is a constant and exaggerated sense of my own importance. -%% +% "All flesh is grass" -- Isiah Smoke a friend today. -%% +% "All my friends and I are crazy. That's the only thing that keeps us sane." -%% +% All programmers are playwrights and all computers are lousy actors. -%% +% All progress is based upon a universal innate desire on the part of every organism to live beyond its income. -- Samuel Butler -%% +% All science is either physics or stamp collecting. -- E. Rutherford -%% +% All the big corporations depreciate their possessions, and you can, too, provided you use them for business purposes. For example, if you subscribe to the Wall Street Journal, a business-related newspaper, you can deduct the cost of your house, because, in the words of U.S. Supreme Court Chief Justice Warren Burger in a landmark 1979 tax decision: "Where else are you going to read the paper? Outside? What if it rains?" -- Dave Barry, "Sweating Out Taxes" -%% +% All the world's a VAX, And all the coders merely butchers; They have their exits and their entrails; And one int in his time plays many widths, His sizeof being N bytes. At first the infant, @@ -1665,18 +1665,18 @@ Mewling and puking in the Regent's arms. And then the whining schoolboy, with his Sun, And shining morning face, creeping like slug Unwillingly to school. -- A Very Annoyed PDP-11 -%% +% All the world's a stage and most of us are desperately unrehearsed. -- Sean O'Casey -%% +% All things are possible except skiing thru a revolving door. -%% +% All true wisdom is found on T-shirts. -%% +% All you have to do to see the accuracy of my thesis is look around you. Look, in particular, at the people who, like you, are making average incomes for doing average jobs -- bank vice presidents, insurance salesman, auditors, secretaries of defense -- and you'll realize they all dress the same way, essentially the way the mannequins @@ -1683,21 +1683,21 @@ in the Sears menswear department dress. Now look at the real successes, the people who make a lot more money than you -- Elton John, Captain Kangaroo, anybody from Saudi Arabia, Big Bird, and so on. They all dress funny -- and they all succeed. Are you catching on? -- Dave Barry, "How to Dress for Real Success" -%% +% Alliance, n.: In international politics, the union of two thieves who have their hands so deeply inserted in each other's pocket that they cannot separately plunder a third. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Alone, adj.: In bad company. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Although we modern persons tend to take our electric lights, radios, mixers, etc., for granted, hundreds of years ago people did not have any of these things, which is just as well because there was no place to plug them in. Then along came the first Electrical Pioneer, Benjamin Franklin, who flew a kite in a lighting storm and received a @@ -1705,42 +1705,42 @@ same force as carpets, but it also damaged Franklin's brain so severely that he started speaking only in incomprehensible maxims, such as "A penny saved is a penny earned." Eventually he had to be given a job running the post office. -- Dave Barry, "What is Electricity?" -%% +% Always borrow money from a pessimist; he doesn't expect to be paid back. -%% +% Ambidextrous, adj.: Able to pick with equal skill a right-hand pocket or a left. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Ambition is a poor excuse for not having sense enough to be lazy. -- Charlie McCarthy -%% +% America may be unique in being a country which has leapt from barbarism to decadence without touching civilization. -- John O'Hara -%% +% America was discovered by Amerigo Vespucci and was named after him, until people got tired of living in a place called "Vespuccia" and changed its name to "America". -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% Amnesia used to be my favorite word, but then I forgot it. -%% +% An American's a person who isn't afraid to criticize the President but is always polite to traffic cops. -%% +% An Englishman never enjoys himself, except for a noble purpose. -- A. P. Herbert -%% +% An effective way to deal with predators is to taste terrible. -%% +% An elephant is a mouse with an operating system. -%% +% An excellence-oriented '80s male does not wear a regular watch He wears a Rolex watch, because it weighs nearly six pounds and is advertised only in excellence-oriented publications such as Fortune and Rich Protestant Golfer Magazine. The advertisements are written in incomplete sentences, which is how advertising copywriters denote @@ -1756,318 +1756,318 @@ Much more successful than the people who laughed at him in high school. Because of his acne. People who are probably nowhere near as successful as he is now. Maybe he'll go to his 20th reunion, and they'll see his Rolex Hyperion. Hahahahahahahahaha." -- Dave Barry, "In Search of Excellence" -%% +% An idea is not responsible for the people who believe in it. -%% +% Anarchy may not be the best form of government, but it's better than no government at all. -%% +% And on the seventh day, He exited from append mode. -%% +% And this is a table ma'am. What in essence it consists of is a horizontal rectilinear plane surface maintained by four vertical columnar supports, which we call legs. The tables in this laboratory, ma'am, are as advanced in design as one will find anywhere in the world. -- Michael Frayn, "The Tin Men" -%% +% Angels we have heard on High Tell us to go out and Buy. -- Tom Leher -%% +% Ankh if you love Isis. -%% +% Anoint, v.: To grease a king or other great functionary already sufficiently slippery. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Another good night not to sleep in a eucalyptus tree. -%% +% Anthony's Law of Force: Don't force it; get a larger hammer. -%% +% Anthony's Law of the Workshop: Any tool when dropped, will roll into the least accessible corner of the workshop. Corollary: On the way to the corner, any dropped tool will first strike your toes. -%% +% Antonym, n.: The opposite of the word you're trying to think of. -%% +% Any clod can have the facts, but having opinions is an art. -- Charles McCabe -%% +% Any excuse will serve a tyrant. -- Aesop -%% +% Any fool can paint a picture, but it takes a wise person to be able to sell it. -%% +% Any small object that is accidentally dropped will hide under a larger object. -%% +% Any sufficiently advanced technology is indistinguishable from a rigged demo. -%% +% Any sufficiently advanced technology is indistinguishable from magic. -- Arthur C. Clarke -%% +% Any two philosophers can tell each other all they know in two hours. -- Oliver Wendell Holmes, Jr. -%% +% Any woman is a volume if one knows how to read her. -%% +% Anybody can win, unless there happens to be a second entry. -%% +% Anybody who doesn't cut his speed at the sight of a police car is probably parked. -%% +% Anybody with money to burn will easily find someone to tend the fire. -%% +% Anyone can hold the helm when the sea is calm. -- Publilius Syrus -%% +% Anyone who cannot cope with mathematics is not fully human. At best he is a tolerable subhuman who has learned to wear shoes, bathe and not make messes in the house. -- Lazarus Long, "Time Enough for Love" -%% +% Anyone who goes to a psychiatrist ought to have his head examined. -- Samuel Goldwyn -%% +% Anyone who hates Dogs and Kids Can't be All Bad. -- W. C. Fields -%% +% Anyone who is capable of getting themselves made President should on no account be allowed to do the job. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" -%% +% Anything free is worth what you pay for it. -%% +% Anything is good and useful if it's made of chocolate. -%% +% Anything is good if it's made of chocolate. -%% +% Anything labeled "NEW" and/or "IMPROVED" isn't. The label means the price went up. The label "ALL NEW", "COMPLETELY NEW", or "GREAT NEW" means the price went way up. -%% +% Anything that is good and useful is made of chocolate. -%% +% Anything worth doing is worth overdoing -%% +% Anytime things appear to be going better, you have overlooked something. -%% +% Aquadextrous, adj.: Possessing the ability to turn the bathtub faucet on and off with your toes. -- Rich Hall, "Sniglets" -%% +% "Arguments with furniture are rarely productive." -- Kehlog Albran, "The Profit" -%% +% Arithmetic is being able to count up to twenty without taking off your shoes. -- Mickey Mouse -%% +% Armadillo: To provide weapons to a Spanish pickle -%% +% Arnold's Laws of Documentation: (1) If it should exist, it doesn't. (2) If it does exist, it's out of date. (3) Only documentation for useless programs transcends the first two laws. -%% +% Arthur's Laws of Love: (1) People to whom you are attracted invariably think you remind them of someone else. (2) The love letter you finally got the courage to send will be delayed in the mail long enough for you to make a fool of yourself in person. -%% +% Artistic ventures highlighted. Rob a museum. -%% +% As I was passing Project MAC, I met a Quux with seven hacks. Every hack had seven bugs; Every bug had seven manifestations; Every manifestation had seven symptoms. Symptoms, manifestations, bugs, and hacks, How many losses at Project MAC? -%% +% As Will Rogers would have said, "There is no such things as a free variable." -%% +% As Zeus said to Narcissus, "Watch yourself." -%% +% As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality. -- Albert Einstein -%% +% As far as we know, our computer has never had an undetected error. -- Weisert -%% +% As long as war is regarded as wicked, it will always have its fascination. When it is looked upon as vulgar, it will cease to be popular. -- Oscar Wilde -%% +% As of next week, passwords will be entered in Morse code. -%% +% "As part of the conversion, computer specialists rewrote 1,500 programs -- a process that traditionally requires some debugging." --- USA Today, referring to the IRS switchover to a new computer system. -%% +% As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs. -- Maurice Wilkes discovers debugging, 1949 -%% +% As the poet said, "Only God can make a tree" -- probably because it's so hard to figure out how to get the bark on. -- Woody Allen -%% +% As the trials of life continue to take their toll, remember that there is always a future in Computer Maintenance. -- National Lampoon, "Deteriorada" -%% +% As with most fine things, chocolate has its season. There is a simple memory aid that you can use to determine whether it is the correct time to order chocolate dishes: any month whose name contains the letter A, E, or U is the proper time for chocolate. -- Sandra Boynton, "Chocolate: The Consuming Passion" -%% +% Ask Not for whom the Bell Tolls, and You will Pay only the Station-to-Station rate. -%% +% Ask not for whom the telephone bell tolls ... if thou art in the bathtub, it tolls for thee. -%% +% Ask your boss to reconsider -- it's so difficult to take "Go to hell" for an answer. -%% +% Ass, n.: The masculine of "lass". -%% +% At Group L, Stoffel oversees six first-rate programmers, a managerial challenge roughly comparable to herding cats. -- The Washington Post Magazine, June 9, 1985 -%% +% At a recent meeting in Snowmass, Colorado, a participant from Los Angeles fainted from hyperoxygenation, and we had to hold his head under the exhaust of a bus until he revived. -%% +% At the source of every error which is blamed on the computer you will find at least two human errors, including the error of blaming it on the computer. -%% +% Atlee is a very modest man. And with reason. -- Winston Churchill -%% +% Automobile, n.: A four-wheeled vehicle that runs up hills and down pedestrians. -%% +% Avoid Quiet and Placid persons unless you are in Need of Sleep. -- National Lampoon, "Deteriorada" -%% +% Avoid reality at all costs. -%% +% BE ALERT!!!! (The world needs more lerts ...) -%% +% BLISS is ignorance -%% +% BULLWINKLE: "You just leave that to my pal. He's the brains of the outfit." GENERAL: "What does that make YOU?" BULLWINKLE: "What else? An executive..." -- Jay Ward -%% +% Bacchus, n.: A convenient deity invented by the ancients as an excuse for getting drunk. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Bagdikian's Observation: Trying to be a first-rate reporter on the average American newspaper is like trying to play Bach's "St. Matthew Passion" on a ukelele. -%% +% Baker's First Law of Federal Geometry: A block grant is a solid mass of money surrounded on all sides by governors. -%% +% Ban the bomb. Save the world for conventional warfare. -%% +% Bank error in your favor. Collect $200. -%% +% Barach's Rule: An alcoholic is a person who drinks more than his own physician. -%% +% Barometer, n.: An ingenious instrument which indicates what kind of weather we are having. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Barth's Distinction: There are two types of people: those who divide people into two types, and those who don't. -%% +% Baruch's Observation: If all you have is a hammer, everything looks like a nail. -%% +% Basic, n.: A programming language. Related to certain social diseases in that those who have it will not admit it in polite company. -%% +% Be a better psychiatrist and the world will beat a psychopath to your door. -%% +% Be assured that a walk through the ocean of most Souls would scarcely get your Feet wet. Fall not in Love, therefore: it will stick to your face. -- National Lampoon, "Deteriorada" -%% +% Be careful of reading health books, you might die of a misprint. -- Mark Twain -%% +% Be different: conform. -%% +% Be free and open and breezy! Enjoy! Things won't get any better so get used to it. -%% +% Be wary of strong drink. It can make you shoot at tax collectors and miss -- Lazarus Long, "Time Enough for Love" -%% +% Behold the warranty ... the bold print giveth and the fine print taketh away. -%% +% Beifeld's Principle: The probability of a young man meeting a desirable and receptive young female increases by pyramidal progression when he is already in the company of: (1) a date, (2) his wife, (3) a better looking and richer male friend. -%% +% Bell Labs Unix -- Reach out and grep someone. -%% +% "Benson, you are so free of the ravages of intelligence" -- Time Bandits -%% +% Besides the device, the box should contain: * Eight little rectangular snippets of paper that say "WARNING" * A plastic packet containing four 5/17 inch pilfer grommets and two @@ -2082,184 +2082,184 @@ without a major transmission overhaul? Because nobody cares, that's why." WARNING: This is assuming your spouse's name is Margaret. -- Dave Barry, "Read This First!" -%% +% Beware of Programmers who carry screwdrivers. -- Leonard Brandwein -%% +% "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth -%% +% Beware of low-flying butterflies. -%% +% Beware of the Turing Tar-pit in which everything is possible but nothing of interest is easy. -%% +% "Beware of the man who works hard to learn something, learns it, and finds himself no wiser than before," Bokonon tells us. "He is full of murderous resentment of people who are ignorant without having come by their ignorance the hard way." -- Kurt Vonnegut, "Cat's Cradle" -%% +% Binary, adj.: Possessing the ability to have friends of both sexes. -%% +% Bipolar, adj.: Refers to someone who has homes in Nome, Alaska, and Buffalo, New York -%% +% Birth, n.: The first and direst of all disasters. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Bizarreness is the essence of the exotic -%% +% Blessed are they who Go Around in Circles, for they Shall be Known as Wheels. -%% +% Blood is thicker than water, and much tastier. -%% +% Board the windows, up your car insurance, and don't leave any booze in plain sight. It's St. Patrick's day in Chicago again. The legend has it that St. Patrick drove the snakes out of Ireland. In fact, he was arrested for drunk driving. The snakes left because people kept throwing up on them. -%% +% Boling's postulate: If you're feeling good, don't worry. You'll get over it. -%% +% Bolub's Fourth Law of Computerdom: Project teams detest weekly progress reporting because it so vividly manifests their lack of progress. -%% +% Bombeck's Rule of Medicine: Never go to a doctor whose office plants have died. -%% +% Boob's Law: You always find something in the last place you look. -%% +% Bore, n.: A person who talks when you wish him to listen. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Boren's Laws: (1) When in charge, ponder. (2) When in trouble, delegate. (3) When in doubt, mumble. -%% +% Boss, n.: According to the Oxford English Dictionary, in the Middle Ages the words "boss" and "botch" were largely synonymous, except that boss, in addition to meaning "a supervisor of workers" also meant "an ornamental stud." -%% +% Boston, n.: Ludwig van Beethoven being jeered by 50,000 sports fans for finishing second in the Irish jig competition. -%% +% Boy, n.: A noise with dirt on it. -%% +% Bradley's Bromide: If computers get too powerful, we can organize them into a committee -- that will do them in. -%% +% Brady's First Law of Problem Solving: When confronted by a difficult problem, you can solve it more easily by reducing it to the question, "How would the Lone Ranger have handled this?" -%% +% Brain fried -- Core dumped -%% +% Brain, n.: The apparatus with which we think that we think. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Brain, v. [as in "to brain"]: To rebuke bluntly, but not pointedly; to dispel a source of error in an opponent. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Breast Feeding should not be attempted by fathers with hairy chests, since they can make the baby sneeze and give it wind. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% Bride, n.: A woman with a fine prospect of happiness behind her. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Bringing computers into the home won't change either one, but may revitalize the corner saloon. -%% +% British Israelites: The British Israelites believe the white Anglo-Saxons of Britain to be descended from the ten lost tribes of Israel deported by Sargon of Assyria on the fall of Sumeria in 721 B.C. ... They further believe that the future can be foretold by the measurements of the Great Pyramid, which probably means it will be big and yellow and in the hand of the Arabs. They also believe that if you sleep with your head under the pillow a fairy will come and take all your teeth. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% Broad-mindedness, n.: The result of flattening high-mindedness out. -%% +% Brooke's Law: Whenever a system becomes completely defined, some damn fool discovers something which either abolishes the system or expands it beyond recognition. -%% +% Brook's Law: Adding manpower to a late software project makes it later -%% +% Bubble Memory, n.: A derogatory term, usually referring to a person's intelligence. See also "vacuum tube". -%% +% Bucy's Law: Nothing is ever accomplished by a reasonable man. -%% +% Bug: Small living things that small living boys throw on small living girls. -%% +% Bug, n.: An aspect of a computer program which exists because the PROGRAMMER was thinking about Jumbo Jacks or stock options when s/he wrote the program. Fortunately, the second-to-last bug has just been fixed. -- Ray Simard -%% +% Bumper sticker: "All the parts falling off this car are of the very finest British manufacture" -%% +% Bureaucrat, n.: A politician who has tenure. -%% +% But in our enthusiasm, we could not resist a radical overhaul of the system, in which all of its major weaknesses have been exposed, analyzed, and replaced with new weaknesses. -- Bruce Leverett, "Register Allocation in Optimizing Compilers" -%% +% But scientists, who ought to know Assure us that it must be so. Oh, let us never, never doubt What nobody is sure about. -- Hilaire Belloc -%% +% But soft you, the fair Ophelia: Ope not thy ponderous and marble jaws, But get thee to a nunnery -- go! -- Mark "The Bard" Twain -%% +% But the greatest Electrical Pioneer of them all was Thomas Edison, who was a brilliant inventor despite the fact that he had little formal education and lived in New Jersey. Edison's first major invention in 1877, was the phonograph, which could soon be found in thousands of American homes, where it basically sat until 1923, when the record was @@ -2276,21 +2276,21 @@ In fact the last year any new electricity was generated in the United States was 1937; the electric companies have been merely re-selling it ever since, which is why they have so much free time to apply for rate increases. -- Dave Barry, "What is Electricity?" -%% +% "But this has taken us far afield from interface, which is not a bad place to be, since I particularly want to move ahead to the kludge. Why do people have so much trouble understanding the kludge? What is a kludge, after all, but not enough Ks, not enough ROMs, not enough RAMs, poor quality interface and too few bytes to go around? Have I explained yet about the bytes?" -%% +% "But what we need to know is, do people want nasally-insertable computers?" -%% +% Buzz off, Banana Nose; Relieve mine eyes Of hateful soreness, purge mine ears of corn; Less dear than army ants in apple pies Art thou, old prune-face, with thy chestnuts worn, Dropt from thy peeling lips like lousy fruit; @@ -2301,273 +2301,273 @@ And stem the produce of thy waspish wits: Thy logick, like thy locks, is disarrayed; Thy cheer, like thy complexion, is the pits. Be off, I say; go bug somebody new, Scram, beat it, get thee hence, and nuts to you. -%% +% By doing just a little every day, you can gradually let the task completely overwhelm you. -%% +% "By necessity, by proclivity, and by delight, we all quote. In fact, it is as difficult to appropriate the thoughts of others as it is to invent. (R. Emerson)" -- Quoted from a fortune cookie program (whose author claims, "Actually, stealing IS easier.") [to which I reply, "You think it's easy for me to misconstrue all these misquotations?!?"] -%% +% Bypasses are devices that allow some people to dash from point A to point B very fast while other people dash from point B to point A very fast. People living at point C, being a point directly in between, are often given to wonder what's so great about point A that so many people from point B are so keen to get there and what's so great about point B that so many people from point A are so keen to get _____there. They often wish that people would just once and for all work out where the hell they wanted to be. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" -%% +% C, n.: A programming language that is sort of like Pascal except more like assembly except that it isn't very much like either one, or anything else. It is either the best language available to the art today, or it isn't. -- Ray Simard -%% +% CChheecckk yyoouurr dduupplleexx sswwiittcchh.. -%% +% Cabbage, n.: A familiar kitchen-garden vegetable about as large and wise as a man's head. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Cahn's Axiom: When all else fails, read the instructions. -%% +% California is a fine place to live -- if you happen to be an orange. -- Fred Allen -%% +% California, n.: From Latin "calor", meaning "heat" (as in English "calorie" or Spanish "caliente"); and "fornia'" for "sexual intercourse" or "fornication." Hence: Tierra de California, "the land of hot sex." -- Ed Moran -%% +% Call on God, but row away from the rocks. -- Indian proverb -%% +% "Calling J-Man Kink. Calling J-Man Kink. Hash missle sighted, target Los Angeles. Disregard personal feelings about city and intercept." -%% +% "Calvin Coolidge looks as if he had been weaned on a pickle." -- Alice Roosevelt Longworth -%% +% "Calvin Coolidge was the greatest man who ever came out of Plymouth Corner, Vermont." -- Clarence Darrow -%% +% Canada Bill Jone's Motto: It's morally wrong to allow suckers to keep their money. Supplement: A .44 magnum beats four aces. -%% +% Canada Post doesn't really charge 32 cents for a stamp. It's 2 cents for postage and 30 cents for storage. -- Gerald Regan, Cabinet Minister, 12/31/83 Financial Post -%% +% Cancel me not -- for what then shall remain? Abscissas, some mantissas, modules, modes, A root or two, a torus and a node: The inverse of my verse, a null domain. -- Stanislaw Lem, "Cyberiad" -%% +% Captain Penny's Law: You can fool all of the people some of the time, and some of the people all of the time, but you Can't Fool Mom. -%% +% Carelessly planned projects take three times longer to complete than expected. Carefully planned projects take four times longer to complete than expected, mostly because the planners expect their planning to reduce the time it takes. -%% +% Carperpetuation (kar' pur pet u a shun), n.: The act, when vacuuming, of running over a string at least a dozen times, reaching over and picking it up, examining it, then putting it back down to give the vacuum one more chance. -- Rich Hall, "Sniglets" -%% +% Cauliflower is nothing but Cabbage with a College Education. -- Mark Twain -%% +% Caution: breathing may be hazardous to your health. -%% +% Celebrate Hannibal Day this year. Take an elephant to lunch. -%% +% Census Taker to Housewife: Did you ever have the measles, and, if so, how many? -%% +% Cerebus: I'd love to lick apricot brandy out of your navel. Jaka: Look, Cerebus-- Jaka has to tell you ... something Cerebus: If Cerebus had a navel, would you lick apricot brandy out of it? Jaka: Ugh! Cerebus: You don't like apricot brandy? -- Cerebus #6, "The Secret" -%% +% Certain old men prefer to rise at dawn, taking a cold bath and a long walk with an empty stomach and otherwise mortifying the flesh. They then point with pride to these practices as the cause of their sturdy health and ripe years; the truth being that they are hearty and old, not because of their habits, but in spite of them. The reason we find only robust persons doing this thing is that it has killed all the others who have tried it. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Certainly there are things in life that money can't buy, but it's very funny-- Did you ever try buying then without money? -- Ogden Nash -%% +% Character Density: the number of very weird people in the office. -%% +% Chemicals, n.: Noxious substances from which modern foods are made. -%% +% Chicago, n.: Where the dead still vote ... early and often! -%% +% Chicken Little was right. -%% +% Chicken Soup, n.: An ancient miracle drug containing equal parts of aureomycin, cocaine, interferon, and TLC. The only ailment chicken soup can't cure is neurotic dependence on one's mother. -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% Children are natural mimic who act like their parents despite every effort to teach them good manners. -%% +% Children aren't happy without something to ignore, And that's what parents were created for. -- Ogden Nash -%% +% Children seldom misquote you. In fact, they usually repeat word for word what you shouldn't have said. -%% +% Chism's Law of Completion: The amount of time required to complete a government project is precisely equal to the length of time already spent on it. -%% +% Chisolm's First Corollary to Murphy's Second Law: When things just can't possibly get any worse, they will. -%% +% Christ: A man who was born at least 5,000 years ahead of his time. -%% +% Churchill's Commentary on Man: Man will occasionally stumble over the truth, but most of the time he will pick himself up and continue on. -%% +% Cigarette, n.: A fire at one end, a fool at the other, and a bit of tobacco in between. -%% +% Cinemuck, n.: The combination of popcorn, soda, and melted chocolate which covers the floors of movie theaters. -- Rich Hall, "Sniglets" -%% +% Cleanliness is next to impossible. -%% +% "Cleveland? Yes, I spent a week there one day." -%% +% Cleveland still lives. God ____must be dead. -%% +% Cloning is the sincerest form of flattery. -%% +% Clothes make the man. Naked people have little or no influence on society. -- Mark Twain -%% +% Cocaine -- the thinking man's Dristan. -%% +% Cogito cogito ergo cogito sum -- "I think that I think, therefore I think that I am." -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Cold, adj.: When the local flashers are handing out written descriptions. -%% +% Cold, adj.: When the politicians walk around with their hands in their own pockets. -%% +% Collaboration, n.: A literary partnership based on the false assumption that the other fellow can spell. -%% +% College football is a game which would be much more interesting if the faculty played instead of the students, and even more interesting if the trustees played. There would be a great increase in broken arms, legs, and necks, and simultaneously an appreciable diminution in the loss to humanity. -- H. L. Mencken -%% +% Colvard's Logical Premises: All probabilities are 50%. Either a thing will happen or it won't. Colvard's Unconscionable Commentary: This is especially true when dealing with someone you're attracted to. Grelb's Commentary Likelihoods, however, are 90% against you. -%% +% Come, every frustum longs to be a cone, And every vector dreams of matrices. Hark to the gentle gradient of the breeze: It whispers of a more ergodic zone. -- Stanislaw Lem, "Cyberiad" -%% +% Come, let us hasten to a higher plane, Where dyads tread the fairy fields of Venn, Their indices bedecked from one to _n, Commingled in an endless Markov chain! -- Stanislaw Lem, "Cyberiad" -%% +% Command, n.: Statement presented by a human and accepted by a computer in such a manner as to make the human feel as if he is in control. -%% +% Commitment, n.: Commitment can be illustrated by a breakfast of ham and eggs. The chicken was involved, the pig was committed. -%% +% Common sense is the collection of prejudices acquired by age eighteen. -- Albert Einstein -%% +% Computer Science is merely the post-Turing decline in formal systems theory. -%% +% Computer programmers do it byte by byte -%% +% Computers are not intelligent. They only think they are. -%% +% Conceit causes more conversation than wit. -- LaRouchefoucauld -%% +% Concept, n.: Any "idea" for which an outside consultant billed you more than $25,000. -%% +% Condense soup, not books! -%% +% Confession is good for the soul only in the sense that a tweed coat is good for dandruff. -- Peter de Vries -%% +% Confidence is the feeling you have before you understand the situation. -%% +% Congratulations! You have purchased an extremely fine device that would give you thousands of years of trouble-free service, except that you undoubtably will destroy it via some typical bonehead consumer maneuver. Which is why we ask you to PLEASE FOR GOD'S SAKE READ THIS OWNER'S MANUAL CAREFULLY BEFORE YOU UNPACK THE DEVICE. YOU ALREADY @@ -2577,92 +2577,92 @@ SET IT ON "FAST FORWARD", THIS CHILD ALSO IS FIDDLING WITH HE KNOBS, RIGHT? AND YOU'RE JUST NOW STARTING TO READ THE INSTRUCTIONS, RIGHT??? WE MIGHT AS WELL JUST BREAK THESE DEVICES RIGHT AT THE FACTORY BEFORE WE SHIP THEM OUT, YOU KNOW THAT? -- Dave Barry, "Read This First!" -%% +% Conscience is the inner voice that warns us somebody is looking -- H. L. Mencken -%% +% Conscience is what hurts when everything else feels so good. -%% +% Consultants are mystical people who ask a company for a number and then give it back to them. -%% +% "Contrariwise," continued Tweedledee, "if it was so, it might be, and if it were so, it would be; but as it isn't, it ain't. That's logic!" -- Lewis Carroll, "Through the Looking Glass" -%% +% Conversation, n.: A vocal competition in which the one who is catching his breath is called the listener. -%% +% Conway's Law: In any organization there will always be one person who knows what is going on. This person must be fired. -%% +% Coronation, n.: The ceremony of investing a sovereign with the outward and visible signs of his divine right to be blown skyhigh with a dynamite bomb. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Corrupt, adj.: In politics, holding an office of trust or profit. -%% +% Corruption is not the #1 priority of the Police Commissioner. His job is to enforce the law and fight crime. -- P.B.A. President E. J. Kiernan -%% +% Coward, n.: One who in a perilous emergency thinks with his legs. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Crash programs fail because they are based on the theory that, with nine women pregnant, you can get a baby a month. -- Wernher von Braun -%% +% Crime does not pay ... as well as politics. -- A. E. Newman -%% +% Critic, n.: A person who boasts himself hard to please because nobody tries to please him. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Cynic, n.: A blackguard whose faulty vision sees things as they are, not as they ought to be. Hence the custom among the Scythians of plucking out a cynic's eyes to improve his vision. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Cynic, n.: One who looks through rose-colored glasses with a jaundiced eye. -%% +% Darth Vader sleeps with a Teddywookie. -%% +% Dawn, n.: The time when men of reason go to bed. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Day of inquiry. You will be subpoenaed. -%% +% DeVries's Dilemma: If you hit two keys on the typewriter, the one you don't want hits the paper. -%% +% Dealing with failure is easy: work hard to improve. Success is also easy to handle: you've solved the wrong problem. Work hard to improve. -%% +% Dear Lord: I just want *___one* one-armed manager so I never have to hear "On the other hand", again. -%% +% Dear Miss Manners: My home economics teacher says that one must never place one's elbows on the table. However, I have read that one elbow, in between courses, is all right. Which is correct? @@ -2670,293 +2670,293 @@ For the purpose of answering examinations in your home economics class, your teacher is correct. Catching on to this principle of education may be of even greater importance to you now than learning correct current table manners, vital as Miss Manners believes that is. -%% +% Dear Miss Manners: Please list some tactful ways of removing a man's saliva from your face. Gentle Reader: Please list some decent ways of acquiring a man's saliva on your face ... -%% +% Death is God's way of telling you not to be such a wise guy. -%% +% Death is Nature's way of recycling human beings. -%% +% Death is life's way of telling you you've been fired. -- R. Geis -%% +% Death is nature's way of telling you to slow down -%% +% Decisionmaker, n.: The person in your office who was unable to form a task force before the music stopped. -%% +% Decisions of the judges will be final unless shouted down by a really overwhelming majority of the crowd present. Abusive and obscene language may not be used by contestants when addressing members of the judging panel, or, conversely, by members of the judging panel when addressing contestants (unless struck by a boomerang). -- Mudgeeraba Creek Emu-Riding and Boomerang-Throwing Assoc. -%% +% Deliberation, n.: The act of examining one's bread to determine which side it is buttered on. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% "Deliver yesterday, code today, think tomorrow." -%% +% Democracy is a form of government in which it is permitted to wonder aloud what the country could do under first-class management. -- Senator Soaper -%% +% Democracy is a form of government that substitutes election by the incompetent many for appointment by the corrupt few. -- G. B. Shaw -%% +% Democracy is also a form of worship. It is the worship of Jackals by Jackasses. -- H. L. Mencken -%% +% Democracy is the recurrent suspicion that more than half of the people are right more than half of the time. -- E. B. White -%% +% Dentist, n.: A Prestidigitator who, putting metal in one's mouth, pulls coins out of one's pockets. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Did you know ... That no-one ever reads these things? -%% +% Did you know that clones never use mirrors? -- Ambrose Bierce, "The Devil's Dictionary" -%% +% "Die? I should say not, dear fellow. No Barrymore would allow such a conventional thing to happen to him." -- John Barrymore's dying words -%% +% Die, v.: To stop sinning suddenly. -- Elbert Hubbard -%% +% Different all twisty a of in maze are you, passages little. -%% +% Dimensions will always be expressed in the least usable term. Velocity, for example, will be expressed in furlongs per fortnight. -%% +% Diplomacy is the art of saying "nice doggy" until you can find a rock. -%% +% Disc space -- the final frontier! -%% +% Disco is to music what Etch-A-Sketch is to art. -%% +% Distress, n.: A disease incurred by exposure to the prosperity of a friend. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Do infants have as much fun in infancy as adults do in adultery? -%% +% Do molecular biologists wear designer genes? -%% +% Do not believe in miracles -- rely on them. -%% +% Do not drink coffee in early A.M. It will keep you awake until noon. -%% +% Do not meddle in the affairs of troff, for it is subtle and quick to anger. -%% +% Do not read this fortune under penalty of law. Violators will be prosecuted. (Penal Code sec. 2.3.2 (II.a.)) -%% +% Do not sleep in a eucalyptus tree tonight. -%% +% Do not try to solve all life's problems at once -- learn to dread each day as it comes. -- Donald Kaul -%% +% Do something unusual today. Pay a bill. -%% +% Do what comes naturally now. Seethe and fume and throw a tantrum. -%% +% Do you realize how many holes there could be if people would just take the time to take the dirt out of them? -%% +% "Do you think what we're doing is wrong?" "Of course it's wrong! It's illegal!" "I've never done anything illegal before." "I thought you said you were an accountant!" -%% +% Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing. -- Dick Brandon -%% +% Documentation is the castor oil of programming. Managers know it must be good because the programmers hate it so much. -%% +% Don: I didn't know you had a cousin Penelope, Bill! Was she pretty? W. C.: Well, her face was so wrinkled it looked like seven miles of bad road. She had so many gold teeth, Don, she use to have to sleep with her head in a safe. She died in Bolivia. Don: Oh Bill, it must be hard to lose a relative. W. C.: It's almost impossible. -- W. C. Fields, from "The Further Adventures of Larson E. Whipsnade and other Tarradiddles" -%% +% Don't abandon hope: your Tom Mix decoder ring arrives tomorrow. -%% +% Don't be humble, you're not that great. -- Golda Meir -%% +% Don't believe everything you hear or anything you say. -%% +% Don't cook tonight -- starve a rat today! -%% +% Don't feed the bats tonight. -%% +% Don't get suckered in by the comments -- they can be terribly misleading. Debug only code. -- Dave Storer -%% +% Don't go around saying the world owes you a living. The world owes you nothing. It was here first. -- Mark Twain -%% +% Don't go surfing in South Dakota for a while. -%% +% Don't hate yourself in the morning -- sleep till noon. -%% +% Don't kiss an elephant on the lips today. -%% +% Don't knock President Fillmore. He kept us out of Vietnam. -%% +% Don't let people drive you crazy when you know it's in walking distance. -%% +% Don't look back, the lemmings are gaining on you. -%% +% Don't put off for tomorrow what you can do today, because if you enjoy it today you can do it again tomorrow. -%% +% "Don't say yes until I finish talking." -- Darryl F. Zanuck -%% +% Don't take life too seriously -- you'll never get out if it alive. -%% +% Don't tell any big lies today. Small ones can be just as effective. -%% +% "Don't tell me I'm burning the candle at both ends -- tell me where to get more wax!!" -%% +% Don't worry about the world coming to an end today. It's already tomorrow in Australia. -- Charles Schultz -%% +% Don't worry over what other people are thinking about you. They're too busy worrying over what you are thinking about them. -%% +% Don't you feel more like you do now than you did when you came in? -%% +% Down with categorical imperative! -%% +% "Drawing on my fine command of language, I said nothing." -%% +% Drew's Law of Highway Biology: The first bug to hit a clean windshield lands directly in front of your eyes. -%% +% Drive defensively. Buy a tank. -%% +% Drugs may be the road to nowhere, but at least they're the scenic route! -%% +% Ducharme's Precept: Opportunity always knocks at the least opportune moment. -%% +% Ducharm's Axiom: If you view your problem closely enough you will recognize yourself as part of the problem. -%% +% Duct tape is like the force. It has a light side, and a dark side, and it holds the universe together ... -- Carl Zwanzig -%% +% Due to a shortage of devoted followers, the production of great leaders has been discontinued. -%% +% Due to circumstances beyond your control, you are master of your fate and captain of your soul. -%% +% During the next two hours, the VAX will be going up and down several times, often with lin~po_~{po ~poz~ppo\~{ o n~po_~{o[po ~y oodsou>#w4k**n~po_~{ol;lkld;f;g;dd;po\~{o -%% +% Dying is a very dull, dreary affair. And my advice to you is to have nothing whatever to do with it. -- W. Somerset Maughm -%% +% E Pluribus Unix -%% +% Earn cash in your spare time -- blackmail your friends. -%% +% /Earth is 98% full ... please delete anyone you can. -%% +% "Earth is a great, big funhouse without the fun." -- Jeff Berner -%% +% Easiest Color to Solve on a Rubik's Cube: Black. Simply remove all the little colored stickers on the cube, and each of side of the cube will now be the original color of the plastic underneath -- black. According to the instructions, this means the puzzle is solved. -- Steve Rubenstein -%% +% Economics is extremely useful as a form of employment for economists. -- John Kenneth Galbraith -%% +% Economics, n.: Economics is the study of the value and meaning of J. K. Galbraith ... -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% Eggheads unite! You have nothing to lose but your yolks. -- Adlai Stevenson -%% +% Eggnog is a traditional holiday drink invented by the English. Many people wonder where the word "eggnog" comes from. The first syllable comes from the English word "egg", meaning "egg". I don't know where the "nog" comes from. To make eggnog, you'll need rum, whiskey, wine gin and, if they are in season, eggs... -%% +% Egotism is the anesthetic given by a kindly nature to relieve the pain of being a damned fool. -- Bellamy Brooks -%% +% Egotist, n.: A person of low taste, more interested in himself than me. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Ehrman's Commentary: 1. Things will get worse before they get better. 2. Who said things would get better? -%% +% Eighty percent of air pollution comes from plants and trees. -- Ronald Reagan, famous movie star -%% +% Eisenhower was very nice, Nixon was his only vice. -- C. Degen -%% +% Eleanor Rigby Sits at the keyboard And waits for a line on the screen Lives in a dream Waits for a signal @@ -2964,71 +2964,71 @@ That will make the machine do some more. What is it for? All the lonely users, where do they all come from? All the lonely users, why does it take so long? -%% +% Electrical Engineers do it with less resistance. -%% +% Electrocution, n.: Burning at the stake with all the modern improvements. -%% +% Elevators smell different to midgets -%% +% Emersons' Law of Contrariness: Our chief want in life is somebody who shall make us do what we can. Having found them, we shall then hate them for it. -%% +% Encyclopedia Salesmen: Invite them all in. Nip out the back door. Phone the police and tell them your house is being burgled. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% Endless Loop: n., see Loop, Endless. Loop, Endless: n., see Endless Loop. -- Random Shack Data Processing Dictionary -%% +% Entropy isn't what it used to be. -%% +% Enzymes are things invented by biologists that explain things which otherwise require harder thinking. -- Jerome Lettvin -%% +% Equal bytes for women. -%% +% Es brilig war. Die schlichte Toven Wirrten und wimmelten in Waben; Und aller-m"umsige Burggoven Dir mohmen R"ath ausgraben. -- Lewis Carrol, "Through the Looking Glass" -%% +% Eternal nothingness is fine if you happen to be dressed for it. -- Woody Allen -%% +% Etymology, n.: Some early etymological scholars come up with derivations that were hard for the public to believe. The term "etymology" was formed from the Latin "etus" ("eaten"), the root "mal" ("bad"), and "logy" ("study of"). It meant "the study of things that are hard to swallow." -- Mike Kellen -%% +% Even if you do learn to speak correct English, whom are you going to speak it to? -- Clarence Darrow -%% +% "Even the best of friends cannot attend each other's funeral." -- Kehlog Albran, "The Profit" -%% +% Even though they raised the rate for first class mail in the United States we really shouldn't complain -- it's still only 2 cents a day. -%% +% Ever notice that even the busiest people are never too busy to tell you just how busy they are. -%% +% Every 4 seconds a woman has a baby. Our problem is to find this woman and stop her. -%% +% Every Horse has an Infinite Number of Legs (proof by intimidation): Horses have an even number of legs. Behind they have two legs, and in front they have fore-legs. This makes six legs, which is certainly an odd number of legs for a horse. But the only number that is both even @@ -3035,57 +3035,57 @@ and odd is infinity. Therefore, horses have an infinite number of legs. Now to show this for the general case, suppose that somewhere, there is a horse that has a finite number of legs. But that is a horse of another color, and by the [above] lemma ["All horses are the same color"], that does not exist. -%% +% Every absurdity has a champion who will defend it. -%% +% Every creature has within him the wild, uncontrollable urge to punt. -%% +% Every gun that is made, every warship launched, every rocket fired signifies in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. This is not a way of life at all in any true sense. Under the clouds of war, it is humanity hanging on a cross of iron. -- Dwight Eisenhower, April 16, 1953 -%% +% Every little picofarad has a nanohenry all its own. -- Don Vonada -%% +% Every man is as God made him, ay, and often worse. -- Miguel de Cervantes -%% +% Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to one instruction which doesn't work. -%% +% Every program has two purposes -- written and another for which it wasn't. -%% +% Every program is a part of some other program, and rarely fits. -%% +% Every solution breeds new problems. -%% +% Every successful person has had failures but repeated failure is no guarantee of eventual success. -%% +% "Every time I think I know where it's at, they move it." -%% +% Every word is like an unnecessary stain on silence and nothingness. -- Beckett -%% +% Everybody is somebody else's weirdo. -- Dykstra -%% +% Everybody wants to go to heaven, but nobody wants to die. -%% +% Everyone can be taught to sculpt: Michelangelo would have had to be taught how ___not to. So it is with the great programmers. -%% +% Everyone knows that dragons don't exist. But while this simplistic formulation may satisfy the layman, it does not suffice for the scientific mind. The School of Higher Neantical Nillity is in fact wholly unconcerned with what ____does exist. Indeed, the banality of existence has been so amply demonstrated, there is no need for us to @@ -3093,250 +3093,250 @@ problem analytically, discovered three distinct kinds of dragon: the mythical, the chimerical, and the purely hypothetical. They were all, one might say, nonexistent, but each nonexisted in an entirely different way ... -- Stanislaw Lem, "Cyberiad" -%% +% Everyone talks about apathy, but no one ____does anything about it. -%% +% Everything is controlled by a small evil group to which, unfortunately, no one we know belongs. -%% +% Everything you know is wrong! -%% +% Everything you've learned in school as "obvious" becomes less and less obvious as you begin to study the universe. For example, there are no solids in the universe. There's not even a suggestion of a solid. There are no absolute continuums. There are no surfaces. There are no straight lines. -- R. Buckminster Fuller -%% +% Everyting should be built top-down, except the first time. -%% +% Excellent day for drinking heavily. Spike office water cooler. -%% +% Excellent day to have a rotten day. -%% +% Excellent time to become a missing person. -%% +% Excess on occasion is exhilarating. It prevents moderation from acquiring the deadening effect of a habit. -- W. Somerset Maugham -%% +% Excessive login or logout messages are a sure sign of senility. -%% +% Expect the worst, it's the least you can do. -%% +% Expense Accounts, n.: Corporate food stamps. -%% +% Experience is something you don't get until just after you need it. -- Olivier -%% +% Experience is that marvelous thing that enables you recognize a mistake when you make it again. -- F. P. Jones -%% +% Experience is the worst teacher. It always gives the test first and the instruction afterward. -%% +% Experience is what causes a person to make new mistakes instead of old ones. -%% +% Experience is what you get when you were expecting something else. -%% +% Experience varies directly with equipment ruined. -%% +% F u cn rd ths u cnt spl wrth a dm! -%% +% FLASH! Intelligence of mankind decreasing. Details at ... uh, when the little hand is on the .... -%% +% FORTUNE'S PARTY TIPS #14 Tired of finding that other people are helping themselves to your good liquor at BYOB parties? Take along a candle, which you insert and light after you've opened the bottle. No one ever expects anything drinkable to be in a bottle which has a candle stuck in its neck. -%% +% Fairy Tale, n.: A horror story to prepare children for the newspapers. -%% +% Faith is the quality that enables you to eat blackberry jam on a picnic without looking to see whether the seeds move. -%% +% Faith, n: That quality which enables us to believe what we know to be untrue. -%% +% Fakir, n: A psychologist whose charismatic data have inspired almost religious devotion in his followers, even though the sources seem to have shinnied up a rope and vanished. -%% +% Familiarity breeds attempt -%% +% Families, when a child is born Want it to be intelligent. I, through intelligence, Having wrecked my whole life, Only hope the baby will prove Ignorant and stupid. Then he will crown a tranquil life By becoming a Cabinet Minister -- Su Tung-p'o -%% +% Famous last words: -%% +% Famous last words: 1. Don't unplug it, it will just take a moment to fix. 2. Let's take the shortcut, he can't see us from there. 3. What happens if you touch these two wires tog-- 4. We won't need reservations. 5. It's always sunny there this time of the year. 6. Don't worry, it's not loaded. 7. They'd never (be stupid enough to) make him a manager. -%% +% Famous last words: 1) "Don't worry, I can handle it." 2) "You and what army?" 3) "If you were as smart as you think you are, you wouldn't be a cop." -%% +% Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the Galaxy lies a small unregarded yellow sun. Orbiting this at a distance of roughly ninety-eight million miles is an utterly insignificant little blue-green planet whose ape-descended life forms are so amazingly primitive that they still think digital watches are a pretty neat idea ... -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" -%% +% Fashion is a form of ugliness so intolerable that we have to alter it every six months. -- Oscar Wilde -%% +% Fats Loves Madelyn -%% +% Feel disillusioned? I've got some great new illusions ... -%% +% Fertility is hereditary. If your parents didn't have any children, neither will you. -%% +% Fifth Law of Applied Terror: If you are given an open-book exam, you will forget your book. Corollary: If you are given a take-home exam, you will forget where you live. -%% +% Fifth Law of Procrastination: Procrastination avoids boredom; one never has the feeling that there is nothing important to do. -%% +% Finagle's Creed: Science is true. Don't be misled by facts. -%% +% Finagle's First Law: If an experiment works, something has gone wrong. -%% +% Finagle's Second Law: No matter what the anticipated result, there will always be someone eager to (a) misinterpret it, (b) fake it, or (c) believe it happened according to his own pet theory. -%% +% Finagle's Third Law: In any collection of data, the figure most obviously correct, beyond all need of checking, is the mistake Corollaries: 1. Nobody whom you ask for help will see it. 2. The first person who stops by, whose advice you really don't want to hear, will see it immediately. -%% +% Finagle's fourth Law: Once a job is fouled up, anything done to improve it only makes it worse. -%% +% Fine day to throw a party. Throw him as far as you can. -%% +% Fine day to work off excess energy. Steal something heavy. -%% +% First Law of Bicycling: No matter which way you ride, it's uphill and against the wind. -%% +% First Law of Procrastination: Procrastination shortens the job and places the responsibility for its termination on someone else (i.e., the authority who imposed the deadline). -%% +% First Law of Socio-Genetics: Celibacy is not hereditary. -%% +% First Rule of History: History doesn't repeat itself -- historians merely repeat each other. -%% +% Flappity, floppity, flip The mouse on the m"obius strip; The strip revolved, The mouse dissolved In a chronodimensional skip. -%% +% Flon's Law: There is not now, and never will be, a language in which it is the least bit difficult to write bad programs. -%% +% Flugg's Law: When you need to knock on wood is when you realize that the world is composed of vinyl, naugahyde and aluminum. -%% +% For a good time, call (415) 642-9483 -%% +% For an idea to be fashionable is ominous, since it must afterwards be always old-fashioned. -%% +% For every complex problem, there is a solution that is simple, neat, and wrong. -- H. L. Mencken -%% +% For every credibility gap, there is a gullibility fill. -- R. Clopton -%% +% For some reason a glaze passes over people's faces when you say "Canada". Maybe we should invade South Dakota or something. -- Sandra Gotlieb, wife of the Canadian ambassador to the U.S. -%% +% For some reason, this fortune reminds everyone of Marvin Zelkowitz. -%% +% "For that matter, compare your pocket computer with the massive jobs of a thousand years ago. Why not, then, the last step of doing away with computers altogether?" -- Jehan Shuman -%% +% For those who like this sort of thing, this is the sort of thing they like. -- Abraham Lincoln -%% +% For years a secret shame destroyed my peace -- I'd not read Eliot, Auden or MacNiece. But now I think a thought that brings me hope: Neither had Chaucer, Shakespeare, Milton, Pope. -- Justin Richardson. -%% +% Forgetfulness, n.: A gift of God bestowed upon debtors in compensation for their destitution of conscience. -%% +% Fortune's graffito of the week (or maybe even month): Don't Write On Walls! (and underneath) You want I should type? -%% +% Fortune's nomination for All-Time Champion and Protector of Youthful Morals goes to Representative Clare E. Hoffman of Michigan. During an impassioned House debate over a proposed bill to "expand oyster and clam research," a sharp-eared informant transcribed the following exchange between our hero and Rep. John D. Dingell, also of Michigan. @@ -3348,26 +3348,26 @@ is that female oysters through their living habits cast out large amounts of seed and the male oysters cast out large amounts of fertilization. HOFFMAN: Wait a minute! I do not want to go into that. There are many teenagers who read The Congressional Record. -%% +% Fourth Law of Applied Terror: The night before the English History mid-term, your Biology instructor will assign 200 pages on planaria. Corollary: Every instructor assumes that you have nothing else to do except study for that instructor's course. -%% +% Fourth Law of Revision: It is usually impractical to worry beforehand about interferences -- if you have none, someone will make one for you. -%% +% Fresco's Discovery: If you knew what you were doing you'd probably be bored. -%% +% Friends, Romans, Hipsters, Let me clue you in; I come to put down Caeser, not to groove him. The square kicks some cats are on stay with them; The hip bits, like, go down under; so let it lay with Caeser. The cool Brutus @@ -3375,15 +3375,15 @@ If that's the sound, someone's copping a plea, And, like, old Caeser really set them straight. Here, copacetic with Brutus and the studs, -- for Brutus is a real cool cat; So are they all, all cool cats, -- Come I to make this gig at Caeser's laying down. -%% +% Frisbeetarianism, n.: The belief that when you die, your soul goes up the on roof and gets stuck. -%% +% Frobnicate, v.: To manipulate or adjust, to tweak. Derived from FROBNITZ. Usually abbreviated to FROB. Thus one has the saying "to frob a frob". See TWEAK and TWIDDLE. Usage: FROB, TWIDDLE, and TWEAK sometimes connote points along a continuum. FROB connotes aimless @@ -3391,59 +3391,59 @@ search for a proper setting; TWEAK connotes fine-tuning. If someone is turning a knob on an oscilloscope, then if he's carefully adjusting it he is probably tweaking it; if he is just turning it but looking at the screen he is probably twiddling it; but if he's just doing it because turning a knob is fun, he's frobbing it. -%% +% From too much love of living, From hope and fear set free, We thank with brief thanksgiving, Whatever gods may be, That no life lives forever, That dead men rise up never, That even the weariest river winds somewhere safe to sea. -- Swinburne -%% +% Fudd's First Law of Opposition: Push something hard enough and it will fall over. -%% +% Furbling, v.: Having to wander through a maze of ropes at an airport or bank even when you are the only person in line. -- Rich Hall, "Sniglets" -%% +% Furious activity is no substitute for understanding. -- H. H. Williams -%% +% Future looks spotty. You will spill soup in late evening. -%% +% G. B. Shaw to William Douglas Home: "Go on writing plays, my boy. One of these days a London producer will go into his office and say to his secretary, `Is there a play from Shaw this morning?' and when she says `No,' he will say, `Well, then we'll have to start on the rubbish.' And that's your chance, my boy." -%% +% GEMINI (May 21 to Jun. 20) Good news and bad news highlighted. Enjoy the good news while you can; the bad news will make you forget it. You will enjoy praise and respect from those around you; everybody loves a sucker. A short trip is in the stars, possibly to the men's room. -%% +% //GO.SYSIN DD *, DOODAH, DOODAH -%% +% Garbage In -- Gospel Out. -%% +% Garter, n.: An elastic band intended to keep a woman from coming out of her stockings and desolating the country. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Gauls! We have nothing to fear; except perhaps that the sky may fall on our heads tomorrow. But as we all know, tomorrow never comes!! -- Adventures of Asterix. -%% +% Gay shlafen: Yiddish for "go to sleep". Now doesn't "gay shlafen" have a softer, more soothing sound than the harsh, staccato "go to sleep"? Listen to the difference: "Go to sleep, you little wretch!" ... "Gay shlafen, darling." @@ -3459,42 +3459,42 @@ everything is written in Yiddish. And we'll have to start driving on the left side of the road so we won't be reading the street signs backwards. But is that too high a price to pay for world peace? I think not, my friend, I think not. -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% Genderplex, n.: The predicament of a person in a restaurant who is unable to determine his or her designated restroom (e.g., turtles and tortoises). -- Rich Hall, "Sniglets" -%% +% Genetics explains why you look like your father, and if you don't, why you should. -%% +% Genius may have its limitations, but stupidity is not thus handicapped. -- Elbert Hubbard -%% +% Genius, n.: A chemist who discovers a laundry additive that rhymes with "bright". -%% +% George Orwell was an optimist. -%% +% Gerrold's Laws of Infernal Dynamics: 1. An object in motion will always be headed in the wrong direction. 2. An object at rest will always be in the wrong place. 3. The energy required to change either one of these states will always be more than you wish to expend, but never so much as to make the task totally impossible. -%% +% Get Revenge! Live long enough to be a problem for your children! -%% +% Get forgiveness now -- tomorrow you may no longer feel guilty. -%% +% Ginsberg's Theorem: 1. You can't win. 2. You can't break even. 3. You can't even quit the game. @@ -3507,93 +3507,93 @@ 1. Capitalism is based on the assumption that you can win. 2. Socialism is based on the assumption that you can break even. 3. Mysticism is based on the assumption that you can quit the game. -%% +% Give me a Plumber's friend the size of the Pittsburgh dome, and a place to stand, and I will drain the world. -%% +% Give me the Luxuries, and the Hell with the Necessities! -%% +% Give thought to your reputation. Consider changing name and moving to a new town. -%% +% Give your child mental blocks for Christmas. -%% +% Glib's Fourth Law of Unreliability: Investment in reliability will increase until it exceeds the probable cost of errors, or until someone insists on getting some useful work done. -%% +% Go placidly amid the noise and waste, and remember what value there may be in owning a piece thereof. -- National Lampoon, "Deteriorada" -%% +% Go 'way! You're bothering me! -%% +% God did not create the world in 7 days; he screwed around for 6 days and then pulled an all-nighter. -%% +% "God gives burdens; also shoulders" Jimmy Carter cited this Jewish saying in his concession speech at the end of the 1980 election. At least he said it was a Jewish saying; I can't find it anywhere. I'm sure he's telling the truth though; why would he lie about a thing like that? -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% God has intended the great to be great and the little to be little ... The trade unions, under the European system, destroy liberty ... I do not mean to say that a dollar a day is enough to support a workingman ... not enough to support a man and five children if he insists on smoking and drinking beer. But the man who cannot live on bread and water is not fit to live! A family may live on good bread and water in the morning, water and bread at midday, and good bread and water at night! -- Rev. Henry Ward Beecher -%% +% God is Dead -- Nietzsche Nietzsche is Dead -- God Nietzsche is God -- The Dead -%% +% God is a comic playing to an audience that's afraid to laugh -%% +% God is a polythiest -%% +% God is not dead! He's alive and autographing bibles at Cody's -%% +% God is real, unless declared integer. -%% +% God is really only another artist. He invented the giraffe, the elephant and the cat. He has no real style, He just goes on trying other things. -- Pablo Picasso -%% +% God is the tangential point between zero and infinity. -- Alfred Jarry -%% +% God isn't dead, he just couldn't find a parking place. -%% +% God made machine language; all the rest is the work of man. -%% +% God made the Idiot for practice, and then He made the School Board -- Mark Twain -%% +% God made the integers; all else is the work of Man. -- Kronecker -%% +% God made the world in six days, and was arrested on the seventh. -%% +% God may be subtle, but He isn't plain mean. -- Albert Einstein -%% +% God must love the Common Man; He made so many of them. -%% +% God rest ye CS students now, Let nothing you dismay. The VAX is down and won't be up, Until the first of May. The program that was due this morn, @@ -3609,58 +3609,58 @@ Can't tell false from true. And now we find that we can't get At Berkeley's 4.2. (chorus) -%% +% Going to church does not make a person religious, nor does going to school make a person educated, any more than going to a garage makes a person a car. -%% +% Gold, n.: A soft malleable metal relatively scarce in distribution. It is mined deep in the earth by poor men who then give it to rich men who immediately bury it back in the earth in great prisons, although gold hasn't done anything to them. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% Goldenstern's Rules: 1. Always hire a rich attorney 2. Never buy from a rich salesman. -%% +% Good advice is something a man gives when he is too old to set a bad example. -- La Rouchefoucauld -%% +% Good day for a change of scene. Repaper the bedroom wall. -%% +% Good day for overcoming obstacles. Try a steeplechase. -%% +% Good day to avoid cops. Crawl to school. -%% +% Good day to let down old friends who need help. -%% +% Good leaders being scarce, following yourself is allowed. -%% +% Good news. Ten weeks from Friday will be a pretty good day. -%% +% Good news is just life's way of keeping you off balance. -%% +% Good night to spend with family, but avoid arguments with your mate's new lover. -%% +% Good-bye. I am leaving because I am bored. -- George Saunders' dying words -%% +% Got Mole problems? Call Avogardo 6.02 x 10^23 -%% +% Goto, n.: A programming tool that exists to allow structured programmers to complain about unstructured programmers. -- Ray Simard -%% +% Goy: ... The distinction between Jewish and goyish can be quite subtle, as the following quote from Lenny Bruce illustrates: "I'm Jewish. Count Basie's Jewish. Ray Charles is Jewish. Eddie Cantor's goyish. The B'nai Brith is goyish. The Hadassah is @@ -3670,74 +3670,74 @@ Instant potatoes -- goyish. Black cherry soda's very Jewish. Macaroons are ____very Jewish. Fruit salad is Jewish. Lime Jell-O is goyish. Lime soda is ____very goyish. Trailer parks are so goyish that Jews won't go near them ..." -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% Grabel's Law: 2 is not equal to 3 -- not even for large values of 2. -%% +% Graduate life -- it's not just a job, it's an indenture. -%% +% Grandpa Charnock's Law: You never really learn to swear until you learn to drive. -%% +% Gravity is a myth, the Earth sucks. -%% +% Gray's Law of Programming: `_n+1' trivial tasks are expected to be accomplished in the same time as `_n' tasks. Logg's Rebuttal to Gray's Law: `_n+1' trivial tasks take twice as long as `_n' trivial tasks. -%% +% Green light in A.M. for new projects. Red light in P.M. for traffic tickets. -%% +% Greener's Law: Never argue with a man who buys ink by the barrel. -%% +% Grelb's Reminder: Eighty percent of all people consider themselves to be above average drivers. -%% +% "Grub first, then ethics." -- Bertolt Brecht -%% +% Gyroscope, n.: A wheel or disk mounted to spin rapidly about an axis and also free to rotate about one or both of two axes perpendicular to each other and the axis of spin so that a rotation of one of the two mutually perpendicular axes results from application of torque to the other when the wheel is spinning and so that the entire apparatus offers considerable opposition depending on the angular momentum to any torque that would change the direction of the axis of spin. -- Webster's Seventh New Collegiate Dictionary -%% +% H. L. Mencken's Law: Those who can -- do. Those who can't -- teach. Martin's Extension: Those who cannot teach -- administrate. -%% +% HE: Let's end it all, bequeathin' our brains to science. SHE: What?!? Science got enough trouble with their OWN brains. -- Walt Kelley -%% +% Hacker's Law: The belief that enhanced understanding will necessarily stir a nation to action is one of mankind's oldest illusions. -%% +% Hacking's just another word for nothing left to kludge. -%% +% Hail to the sun god He sure is a fun god Ra! Ra! Ra! -%% +% Half Moon tonight. (At least it's better than no Moon at all.) -%% +% Half-done: This is the best way to eat a kosher dill -- when it's still crunchy, light green, yet full of garlic flavor. The difference between this and the typical soggy dark green cucumber corpse is like the the difference between life and death. You may find it difficult to find a good half-done kosher dill @@ -3747,63 +3747,63 @@ Essex (along the park), make your first left onto Hester Street, walk about fifteen steps, turn ninety degrees left, and stop. Say to the man, "Let me have a nice half-done." Worth the trouble, wasn't it? -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% Hall's Laws of Politics: (1) The voters want fewer taxes and more spending. (2) Citizens want honest politicians until they want something fixed. (3) Constituency drives out consistency (i.e., liberals defend military spending, and conservatives social spending in their own districts). -%% +% Hand, n.: A singular instrument worn at the end of a human arm and commonly thrust into somebody's pocket. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Hanlon's Razor: Never attribute to malice that which is adequately explained by stupidity. -%% +% Hanson's Treatment of Time: There are never enough hours in a day, but always too many days before Saturday. -%% +% Happiness is having a scratch for every itch. -- Ogden Nash -%% +% Happiness isn't something you experience; it's something you remember. -- Oscar Levant -%% +% Happiness, n.: An agreeable sensation arising from contemplating the misery of another. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Hardware, n.: The parts of a computer system that can be kicked. -%% +% Hark, Hark, the dogs do bark The Duke is fond of kittens He likes to take their insides out And use them for his mittens From "The Thirteen Clocks" -%% +% Hark, the Herald Tribune sings, Advertising wondrous things. -- Tom Leher -%% +% Harrisberger's Fourth Law of the Lab: Experience is directly proportional to the amount of equipment ruined. -%% +% Harris's Lament: All the good ones are taken. -%% +% Harry is heavily into camping, and every year in the late fall, he makes us all go to Assateague, which is an island on the Atlantic Ocean famous for its wild horses. I realize that the concept of wild horses probably stirs romantic notions in many of you, but this is because you have never met any wild horses in person. In person, they are like @@ -3810,110 +3810,110 @@ enormous hooved rats. They amble up to your camp site, and their attitude is: "We're wild horses. We're going to eat your food, knock down your tent and poop on your shoes. We're protected by federal law, just like Richard Nixon." -- Dave Barry, "Tenting Grandpa Bob" -%% +% Hartley's First Law: You can lead a horse to water, but if you can get him to float on his back, you've got something. -%% +% Hartley's Second Law: Never sleep with anyone crazier than yourself. -%% +% Harvard Law: Under the most rigorously controlled conditions of pressure, temperature, volume, humidity, and other variables, the organism will do as it damn well pleases. -%% +% Has everyone noticed that all the letters of the word "database" are typed with the left hand? Now the layout of the QWERTYUIOP typewriter keyboard was designed, among other things, to facilitate the even use of both hands. It follows, therefore, that writing about databases is not only unnatural, but a lot harder than it appears. -%% +% Hatred, n.: A sentiment appropriate to the occasion of another's superiority. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Have you ever noticed that the people who are always trying to tell you, "There's a time for work and a time for play," never find the time for play? -%% +% Have you noticed that all you need to grow healthy, vigorous grass is a crack in your sidewalk? -%% +% He had that rare weird electricity about him -- that extremely wild and heavy presence that you only see in a person who has abandoned all hope of ever behaving "normally." -- Hunter S. Thompson, "Fear and Loathing '72" -%% +% He hadn't a single redeeming vice. -- Oscar Wilde -%% +% "He is now rising from affluence to poverty." -- Mark Twain -%% +% He looked at me as if I was a side dish he hadn't ordered. -%% +% He played the king as if afraid someone else would play the ace. -- John Mason Brown, drama critic -%% +% He thought he saw an albatross That fluttered 'round the lamp. He looked again and saw it was A penny postage stamp. "You'd best be getting home," he said, "The nights are rather damp." -%% +% "He was so narrow minded he could see through a keyhole with both eyes ..." -%% +% He who Laughs, Lasts. -%% +% He who attacks the fundamentals of the American broadcasting industry attacks democracy itself. -- William S. Paley, chairman of CBS -%% +% Health is merely the slowest possible rate at which one can die. -%% +% Heaven, n.: A place where the wicked cease from troubling you with talk of their personal affairs, and the good listen with attention while you expound your own. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Heavy, adj.: Seduced by the chocolate side of the force. -%% +% "Heisenberg may have slept here" -%% +% Hell hath no fury like a bureaucrat scorned. -- Milton Friedman -%% +% Heller's Law: The first myth of management is that it exists. Johnson's Corollary: Nobody really knows what is going on anywhere within the organization. -%% +% Help! I'm trapped in a PDP 11/70! -%% +% Help a swallow land at Capistrano. -%% +% Her locks an ancient lady gave Her loving husband's life to save; And men -- they honored so the dame -- Upon some stars bestowed her name. But to our modern married fair, Who'd give their lords to save their hair, No stellar recognition's given. There are not stars enough in heaven. -%% +% Here I sit, broken-hearted, All logged in, but work unstarted. First net.this and net.that, And a hot buttered bun for net.fat. @@ -3922,14 +3922,14 @@ Is there a cure (I need your views), For someone trapped in net.news? I need your help, I say 'tween sobs, 'Cause I'll soon be listed in net.jobs. -%% +% "Here at the Phone Company, we serve all kinds of people; from Presidents and Kings to the scum of the earth ..." -%% +% Here in my heart, I am Helen; I'm Aspasia and Hero, at least. I'm Judith, and Jael, and Madame de Sta"el; I'm Salome, moon of the East. @@ -3941,11 +3941,11 @@ I'm all of the glamorous ladies At whose beckoning history shook. But you are a man, and see only my pan, So I stay at home with a book. -- Dorothy Parker -%% +% Here is a simple experiment that will teach you an important electrical lesson: On a cool, dry day, scuff your feet along a carpet, then reach your hand into a friend's mouth and touch one of his dental fillings. Did you notice how your friend twitched violently and cried out in pain? This teaches us that electricity can be a very powerful force, @@ -3963,122 +3963,122 @@ Amazing Electronic Fact: If you scuffed your feet long enough without touching anything, you would build up so many electrons that your finger would explode! But this is nothing to worry about unless you have carpeting. -- Dave Barry, "What is Electricity?" -%% +% "He's just a politician trying to save both his faces ..." -%% +% He's the kind of guy, that, well, if you were ever in a jam he'd be there ... with two slices of bread and some chunky peanut butter. -%% +% "He's the kind of man for the times that need the kind of man he is ..." -%% +% Heuristics are bug ridden by definition. If they didn't have bugs, then they'd be algorithms. -%% +% "Hey! Who took the cork off my lunch??!" -- W. C. Fields -%% +% Hi there! This is just a note from me, to you, to tell you, the person reading this note, that I can't think up any more famous quotes, jokes, nor bizarre stories, so you may as well go home. -%% +% Higgeldy Piggeldy, Hamlet of Elsinore Ruffled the critics by Dropping this bomb: "Phooey on Freud and his Psychoanalysis -- Oedipus, Shmoedipus, I just loved Mom." -%% +% Hindsight is an exact science. -%% +% Hippogriff, n.: An animal (now extinct) which was half horse and half griffin. The griffin was itself a compound creature, half lion and half eagle. The hippogriff was actually, therefore, only one quarter eagle, which is two dollars and fifty cents in gold. The study of zoology is full of surprises. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Hire the morally handicapped. -%% +% "His mind is like a steel trap -- full of mice" -- Foghorn Leghorn -%% +% "His super power is to turn into a scotch terrier." -%% +% History repeats itself. That's one thing wrong with history. -%% +% Hlade's Law: If you have a difficult task, give it to a lazy person -- they will find an easier way to do it. -%% +% Hoare's Law of Large Problems: Inside every large problem is a small problem struggling to get out. -%% +% Hofstadter's Law: It always takes longer than you expect, even when you take Hofstadter's Law into account. -%% +% Hollywood is where if you don't have happiness you send out for it. -- Rex Reed -%% +% "Honesty is the best policy, but insanity is a better defense" -%% +% Honesty pays, but it doesn't seem to pay enough to suit some people. -- F. M. Hubbard -%% +% Honk if you hate bumper stickers that say "Honk if ..." -%% +% Honk if you love peace and quiet. -%% +% Honorable, adj.: Afflicted with an impediment in one's reach. In legislative bodies, it is customary to mention all members as honorable; as, "the honorable gentleman is a scurvy cur." -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Horngren's Observation: Among economists, the real world is often a special case. -%% +% Horse sense is the thing a horse has which keeps it from betting on people. -- W. C. Fields -%% +% How can you be in two places at once when you're not anywhere at all? -%% +% How come only your friends step on your new white sneakers? -%% +% How come wrong numbers are never busy? -%% +% How do you explain school to a higher intelligence? -- Elliot, "E.T." -%% +% How doth the VAX's C compiler Improve its object code. And even as we speak does it Increase the system load. How patiently it seems to run And spit out error flags, While users, with frustration, all Tear their clothes to rags. -%% +% How doth the VAX's C-compiler Improve its object code. And even as we speak does it Increase the system load. How patiently it seems to run And spit out error flags, While users, with frustration, all Tear all their clothes to rags. -%% +% How doth the little crocodile Improve his shining tail, And pour the waters of the Nile On every golden scale! @@ -4085,60 +4085,60 @@ How cheerfully he seems to grin, How neatly spreads his claws, And welcomes little fishes in, With gently smiling jaws! -- Lewis Carrol, "Alice in Wonderland" -%% +% How long a minute is depends on which side of the bathroom door you're on. -%% +% How many Zen masters does it take to screw in a light bulb? None. The Universe spins the bulb, and the Zen master stays out of the way. -%% +% How many hardware engineers does it take to change a lightbulb? None: "We'll fix it in software." How many software engineers does it take to change a lightbulb? None: "We'll document it in the manual." How many tech writers does it take to change a lightbulb? None: "The user can work it out." -%% +% How much does it cost to entice a dope-smoking UNIX system guru to Dayton? -- Brian Boyle, UNIX/WORLD's First Annual Salary Survey -%% +% How wonderful opera would be if there were no singers. -%% +% Howe's Law: Everyone has a scheme that will not work. -%% +% However, never daunted, I will cope with adversity in my traditional manner ... sulking and nausea. -- Tom K. Ryan -%% +% Human beings were created by water to transport it uphill. -%% +% Human cardiac catheterization was introduced by Werner Forssman in 1929. Ignoring his department chief, and tying his assistant to an operating table to prevent his interference, he placed a uretheral catheter into a vein in his arm, advanced it to the right atrium [of his heart], and walked upstairs to the x-ray department where he took the confirmatory x-ray film. In 1956, Dr. Forssman was awarded the Nobel Prize. -%% +% Hummingbirds never remember the words to songs. -%% +% "Humor is a drug which it's the fashion to abuse." -- William Gilbert -%% +% Hurewitz's Memory Principle: The chance of forgetting something is directly proportional to ..... to ........ uh .............. -%% +% I am changing my name to Crysler I am going down to Washington, D.C. I will tell some power broker What they did for Iacocca Will be perfectly acceptable to me! @@ -4145,102 +4145,102 @@ I am changing my name to Chrysler, I am heading for that great receiving line. When they hand a million grand out, I'll be standing with my hand out, Yessir, I'll get mine! -%% +% I am, in point of fact, a particularly haughty and exclusive person, of pre-Adamite ancestral descent. You will understand this when I tell you that I can trace my ancestry back to a protoplasmal primordial atomic globule. Consequently, my family pride is something inconceivable. I can't help it. I was born sneering. -- Pooh-Bah, "The Mikado", Gilbert & Sullivan -%% +% "I am not an Economist. I am an honest man!" -- Paul McCracken -%% +% I am not now, and never have been, a girl friend of Henry Kissinger. -- Gloria Steinem -%% +% "I am not sure what this is, but an `F' would only dignify it." -- English Professor -%% +% I am ready to meet my Maker. Whether my Maker is prepared for the great ordeal of meeting me is another matter. -- Winston Churchill -%% +% "I am returning this otherwise good typing paper to you because someone has printed gibberish all over it and put your name at the top." --English Professor, Ohio University -%% +% I am the mother of all things, and all things should wear a sweater. -%% +% I believe in getting into hot water; it keeps you clean. -- G. K. Chesterton -%% +% I belong to no organized party. I am a Democrat. -- Will Rogers -%% +% I bet the human brain is a kludge. -- Marvin Minsky -%% +% I can resist anything but temptation. -%% +% I cannot and will not cut my conscience to fit this year's fashions. -- Lillian Hellman -%% +% I cannot overemphasize the importance of good grammar. What a crock. I could easily overemphasize the importance of good grammar. For example, I could say: "Bad grammar is the leading cause of slow, painful death in North America," or "Without good grammar, the United States would have lost World War II." -- Dave Barry, "An Utterly Absurd Look at Grammar" -%% +% I can't complain, but sometimes I still do. -- Joe Walsh -%% +% I do not fear computers. I fear the lack of them. -- Isaac Asimov -%% +% I do not feel obliged to believe that the same God who has endowed us with sense, reason, and intellect has intended us to forgo their use. -- Galileo Galilei -%% +% I do not know myself, and God forbid that I should. -- Johann Wolfgang von Goethe -%% +% I don't believe in astrology. But then I'm an Aquarius, and Aquarians don't believe in astrology. -- James R. F. Quirk -%% +% "I don't care who does the electing as long as I get to do the nominating" -- Boss Tweed -%% +% "I don't have any solution but I certainly admire the problem." -- Ashleigh Brilliant -%% +% I don't have to take this abuse from you -- I've got hundreds of people waiting to abuse me. --Bill Murray, "Ghostbusters" -%% +% I don't like spinach, and I'm glad I don't, because if I liked it I'd eat it, and I just hate it. -- Clarence Darrow -%% +% I don't object to sex before marriage, but two minutes before?!? -%% +% I dread success. To have succeeded is to have finished one's business on earth, like the male spider, who is killed by the female the moment he has succeeded in his courtship. I like a state of continual becoming, with a goal in front and not behind. -- George Bernard Shaw -%% +% "I drink to make other people interesting." -- George Jean Nathan -%% +% I for one cannot protest the recent M. T. A. fare hike and the accompanying promises that this would in no way improve service. For the transit system, as it now operates, has hidden advantages that can't be measured in monetary terms. @@ -4247,11 +4247,11 @@ Personally, I feel that it is well worth 75 cents or even $1 to have that unimpeachable excuse whenever I am late to anything: "I came by subway." Those four words have such magic in them that if Godot should someday show up and mumble them, any audience would instantly understand his long delay. -%% +% I for one cannot protest the recent M.T.A. fare hike and the accompanying promises that this would in no way improve service. For the transit system, as it now operates, has hidden advantages that can't be measured in monetary terms. @@ -4258,14 +4258,14 @@ Personally, I feel that it is well worth 75 cents or even $1 to have that unimpeachable excuse whenever I am late to anything: "I came by subway." Those four words have such magic in them that if Godot should someday show up and mumble them, any audience would instantly understand his long delay. -%% +% I generally avoid temptation unless I can't resist it. -- Mae West -%% +% I get up each morning, gather my wits. Pick up the paper, read the obits. If I'm not there I know I'm not dead. So I eat a good breakfast and go back to bed. @@ -4272,91 +4272,91 @@ Oh, how do I know my youth is all spent? My get-up-and-go has got-up-and-went. But in spite of it all, I'm able to grin, And think of the places my get-up has been. -- Pete Seeger -%% +% I hate quotations. -- Ralph Waldo Emerson -%% +% I have a simple philosophy: Fill what's empty. Empty what's full. Scratch where it itches. -- A. R. Longworth -%% +% I have learned To spell hors d'oeuvres Which still grates on Some people's n'oeuvres. -- Warren Knox -%% +% I have made mistakes but I have never made the mistake of claiming that I have never made one. -- James Gordon Bennett -%% +% I have made this letter longer than usual because I lack the time to make it shorter. -- Blaise Pascal -%% +% I have seen the future and it is just like the present, only longer. -- Kehlog Albran, "The Profit" -%% +% I have the simplest tastes. I am always satisfied with the best. -- Oscar Wilde -%% +% I haven't lost my mind -- it's backed up on tape somewhere. -%% +% I haven't lost my mind; I know exactly where I left it. -%% +% "I just need enough to tide me over until I need more." -- Bill Hoest -%% +% "I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones." -- Albert Einstein -%% +% I like being single. I'm always there when I need me. -- Art Leo -%% +% I like work ... I can sit and watch it for hours. -%% +% I like your game but we have to change the rules. -%% +% "I may not be totally perfect, but parts of me are excellent." -- Ashleigh Brilliant -%% +% "I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up." -- Mark Twain, "The Innocents Abroad" -%% +% I must have slipped a disk -- my pack hurts -%% +% I never fail to convince an audience that the best thing they could do was to go away. -%% +% I never met a piece of chocolate I didn't like. -%% +% I profoundly believe it takes a lot of practice to become a moral slob. -- William F. Buckley -%% +% I really hate this damned machine I wish that they would sell it. It never does quite what I want But only what I tell it. -%% +% "I refuse to have a battle of wits with an unarmed person." -%% +% I see the eigenvalue in thine eye, I hear the tender tensor in thy sigh. Bernoulli would have been content to die Had he but known such _a-squared cos 2(phi)! -- Stanislaw Lem, "Cyberiad" -%% +% I sent a letter to the fish, I told them, "This is what I wish." The little fishes of the sea, They sent an answer back to me. The little fishes' answer was @@ -4381,30 +4381,30 @@ I tried to turn the handle, But ... "Is that all?" asked Alice. "That is all." said Humpty Dumpty. "Goodbye." -- Lewis Carrol, "Through the Looking Glass" -%% +% I think that I shall never see A billboard lovely as a tree. Perhaps, unless the billboards fall I'll never see a tree at all. -- Ogden Nash -%% +% I used to get high on life but lately I've built up a resistance. -%% +% I used to think I was indecisive, but now I'm not so sure. -%% +% "I want to buy a husband who, every week when I sit down to watch `St. Elsewhere', won't scream, `FORGET IT, BLANCHE ... IT'S TIME FOR "HEE HAW"!!'" -- Berke Breathed, "Bloom County" -%% +% I was gratified to be able to answer promptly, and I did. I said I didn't know. -- Mark Twain -%% +% I went on to test the program in every way I could devise. I strained it to expose its weaknesses. I ran it for high-mass stars and low-mass stars, for stars born exceedingly hot and those born relatively cold. I ran it assuming the superfluid currents beneath the crust to be absent -- not because I wanted to know the answer, but because I had @@ -4413,133 +4413,133 @@ temperature to be less than absolute zero. I had found an error. I chased down the error and fixed it. Now I had improved the program to the point where it would not run at all. -- George Greenstein, "Frozen Star: Of Pulsars, Black Holes and the Fate of Stars" -%% +% I wish there was a knob on the TV to turn up the intelligence. There's a knob called "brightness", but it doesn't work. -- Gallagher -%% +% I wouldn't recommend sex, drugs or insanity for everyone, but they've always worked for me. -- Hunter S. Thompson -%% +% IBM had a PL/I, Its syntax worse than JOSS; And everywhere this language went, It was a total loss. -%% +% I'd give my right arm to be ambidextrous. -%% +% "I'd love to go out with you, but I did my own thing and now I've got to undo it." -%% +% "I'd love to go out with you, but I have to floss my cat." -%% +% "I'd love to go out with you, but I have to stay home and see if I snore." -%% +% "I'd love to go out with you, but I never go out on days that end in `Y.'" -%% +% "I'd love to go out with you, but I want to spend more time with my blender." -%% +% "I'd love to go out with you, but I'm attending the opening of my garage door." -%% +% "I'd love to go out with you, but I'm converting my calendar watch from Julian to Gregorian." -%% +% "I'd love to go out with you, but I'm doing door-to-door collecting for static cling." -%% +% "I'd love to go out with you, but I'm having all my plants neutered." -%% +% "I'd love to go out with you, but I'm staying home to work on my cottage cheese sculpture." -%% +% "I'd love to go out with you, but I'm taking punk totem pole carving." -%% +% "I'd love to go out with you, but I've been scheduled for a karma transplant." -%% +% "I'd love to go out with you, but it's my parakeet's bowling night." -%% +% "I'd love to go out with you, but my favorite commercial is on TV." -%% +% "I'd love to go out with you, but the last time I went out, I never came back." -%% +% "I'd love to go out with you, but the man on television told me to say tuned." -%% +% "I'd love to go out with you, but there are important world issues that need worrying about." -%% +% I'd rather have a bottle in front of me than a frontal lobotomy. -%% +% Idiot Box, n.: The part of the envelope that tells a person where to place the stamp when they can't quite figure it out for themselves. -- Rich Hall, "Sniglets" -%% +% Idiot, n.: A member of a large and powerful tribe whose influence in human affairs has always been dominant and controlling. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% If A = B and B = C, then A = C, except where void or prohibited by law. -- Roy Santoro -%% +% If God had intended Man to Smoke, He would have set him on Fire. -%% +% If God had intended Man to Walk, He would have given him Feet. -%% +% If God had intended Man to Watch TV, He would have given him Rabbit Ears. -%% +% If God had intended Men to Smoke, He would have put Chimneys in their Heads. -%% +% If God had meant for us to be in the Army, we would have been born with green, baggy skin. -%% +% If God had meant for us to be naked, we would have been born that way. -%% +% If God had not given us sticky tape, it would have been necessary to invent it. -%% +% If God had wanted you to go around nude, He would have given you bigger hands. -%% +% If God is perfect, why did He create discontinuous functions? -%% +% "If God lived on Earth, people would knock out all His windows." -- Yiddish saying -%% +% If I don't drive around the park, I'm pretty sure to make my mark. If I'm in bed each night by ten, I may get back my looks again. If I abstain from fun and such, I'll probably amount to much; But I shall stay the way I am, Because I do not give a damn. -- Dorothy Parker -%% +% If I had a plantation in Georgia and a home in Hell, I'd sell the plantation and go home. -- Eugene P. Gallagher -%% +% If I had any humility I would be perfect. -- Ted Turner -%% +% "If I had only known, I would have been a locksmith." -- Albert Einstein -%% +% If I kiss you, that is a psychological interaction. On the other hand, if I hit you over the head with a brick, that is also a psychological interaction. @@ -4546,114 +4546,114 @@ The difference is that one is friendly and the other is not so friendly. The crucial point is if you can tell which is which. -- Dolph Sharp, "I'm O.K., You're Not So Hot" -%% +% If I traveled to the end of the rainbow As Dame Fortune did intend, Murphy would be there to tell me The pot's at the other end. -- Bert Whitney -%% +% If Jesus Christ were to come today, people would not even crucify him. They would ask him to dinner, and hear what he had to say, and make fun of it. -- Thomas Carlyle -%% +% If a President doesn't do it to his wife, he'll do it to his country. -%% +% If a group of _N persons implements a COBOL compiler, there will be _N-1 passes. Someone in the group has to be the manager. -- T. Cheatham -%% +% If a listener nods his head when you're explaining your program, wake him up. -%% +% If all be true that I do think, There be Five Reasons why one should Drink; Good friends, good wine, or being dry, Or lest we should be by-and-by, Or any other reason why. -%% +% If all else fails, immortality can always be assured by spectacular error. -- John Kenneth Galbraith -%% +% If all the world's a stage, I want to operate the trap door. -- Paul Beatty -%% +% If all the world's economists were laid end to end, we wouldn't reach a conclusion. -- William Baumol -%% +% If an S and an I and an O and a U With an X at the end spell Su; And an E and a Y and an E spell I, Pray what is a speller to do? Then, if also an S and an I and a G And an HED spell side, There's nothing much left for a speller to do But to go commit siouxeyesighed. -- Charles Follen Adams, "An Orthographic Lament" -%% +% If anything can go wrong, it will. -%% +% If at first you don't succeed, give up, no use being a damn fool. -%% +% If at first you don't succeed, redefine success. -%% +% If bankers can count, how come they have eight windows and only four tellers? -%% +% "If dolphins are so smart, why did Flipper work for television?" -%% +% If entropy is increasing, where is it coming from? -%% +% If everything is coming your way then you're in the wrong lane. -%% +% If ignorance is bliss, why aren't there more happy people? -%% +% If it's Tuesday, this must be someone else's fortune. -%% +% If life is a stage, I want some better lighting. -%% +% If little green men land in your back yard, hide any little green women you've got in the house. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% If mathematically you end up with the wrong answer, try multiplying by the page number. -%% +% If money can't buy happiness, I guess you'll just have to rent it. -%% +% If only God would give me some clear sign! Like making a large deposit in my name at a Swiss bank. -- Woody Allen, "Without Feathers" -%% +% If only I could be respected without having to be respectable. -%% +% If only one could get that wonderful feeling of accomplishment without having to accomplish anything. -%% +% If scientific reasoning were limited to the logical processes of arithmetic, we should not get very far in our understanding of the physical world. One might as well attempt to grasp the game of poker entirely by the use of the mathematics of probability. -- Vannevar Bush -%% +% If someone had told me I would be Pope one day, I would have studied harder. -- Pope John Paul I -%% +% "If the King's English was good enough for Jesus, it's good enough for me!" -- "Ma" Ferguson, Governor of Texas (circa 1920) -%% +% If the code and the comments disagree, then both are probably wrong. -- Norm Schryer -%% +% If the colleges were better, if they really had it, you would need to get the police at the gates to keep order in the inrushing multitude. See in college how we thwart the natural love of learning by leaving the natural method of teaching what each wishes to learn, and insisting that you shall learn what you have no taste or capacity for. The @@ -4664,123 +4664,123 @@ interest in knowledge. The wise instructor accomplishes this by opening to his pupils precisely the attractions the study has for himself. The marking is a system for schools, not for the college; for boys, not for men; and it is an ungracious work to put on a professor. -- Ralph Waldo Emerson -%% +% If the odds are a million to one against something occurring, chances are 50-50 it will. -%% +% If the weather is extremely bad, church attendance will be down. If the weather is extremely good, church attendance will be down. If the bulletin covers are in short supply, however, church attendance will exceed all expectations. -- Reverend Chichester -%% +% If there are epigrams, there must be meta-epigrams. -%% +% If there is a possibility of several things going wrong, the one that will cause the most damage will be the one to go wrong. -%% +% If there is no God, who pops up the next Kleenex? -- Art Hoppe -%% +% If this fortune didn't exist, somebody would have invented it. -%% +% If time heals all wounds, how come the belly button stays the same? -%% +% If two men agree on everything, you may be sure that one of them is doing the thinking. -- Lyndon Baines Johnson -%% +% If we do not change our direction we are likely to end up where we are headed. -%% +% If while you are in school, there is a shortage of qualified personnel in a particular field, then by the time you graduate with the necessary qualifications, that field's employment market is glutted. -- Marguerite Emmons -%% +% "If you can count your money, you don't have a billion dollars." -- J. Paul Getty -%% +% If you can lead it to water and force it to drink, it isn't a horse. -%% +% If you can survive death, you can probably survive anything. -%% +% If you cannot convince them, confuse them. -- Harry S Truman -%% +% If you can't be good, be careful. If you can't be careful, give me a call. -%% +% If you can't learn to do it well, learn to enjoy doing it badly. -%% +% If you didn't get caught, did you really do it? -%% +% If you don't care where you are, then you ain't lost. -%% +% If you explain so clearly that nobody can misunderstand, somebody will. -%% +% If you give Congress a chance to vote on both sides of an issue, it will always do it. -- Les Aspin, D., Wisconsin -%% +% "If you go on with this nuclear arms race, all you are going to do is make the rubble bounce" -- Winston Churchill -%% +% If you had any brains, you'd be dangerous. -%% +% If you have a procedure with 10 parameters, you probably missed some. -%% +% "If you have to hate, hate gently" -%% +% If you live in a country run by committee, be on the committee. -- Graham Summer -%% +% If you make people think they're thinking, they'll love you; but if you really make them think they'll hate you. -%% +% If you only have a hammer, you tend to see every problem as a nail. -- Maslow -%% +% If you perceive that there are four possible ways in which a procedure can go wrong, and circumvent these, then a fifth way will promptly develop. -%% +% If you pick up a starving dog and make him prosperous, he will not bite you. This is the principal difference between a dog and a man. -- Mark Twain -%% +% If you push the "extra ice" button on the soft drink vending machine, you won't get any ice. If you push the "no ice" button, you'll get ice, but no cup. -%% +% If you put garbage in a computer nothing comes out but garbage. But this garbage, having passed through a very expensive machine, is somehow enobled and none dare criticize it. -%% +% If you think education is expensive, try ignorance. -- Derek Bok, president of Harvard -%% +% If you think last Tuesday was a drag, wait till you see what happens tomorrow! -%% +% If you think nobody cares if you're alive, try missing a couple of car payments. -- Earl Wilson -%% +% If you think the United States has stood still, who built the largest shopping center in the world? -- Richard M. Nixon -%% +% If you think the United States has stood still, who built the largest shopping center in the world? -- Richard Nixon -%% +% If you throw a New Year's Party, the worst thing that you can do would be to throw the kind of party where your guests wake up today, and call you to say they had a nice time. Now you'll be be expected to throw another party next year. @@ -4794,164 +4794,164 @@ If your party is successful, the police will knock on your door, unless your party is very successful in which case they will lob tear gas through your living room window. As host, your job is to make sure that they don't arrest anybody. Or if they're dead set on arresting someone, your job is to make sure it isn't you ... -%% +% If you want your spouse to listen and pay strict attention to every word you say, talk in your sleep. -%% +% "If you wants to get elected president, you'se got to think up some memoraboble homily so's school kids can be pestered into memorizin' it, even if they don't know what it means." -- Walt Kelly, "The Pogo Party" -%% +% If you're going to do something tonight that you'll be sorry for tomorrow morning, sleep late. -- Henny Youngman -%% +% If you're happy, you're successful. -%% +% If you're not part of the solution, you're part of the precipitate. -%% +% If you're not very clever you should be conciliatory. -- Benjamin Disraeli -%% +% If you've done six impossible things before breakfast, why not round it off with dinner at Milliway's, the restaurant at the end of the universe? -%% +% If you've seen one redwood, you've seen them all. -- Ronald Reagan -%% +% Il brilgue: les t^oves libricilleux Se gyrent et frillant dans le guave, Enm^im'es sont les gougebosquex, Et le m^omerade horgrave. -- Lewis Carrol, "Through the Looking Glass" -%% +% I'll grant the random access to my heart, Thoul't tell me all the constants of thy love; And so we two shall all love's lemmas prove And in our bound partition never part. -- Stanislaw Lem, "Cyberiad" -%% +% Illinois isn't exactly the land that God forgot -- it's more like the land He's trying to ignore. -%% +% I'm N-ary the tree, I am, N-ary the tree, I am, I am. I'm getting traversed by the parser next door, She's traversed me seven times before. And ev'ry time it was an N-ary (N-ary!) Never wouldn't ever do a binary. (No sir!) I'm 'er eighth tree that was N-ary. N-ary the tree I am, I am, N-ary the tree I am. -%% +% I'm a creationist; I refuse to believe that I could have evolved from man. -%% +% I'm all for computer dating, but I wouldn't want one to marry my sister. -%% +% I'm fed up to the ears with old men dreaming up wars for young men to die in. -- George McGovern -%% +% I'm in Pittsburgh. Why am I here? -- Harold Urey, Nobel Laureate -%% +% I'm not under the alkafluence of inkahol that some thinkle peep I am. It's just the drunker I sit here the longer I get. -%% +% I'm prepared for all emergencies but totally unprepared for everyday life. -%% +% I'm really enjoying not talking to you ... Let's not talk again ____REAL soon ... -%% +% I'm very good at integral and differential calculus, I know the scientific names of beings animalculous; In short, in matters vegetable, animal, and mineral, I am the very model of a modern Major-General. -- Gilbert & Sullivan, "Pirates of Penzance" -%% +% Imagination is the one weapon in the war against reality. -- Jules de Gaultier -%% +% Imagine that Cray computer decides to make a personal computer. It has a 150 MHz processor, 200 megabytes of RAM, 1500 megabytes of disk storage, a screen resolution of 1024 x 1024 pixels, relies entirely on voice recognition for input, fits in your shirt pocket and costs $300. What's the first question that the computer community asks? "Is it PC compatible?" -%% +% Immortality -- a fate worse than death. -- Edgar A. Shoaff -%% +% Impartial, adj.: Unable to perceive any promise of personal advantage from espousing either side of a controversy or adopting either of two conflicting opinions. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Important letters which contain no errors will develop errors in the mail. Corresponding errors will show up in the duplicate while the Boss is reading it. -%% +% In America, any boy may become president and I suppose that's just one of the risks he takes. -- Adlai Stevenson -%% +% In Dr. Johnson's famous dictionary patriotism is defined as the last resort of the scoundrel. With all due respect to an enlightened but inferior lexicographer I beg to submit that it is the first. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% In English, every word can be verbed. Would that it were so in our programming languages. -%% +% In India, "cold weather" is merely a conventional phrase and has come into use through the necessity of having some way to distinguish between weather which will melt a brass door-knob and weather which will only make it mushy. -- Mark Twain -%% +% In Riemann, Hilbert or in Banach space Let superscripts and subscripts go their ways. Our symptotes no longer out of phase, We shall encounter, counting, face to face. -- Stanislaw Lem, "Cyberiad" -%% +% In a five year period we can get one superb programming language. Only we can't control when the five year period will begin. -%% +% In an organization, each person rises to the level of his own incompetency -- The Peter Principle -%% +% In any formula, constants (especially those obtained from handbooks) are to be treated as variables. -%% +% In case of atomic attack, the federal ruling against prayer in schools will be temporarily canceled. -%% +% In case of injury notify your superior immediately. He'll kiss it and make it better. -%% +% "In defeat, unbeatable; in victory, unbearable." -- Winston Curchill, of Montgomery -%% +% In our civilization, and under our republican form of government, intelligence is so highly honored that it is rewarded by exemption from the cares of office. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% "In short, _N is Richardian if, and only if, _N is not Richardian." -%% +% [In the 60's] there was madness in any direction, at any hour ... You could strike sparks anywhere. There was a fantastic universal sense that whatever we were doing was `right', that we were winning ... And that, I think, was the handle -- the sense of inevitable victory @@ -4963,379 +4963,379 @@ So now, less than five years later, you can go up on a steep hill in Las Vegas and look West, and with the right kind of eyes you can almost ___see the high-water mark -- the place where the wave finally broke and rolled back. -- Hunter S. Thompson, "Fear and Loathing in Las Vegas" -%% +% In the Top 40, half the songs are secret messages to the teen world to drop out, turn on, and groove with the chemicals and light shows at discotheques. -- Art Linkletter -%% +% In the force if Yoda's so strong, construct a sentence with words in the proper order then why can't he? -%% +% In the land of the dark, the Ship of the Sun is driven by the Grateful Dead. -- Egyptian Book of the Dead -%% +% In the long run, every program becomes rococo, and then rubble. -- Alan Perlis -%% +% In the olden days in England, you could be hung for stealing a sheep or a loaf of bread. However, if a sheep stole a loaf of bread and gave it to you, you would only be tried for receiving, a crime punishable by forty lashes with the cat or the dog, whichever was handy. If you stole a dog and were caught, you were punished with twelve rabbit punches, although it was hard to find rabbits big enough or strong enough to punch you. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% Incumbent, n.: Person of liveliest interest to the outcumbents. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Information Center, n.: A room staffed by professional computer people whose job it is to tell you why you cannot have the information you require. -%% +% Ingrate, n.: A man who bites the hand that feeds him, and then complains of indigestion. -%% +% Injustice anywhere is a threat to justice everywhere. -- Martin Luther King, Jr. -%% +% Ink, n.: A villainous compound of tannogallate of iron, gum-arabic, and water, chiefly used to facilitate the infection of idiocy and promote intellectual crime. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Innovation is hard to schedule. -- Dan Fylstra -%% +% Insanity is hereditary. You get it from your kids. -%% +% Insanity is the final defense ... It's hard to get a refund when the salesman is sniffing your crotch and baying at the moon. -%% +% Interpreter, n.: One who enables two persons of different languages to understand each other by repeating to each what it would have been to the interpreter's advantage for the other to have said. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Iron Law of Distribution: Them that has, gets. -%% +% Is it possible that software is not like anything else, that it is meant to be discarded: that the whole point is to always see it as a soap bubble? -%% +% Is not marriage an open question, when it is alleged, from the beginning of the world, that such as are in the institution wish to get out, and such as are out wish to get in? -- Ralph Emerson -%% +% Is your job running? You'd better go catch it! -%% +% Isn't it strange that the same people that laugh at gypsy fortune tellers take economists seriously? -%% +% Issawi's Laws of Progress: The Course of Progress: Most things get steadily worse. The Path of Progress: A shortcut is the longest distance between two points. -%% +% It has been observed that one's nose is never so happy as when it is thrust into the affairs of another, from which some physiologists have drawn the inference that the nose is devoid of the sense of smell. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% It has just been discovered that research causes cancer in rats. -%% +% It is against the grain of modern education to teach children to program. What fun is there in making plans, acquiring discipline in organizing thoughts, devoting attention to detail, and learning to be self-critical? -- Alan Perlis -%% +% It is amusing that a virtue is made of the vice of chastity; and it's a pretty odd sort of chastity at that, which leads men straight into the sin of Onan, and girls to the waning of their color. -- Voltaire -%% +% It is better to kiss an avocado than to get in a fight with an aardvark -%% +% It is by the fortune of God that, in this country, we have three benefits: freedom of speech, freedom of thought, and the wisdom never to use either. -- Mark Twain -%% +% It is difficult to produce a television documentary that is both incisive and probing when every twelve minutes one is interrupted by twelve dancing rabbits singing about toilet paper. -- R. Serling -%% +% "It is easier for a camel to pass through the eye of a needle if it is lightly greased." -- Kehlog Albran, "The Profit" -%% +% It is easier to change the specification to fit the program than vice versa. -%% +% It is easier to get forgiveness than permission. -%% +% It is easier to write an incorrect program than understand a correct one. -%% +% It is generally agreed that "Hello" is an appropriate greeting because if you entered a room and said "Goodbye," it could confuse a lot of people. -- Dolph Sharp, "I'm O.K., You're Not So Hot" -%% +% It is impossible to make anything foolproof because fools are so ingenious. -%% +% It is impossible to travel faster than light, and certainly not desirable, as one's hat keeps blowing off. -- Woody Allen -%% +% It is much easier to suggest solutions when you know nothing about the problem. -%% +% It is not enough to succeed. Others must fail. -- Gore Vidal -%% +% It is not true that life is one damn thing after another -- it's one damn thing over and over. -- Edna St. Vincent Millay -%% +% It is now 10 p.m. Do you know where Henry Kissinger is? -- Elizabeth Carpenter -%% +% It is now pitch dark. If you proceed, you will likely fall into a pit. -%% +% It is one of the superstitions of the human mind to have imagined that virginity could be a virtue. -- Voltaire -%% +% It is said that the lonely eagle flies to the mountain peaks while the lowly ant crawls the ground, but cannot the soul of the ant soar as high as the eagle? -%% +% It is something to be able to paint a particular picture, or to carve a statue, and so to make a few objects beautiful; but it is far more glorious to carve and paint the very atmosphere and medium through which we look, which morally we can do. To affect the quality of the day, that is the highest of arts. -- Henry David Thoreau, "Where I Live" -%% +% It is the business of little minds to shrink. -- Carl Sandburg -%% +% It is the business of the future to be dangerous. -- Hawkwind -%% +% It looks like blind screaming hedonism won out. -%% +% It may be that your whole purpose in life is simply to serve as a warning to others. -%% +% It seems like the less a statesman amounts to, the more he loves the flag. -%% +% "It took me fifteen years to discover that I had no talent for writing, but I couldn't give up because by that time I was too famous." -%% +% It was a book to kill time for those who liked it better dead. -%% +% "It was pleasant to me to get a letter from you the other day. Perhaps I should have found it pleasanter if I had been able to decipher it. I don't think that I mastered anything beyond the date (which I knew) and the signature (which I guessed at). There's a singular and a perpetual charm in a letter of yours; it never grows old, it never loses its novelty .... Other letters are read and thrown away and forgotten, but yours are kept forever -- unread. One of them will last a reasonable man a lifetime." -- Thomas Aldrich -%% +% It will be advantageous to cross the great stream ... the Dragon is on the wing in the Sky ... the Great Man rouses himself to his Work. -%% +% "It's Fabulous! We haven't seen anything like it in the last half an hour!" -- Macy's -%% +% It's a damn poor mind that can only think of one way to spell a word. -- Andrew Jackson -%% +% "It's bad luck to be superstitious." -- Andrew W. Mathis -%% +% "It's easier said than done." ... and if you don't believe it, try proving that it's easier done than said, and you'll see that "it's easier said that `it's easier done than said' than it is done", which really proves that "it's easier said than done". -%% +% It's easier to fight for one's principles than to live up to them. -%% +% It's easier to get forgiveness for being wrong than forgiveness for being right. -%% +% It's is not, it isn't ain't, and it's it's, not its, if you mean it is. If you don't, it's its. Then too, it's hers. It isn't her's. It isn't our's either. It's ours, and likewise yours and theirs. -- Oxford University Press, Edpress News -%% +% It's lucky you're going so slowly, because you're going in the wrong direction. -%% +% "It's not Camelot, but it's not Cleveland, either." -- Kevin White, mayor of Boston -%% +% It's not an optical illusion, it just looks like one. -- Phil White -%% +% It's not enough to be Hungarian; you must have talent too. -- Alexander Korda -%% +% It's not that I'm afraid to die. I just don't want to be there when it happens. -- Woody Allen -%% +% It's really quite a simple choice: Life, Death, or Los Angeles. -%% +% Jacquin's Postulate on Democratic Government: No man's life, liberty, or property are safe while the legislature is in session. -%% +% Jenkinson's Law: It won't work. -%% +% Jesus Saves, Moses Invests, But only Buddha pays Dividends. -%% +% Joe's sister puts spaghetti in her shoes! -%% +% Johnson's First Law: When any mechanical contrivance fails, it will do so at the most inconvenient possible time. -%% +% Jone's Law: The man who smiles when things go wrong has thought of someone to blame it on. -%% +% Jone's Motto: Friends come and go, but enemies accumulate. -%% +% Jones's First Law: Anyone who makes a significant contribution to any field of endeavor, and stays in that field long enough, becomes an obstruction to its progress -- in direct proportion to the importance of their original contribution. -%% +% Just because your doctor has a name for your condition doesn't mean he knows what it is. -%% +% Just because you're paranoid doesn't mean they AREN'T after you. -%% +% "Just once, I wish we would encounter an alien menace that wasn't immune to bullets" -- The Brigader, "Dr. Who" -%% +% Just remember: when you go to court, you are trusting your fate to twelve people that weren't smart enough to get out of jury duty! -%% +% Justice is incidental to law and order. -- J. Edgar Hoover -%% +% Justice, n.: A decision in your favor. -%% +% Katz' Law: Man and nations will act rationally when all other possibilities have been exhausted. -%% +% Keep America beautiful. Swallow your beer cans. -%% +% Keep emotionally active. Cater to your favorite neurosis. -%% +% Keep grandma off the streets -- legalize bingo. -%% +% Keep in mind always the two constant Laws of Frisbee: 1. The most powerful force in the world is that of a disc straining to land under a car, just out of reach (this force is technically termed "car suck"). 2. Never precede any maneuver by a comment more predictive than "Watch this!" -%% +% Keep you Eye on the Ball, Your Shoulder to the Wheel, Your Nose to the Grindstone, Your Feet on the Ground, Your Head on your Shoulders. Now ... try to get something DONE! -%% +% Ken Thompson has an automobile which he helped design. Unlike most automobiles, it has neither speedometer, nor gas gage, nor any of the numerous idiot lights which plague the modern driver. Rather, if the driver makes any mistake, a giant "?" lights up in the center of the dashboard. "The experienced driver", he says, "will usually know what's wrong." -%% +% Kerr's Three Rules for a Successful College: Have plenty of football for the alumni, sex for the students, and parking for the faculty. -%% +% Kin, n.: An affliction of the blood -%% +% Kinkler's First Law: Responsibility always exceeds authority. Kinkler's Second Law: All the easy problems have been solved. -%% +% "Kirk to Enterprise -- beam down yeoman Rand and a six-pack." -%% +% Kiss me twice. I'm schizophrenic. -%% +% Kiss your keyboard goodbye! -%% +% Klein bottle for rent -- inquire within. -%% +% Klein bottle for sale ... inquire within. -%% +% Kleptomaniac, n.: A rich thief. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Know thyself. If you need help, call the C.I.A. -%% +% Know what I hate most? Rhetorical questions. -- Henry N. Camp -%% +% Krogt, n. (chemical symbol: Kr): The metallic silver coating found on fast-food game cards. -- Rich Hall, "Sniglets" -%% +% LEO (July 23 - Aug 22) Your determination and sense of humor will come to the fore. Your ability to laugh at adversity will be a blessing because you've got a day coming you wouldn't believe. As a matter of fact, if you can laugh at what happens to you today, you've got a sick sense of humor. -%% +% LETTERS TO THE EDITOR (The Times of London) Dear Sir, I am firmly opposed to the spread of microchips either to the home or @@ -5346,201 +5346,201 @@ agricultural industry. Yours faithfully, Capt. Quinton D'Arcy, J. P. Sevenoaks -%% +% LIBRA (Sep. 23 to Oct. 22) Your desire for justice and truth will be overshadowed by your desire for filthy lucre and a decent meal. Be gracious and polite. Someone is watching you, so stop staring like that. -%% +% LSD melts in your mind, not in your hand. -%% +% Labor, n.: One of the processes by which A acquires property for B. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Lackland's Laws: 1. Never be first. 2. Never be last. 3. Never volunteer for anything -%% +% Lactomangulation, n.: Manhandling the "open here" spout on a milk carton so badly that one has to resort to using the "illegal" side. -- Rich Hall, "Sniglets" -%% +% Laetrile is the pits -%% +% Langsam's Laws: 1) Everything depends. 2) Nothing is always. 3) Everything is sometimes. -%% +% Larkinson's Law: All laws are basically false. -%% +% Laugh at your problems; everybody else does. -%% +% "Laughter is the closest distance between two people." -- Victor Borge -%% +% Law of Communications: The inevitable result of improved and enlarged communications between different levels in a hierarchy is a vastly increased area of misunderstanding. -%% +% Law of Probable Dispersal: Whatever it is that hits the fan will not be evenly distributed. -%% +% Law of Selective Gravity: An object will fall so as to do the most damage. Jenning's Corollary: The chance of the bread falling with the buttered side down is directly proportional to the cost of the carpet. -%% +% Law of the Perversity of Nature: You cannot successfully determine beforehand which side of the bread to butter. -%% +% Laws of Serendipity: 1. In order to discover anything, you must be looking for something. 2. If you wish to make an improved product, you must already be engaged in making an inferior one. -%% +% Lazlo's Chinese Relativity Axiom: No matter how great your triumphs or how tragic your defeats -- approximately one billion Chinese couldn't care less. -%% +% Left to themselves, things tend to go from bad to worse. -%% +% Leibowitz's Rule: When hammering a nail, you will never hit your finger if you hold the hammer with both hands. -%% +% Let He who taketh the Plunge Remember to return it by Tuesday. -%% +% Let us live!!! Let us love!!! Let us share the deepest secrets of our souls!!! You first. -%% +% Let's talk about how to fill out your 1984 tax return. Here's an often overlooked accounting technique that can save you thousands of dollars: For several days before you put it in the mail, carry your tax return around under your armpit. No IRS agent is going to want to spend hours poring over a sweat-stained document. So even if you owe money, you can put in for an enormous refund and the agent will probably give it to you, just to avoid an audit. What does he care? It's not his money. -- Dave Barry, "Sweating Out Taxes" -%% +% Lewis's Law of Travel: The first piece of luggage out of the chute doesn't belong to anyone, ever. -%% +% Liar, n.: A lawyer with a roving commission. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Lie, n.: A very poor substitute for the truth, but the only one discovered to date. -%% +% Lieberman's Law: Everybody lies, but it doesn't matter since nobody listens. -%% +% Life is a whim of several billion cells to be you for a while. -%% +% Life is a yo-yo, and mankind ties knots in the string. -%% +% Life is like an onion: you peel off layer after layer, then you find there is nothing in it. -%% +% "Life may have no meaning -- or even worse, it may have a meaning of which I disapprove." -%% +% Like so many Americans, she was trying to construct a life that made sense from things she found in gift shops. -- Kurt Vonnegut, Jr. -%% +% Like the ski resort of girls looking for husbands and husbands looking for girls, the situation is not as symmetrical as it might seem. -- Alan McKay -%% +% Limericks are art forms complex, Their topics run chiefly to sex. They usually have virgins, And masculine urgin's, And other erotic effects. -%% +% Line Printer paper is strongest at the perforations. -%% +% Linus: I guess it's wrong always to be worrying about tomorrow. Maybe we should think only about today. Charlie Brown: No, that's giving up. I'm still hoping that yesterday will get better. -%% +% Living on Earth may be expensive, but it includes an annual free trip around the Sun. -%% +% Living your life is a task so difficult, it has never been attempted before. -%% +% Lizzie Borden took an axe, And plunged it deep into the VAX; Don't you envy people who Do all the things ___YOU want to do? -%% +% Lockwood's Long Shot: The chances of getting eaten up by a lion on Main Street aren't one in a million, but once would be enough. -%% +% Look out! Behind you! -%% +% Losing your drivers' license is just God's way of saying "BOOGA, BOOGA!" -%% +% Love at first sight is one of the greatest labor-saving devices the world has ever seen. -%% +% Love is a word that is constantly heard, Hate is a word that is not. Love, I am told, is more precious than gold. Love, I have read, is hot. But hate is the verb that to me is superb, And Love but a drug on the mart. Any kiddie in school can love like a fool, But Hating, my boy, is an Art. -- Ogden Nash -%% +% Love is sentimental measles. -%% +% Love is the triumph of imagination over intelligence. -- H. L. Mencken -%% +% Love your enemies: they'll go crazy trying to figure out what you're up to. -%% +% Lowery's Law: If it jams -- force it. If it breaks, it needed replacing anyway. -%% +% Lubarsky's Law of Cybernetic Entomology: There's always one more bug. -%% +% Lunatic Asylum, n.: The place where optimism most flourishes. -%% +% Lysistrata had a good idea. -%% +% MOCK APPLE PIE (No Apples Needed) Pastry to two crust 9-inch pie 36 RITZ Crackers 2 cups water 2 cups sugar 2 teaspoons cream of tartar 2 tablespoons lemon juice @@ -5554,228 +5554,228 @@ with butter or margarine and sprinkle with cinnamon. Cover with top crust. Trim and flute edges together. Cut slits in top crust to let steam escape. Bake in a hot oven (425 F) 30 to 35 minutes, until crust is crisp and golden. Serve warm. Cut into 6 to 8 slices. -- Found lurking on a Ritz Crackers box -%% +% "MacDonald has the gift on compressing the largest amount of words into the smallest amount of thoughts." -- Winston Churchill -%% +% Mad, adj.: Affected with a high degree of intellectual independence ... -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Madam, there's no such thing as a tough child -- if you parboil them first for seven hours, they always come out tender. -- W. C. Fields -%% +% Magnet, n.: Something acted upon by magnetism Magnetism, n.: Something acting upon a magnet. The two definition immediately foregoing are condensed from the works of one thousand eminent scientists, who have illuminated the subject with a great white light, to the inexpressible advancement of human knowledge. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Magnocartic, adj.: Any automobile that, when left unattended, attracts shopping carts. -- Sniglets, "Rich Hall & Friends" -%% +% Magpie, n.: A bird whose theivish disposition suggested to someone that it might be taught to talk. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Maier's Law: If the facts do not conform to the theory, they must be disposed of. Corollaries: 1. The bigger the theory, the better. 2. The experiment may be considered a success if no more than 50% of the observed measurements must be discarded to obtain a correspondence with the theory. -%% +% Main's Law: For every action there is an equal and opposite government program. -%% +% Maintainer's Motto: If we can't fix it, it ain't broke. -%% +% Major Premise: Sixty men can do a piece of work sixty times as quickly as one man. Minor Premise: One man can dig a posthole in sixty seconds. Conclusion: Sixty men can dig a posthole in one second. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Majority, n.: That quality that distinguishes a crime from a law. -%% +% Making files is easy under the UNIX operating system. Therefore, users tend to create numerous files using large amounts of file space. It has been said that the only standard thing about all UNIX systems is the message-of-the-day telling users to clean up their files. -- System V.2 administrator's guide -%% +% Malek's Law: Any simple idea will be worded in the most complicated way. -%% +% "Man invented language to satisfy his deep need to complain." -- Lily Tomlin -%% +% Man is a rational animal who always loses his temper when he is called upon to act in accordance with the dictates of reason. -- Oscar Wilde -%% +% Man is the best computer we can put aboard a spacecraft ... and the only one that can be mass produced with unskilled labor. -- Wernher von Braun -%% +% Man is the only animal that blushes -- or needs to. -- Mark Twain -%% +% Man, n.: An animal so lost in rapturous contemplation of what he thinks he is as to overlook what he indubitably ought to be. His chief occupation is extermination of other animals and his own species, which, however, multiplies with such insistent rapidity as to infest the whole habitable earth and Canada. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Man usually avoids attributing cleverness to somebody else -- unless it is an enemy. -- A. Einstein -%% +% Mankind's yearning to engage in sports is older than recorded history, dating back to the time millions of years ago, when the first primitive man picked up a crude club and a round rock, tossed the rock into the air, and whomped the club into the sloping forehead of the first primitive umpire. What inner force drove this first athlete? Your guess is as good as mine. Better, probably, because you haven't had four beers. -- Dave Barry, "Sports is a Drag" -%% +% Manual, n.: A unit of documentation. There are always three or more on a given item. One is on the shelf; someone has the others. The information you need in in the others. -- Ray Simard -%% +% Many years ago in a period commonly know as Next Friday Afternoon, there lived a King who was very Gloomy on Tuesday mornings because he was so Sad thinking about how Unhappy he had been on Monday and how completely Mournful he would be on Wednesday ... -- Walt Kelly -%% +% Mark's Dental-Chair Discovery: Dentists are incapable of asking questions that require a simple yes or no answer. -%% +% Marriage is the only adventure open to the cowardly. -- Voltaire -%% +% "Matrimony isn't a word, it's a sentence." -%% +% Matter cannot be created or destroyed, nor can it be returned without a receipt. -%% +% Maturity is only a short break in adolescence. -- Jules Feiffer -%% +% May Euell Gibbons eat your only copy of the manual! -%% +% May a Misguided Platypus lay its Eggs in your Jockey Shorts -%% +% May the Fleas of a Thousand Camels infest one of your Erogenous Zones. -%% +% May your Tongue stick to the Roof of your Mouth with the Force of a Thousand Caramels. -%% +% Maybe Computer Science should be in the College of Theology. -- R. S. Barton -%% +% Maybe you can't buy happiness, but these days you can certainly charge it. -%% +% Mayor Vincent J. `Buddy' Cianci on the ACLU's suit to have a city nativity scene removed: "They're just jealous because they don't have three wise men and a virgin in the whole organization." -%% +% McGowan's Madison Avenue Axiom: If an item is advertised as "under $50", you can bet it's not $19.95. -%% +% Meader's Law: Whatever happens to you, it will previously have happened to everyone you know, only more so. -%% +% Measure with a micrometer. Mark with chalk. Cut with an axe. -%% +% Meeting, n.: An assembly of people coming together to decide what person or department not represented in the room must solve a problem. -%% +% Men were real men, women were real women, and small, furry creatures from Alpha Centauri were REAL small, furry creatures from Alpha Centauri. Spirits were brave, men boldly split infinitives that no man had split before. Thus was the Empire forged. -- "The Hitchhiker's Guide to the Galaxy", Douglas Adams -%% +% Mencken and Nathan's Fifteenth Law of The Average American: The worst actress in the company is always the manager's wife. -%% +% Mencken and Nathan's Ninth Law of The Average American: The quality of a champagne is judged by the amount of noise the cork makes when it is popped. -%% +% Mencken and Nathan's Second Law of The Average American: All the postmasters in small towns read all the postcards. -%% +% Mencken and Nathan's Sixteenth Law of The Average American: Milking a cow is an operation demanding a special talent that is possessed only by yokels, and no person born in a large city can never hope to acquire it. -%% +% Menu, n.: A list of dishes which the restaurant has just run out of. -%% +% Meskimen's Law: There's never time to do it right, but there's always time to do it over. -%% +% Message will arrive in the mail. Destroy, before the FBI sees it. -%% +% Mickey Mouse wears a Spiro Agnew watch. -%% +% Micro Credo: Never trust a computer bigger than you can lift. -%% +% "Might as well be frank, monsieur. It would take a miracle to get you out of Casablanca and the Germans have outlawed miracles." -%% +% Miksch's Law: If a string has one end, then it has another end. -%% +% Military intelligence is a contradiction in terms. -- Groucho Marx -%% +% Military justice is to justice what military music is to music. -- Groucho Marx -%% +% Millions long for immortality who do not know what to do with themselves on a rainy Sunday afternoon. -- Susan Ertz -%% +% Millions of sensible people are too high-minded to concede that politics is almost always the choice of the lesser evil. "Tweedledum and Tweedledee," they say, "I will not vote." Having abstained, they are presented with a President who appoints the people who are going to rummage around in their lives for the next four years. Consider all @@ -5783,293 +5783,293 @@ Humphrey. They showed Humphrey. Those people who taught Hubert Humphrey a lesson will still be enjoying the Nixon Supreme Court when Tricia and Julie begin to find silver threads among the gold and the black. -- Russel Baker, "Ford without Flummery" -%% +% Mind! I don't mean to say that I know, of my own knowledge, what there is particularly dead about a door-nail. I might have been inclined, myself, to regard a coffin-nail as the deadest piece of ironmongery in the trade. But the wisdom of our ancestors is in the simile; and my unhallowed hands shall not disturb it, or the Country's done for. You will therefore permit me to repeat, emphatically, that Marley was as dead as a door-nail. -%% +% Minnie Mouse is a slow maze learner. -%% +% Misery loves company, but company does not reciprocate. -%% +% Misfortune, n.: The kind of fortune that never misses. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Miss, n.: A title with which we brand unmarried women to indicate that they are in the market. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Mistakes are often the stepping stones to utter failure. -%% +% Mitchell's Law of Committees: Any simple problem can be made insoluble if enough meetings are held to discuss it. -%% +% Modern man is the missing link between apes and human beings. -%% +% Molecule, n.: The ultimate, indivisible unit of matter. It is distinguished from the corpuscle, also the ultimate, indivisible unit of matter, by a closer resemblance to the atom, also the ultimate, indivisible unit of matter ... The ion differs from the molecule, the corpuscle and the atom in that it is an ion ... -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Mollison's Bureaucracy Hypothesis: If an idea can survive a bureaucratic review and be implemented it wasn't worth doing. -%% +% Monday is an awful way to spend one seventh of your life. -%% +% Monday, n.: In Christian countries, the day after the baseball game. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Money is the root of all evil, and man needs roots -%% +% Mophobia, n.: Fear of being verbally abused by a Mississippian. -%% +% More than any time in history, mankind now faces a crossroads. One path leads to despair and utter hopelessness, the other to total extinction. Let us pray that we have the wisdom to choose correctly. -- Woody Allen -%% +% Mosher's Law of Software Engineering: Don't worry if it doesn't work right. If everything did, you'd be out of a job. -%% +% Most people wouldn't know music if it came up and bit them on the ass. -- Frank Zappa -%% +% Mother told me to be good, but she's been wrong before. -%% +% Mr. Cole's Axiom: The sum of the intelligence on the planet is a constant; the population is growing. -%% +% Murphy's Discovery: Do you know Presidents talk to the country the way men talk to women? They say, "Trust me, go all the way with me, and everything will be all right." And what happens? Nine months later, you're in trouble! -%% +% Murphy's Law is recursive. Washing your car to make it rain doesn't work. -%% +% Murphy's Law of Research: Enough research will tend to support your theory. -%% +% Mustgo, n.: Any item of food that has been sitting in the refrigerator so long it has become a science project. -- Sniglets, "Rich Hall & Friends" -%% +% My God, I'm depressed! Here I am, a computer with a mind a thousand times as powerful as yours, doing nothing but cranking out fortunes and sending mail about softball games. And I've got this pain right through my ALU. I've asked for it to be replaced, but nobody ever listens. I think it would be better for us both if you were to just log out again. -%% +% My love, he's mad, and my love, he's fleet, And a wild young wood-thing bore him! The ways are fair to his roaming feet, And the skies are sunlit for him. As sharply sweet to my heart he seems As the fragrance of acacia. My own dear love, he is all my dreams -- And I wish he were in Asia. -- Dorothy Parker -%% +% My love runs by like a day in June, And he makes no friends of sorrows. He'll tread his galloping rigadoon In the pathway or the morrows. He'll live his days where the sunbeams start Nor could storm or wind uproot him. My own dear love, he is all my heart -- And I wish somebody'd shoot him. -- Dorothy Parker -%% +% My opinions may have changed, but not the fact that I am right. -%% +% My own dear love, he is strong and bold And he cares not what comes after. His words ring sweet as a chime of gold, And his eyes are lit with laughter. He is jubilant as a flag unfurled -- Oh, a girl, she'd not forget him. My own dear love, he is all my world -- And I wish I'd never met him. -- Dorothy Parker -%% +% "My weight is perfect for my height -- which varies" -%% +% Mythology, n.: The body of a primitive people's beliefs concerning its origin, early history, heroes, deities and so forth, as distinguished from the true accounts which it invents later. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% NAPOLEON: What shall we do with this soldier, Guiseppe? Everything he says is wrong. GUISEPPE: Make him a general, Excellency, and then everything he says will be right. -- G. B. Shaw, "The Man of Destiny" -%% +% NEWS FLASH!! Today the East German pole-vault champion became the West German pole-vault champion. -%% +% NOBODY EXPECTS THE SPANISH INQUISITION -%% +% Naeser's Law: You can make it foolproof, but you can't make it damnfoolproof. -%% +% Nature and nature's laws lay hid in night, God said, "Let Newton be," and all was light. It did not last; the devil howling "Ho! Let Einstein be!" restored the status quo. -%% +% Nearly all men can stand adversity, but if you want to test a man's character, give him power. -- Abraham Lincoln -%% +% Necessity is a mother. -%% +% Never be led astray onto the path of virtue. -%% +% Never call a man a fool. Borrow from him. -%% +% Never call a man a fool; borrow from him. -%% +% Never count your chickens before they rip your lips off -%% +% Never drink coke in a moving elevator. The elevator's motion coupled with the chemicals in coke produce hallucinations. People tend to change into lizards and attack without warning, and large bats usually fly in the window. Additionally, you begin to believe that elevators have windows. -%% +% Never eat more than you can lift. -- Miss Piggy -%% +% Never hit a man with glasses. Hit him with a baseball bat. -%% +% Never let your sense of morals prevent you from doing what is right. -- Salvor Hardin, "Foundation" -%% +% Never make anything simple and efficient when a way can be found to make it complex and wonderful. -%% +% Never offend people with style when you can offend them with substance. -- Sam Brown, "The Washington Post", January 26, 1977 -%% +% Never put off till tomorrow what you can avoid all together. -%% +% Never try to outstubborn a cat. -- Lazarus Long, "Time Enough for Love" -%% +% Never worry about theory as long as the machinery does what it's supposed to do. -- R. A. Heinlein -%% +% New Year's Eve is the time of year when a man most feels his age, and his wife most often reminds him to act it. -- Webster's Unafraid Dictionary -%% +% New York is real. The rest is done with mirrors. -%% +% New York's got the ways and means; Just won't let you be. -- The Grateful Dead -%% +% New crypt. See /usr/news/crypt. -%% +% New members are urgently needed in the Society for Prevention of Cruelty to Yourself. Apply within. -%% +% New systems generate new problems. -%% +% Newlan's Truism: An "acceptable" level of unemployment means that the government economist to whom it is acceptable still has a job. -%% +% Newton's Fourth Law: Every action has an equal and opposite satisfaction. -%% +% Newton's Little-Known Seventh Law: A bird in the hand is safer than one overhead. -%% +% Next Friday will not be your lucky day. As a matter of fact, you don't have a lucky day this year. -%% +% Next to being shot at and missed, nothing is really quite as satisfying as an income tax refund. -- F. J. Raymond -%% +% Nihilism should commence with oneself. -%% +% Niklaus Wirth has lamented that, whereas Europeans pronounce his name correctly (Ni-klows Virt), Americans invariably mangle it into (Nick-les Worth). Which is to say that Europeans call him by name, but Americans call him by value. -%% +% Nine megs for the secretaries fair, Seven megs for the hackers scarce, Five megs for the grads in smoky lairs, Three megs for system source; One disk to rule them all, One disk to bind them, One disk to hold the files And in the darkness grind 'em. -%% +% Ninety-Ninety Rule of Project Schedules: The first ninety percent of the task takes ninety percent of the time, and the last ten percent takes the other ninety percent. -%% +% No good deed goes unpunished. -- Clare Boothe Luce -%% +% No man is an island, but some of us are long peninsulas. -%% +% No one can make you feel inferior without your consent. -- Eleanor Roosevelt -%% +% No problem is so formidable that you can't just walk away from it. -%% +% No problem is so large it can't be fit in somewhere. -%% +% Nobody wants constructive criticism. It's all we can do to put up with constructive praise. -%% +% Non-Reciprocal Laws of Expectations: Negative expectations yield negative results. Positive expectations yield negative results. -%% +% Noncombatant, n.: A dead Quaker. -- Ambrose Bierce -%% +% "Nondeterminism means never having to say you are wrong." -%% +% Nostalgia isn't what it used to be. -%% +% Not far from here, by a white sun, behind a green star, lived the Steelypips, illustrious, industrious, and they hadn't a care: no spats in their vats, no rules, no schools, no gloom, no evil influence of the moon, no trouble from matter or antimatter -- for they had a machine, a dream of a machine, with springs and gears and perfect in every @@ -6076,57 +6076,57 @@ respect. And they lived with it, and on it, and under it, and inside it, for it was all they had -- first they saved up all their atoms, then they put them all together, and if one didn't fit, why they chipped at it a bit, and everything was just fine ... -- Stanislaw Lem, "Cyberiad" -%% +% "Not only is this incomprehensible, but the ink is ugly and the paper is from the wrong kind of tree." --Profesoor W. -%% +% Notes for a ballet, "The Spell": ... Suddenly Sigmund hears the flutter of wings, and a group of wild swans flies across the moon ... Sigmund is astounded to see that their leader is part swan and part woman -- unfortunately, divided lengthwise. She enchants Sigmund, who is careful not to make any poultry jokes ... -- Woody Allen -%% +% Nothing astonishes men so much as common sense and plain dealing. -%% +% Nothing cures insomnia like the realization that it's time to get up. -%% +% Nothing is faster than the speed of light ... To prove this to yourself, try opening the refrigerator door before the light comes on. -%% +% Nothing is illegal if one hundred businessmen decide to do it. -- Andrew Young -%% +% Nothing recedes like success. -- Walter Winchell -%% +% Nothing takes the taste out of peanut butter quite like unrequited love. -- Charlie Brown -%% +% November, n.: The eleventh twelfth of a weariness. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Now I lay me down to sleep I pray the double lock will keep; May no brick through the window break, And, no one rob me till I awake. -%% +% Now and then, an innocent man is sent to the Legislature. -%% +% Now and then an innocent person is sent to the legislature. -%% +% "Now is the time for all good men to come to." -- Walt Kelly -%% +% Now that you've read Fortune's diet truths, you'll be prepared the next time some housewife or boutique-owner-turned-diet-expert appears on TV to plug her latest book. And, if you still feel a twinge of guilt for eating coffee cake while listening to her exhortations, ask yourself the following questions: @@ -6140,60 +6140,60 @@ double cheese, or the occasional Mai-Tai? (Remember, living right doesn't really make you live longer, it just *seems* like longer.) That, and another piece of coffee cake, should do the trick. -%% +% "Now the Lord God planted a garden East of Whittier in a place called Yorba Linda, and out of the ground he made to grow orange trees that were good for food and the fruits thereof he labeled SUNKIST ..." -- "The Begatting of a President" -%% +% [Nuclear war] ... may not be desirable. -- Edwin Meese III -%% +% Nudists are people who wear one-button suits. -%% +% Numeric stability is probably not all that important when you're guessing. -%% +% O give me a home, Where the buffalo roam, Where the deer and the antelope play, Where seldom is heard A discouraging word, 'Cause what can an antelope say? -%% +% O'Toole's Commentary on Murphy's Law: Murphy was an optimist. -%% +% O'Toole's commentary on Murphy's Law: "Murphy was an optimist." -%% +% Of all the animals, the boy is the most unmanageable. -- Plato -%% +% "Of ______course it's the murder weapon. Who would frame someone with a fake?" -%% +% Of course there's no reason for it, it's just our policy. -%% +% Office Automation, n.: The use of computers to improve efficiency by removing anyone you would want to talk with over coffee. -%% +% Ogden's Law: The sooner you fall behind, the more time you have to catch up. -%% +% Oh don't the days seem lank and long When all goes right and none goes wrong, And isn't your life extremely flat With nothing whatever to grumble at! -%% +% Oh, well, I guess this is just going to be one of those lifetimes. -%% +% Oh, when I was in love with you, Then I was clean and brave, And miles around the wonder grew How well did I behave. @@ -6200,37 +6200,37 @@ And now the fancy passes by, And nothing will remain, And miles around they'll say that I Am quite myself again. -- A. E. Housman -%% +% Oh, wow! Look at the moon! -%% +% Old age is the most unexpected of things that can happen to a man. -- Trotsky -%% +% Old programmers never die. They just branch to a new address. -%% +% Old soldiers never die. Young ones do. -%% +% Oliver's Law: Experience is something you don't get until just after you need it. -%% +% On Monday mornings I am dedicated to the proposition that all men are created jerks. -- H. Allen Smith, "Let the Crabgrass Grow" -%% +% On a paper submitted by a physicist colleague: "This isn't right. This isn't even wrong." -- Wolfgang Pauli -%% +% Once ... in the wilds of Afghanistan, I lost my corkscrew, and we were forced to live on nothing but food and water for days. -- W. C. Fields, "My Little Chickadee" -%% +% Once Law was sitting on the bench And Mercy knelt a-weeping. "Clear out!" he cried, "disordered wench! Nor come before me creeping. Upon you knees if you appear, @@ -6241,15 +6241,15 @@ "Amica curiae," she replied -- "Friend of the court, so please you." "Begone!" he shouted -- "There's the door -- I never saw your face before!" -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Once, adv.: Enough. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice. In the old days, it was not called the Holiday Season; the Christians @@ -6256,18 +6256,18 @@ called it "Christmas" and went to church; the Jews called it "Hanukka" and went to synagogue; the atheists went to parties and drank. People passing each other on the street would say "Merry Christmas!" or "Happy Hanukka!" or (to the atheists) "Look out for the wall!" -- Dave Barry, "Christmas Shopping: A Survivor's Guide" -%% +% Once the realization is accepted that even between the closest human beings infinite distances continue to exist, a wonderful living side by side can grow up, if they succeed in loving the distance between them which makes it possible for each to see each other whole against the sky. -- Rainer Rilke -%% +% Once upon a time, when I was training to be a mathematician, a group of us bright young students taking number theory discovered the names of the smaller prime numbers. 2: The Odd Prime -- @@ -6282,174 +6282,174 @@ at all. Since the composite numbers are formed from primes, their qualities are derived from those primes. So, for instance, the number 6 is "odd but true", while the powers of 2 are all extremely odd numbers. -%% +% One Page Principle: A specification that will not fit on one page of 8.5x11 inch paper cannot be understood. -- Mark Ardis -%% +% One can't proceed from the informal to the formal by formal means. -%% +% One difference between a man and a machine is that a machine is quiet when well oiled. -%% +% One good reason why computers can do more work than people is that they never have to stop and answer the phone. -%% +% One nice thing about egotists: they don't talk about other people. -%% +% One of my less pleasant chores when I was young was to read the Bible from one end to the other. Reading the Bible straight through is at least 70 percent discipline, like learning Latin. But the good parts are, of course, simply amazing. God is an extremely uneven writer, but when He's good, nobody can touch Him. -- John Gardner, NYT Book Review, Jan 1983 -%% +% One of the oldest problems puzzled over in the Talmud is: "Why did God create goyim?" The generally accepted answer is "________somebody has to buy retail." -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% One of the rules of Busmanship, New York style, is never surrender your seat to another passenger. This may seem callous, but it is the best way, really. If one passenger were to give a seat to someone who fainted in the aisle, say, the others on the bus would become disoriented and imagine they were in Topeka, Kansas. -%% +% "One planet is all you get." -%% +% One seldom sees a monument to a committee. -%% +% One thing the inventors can't seem to get the bugs out of is fresh paint. -%% +% One way to stop a runaway horse is to bet on him. -%% +% On-line, adj.: The idea that a human being should always be accessible to a computer. -%% +% Only God can make random selections. -%% +% Only adults have difficulty with childproof caps. -%% +% Optimization hinders evolution. -%% +% Oregon, n.: Eighty billion gallons of water with no place to go on Saturday night. -%% +% Organic chemistry is the chemistry of carbon compounds. Biochemistry is the study of carbon compounds that crawl. -- Mike Adams -%% +% Osborn's Law: Variables won't; constants aren't. -%% +% Others will look to you for stability, so hide when you bite your nails. -%% +% Our OS who art in CPU, UNIX be thy name. Thy programs run, thy syscalls done, in kernel as it is in user! -%% +% Our country has plenty of good five-cent cigars, but the trouble is they charge fifteen cents for them. -%% +% Our policy is, when in doubt, do the right thing. -- Roy L. Ash, ex-president Litton Industries -%% +% Overdrawn? But I still have checks left! -%% +% Overflow on /dev/null, please empty the bit bucket. -%% +% Overload -- core meltdown sequence initiated. -%% +% Ozman's Laws: 1. If someone says he will do something "without fail," he won't. 2. The more people talk on the phone, the less money they make. 3. People who go to conferences are the ones who shouldn't. 4. Pizza always burns the roof of your mouth. -%% +% PISCES (Feb. 19 to Mar. 20) Take the high road, look for the good things, carry the American Express card and a weapon. The world is yours today, as nobody else wants it. Your mortgage will be foreclosed. You will probably get run over by a bus. -%% +% PL/1, "the fatal disease", belongs more to the problem set than to the solution set. -- E. W. Dijkstra -%% +% PLUNDERER'S THEME (to Supercalifragilisticexpialidocius) Pillage, rape, and loot and burn, but all in moderation. If you do the things we say, then you'll soon rule the nation. Kill your foes and enemies and then kill your relations. Pillage, rape, and loot and burn, but all in moderation. -%% +% Paranoia is simply an optimistic outlook on life. -%% +% Paranoids are people, too; they have their own problems. It's easy to criticize, but if everybody hated you, you'd be paranoid too. -- D. J. Hicks -%% +% Pardo's First Postulate: Anything good in life is either illegal, immoral, or fattening. Arnold's Addendum: Anything not fitting into these categories causes cancer in rats. -%% +% Parker's Law: Beauty is only skin deep, but ugly goes clean to the bone. -%% +% Parkinson's Fifth Law: If there is a way to delay in important decision, the good bureaucracy, public or private, will find it. -%% +% Parkinson's Fourth Law: The number of people in any working group tends to increase regardless of the amount of work to be done. -%% +% Parts that positively cannot be assembled in improper order will be. -%% +% Pascal Users: To show respect for the 313th anniversary (tomorrow) of the death of Blaise Pascal, your programs will be run at half speed. -%% +% "Pascal is not a high-level language." -- Steven Feiner -%% +% Pascal, n.: A programming language named after a man who would turn over in his grave if he knew about it. -%% +% Passionate hatred can give meaning and purpose to an empty life. -- Eric Hoffer -%% +% Paul Revere was a tattle-tale -%% +% Paul's Law: In America, it's not how much an item costs, it's how much you save. -%% +% Paul's Law: You can't fall off the floor. -%% +% Peace, n.: In international affairs, a period of cheating between two periods of fighting. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Peanut Blossoms 4 cups sugar 16 tbsp. milk 4 cups brown sugar 4 tsp. vanilla 4 cups shortening 14 cups flour @@ -6458,68 +6458,68 @@ Shape dough into balls. Roll in sugar and bake on ungreased cookie sheet at 375 F. for 10-12 minutes. Immediately top each cookie with a Hershey's kiss or star pressing down firmly to crack cookie. Makes a hell of a lot. -%% +% Pecor's Health-Food Principle: Never eat rutabaga on any day of the week that has a "y" in it. -%% +% People often find it easier to be a result of the past than a cause of the future. -%% +% People usually get what's coming to them ... unless it's been mailed. -%% +% People who claim they don't let little things bother them have never slept in a room with a single mosquito. -%% +% People who have what they want are very fond of telling people who haven't what they want that they don't want it. -- Ogden Nash -%% +% People will accept your ideas much more readily if you tell them that Benjamin Franklin said it first. -%% +% People will buy anything that's one to a customer. -%% +% Pereant, inquit, qui ante nos nostra dixerunt. "Confound those who have said our remarks before us." -- Aelius Donatus -%% +% Perfect day for scrubbing the floor and other exciting things. -%% +% Peter's Law of Substitution: Look after the molehills, and the mountains will look after themselves. -%% +% Philadelphia is not dull -- it just seems so because it is next to exciting Camden, New Jersy. -%% +% Philogyny recapitulates erogeny; erogeny recapitulates philogyny. -%% +% Pig, n.: An animal (Porcus omnivorous) closely allied to the human race by the splendor and vivacity of its appetite, which, however, is inferior in scope, for it balks at pig. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Please ignore previous fortune. -%% +% Please take note: -%% +% Please try to limit the amount of `this room doesn't have any bazingas' until you are told that those rooms are `punched out.' Once punched out, we have a right to complain about atrocities, missing bazingas, and such. -- N. Meyrowitz -%% +% Please, won't somebody tell me what diddie-wa-diddie means? -%% +% Pohl's law: Nothing is so good that somebody, somewhere, will not hate it. -%% +% Police: Good evening, are you the host? Host: No. Police: We've been getting complaints about this party. Host: About the drugs? Police: No. @@ -6536,25 +6536,25 @@ religious symbols drawn on the doors emerges from the living room and roars down the hall, past the police and onto the lawn, where it smashes into a tree. Eight guests tumble out onto the grass, moaning.) See? Things are starting to wind down. -%% +% Political T.V. commercials prove one thing: some candidates can tell all their good points and qualifications in just 30 seconds. -%% +% Politician, n.: From the Greek "poly" ("many") and the French "tete" ("head" or "face," as in "tete-a-tete": head to head or face to face). Hence "polytetien", a person of two or more faces. -- Martin Pitt -%% +% Politics is like coaching a football team. you have to be smart enough to understand the game but not smart enough to lose interest. -%% +% Polymer physicists are into chains. -%% +% Pope Goestheveezl was the shortest reigning pope in the history of the Church, reigning for two hours and six minutes on 1 April 1866. The white smoke had hardly faded into the blue of the Vatican skies before it dawned on the assembled multitudes in St. Peter's Square that his name had hilarious possibilities. The crowds fell about, helpless with @@ -6566,53 +6566,53 @@ The square was finally cleared by armed carabineri with tears of laughter streaming down their faces. The event set a record for hilarious civic functions, smashing the previous record set when Baron Hans Neizant B"ompzidaize was elected Landburgher of K"oln in 1653. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% Positive, adj.: Mistaken at the top of one's voice. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Power, n: The only narcotic regulated by the SEC instead of the FDA. -%% +% Practical people would be more practical if they would take a little more time for dreaming. -- J. P. McEvoy -%% +% Predestination was doomed from the start. -%% +% President Reagan has noted that there are too many economic pundits and forecasters and has decided on an excess prophets tax. -%% +% President Thieu says he'll quit if he doesn't get more than 50% of the vote. In a democracy, that's not called quitting. -- The Washington Post -%% +% Pretend to spank me -- I'm a pseudo-masochist! -%% +% Preudhomme's Law of Window Cleaning: It's on the other side. -%% +% [Prime Minister Joseph] Chamberlain loves the working man -- he loves to see him work. -- Winston Churchill -%% +% Pro is to con as progress is to Congress. -%% +% Probable-Possible, my black hen, She lays eggs in the Relative When. She doesn't lay eggs in the Positive Now Because she's unable to postulate how. -- Frederick Winsor -%% +% Professor Gorden Newell threw another shutout in last week's Chem. Eng. 130 midterm. Once again a student did not receive a single point on his exam. Newell has now tossed 5 shutouts this quarter. Newell's earned exam average has now dropped to a phenomenal 30% -%% +% Proof techniques #1: Proof by Induction. This technique is used on equations with "_n" in them. Induction techniques are very popular, even the military used them. @@ -6623,11 +6623,11 @@ as large as we want. If _n is sufficiently large, the case of _n+1 is trivially equivalent, so the only important _n are _n less than _n. We can take _n = _n (from above), so it's true for _n+1 because it's just about _n. QED. (QED translates from the Latin as "So what?") -%% +% Proof techniques #2: Proof by Oddity. SAMPLE: To prove that horses have an infinite number of legs. (1) Horses have an even number of legs. (2) They have two legs in back and fore legs in front. (3) This makes a total of six legs, which certainly is an odd number of @@ -6643,73 +6643,73 @@ Blatant assertion Changing all the 2's to _n's Mutual consent Lack of a counterexample, and "It stands to reason" -%% +% Psychiatrists say that one out of four people are mentally ill. Check three friends. If they're ok, you're it. -%% +% Put your Nose to the Grindstone! -- Amalgamated Plastic Surgeons and Toolmakers, Ltd. -%% +% Putt's Law: Technology is dominated by two types of people: Those who understand what they do not manage. Those who manage what they do not understand. -%% +% Q: Do you know what the death rate around here is? A: One per person. -%% +% Q: Why do ducks have flat feet? A: To stamp out forest fires. Q: Why do elephants have flat feet? A: To stamp out flaming ducks. -%% +% Q: Why do mountain climbers rope themselves together? A: To prevent the sensible ones from going home. -%% +% Q: How many DEC repairman does it take to fix a flat ? A: Five; four to hold the car up and one to swap tires. -%% +% Q: How many DEC repairman does it take to fix a flat? A: Five; four to hold the car up and one to swap tires. Q: How long does it take? A: It's indeterminate. It will depend upon how many flats they've brought with them. Q: What happens if you've got TWO flats? A: They replace your generator. -%% +% Q: How many IBM CPU's does it take to execute a job? A: Four; three to hold it down, and one to rip its head off. -%% +% Q: How many IBM cpu's does it take to do a logical right shift? A: 33. 1 to hold the bits and 32 to push the register. -%% +% Q: How many IBM types does it take to change a light bulb? A: 100. Ten to do it, and 90 to write document number GC7500439-0001, Multitasking Incandescent Source System Facility, of which 10% of the pages state only "This page intentionally left blank", and 20% of the definitions are of the form "A ...... consists of sequences of non-blank characters separated by blanks". -%% +% Q: How many Martians does it take to screw in a lightbulb? A: One and a half. -%% +% Q: How many Oregonians does it take to screw in a light bulb? A: Three. One to screw in the lightbulb and two to fend off all those Californians trying to share the experience. -%% +% Q: How many existentialists does it take to screw in a lightbulb? A: Two. One to screw it in and one to observe how the lightbulb itself symbolizes a single incandescent beacon of subjective reality in a netherworld of endless absurdity reaching out toward a maudlin cosmos of nothingness. -%% +% Q: How many journalists does it take to screw in a lightbulb? A: Three. One to report it as an inspired government program to bring light to the people, one to report it as a diabolical government plot to deprive the poor of darkness, and one to win a pulitzer prize for reporting that Electric Company hired a lightbulb-assassin @@ -6716,43 +6716,43 @@ to break the bulb in the first place. % Q: How many heterosexual males does it take to screw in a light bulb in San Francisco? A: Both of them. -%% +% Q: How many surrealists does it take to change a light bulb? A: Two. One to hold the girrafe and the other to fill the bathtub with brightly colored machine tools. -%% +% Q: Why did the tachyon cross the road? A: Because it was on the other side. -%% +% QWERT (kwirt), n. [MW < OW qwertyuiop, a thirteenth]: 1. a unit of weight equal to 13 poiuyt avoirdupois (or 1.69 kiloliks), commonly used in structural engineering; 2. [Colloq.] one thirteenth the load that a fully grown sligo can carry; 3. [Anat.] a painful irritation of the dermis in the region of the anus; 4. [Slang] person who excites in others the symptoms of a qwert. -- Webster's Middle World Dictionary, 4th ed. -%% +% Quality Control, n.: The process of testing one out of every 1,000 units coming off a production line to make sure that at least one out of 100 works. -%% +% Question: Man Invented Alcohol, God Invented Grass. Who do you trust? -%% +% Quick!! Act as if nothing has happened! -%% +% "Qvid me anxivs svm?" -%% +% ROMEO: Courage, man; the hurt cannot be much. MERCUTIO: No, 'tis not so deep as a well, nor so wide as a church- door; but 'tis enough, 'twill serve. -%% +% RULES OF EATING -- THE BRONX DIETER'S CREED 1. Never eat on an empty stomach. 2. Never leave the table hungry. 3. When traveling, never leave a country hungry. 4. Enjoy your food. @@ -6766,13 +6766,13 @@ 9. Don't feel you must finish everything on your plate. You can always eat it later. 10. Avoid any wine with a childproof cap. 11. Avoid blue food. -- Richard Smit, "The Bronx Diet" -%% +% Radioactive cats have 18 half-lives. -%% +% Rattling around the back of my head is a disturbing image of something I saw at the airport ... Now I'm remembering, those giant piles of computer magazines right next to "People" and "Time" in the airport store. Does it bother anyone else that half the world is being told all of our hard-won secrets of computer technology? Remember how all @@ -6781,72 +6781,72 @@ rate it won't be long before there are stacks of the "Transactions on Information Theory" at the A&P checkout counters. Who's going to be impressed with us electrical engineers then? Are we, as the saying goes, giving away the store? -- Robert W. Lucky, IEEE President -%% +% Ray's Rule of Precision: Measure with a micrometer. Mark with chalk. Cut with an axe. -%% +% Razors pain you; Rivers are damp; Acids stain you; And drugs cause cramp. Guns aren't lawful; Nooses give; Gas smells awful; You might as well live. -- Dorothy Parker -%% +% Re graphics: A picture is worth 10K words -- but only those to describe the picture. Hardly any sets of 10K words can be adequately described with pictures. -%% +% Real Programmers don't play tennis, or any other sport that requires you to change clothes. Mountain climbing is OK, and real programmers wear their climbing boots to work in case a mountain should suddenly spring up in the middle of the machine room. -%% +% Real Programmers don't write in PL/I. PL/I is for programmers who can't decide whether to write in COBOL or FORTRAN. -%% +% Real Programmers think better when playing Adventure or Rogue. -%% +% Real Programs don't use shared text. Otherwise, how can they use functions for scratch space after they are finished calling them? -%% +% Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -%% +% Reality is a cop-out for people who can't handle drugs. -%% +% Reality is an obstacle to hallucination. -%% +% Reality is for those who can't face Science Fiction. -%% +% "Really ?? What a coincidence, I'm shallow too!!" -%% +% Receiving a million dollars tax free will make you feel better than being flat broke and having a stomach ache. -- Dolph Sharp, "I'm O.K., You're Not So Hot" -%% +% Recession is when your neighbor loses his job. Depression is when you lose your job. These economic downturns are very difficult to predict, but sophisticated econometric modeling houses like Data Resources and Chase Econometrics have successfully predicted 14 of the last 3 recessions. -%% +% Reclaimer, spare that tree! Take not a single bit! It used to point to me, Now I'm protecting it. It was the reader's CONS That made it, paired by dot; Now, GC, for the nonce, Thou shalt reclaim it not. -%% +% "Reintegration complete," ZORAC advised. "We're back in the universe again ..." An unusually long pause followed, "... but I don't know which part. We seem to have changed our position in space." A spherical display in the middle of the floor illuminated to show the starfield surrounding the ship. @@ -6856,37 +6856,37 @@ are obviously the products of intelligence. Implications: we have been intercepted deliberately by a means unknown, for a purpose unknown, and transferred to a place unknown by a form of intelligence unknown. Apart from the unknowns, everything is obvious." -- James P. Hogan, "Giants Star" -%% +% Reisner's Rule of Conceptual Inertia: If you think big enough, you'll never have to do it. -%% +% Remember, UNIX spelled backwards is XINU. -%% +% Remember, even if you win the rat race -- you're still a rat. -%% +% Remember that whatever misfortune may be your lot, it could only be worse in Cleveland. -- National Lampoon, "Deteriorada" -%% +% Reporter, n.: A writer who guesses his way to the truth and dispels it with a tempest of words. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Reporter (to Mahatma Gandhi): Mr Gandhi, what do you think of Western Civilization? Gandhi: I think it would be a good idea. -%% +% Research is what I'm doing when I don't know what I'm doing. -- Wernher von Braun -%% +% Resisting temptation is easier when you think you'll probably get another chance later on. -%% +% Review Questions 1: If Nerd on the planet Nutley starts out in his spaceship at 20 KPH, and his speed doubles every 3.2 seconds, how long will it be before he exceeds the speed of light? How long will it be @@ -6901,11 +6901,11 @@ 3: If Johnson drinks one beer the first hour (slow start), four beers the next hour, nine beers the next, etc., and stacks the cans in a pyramid, how soon will Johnson's pyramid be larger than King Tut's? When will it fall on him? Will he notice? -%% +% Rhode's Law: When any principle, law, tenet, probability, happening, circumstance, or result can in no way be directly, indirectly, empirically, or circuitously proven, derived, implied, inferred, induced, deducted, estimated, or scientifically @@ -6914,56 +6914,56 @@ comfort, or any combination of the above, or none of the above, be unilaterally and unequivocally assumed, proclaimed, and adhered to as absolute truth to be undeniably, universally, immutably, and infinitely so, until such time as it becomes advantageous to assume otherwise, maybe. -%% +% Rocky's Lemma of Innovation Prevention Unless the results are known in advance, funding agencies will reject the proposal. -%% +% Rudin's Law: If there is a wrong way to do something, most people will do it every time. -%% +% Rule 46, Oxford Union Society, London: Any member introducing a dog into the Society's premises shall be liable to a fine of one pound. Any animal leading a blind person shall be deemed to be a cat. -%% +% Rule of Creative Research: 1) Never draw what you can copy. 2) Never copy what you can trace. 3) Never trace what you can cut out and paste down. -%% +% Rule of Defactualization: Information deteriorates upward through bureaucracies. -%% +% Rule of Feline Frustration: When your cat has fallen asleep on your lap and looks utterly content and adorable, you will suddenly have to go to the bathroom. -%% +% Rule of the Great: When people you greatly admire appear to be thinking deep thoughts, they probably are thinking about lunch. -%% +% Rules for driving in New York: 1) Anything done while honking your horn is legal. 2) You may park anywhere if you turn your four-way flashers on. 3) A red light means the next six cars may go through the intersection. -%% +% SCCS, the source motel! Programs check in and never check out! -- Ken Thompson -%% +% SHIFT TO THE LEFT! SHIFT TO THE RIGHT! POP UP, PUSH DOWN, BYTE, BYTE, BYTE! -%% +% SOFTWARE -- formal evening attire for female computer analysts. -%% +% Safety Tips for the Post-Nuclear Existence Tip #1: How to tell when you are dead. 1. Little things start bothering you: little things like worms, bugs, ants. @@ -6972,110 +6972,110 @@ 4. You have a hard time getting a waiter. 5. Exotic birds flock around you. 6. People ignore you at parties. 7. You have a hard time getting up in the morning. 8. You no longer get off on cocaine. -%% +% San Francisco isn't what it used to be, and it never was. -- Herb Caen -%% +% San Francisco, n.: Marcel Proust editing an issue of Penthouse. -%% +% Santa Claus wears a Red Suit, He must be a communist. And a beard and long hair, Must be a pacifist. What's in that pipe that he's smoking? -- Arlo Guthrie -%% +% Satellite Safety Tip #14: If you see a bright streak in the sky coming at you, duck. -%% +% Sattinger's Law: It works better if you plug it in. -%% +% Saturday night in Toledo Ohio, Is like being nowhere at all, All through the day how the hours rush by, You sit in the park and you watch the grass die. -- John Denver, "Saturday Night in Toledo Ohio" -%% +% Save energy: be apathetic. -%% +% Save the whales. Collect the whole set. -%% +% Schapiro's Explanation: The grass is always greener on the other side -- but that's because they use more manure. -%% +% Schizophrenia beats being alone. -%% +% Science is what happens when preconception meets verification. -%% +% Scott's first Law: No matter what goes wrong, it will probably look right. -%% +% Scott's second Law: When an error has been detected and corrected, it will be found to have been wrong in the first place. Corollary: After the correction has been found in error, it will be impossible to fit the original quantity back into the equation. -%% +% Scotty: Captain, we din' can reference it! Kirk: Analysis, Mr. Spock? Spock: Captain, it doesn't appear in the symbol table. Kirk: Then it's of external origin? Spock: Affirmative. Kirk: Mr. Sulu, go to pass two. Sulu: Aye aye, sir, going to pass two. -%% +% Screw up your courage! You've screwed up everything else. -%% +% Second Law of Business Meetings: If there are two possible ways to spell a person's name, you will pick the wrong one. Corollary: If there is only one way to spell a name, you will spell it wrong, anyway. -%% +% Security check: INTRUDER ALERT! -%% +% Seduced, shaggy Samson snored. She scissored short. Sorely shorn, Soon shackled slave, Samson sighed, Silently scheming, Sightlessly seeking Some savage, spectacular suicide. -- Stanislaw Lem, "Cyberiad" -%% +% Self Test for Paranoia: You know you have it when you can't think of anything that's your own fault. -%% +% Seminars, n.: From "semi" and "arse", hence, any half-assed discussion. -%% +% Serocki's Stricture: Marriage is always a bachelor's last option. -%% +% Serving coffee on aircraft causes turbulence. -%% +% Sex is not the answer. Sex is the question. "Yes" is the answer. -- Swami X -%% +% Sex is the mathematics urge sublimated. -- M. C. Reed. -%% +% Sex without love is an empty experience, but, as empty experiences go, it's one of the best. -- Woody Allen -%% +% Shamus, n.: A shamus is a guy who takes care of handyman tasks around the temple, and makes sure everything is in working order. A shamus is at the bottom of the pecking order of synagog functionaries, and there's a joke about that: @@ -7084,116 +7084,116 @@ bested, also cries out, "Oh, Lord, I am nobody!" The shamus, deeply moved, follows suit and cries, "Oh, Lord, I am nobody!" The rabbi turns to the cantor and says, "Look who thinks he's nobody!" -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% Shaw's Principle: Build a system that even a fool can use, and only a fool will want to use it. -%% +% "She is descended from a long line that her mother listened to." -- Gypsy Rose Lee -%% +% She is not refined. She is not unrefined. She keeps a parrot. -- Mark Twain -%% +% She missed an invaluable opportunity to give him a look that you could have poured on a waffle ... -%% +% "Sherry [Thomas Sheridan] is dull, naturally dull; but it must have taken him a great deal of pains to become what we now see him. Such an excess of stupidity, sir, is not in Nature." -- Samuel Johnson -%% +% She's genuinely bogus. -%% +% Show me a man who is a good loser and I'll show you a man who is playing golf with his boss. -%% +% Show respect for age. Drink good Scotch for a change. -%% +% Signs of crime: screaming or cries for help. -- from the Brown Security Crime Prevention Pamphlet -%% +% Silverman's Law: If Murphy's Law can go wrong, it will. -%% +% Simon's Law: Everything put together falls apart sooner or later. -%% +% Since I hurt my pendulum My life is all erratic. My parrot, who was cordial, Is now transmitting static. The carpet died, a palm collapsed, The cat keeps doing poo. The only thing that keeps me sane Is talking to my shoe. -- My Shoe -%% +% Since we're all here, we must not be all there. -- Bob "Mountain" Beck -%% +% [Sir Stafford Cripps] has all the virtues I dislike and none of the vices I admire. -- Winston Churchill -%% +% Sixtus V, Pope from 1585 to 1590 authorized a printing of the Vulgate Bible. Taking no chances, the pope issued a papal bull automatically excommunicating any printer who might make an alteration in the text. This he ordered printed at the beginning of the Bible. He personally examined every sheet as it came off the press. Yet the published Vulgate Bible contained so many errors that corrected scraps had to be printed and pasted over them in every copy. The result provoked wry comments on the rather patchy papal infallibility, and Pope Sixtus had no recourse but to order the return and destruction of every copy. -%% +% Skinner's Constant (or Flannagan's Finagling Factor): That quantity which, when multiplied by, divided by, added to, or subtracted from the answer you get, gives you the answer you should have gotten. -%% +% Slang is language that takes off its coat, spits on its hands, and goes to work. -%% +% Slick's Three Laws of the Universe: 1. Nothing in the known universe travels faster than a bad check. 2. A quarter-ounce of chocolate = four pounds of fat. 3. There are two types of dirt: the dark kind, which is attracted to light objects, and the light kind, which is attracted to dark objects. -%% +% Slurm, n.: The slime that accumulates on the underside of a soap bar when it sits in the dish too long. -- Rich Hall, "Sniglets" -%% +% Snacktrek, n.: The peculiar habit, when searching for a snack, of constantly returning to the refrigerator in hopes that something new will have materialized. -- Rich Hall, "Sniglets" -%% +% So far as I can remember, there is not one word in the Gospels in praise of intelligence. -- Bertrand Russell -%% +% "So she went into the garden to cut a cabbage leaf to make an apple pie; and at the same time a great she-bear, coming up the street pops its head into the shop. "What! no soap?" So he died, and she very imprudently married the barber; and there were present the Picninnies, and the Grand Panjandrum himself, with the little round button at top, and they all fell to playing the game of catch as catch can, till the gunpowder ran out at the heels of their boots." -- Samuel Foote -%% +% Sodd's Second Law: Sooner or later, the worst possible set of circumstances is bound to occur. -%% +% Some of you ... may have decided that, this year, you're going to celebrate it the old-fashioned way, with your family sitting around stringing cranberries and exchanging humble, handmade gifts, like on "The Waltons". Well, you can forget it. If everybody pulled that kind of subversive stunt, the economy would collapse overnight. The @@ -7203,62 +7203,62 @@ it would drop on the populace from Air Force jets, killing and maiming thousands. So, for the good of the nation, you should go along with the Holiday Program. This means you should get a large sum of money and go to a mall. -- Dave Barry, "Christmas Shopping: A Survivor's Guide" -%% +% Some people are born mediocre, some people achieve mediocrity, and some people have mediocrity thrust upon them. -- Joseph Heller, "Catch-22" -%% +% Some people in this department wouldn't recognize subtlety if it hit them on the head. -%% +% Some points to remember [about animals]: 1. Don't go to sleep under big animals, e.g., elephants, rhinoceri, hippopotamuses; 2. Don't put animals with sharp teeth or poisonous fangs down the front of your clothes; 3. Don't pat certain animals, e.g., crocodiles and scorpions or dogs you have just kicked. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% Somebody ought to cross ball point pens with coat hangers so that the pens will multiply instead of disappear. -%% +% Someone will try to honk your nose today. -%% +% "Sometimes I simply feel that the whole world is a cigarette and I'm the only ashtray." -%% +% Sometimes I worry about being a success in a mediocre world. -- Lily Tomlin -%% +% "Somewhere", said Father Vittorini, "did Blake not speak of the Machineries of Joy? That is, did not God promote environments, then intimidate these Natures by provoking the existence of flesh, toy men and women, such as are we all? And thus happily sent forth, at our best, with good grace and fine wit, on calm noons, in fair climes, are we not God's Machineries of Joy?" "If Blake said that", said Father Brian, "he never lived in Dublin." -- R. Bradbury, "The Machineries of Joy" -%% +% Sooner or later you must pay for your sins. (Those who have already paid may disregard this fortune). -%% +% Space is big. You just won't believe how vastly, hugely, mind- bogglingly big it is. I mean, you may think it's a long way down the road to the drug store, but that's just peanuts to space. -- "The Hitchhiker's Guide to the Galaxy" -%% +% Spark's Sixth Rule for Managers: If a subordinate asks you a pertinent question, look at him as if he had lost his senses. When he looks down, paraphrase the question back at him. -%% +% Speak roughly to your little VAX, And boot it when it crashes; It knows that one cannot relax Because the paging thrashes! @@ -7268,11 +7268,11 @@ And boot it when it crashes; In spite of all my favorite hacks My jobs it always thrashes! Wow! Wow! Wow! -%% +% Speak roughly to your little boy, And beat him when he sneezes: He only does it to annoy Because he knows it teases. @@ -7283,13 +7283,13 @@ For he can thoroughly enjoy The pepper when he pleases! Wow! wow! wow! -- Lewis Carrol, "Alice in Wonderland" -%% +% Speak softly and carry a +6 two-handed sword. -%% +% Speaking as someone who has delved into the intricacies of PL/I, I am sure that only Real Men could have written such a machine-hogging, cycle-grabbing, all-encompassing monster. Allocate an array and free the middle third? Sure! Why not? Multiply a character string times a bit string and assign the result to a float decimal? Go ahead! Free a @@ -7296,67 +7296,67 @@ controlled variable procedure parameter and reallocate it before passing it back? Overlay three different types of variable on the same memory location? Anything you say! Write a recursive macro? Well, no, but Real Men use rescan. How could a language so obviously designed and written by Real Men not be intended for Real Man use? -%% +% Speaking of love, one problem that recurs more and more frequently these days, in books and plays and movies, is the inability of people to communicate with the people they love; Husbands and wives who can't communicate, children who can't communicate with their parents, and so on. And the characters in these books and plays and so on (and in real life, I might add) spend hours bemoaning the fact that they can't communicate. I feel that if a person can't communicate, the very _____least he can do is to Shut Up! -- Tom Lehrer, "That Was the Year that Was" -%% +% Spend extra time on hobby. Get plenty of rolling papers. -%% +% Spirtle, n.: The fine stream from a grapefruit that always lands right in your eye. -- Sniglets, "Rich Hall & Friends" -%% +% Spouse, n.: Someone who'll stand by you through all the trouble you wouldn't have had if you'd stayed single. -%% +% Stay away from flying saucers today. -%% +% Stay away from hurricanes for a while. -%% +% "Stealing a rhinoceros should not be attempted lightly." -%% +% Steele's Plagiarism of Somebody's Philosophy: Everybody should believe in something -- I believe I'll have another drink. -%% +% Steinbach's Guideline for Systems Programming Never test for an error condition you don't know how to handle. -%% +% Stop searching. Happiness is right next to you. -%% +% Stop searching. Happiness is right next to you. Now, if they'd only take a bath ... -%% +% Stult's Report: Our problems are mostly behind us. What we have to do now is fight the solutions. -%% +% Stupid, n.: Losing $25 on the game and $25 on the instant replay. -%% +% Sturgeon's Law: 90% of everything is crud. -%% +% Substitute "damn" every time you're inclined to write "very"; your editor will delete it and the writing will be just as it should be. -- Mark Twain -%% +% Succumb to natural tendencies. Be hateful and boring. -%% +% (Sung to the tune of "The Impossible Dream" from MAN OF LA MANCHA) To code the impossible code, To bring up a virgin machine, To pop out of endless recursion, @@ -7364,39 +7364,39 @@ To right the unrightable bug, To endlessly twiddle and thrash, To mount the unmountable magtape, To stop the unstoppable crash! -%% +% Support bacteria -- it's the only culture some people have! -%% +% Surprise! You are the lucky winner of random I.R.S. Audit! Just type in your name and social security number. Please remember that leaving the room is punishable under law: Name # -%% +% Surprise due today. Also the rent. -%% +% Surprise your boss. Get to work on time. -%% +% Sweater, n.: A garment worn by a child when its mother feels chilly. -%% +% Swipple's Rule of Order: He who shouts the loudest has the floor. -%% +% 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! -%% +% THE GOLDEN RULE OF ARTS AND SCIENCES The one who has the gold makes the rules. -%% +% THE LESSER-KNOWN PROGRAMMING LANGUAGES #10 -- SIMPLE SIMPLE is an acronym for Sheer Idiot's Monopurpose Programming Language Environment. This language, developed at the Hanover College for Technological Misfits, was designed to make it impossible to write code @@ -7403,52 +7403,52 @@ with errors in it. The statements are, therefore, confined to BEGIN, END and STOP. No matter how you arrange the statements, you can't make a syntax error. Programs written in SIMPLE do nothing useful. Thus they achieve the results of programs written in other languages without the tedious, frustrating process of testing and debugging. -%% +% THE LESSER-KNOWN PROGRAMMING LANGUAGES #12 -- LITHP This otherwise unremarkable language is distinguished by the absence of an "S" in its character set; users must substitute "TH". LITHP is said to be useful in protheththing lithtth. -%% +% THE LESSER-KNOWN PROGRAMMING LANGUAGES #13 -- SLOBOL SLOBOL is best known for the speed, or lack of it, of its compiler. Although many compilers allow you to take a coffee break while they compile, SLOBOL compilers allow you to travel to Bolivia to pick the coffee. Forty-three programmers are known to have died of boredom sitting at their terminals while waiting for a SLOBOL program to compile. Weary SLOBOL programmers often turn to a related (but infinitely faster) language, COCAINE. -%% +% THE LESSER-KNOWN PROGRAMMING LANGUAGES #17 -- SARTRE Named after the late existential philosopher, SARTRE is an extremely unstructured language. Statements in SARTRE have no purpose; they just are. Thus SARTRE programs are left to define their own functions. SARTRE programmers tend to be boring and depressed, and are no fun at parties. -%% +% THE LESSER-KNOWN PROGRAMMING LANGUAGES #17 -- SARTRE Named after the late existential philosopher, SARTRE is an extremely unstructured language. Statements in SARTRE have no purpose; they just are. Thus SARTRE programs are left to define their own functions. SARTRE programmers tend to be boring and depressed, and are no fun at parties. -%% +% THE LESSER-KNOWN PROGRAMMING LANGUAGES #18 -- C- This language was named for the grade received by its creator when he submitted it as a class project in a graduate programming class. C- is best described as a "low-level" programming language. In fact, the language generally requires more C- statements than machine-code statements to execute a given task. In this respect, it is very similar to COBOL. -%% +% THE LESSER-KNOWN PROGRAMMING LANGUAGES #18 -- FIFTH FIFTH is a precision mathematical language in which the data types refer to quantity. The data types range from CC, OUNCE, SHOT, and JIGGER to FIFTH (hence the name of the language), LITER, MAGNUM and @@ -7458,11 +7458,11 @@ The many versions of the FIFTH language reflect the sophistication and financial status of its users. Commands in the ELITE dialect include VSOP and LAFITE, while commands in the GUTTER dialect include HOOTCH and RIPPLE. The latter is a favorite of frustrated FORTH programmers who end up using this language. -%% +% THIS IS PLEDGE WEEK FOR THE FORTUNE PROGRAM If you like the fortune program, why not support it now with your contribution of a pithy fortune, clean or obscene? We cannot continue without your support. Less than 14% of all fortune users are @@ -7475,72 +7475,72 @@ you forget. Our target is 300 new fortunes by the end of the week. Don't miss out. All fortunes will be acknowledged. If you contribute 30 fortunes or more, you will receive a free subscription to "The Fortune Hunter", our monthly program guide. If you contribute 50 or more, you will receive a free "Fortune Hunter" coffee mug .... -%% +% TV is chewing gum for the eyes. -- Frank Lloyd Wright -%% +% Tact is the ability to tell a man he has an open mind when he has a hole in his head. -%% +% Tact, n.: The unsaid part of what you're thinking. -%% +% Take everything in stride. Trample anyone who gets in your way. -%% +% Take heart amid the deepening gloom that your dog is finally getting enough cheese -- National Lampoon, "Deteriorada" -%% +% Take it easy, we're in a hurry. -%% +% Take my word for it, the silliest woman can manage a clever man, but it needs a very clever woman to manage a fool. -- Kipling -%% +% Take your dying with some seriousness, however. Laughing on the way to your execution is not generally understood by less advanced life forms, and they'll call you crazy. -- "Messiah's Handbook: Reminders for the Advanced Soul" -%% +% Take your dying with some seriousness, however. Laughing on the way to your execution is not generally understood by less-advanced life-forms, and they'll call you crazy. -- Messiah's Handbook: Reminders for the Advanced Soul -%% +% Talk sense to a fool and he calls you foolish. -- Euripides -%% +% Talkers are no good doers. -- William Shakespeare, "Henry VI" -%% +% Talking much about oneself can also be a means to conceal oneself. -- Friedrich Nietzsche -%% +% Tax reform means "Don't tax you, don't tax me, tax that fellow behind the tree." -- Russell Long -%% +% Taxes, n.: Of life's two certainties, the only one for which you can get an extension. -%% +% Teach children to be polite and courteous in the home, and, when he grows up, he will never be able to edge his car onto a freeway. -%% +% Teamwork is essential -- it allows you to blame someone else. -%% +% Technological progress has merely provided us with more efficient means for going backwards. -- Aldous Huxley -%% +% Ten years of rejection slips is nature's way of telling you to stop writing. -- R. Geis -%% +% "Terence, this is stupid stuff: You eat your victuals fast enough; There can't be much amiss, 'tis clear, To see the rate you drink your beer. But oh, good Lord, the verse you make, @@ -7552,11 +7552,11 @@ Pretty friendship 'tis to rhyme Your friends to death before their time. Moping, melancholy mad: Come, pipe a tune to dance to, lad." -- A. E. Housman -%% +% Tertullian was born in Carthage somewhere about 160 A.D. He was a pagan, and he abandoned himself to the lascivious life of his city until about his 35th year, when he became a Christian .... To him is ascribed the sublime confession: Credo quia absurdum est (I believe because it is absurd). This does not altogether accord with historical @@ -7569,184 +7569,184 @@ Thanks to the acuteness of his mind, he saw through the poverty of philosophical and Gnostic knowledge, and contemptuously rejected it. -- C. G. Jung, in Psychological Types (Teruillian was one of the founders of the Catholic Church). -%% +% Test-tube babies shouldn't throw stones. -%% +% "Text processing has made it possible to right-justify any idea, even one which cannot be justified on any other grounds." -- J. Finnegan, USC. -%% +% "That must be wonderful! I don't understand it at all." -%% +% That secret you've been guarding, isn't. -%% +% That woman speaks eight languages and can't say "no" in any of them. -- Dorothy Parker -%% +% The Abrams' Principle: The shortest distance between two points is off the wall. -%% +% The Army has carried the American ... ideal to its logical conclusion. Not only do they prohibit discrimination on the grounds of race, creed and color, but also on ability. -- T. Lehrer -%% +% The Army needs leaders the way a foot needs a big toe. -- Bill Murray -%% +% The Briggs/Chase Law of Program Development: To determine how long it will take to write and debug a program, take your best estimate, multiply that by two, add one, and convert to the next higher units. -%% +% "The C Programming Language -- A language which combines the flexibility of assembly language with the power of assembly language." -%% +% The Crown is full of it! -- Nate Harris, 1775 -%% +% The English have no respect for their language, and will not teach their children to speak it. -- G. B. Shaw -%% +% The Fifth Rule: You have taken yourself too seriously. -%% +% The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet. -- Michael Jackson -%% +% The [Ford Foundation] is a large body of money completely surrounded by people who want some. -- Dwight MacDonald -%% +% The Great Bald Swamp Hedgehog: The Gerat Bald Swamp Hedgehog of Billericay displays, in courtship, his single prickle and does impressions of Holiday Inn desk clerks. Since this means him standing motionless for enormous periods of time he is often eaten in full display by The Great Bald Swamp Hedgehog Eater. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% The Heineken Uncertainty Principle: You can never be sure how many beers you had last night. -%% +% The IQ of the group is the lowest IQ of a member of the group divided by the number of people in the group. -%% +% The IRS spends God knows how much of your tax money on these toll-free information hot lines staffed by IRS employees, whose idea of a dynamite tax tip is that you should print neatly. If you ask them a real tax question, such as how you can cheat, they're useless. So, for guidance, you want to look to big business. Big business never pays a nickel in taxes, according to Ralph Nader, who represents a big consumer organization that never pays a nickel in taxes... -- Dave Barry, "Sweating Out Taxes" -%% +% The Kennedy Constant: Don't get mad -- get even. -%% +% The Killer Ducks are coming!!! -%% +% The Law, in its majestic equality, forbids the rich, as well as the poor, to sleep under the bridges, to beg in the streets, and to steal bread. -- Anatole France -%% +% "The Lord gave us farmers two strong hands so we could grab as much as we could with both of them." -- Joseph Heller, "Catch-22" -%% +% The National Short-Sleeved Shirt Association says: Support your right to bare arms! -%% +% The New Testament offers the basis for modern computer coding theory, in the form of an affirmation of the binary number system. But let your communication be Yea, yea; nay, nay: for whatsoever is more than these cometh of evil. -- Matthew 5:37 -%% +% The Official MBA Handbook on business cards: Avoid overly pretentious job titles such as "Lord of the Realm, Defender of the Faith, Emperor of India" or "Director of Corporate Planning." -%% +% The Pig, if I am not mistaken, Gives us ham and pork and Bacon. Let others think his heart is big, I think it stupid of the Pig. -- Ogden Nash -%% +% The Preacher, the Politicain, the Teacher, Were each of them once a kiddie. A child, indeed, is a wonderful creature. Do I want one? God Forbiddie! -- Ogden Nash -%% +% The Psblurtex is an 18-inch long anaconda that hides in the gentlemen's outfitting departments of Amazonian stores and is often bought by mistake since its colors are those of the London Reform Club. Once tied around its victim's neck, it strangles him gently and then claims the insurance before running off to Germany where it lives in hiding. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% The Roman Rule The one who says it cannot be done should never interrupt the one who is doing it. -%% +% The Ruffed Pandanga of Borneo and Rotherham spreads out his feathers in his courtship dance and imitates Winston Churchill and Tommy Cooper on one leg. The padanga is dying out because the female padanga doesn't take it too seriously. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% The Schwine-Kitzenger Institute study of 47 men over the age of 100 showed that all had these things in common: 1. They all had moderate appetites. 2. They all came from middle class homes 3. All but two of them were dead. -%% +% The Third Law of Photography: If you did manage to get any good shots, they will be ruined when someone inadvertently opens the darkroom door and all of the dark leaks out. -%% +% The USA is so enormous, and so numerous are its schools, colleges and religious seminaries, many devoted to special religious beliefs ranging from the unorthodox to the dotty, that we can hardly wonder at its yielding a more bounteous harvest of gobbledegook than the rest of the world put together. -- Sir Peter Medawar -%% +% The USA is so enormous, and so numerous are its schools, colleges and religious seminaries, many devoted to special religious beliefs ranging from the unorthodox to the dotty, that we can hardly wonder at its yielding a more bounteous harvest of gobbledygook than the rest of the world put together. -- Sir Peter Medawar -%% +% The University of California Bears announced the signing of Reggie Philbin to a letter of intent to attend Cal next Fall. Philbin is said to make up for no talent by cheating well. Says Philbin of his decision to attend Cal, "I'm in it for the free ride." -%% +% The advertisement is the most truthful part of a newspaper -- Thomas Jefferson -%% +% The average woman would rather have beauty than brains, because the average man can see better than he can think. -%% +% The basic idea behind malls is that they are more convenient than cities. Cities contain streets, which are dangerous and crowded and difficult to park in. Malls, on the other hand, have parking lots, which are also dangerous and crowded and difficult to park in, but -- here is the big difference -- in mall parking lots, THERE ARE NO @@ -7757,25 +7757,25 @@ and explained to me, in great detail, why the accident was my fault, his reasoning being that he was violent and muscular, whereas I was neither. This kind of reasoning is legally valid in mall parking lots. -- Dave Barry, "Christmas Shopping: A Survivor's Guide" -%% +% The best book on programming for the layman is "Alice in Wonderland"; but that's because it's the best book on anything for the layman. -%% +% The best cure for insomnia is to get a lot of sleep. -- W. C. Fields -%% +% The best defense against logic is ignorance. -%% +% The best thing about growing older is that it takes such a long time. -%% +% The biggest difference between time and space is that you can't reuse time. -- Merrick Furst -%% +% The birds are singing, the flowers are budding, and it is time for Miss Manners to tell young lovers to stop necking in public. It's not that Miss Manners is immune to romance. Miss Manners has been known to squeeze a gentleman's arm while being helped over a curb, and, @@ -7783,78 +7783,78 @@ under the dinner table. Miss Manners also believes that the sight of people strolling hand in hand or arm in arm or arm in hand dresses up a city considerably more than the more familiar sight of people shaking umbrellas at one another. What Miss Manners objects to is the kind of activity that frightens the horses on the street ... -%% +% "The bland leadeth the bland and they both shall fall into the kitsch." -%% +% The brain is a wonderful organ; it starts working the moment you get up in the morning, and does not stop until you get to school. -%% +% The chicken that clucks the loudest is the one most likely to show up at the steam fitters' picnic. -%% +% The chief cause of problems is solutions. -%% +% "The climate of Bombay is such that its inhabitants have to live elsewhere." -%% +% The computing field is always in need of new cliches. -- Alan Perlis -%% +% The correct way to punctuate a sentence that starts: "Of course it is none of my business, but --" is to place a period after the word "but." Don't use excessive force in supplying such a moron with a period. Cutting his throat is only a momentary pleasure and is bound to get you talked about. -- Lazarus Long, "Time Enough for Love" -%% +% The cost of living hasn't affected its popularity. -%% +% The cost of living is going up, and the chance of living is going down. -%% +% The cow is nothing but a machine with makes grass fit for us people to eat. -- John McNulty -%% +% The day-to-day travails of the IBM programmer are so amusing to most of us who are fortunate enough never to have been one -- like watching Charlie Chaplin trying to cook a shoe. -%% +% The debate rages on: Is PL/I Bachtrian or Dromedary? -%% +% The devil finds work for idle circuits to do. -%% +% "The difference between a misfortune and a calamity? If Gladstone fell into the Thames, it would be a misfortune. But if someone dragged him out again, it would be a calamity." -- Benjamin Disraeli -%% +% The difference between science and the fuzzy subjects is that science requires reasoning while those other subjects merely require scholarship. -- Robert Heinlein -%% +% The duck hunter trained his retriever to walk on water. Eager to show off this amazing accomplishment, he asked a friend to go along on his next hunting trip. Saying nothing, he fired his first shot and, as the duck fell, the dog walked on the surface of the water, retrieved the duck and returned it to his master. "Notice anything?" the owner asked eagerly. "Yes," said his friend, "I see that fool dog of yours can't swim." -%% +% The earth is like a tiny grain of sand, only much, much heavier. -%% +% The end of the world will occur at 3:00 p.m., this Friday, with symposium to follow. -%% +% The fact that it works is immaterial. -- L. Ogborn -%% +% The first Great Steward, Parrafin the Climber, was employed in King Chloroplast's kitchen as second scullery boy when the old King met a tragic death. He apparently fell backward by accident on a dozen salad forks. Simultaneously the true heir, his son Carotene, mysteriously fled the city, complaining of some sort of plot and a lot of @@ -7871,14 +7871,14 @@ crown, and the rule of Twodor was up for grabs. The scullery slave Parrafin bravely accepted the Stewardship of Twodor until that day when a lineal descendant of Carotene's returns to reclaim his rightful throne, conquer Twodor's enemies, and revamp the postal system. -- Harvard Lampoon, "Bored of the Rings" -%% +% The first duty of a revolutionary is to get away with it. -- Abbie Hoffman -%% +% The first riddle I ever heard, one familiar to almost every Jewish child, was propounded to me by my father: "What is it that hangs on the wall, is green, wet -- and whistles?" I knit my brow and thought and thought, and in final perplexity @@ -7893,64 +7893,64 @@ "But -- " I sputtered, summoning all my outrage, "-- a herring doesn't whistle!!" "Right, " smiled my father. "I just put that in to make it hard." -- Leo Rosten, "The Joys of Yiddish" -%% +% The fortune program is supported, in part, by user contributions and by a major grant from the National Endowment for the Inanities. -%% +% The generation of random numbers is too important to be left to chance. -%% +% The geographical center of Boston is in Roxbury. Due north of the center we find the South End. This is not to be confused with South Boston which lies directly east from the South End. North of the South End is East Boston and southwest of East Boston is the North End. -%% +% The goal of Computer Science is to build something that will last at least until we've finished building it. -%% +% The goal of science is to build better mousetraps. The goal of nature is to build better mice. -%% +% The gods gave man fire and he invented fire engines. They gave him love and he invented marriage. -%% +% The hardest thing in the world to understand is the income tax. -- Albert Einstein -%% +% The hearing ear is always found close to the speaking tongue, a custom whereof the memory of man runneth not howsomever to the contrary, nohow. -%% +% The herd instinct among economists makes sheep look like independent thinkers. -%% +% The human animal differs from the lesser primates in his passion for lists of "Ten Best". -- H. Allen Smith -%% +% The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. -%% +% The human mind treats a new idea the way the body treats a strange protein -- it rejects it. -- P. Medawar -%% +% The human race has one really effective weapon, and that is laughter. -- Mark Twain -%% +% "The illegal we do immediately. The unconstitutional takes a bit longer." -- Henry Kissinger -%% +% The individual choice of garnishment of a burger can be an important point to the consumer in this day when individualism is an increasingly important thing to people. -- Donald N. Smith, president of Burger King -%% +% The ladies men admire, I've heard, Would shudder at a wicked word. Their candle gives a single light; They'd rather stay at home at night. They do not keep awake till three, @@ -7958,99 +7958,99 @@ They never sanction the impure, Nor recognize an overture. They shrink from powders and from paints ... So far, I've had no complaints. -- Dorothy Parker -%% +% The light at the end of the tunnel is the headlight of an approaching train. -%% +% The lion and the calf shall lie down together but the calf won't get much sleep. -- Woody Allen -%% +% The longer I am out of office, the more infallible I appear to myself. -- Henry Kissinger -%% +% The man who follows the crowd will usually get no further than the crowd. The man who walks alone is likely to find himself in places no one has ever been. -- Alan Ashley-Pitt -%% +% The marvels of today's modern technology include the development of a soda can, when discarded will last forever ... and a $7,000 car which when properly cared for will rust out in two or three years. -%% +% The meek shall inherit the earth -- they are too weak to refuse. -%% +% The moon may be smaller than Earth, but it's further away. -%% +% The more laws and order are made prominent, the more thieves and robbers there will be. -- Lao Tsu -%% +% The more things change, the more they stay insane. -%% +% The more we disagree, the more chance there is that at least one of us is right. -%% +% The mosquito is the state bird of New Jersey. -- Andy Warhol -%% +% The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!" (I found it!) but "That's funny ..." -- Isaac Asimov -%% +% The moving cursor writes, and having written, blinks on. -%% +% The new Congressmen say they're going to turn the government around. I hope I don't get run over again. -%% +% The nice thing about standards is that there are so many of them to choose from. -- Andrew S. Tanenbaum -%% +% The notion of a "record" is an obsolete remnant of the days of the 80-column card. -- Dennis M. Ritchie -%% +% The objective of all dedicated employees should be to thoroughly analyze all situations, anticipate all problems prior to their occurrence, have answers for these problems, and move swiftly to solve these problems when called upon. However, When you are up to your ass in alligators it is difficult to remind yourself your initial objective was to drain the swamp. -%% +% The older a man gets, the farther he had to walk to school as a boy. -%% +% The one good thing about repeating your mistakes is that you know when to cringe. -%% +% The only possible interpretation of any research whatever in the `social sciences' is: some do, some don't. -- Ernest Rutherford -%% +% The only problem with being a man of leisure is that you can never stop and take a rest. -%% +% The only thing to do with good advice is pass it on. It is never any use to oneself. -- Oscar Wilde -%% +% The only way to get rid of a temptation is to yield to it. -- Oscar Wilde -%% +% The opossum is a very sophisticated animal. It doesn't even get up until 5 or 6 pm. -%% +% The opposite of a profound truth may well be another profound truth. -- Bohr -%% +% The optimum committee has no members. -- Norman Augustine -%% +% The owner of a large furniture store in the mid-west arrived in France on a buying trip. As he was checking into a hotel he struck up an acquaintance with a beautiful young lady. However, she only spoke French and he only spoke English, so each couldn't understand a word the other spoke. He took out a pencil and a notebook and drew a @@ -8060,102 +8060,102 @@ dinner he sketched two dancers and she was delighted. They went to several nightclubs, drank champagne, danced and had a glorious evening. It had gotten quite late when she motioned for the pencil and drew a picture of a four-poster bed. He was dumbfounded, and has never be able to understand how she knew he was in the furniture business. -%% +% The past always looks better than it was. It's only pleasant because it isn't here. -- Finley Peter Dunne (Mr. Dooley) -%% +% The pitcher wound up and he flang the ball at the batter. The batter swang and missed. The pitcher flang the ball again and this time the batter connected. He hit a high fly right to the center fielder. The center fielder was all set to catch the ball, but at the last minute his eyes were blound by the sun and he dropped it. -- Dizzy Dean -%% +% The primary purpose of the DATA statement is to give names to constants; instead of referring to pi as 3.141592653589793 at every appearance, the variable PI can be given that value with a DATA statement and used instead of the longer form of the constant. This also simplifies modifying the program, should the value of pi change. -- FORTRAN manual for Xerox Computers -%% +% The probability of someone watching you is proportional to the stupidity of your action. -%% +% The problem ... is that we have run out of dinosaurs to form oil with. Scientists working for the Department of Energy have tried to form oil using other animals; they've piled thousands of tons of sand and Middle Eastern countries on top of cows, raccoons, haddock, laboratory rats, etc., but so far all they have managed to do is run up an enormous bulldozer-rental bill and anger a lot of Middle Eastern persons. None of the animals turned into oil, although most of the laboratory rats developed cancer. -- Dave Barry, "Postpetroleum Guzzler" -%% +% The problem with any unwritten law is that you don't know where to go to erase it. -- Glaser and Way -%% +% The problem with people who have no vices is that generally you can be pretty sure they're going to have some pretty annoying virtues. -- Elizabeth Taylor -%% +% The problem with the gene pool is that there is no lifeguard. -%% +% "The pyramid is opening!" "Which one?" "The one with the ever-widening hole in it!" -- Firesign Theater, "How Can You Be In Two Places At Once When You're Not Anywhere At All" -%% +% The rain it raineth on the just And also on the unjust fella, But chiefly on the just, because The unjust steals the just's umbrella. -%% +% The reason computer chips are so small is computers don't eat much. -%% +% The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw -%% +% The revolution will not be televised. -%% +% The reward of a thing well done is to have done it. -- Emerson -%% +% The right half of the brain controls the left half of the body. This means that only left handed people are in their right mind. -%% +% The shortest distance between two points is under construction. -- Noelie Altito -%% +% "The society which scorns excellence in plumbing as a humble activity and tolerates shoddiness in philosophy because it is an exaulted activity will have neither good plumbing nor good philosophy ... neither its pipes nor its theories will hold water." -%% +% "The sooner you fall behind, the more time you'll have to catch up!" -%% +% The steady state of disks is full. --Ken Thompson -%% +% The sun was shining on the sea, Shining with all his might: He did his very best to make The billows smooth and bright -- And this was very odd, because it was The middle of the night. -- Lewis Carroll, "Through the Looking Glass" -%% +% The superfluous is very necessary. -- Voltaire -%% +% The temperature of Heaven can be rather accurately computed. Our authority is Isaiah 30:26, "Moreover, the light of the Moon shall be as the light of the Sun and the light of the Sun shall be sevenfold, as the light of seven days." Thus Heaven receives from the Moon as much radiation as we do from the Sun, and in addition 7*7 (49) times as much @@ -8171,68 +8171,68 @@ fearful, and unbelieving ... shall have their part in the lake which burneth with fire and brimstone." A lake of molten brimstone means that its temperature must be at or below the boiling point, 444.6C. We have, then, that Heaven, at 525C is hotter than Hell at 445C. -- From "Applied Optics" vol. 11, A14, 1972 -%% +% The three laws of thermodynamics: The First Law: You can't get anything without working for it. The Second Law: The most you can accomplish by working is to break even. The Third Law: You can only break even at absolute zero. -%% +% The trouble with a kitten is that When it grows up, it's always a cat -- Ogden Nash. -%% +% The trouble with being poor is that it takes up all your time. -%% +% The trouble with being punctual is that people think you have nothing more important to do. -%% +% The trouble with doing something right the first time is that nobody appreciates how difficult it was. -%% +% The truth of a proposition has nothing to do with its credibility. And vice versa. -%% +% The turtle lives 'twixt plated decks Which practically conceal its sex. I think it clever of the turtle In such a fix to be so fertile. -- Ogden Nash -%% +% The typewriting machine, when played with expression, is no more annoying than the piano when played by a sister or near relation. -- Oscar Wilde -%% +% The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense. -- E. W. Dijkstra -%% +% "The voters have spoken, the bastards ..." -%% +% "The warning message we sent the Russians was a calculated ambiguity that would be clearly understood." -- Alexander Haig -%% +% "The way to make a small fortune in the commodities market is to start with a large fortune." -%% +% The world is coming to an end. Please log off. -%% +% The world is coming to an end! Repent and return those library books! -%% +% The world's as ugly as sin, And almost as delightful -- Frederick Locker-Lampson -%% +% The years of peak mental activity are undoubtedly between the ages of four and eighteen. At four we know all the questions, at eighteen all the answers. -%% +% Then a man said: Speak to us of Expectations. He then said: If a man does not see or hear the waters of the Jordan, then he should not taste the pomegranate or ply his wares in an open market. @@ -8242,131 +8242,131 @@ Such a man would expect a pear of a peach tree. Such a man would expect a stone to lay an egg. Such a man would expect Sears to assemble a lawnmower. -- Kehlog Albran, "The Profit" -%% +% There are four kinds of homicide: felonious, excusable, justifiable, and praiseworthy ... -- Ambrose Bierce, "The Devil's Dictionary" -%% +% There are really not many jobs that actually require a penis or a vagina, and all other occupations should be open to everyone. -- Gloria Steinem -%% +% There are some micro-organisms that exhibit characteristics of both plants and animals. When exposed to light they undergo photosynthesis; and when the lights go out, they turn into animals. But then again, don't we all? -%% +% There are three kinds of lies: Lies, Damn Lies, and Statistics. -- Disraeli -%% +% "There are three possibilities: Pioneer's solar panel has turned away from the sun; there's a large meteor blocking transmission; or someone loaded Star Trek 3.2 into our video processor." -%% +% There are three possible parts to a date, of which at least two must be offered: entertainment, food, and affection. It is customary to begin a series of dates with a great deal of entertainment, a moderate amount of food, and the merest suggestion of affection. As the amount of affection increases, the entertainment can be reduced proportionately. When the affection IS the entertainment, we no longer call it dating. Under no circumstances can the food be omitted. -- Miss Manners' Guide to Excruciatingly Correct Behaviour -%% +% There are three ways to get something done: 1. Do it yourself. 2. Hire someone to do it for you. 3. Forbid your kids to do it. -%% +% There are three ways to get something done: do it yourself, hire someone, or forbid your kids to do it. -%% +% There are two kinds of solar-heat systems: "passive" systems collect the sunlight that hits your home, and "active" systems collect the sunlight that hits your neighbors' homes, too. -- Dave Barry, "Postpetroleum Guzzler" -%% +% "There are two ways of disliking poetry; one way is to dislike it, the other is to read Pope." -- Oscar Wilde -%% +% There are two ways to write error-free programs. Only the third one works. -%% +% There are very few personal problems that cannot be solved through a suitable application of high explosives. -%% +% There cannot be a crisis next week. My schedule is already full. -- Henry Kissinger -%% +% There has been an alarming increase in the number of things you know nothing about. -%% +% There is a great discovery still to be made in Literature: that of paying literary men by the quantity they do NOT write. -%% +% There is a green, multi-legged creature crawling on your shoulder. -%% +% There is a theory that states: "If anyone finds out what the universe is for it will disappear and be replaced by something more bazaarly inexplicable." There is another theory that states: "This has already happened ...." -- Donald Adams, "Hitch-Hikers Guide to the Galaxy" -%% +% 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. -- Donald Adams, "The Hitchhiker's Guide to the Galaxy" -%% +% There is no distinctly native American criminal class except Congress. -- Mark Twain -%% +% There is no realizable power that man cannot, in time, fashion the tools to attain, nor any power so secure that the naked ape will not abuse it. So it is written in the genetic cards -- only physics and war hold him in check. And also the wife who wants him home by five, of course. -- Encyclopadia Apocryphia, 1990 ed. -%% +% There is no satisfaction in hanging a man who does not object to it -- G. B. Shaw -%% +% There is no substitute for good manners, except, perhaps, fast reflexes. -%% +% There is no time like the present for postponing what you ought to be doing. -%% +% There is only one thing in the world worse than being talked about, and that is not being talked about. -- Oscar Wilde -%% +% There is something fascinating about science. One gets such wholesale returns of conjecture out of such a trifling investment of fact. -- Mark Twain -%% +% 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 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 boy called Eustace Clarence Scrubb, and he almost deserved it." -- C. S. Lewis, The Chronicles of Narnia -%% +% There was a plane crash over mid-ocean, and only three survivors were left in the life-raft: the Pope, the President, and Mayor Daley. Unfortunately, it was a one-man life-raft, and quickly sinking, so they started debating who should be allowed to stay. @@ -8374,17 +8374,17 @@ over the world, the President explained that if he died then America would be stuck with the Vice-President, and so forth. Then Mayor Daley said, "Look! We're not solving anything like this! The only fair thing to do is to vote on it." So they did, and Mayor Daley won by 97 votes. -%% +% 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 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." @@ -8392,17 +8392,17 @@ "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." -%% +% There were in this country two very large monopolies. The larger of the two had the following record: the Vietnam War, Watergate, double- digit inflation, fuel and energy shortages, bankrupt airlines, and the 8-cent postcard. The second was responsible for such things as the transistor, the solar cell, lasers, synthetic crystals, high fidelity @@ -8410,16 +8410,16 @@ feedback, magnetic tape, magnetic "bubbles", electronic switching systems, microwave radio and TV relay systems, information theory, the first electrical digital computer, and the first communications satellite. Guess which one got to tell the other how to run the telephone business? -%% +% There's a fine line between courage and foolishness. Too bad its not a fence. -%% +% There's an old proverb that says just about whatever you want it to. -%% +% There's little in taking or giving, There's little in water or wine: This living, this living, this living, Was never a project of mine. Oh, hard is the struggle, and sparse is @@ -8429,43 +8429,43 @@ And work is the province of cattle, And rest's for a clam in a shell, So I'm thinking of throwing the battle -- Would you kindly direct me to hell? -- Dorothy Parker -%% +% There's no future in time travel -%% +% There's no point in being grown up if you can't be childish sometimes. -- Dr. Who -%% +% There's no real need to do housework -- after four years it doesn't get any worse. -%% +% There's only one way to have a happy marriage and as soon as I learn what it is I'll get married again. -- Clint Eastwood -%% +% There's so much plastic in this culture that vinyl leopard skin is becoming an endangered synthetic. -- Lily Tomlin -%% +% "These are DARK TIMES for all mankind's HIGHEST VALUES!" "These are DARK TIMES for FREEDOM and PROSPERITY!" "These are GREAT TIMES to put your money on BAD GUY to kick the CRAP out of MEGATON MAN!" -%% +% These days the necessities of life cost you about three times what they used to, and half the time they aren't even fit to drink. -%% +% They also surf who only stand on waves. -%% +% They spell it "da Vinci" and pronounce it "da Vinchy". Foreigners always spell better than they pronounce. -- Mark Twain -%% +% "They told me I was gullible ... and I believed them!" -%% +% They told me you had proven it When they discovered our results About a month before. Their hair began to curl The proof was valid, more or less Instead of understanding it But rather less than more. We'd run the thing through PRL. @@ -8476,50 +8476,50 @@ My notion was to start again Ignoring all they'd done We quickly turned it into code To see if it would run. -%% +% They're only trying to make me LOOK paranoid! -%% +% Things are more like they used to be than they are now. -%% +% Things will be bright in P.M. A cop will shine a light in your face. -%% +% Think big. Pollute the Mississippi. -%% +% Think honk if you're a telepath. -%% +% Think of it! With VLSI we can pack 100 ENIACs in 1 sq. cm.! -%% +% Think of your family tonight. Try to crawl home after the computer crashes. -%% +% Think twice before speaking, but don't say "think think click click". -%% +% This fortune cookie program out of order. For those in desperate need, please use the program "________randchar". This program generates random characters, and, given enough time, will undoubtedly come up with something profound. It will, however, take it no time at all to be more profound than THIS program has ever been. -%% +% This fortune intentionally not included. -%% +% This fortune is false. -%% +% This is National Non-Dairy Creamer Week. -%% +% "This is a country where people are free to practice their religion, regardless of race, creed, color, obesity, or number of dangling keys ..." -%% +% This is for all ill-treated fellows Unborn and unbegot, For them to read when they're in trouble And I am not. -- A. E. Housman -%% +% This is the story of the bee Whose sex is very hard to see You cannot tell the he from the she But she can tell, and so can he @@ -8527,156 +8527,156 @@ The little bee is never still She has no time to take the pill And that is why, in times like these There are so many sons of bees. -%% +% This life is a test. It is only a test. Had this been an actual life, you would have received further instructions as to what to do and where to go. -%% +% This login session: $13.99, but for you $11.88 -%% +% This planet has -- or rather had -- a problem, which was this: most of the people living on it were unhappy for pretty much of the time. Many solutions were suggested for this problem, but most of these were largely concerned with the movements of small green pieces of paper, which is odd because on the whole it wasn't the small green pieces of paper that were unhappy. -- Douglas Adams -%% +% This will be a memorable month -- no matter how hard you try to forget it. -%% +% Those who can, do. Those who can't, simulate. -%% +% Those who can't write, write manuals. -%% +% Those who educate children well are more to be honored than parents, for these only gave life, those the art of living well. -- Aristotle -%% +% Those who in quarrels interpose, must often wipe a bloody nose. -%% +% Those who make peaceful revolution impossible will make violent revolution inevitable. -- John F. Kennedy -%% +% Three great scientific theories of the structure of the universe are the molecular, the corpuscular and the atomic. A fourth affirms, with Haeckel, the condensation or precipitation of matter from ether -- whose existence is proved by the condensation or precipitation ... A fifth theory is held by idiots, but it is doubtful if they know any more about the matter than the others. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Time flies like an arrow Fruit flies like a banana -%% +% Time is nature's way of making sure that everything doesn't happen at once. -%% +% "To YOU I'm an atheist; to God, I'm the Loyal Opposition." -- Woody Allen -%% +% To be intoxicated is to feel sophisticated but not be able to say it. -%% +% To be is to do. -- I. Kant To do is to be. -- A. Sartre Yabba-Dabba-Doo! -- F. Flinstone -%% +% To be sure of hitting the target, shoot first and, whatever you hit, call it the target. -%% +% To err is human, to forgive is Not Company Policy. -%% +% To invent, you need a good imagination and a pile of junk. -- Thomas Edison -%% +% To iterate is human, to recurse, divine. -%% +% To those accustomed to the precise, structured methods of conventional system development, exploratory development techniques may seem messy, inelegant, and unsatisfying. But it's a question of congruence: precision and flexibility may be just as disfunctional in novel, uncertain situations as sloppiness and vacillation are in familiar, well-defined ones. Those who admire the massive, rigid bone structures of dinosaurs should remember that jellyfish still enjoy their very secure ecological niche. -- Beau Sheil, "Power Tools for Programmers" -%% +% "To vacillate or not to vacillate, that is the question ... or is it?" -%% +% Today is National Existential Ennui Awareness Day. -%% +% Today is a good day to bribe a high-ranking public official. -%% +% Today is the first day of the rest of the mess -%% +% Today is the tomorrow you worried about yesterday -%% +% Today's scientific question is: What in the world is electricity? And where does it go after it leaves the toaster? -- Dave Barry, "What is Electricity?" -%% +% Tomorrow will be canceled due to lack of interest. -%% +% Tonight's the night: Sleep in a eucalyptus tree. -%% +% Too much of a good thing is WONDERFUL. -- Mae West -%% +% Travel important today; Internal Revenue men arrive tomorrow. -%% +% Troubled day for virgins over 16 who are beautiful and wealthy and live in eucalyptus trees. -%% +% Truly great madness can not be achieved without significant intelligence. -- Henrik Tikkanen -%% +% Truth will be out this morning. (Which may really mess things up.) -%% +% Truthful, adj.: Dumb and illiterate. -%% +% Truthful, adj.: Dumb and illiterate. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Try not to have a good time ... This is supposed to be educational. -- Charles Schulz -%% +% Try to be the best of whatever you are, even if what you are is no good. -%% +% Try to get all of your posthumous medals in advance. -%% +% Trying to be happy is like trying to build a machine for which the only specification is that it should run noiselessly. -%% +% Turnaucka's Law: The attention span of a computer is only as long as its electrical cord. -%% +% Tussman's Law: Nothing is as inevitable as a mistake whose time has come. -%% +% 'Twas midnight, and the UNIX hacks Did gyre and gimble in their cave All mimsy was the CS-VAX And Cory raths outgrave. "Beware the software rot, my son! The faults that bite, the jobs that thrash! Beware the broken pipe, and shun The frumious system crash!" -%% +% 'Twas the nocturnal segment of the diurnal period preceding the annual Yuletide celebration, And throughout our place of residence, Kinetic activity was not in evidence among the possessors of this potential, including that @@ -8685,211 +8685,211 @@ edge of the woodburning caloric apparatus, Pursuant to our anticipatory pleasure regarding an imminent visitation from an eccentric philanthropist among whose folkloric appelations is the honorific title of St. Nicklaus ... -%% +% Two can Live as Cheaply as One for Half as Long. -- Howard Kandel -%% +% Two percent of zero is almost nothing. -%% +% UFO's are for real: the Air Force doesn't exist. -%% +% "Uncle Cosmo ... why do they call this a word processor?" "It's simple, Skyler ... you've seen what food processors do to food, right?" -- MacNelley, "Shoe" -%% +% Uncle Ed's Rule of Thumb: Never use your thumb for a rule. You'll either hit it with a hammer or get a splinter in it. -%% +% Under deadline pressure for the next week. If you want something, it can wait. Unless it's blind screaming paroxysmally hedonistic ... -%% +% Underlying Principle of Socio-Genetics: Superiority is recessive. -%% +% Unfair animal names: -- tsetse fly -- bullhead -- booby -- duck-billed platypus -- sapsucker -- Clarence -- Gary Larson -%% +% United Nations, New York, December 25. The peace and joy of the Christmas season was marred by a proclamation of a general strike of all the military forces of the world. Panic reigns in the hearts of all the patriots of every persuasion. Meanwhile, fears of universal disaster sank to an all-time low over the world. -- Isaac Asimov -%% +% Universe, n.: The problem. -%% +% University, n.: Like a software house, except the software's free, and it's usable, and it works, and if it breaks they'll quickly tell you how to fix it, and ... -%% +% Unnamed Law: If it happens, it must be possible. -%% +% Unquestionably, there is progress. The average American now pays out twice as much in taxes as he formerly got in wages. -- H. L. Mencken -%% +% Usage: fortune -P [] -a [xsz] [Q: [file]] [rKe9] -v6[+] dataspec ... inputdir -%% +% User n.: A programmer who will believe anything you tell him. -%% +% Using TSO is like kicking a dead whale down the beach. -- S. C. Johnson -%% +% VIRGO (Aug 23 - Sept 22) Learn something new today, like how to spell or how to count to ten without using your fingers. Be careful dressing this morning. You may be hit by a car later in the day and you wouldn't want to be taken to the doctor's office in some of that old underwear you own. -%% +% Vail's Second Axiom: The amount of work to be done increases in proportion to the amount of work already completed. -%% +% Van Roy's Law: An unbreakable toy is useful for breaking other toys. -%% +% Velilind's Laws of Experimentation: 1. If reproducibility may be a problem, conduct the test only once. 2. If a straight line fit is required, obtain only two data points. -%% +% Very few profundities can be expressed in less than 80 characters. -%% +% Violence is the last refuge of the incompetent. -- Salvor Hardin -%% +% Virtue is its own punishment. -%% +% Vital papers will demonstrate their vitality by spontaneously moving from where you left them to where you can't find them. -%% +% Vitamin C deficiency is apauling -%% +% Vote anarchist -%% +% WARNING: Reading this fortune can affect the dimensionality of your mind, change the curvature of your spine, cause the growth of hair on your palms, and make a difference in the outcome of your favorite war. -%% +% WHERE CAN THE MATTER BE Oh, dear, where can the matter be When it's converted to energy? There is a slight loss of parity. Johnny's so long at the fair. -%% +% "Wagner's music is better than it sounds." -- Mark Twain -%% +% Waiter: "Tea or coffee, gentlemen?" 1st customer: "I'll have tea." 2nd customer: "Me, too -- and be sure the glass is clean!" (Waiter exits, returns) Waiter: "Two teas. Which one asked for the clean glass?" -%% +% War hath no fury like a non-combatant. -- Charles Edward Montague -%% +% Washington [D.C.] is a city of Southern efficiency and Northern charm. -- John F. Kennedy -%% +% Wasting time is an important part of living. -%% +% Watson's Law: The reliability of machinery is inversely proportional to the number and significance of any persons watching it. -%% +% We ARE as gods and might as well get good at it. -- Whole Earth Catalog -%% +% We are confronted with insurmountable opportunities. -- Walt Kelly, "Pogo" -%% +% We can defeat gravity. The problem is the paperwork involved. -%% +% "We don't care. We don't have to. We're the Phone Company." -%% +% We don't understand the software, and sometimes we don't understand the hardware, but we can *___see* the blinking lights! -%% +% We have met the enemy, and he is us. -- Walt Kelly -%% +% "We have reason to believe that man first walked upright to free his hands for masturbation." -- Lily Tomlin -%% +% We may not return the affection of those who like us, but we always respect their good judgement. -%% +% We must remember the First Amendment which protects any shrill jackass no matter how self-seeking. -- F. G. Withington -%% +% We really don't have any enemies. It's just that some of our best friends are trying to kill us. -%% +% We will have solar energy as soon as the utility companies solve one technical problem -- how to run a sunbeam through a meter. -%% +% We wish you a Hare Krishna We wish you a Hare Krishna We wish you a Hare Krishna And a Sun Myung Moon! -- Maxwell Smart -%% +% Weiler's Law: Nothing is impossible for the man who doesn't have to do it himself. -%% +% Weinberg's First Law: Progress is made on alternate Fridays. -%% +% Weinberg's Principle: An expert is a person who avoids the small errors while sweeping on to the grand fallacy. -%% +% Weinberg's Second Law: If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization. -%% +% Weiner's Law of Libraries: There are no answers, only cross references. -%% +% Well, I would -- if they realized that we -- again if -- if we led them back to that stalemate only because our retaliatory power, our seconds, or strike at them after our first strike, would be so destructive they they couldn't afford it, that would hold them off. -- President Ronald Reagan, on the MX missile -%% +% "We'll cross out that bridge when we come back to it later." -%% +% "Well, if you can't believe what you read in a comic book, what *___can* you believe?!" -- Bullwinkle J. Moose [Jay Ward] -%% +% Well, my terminal's locked up, and I ain't got any Mail, And I can't recall the last time that my program didn't fail; I've got stacks in my structs, I've got arrays in my queues, I've got the : Segmentation violation -- Core dumped blues. @@ -8901,103 +8901,103 @@ On a PDP-11, life should be a breeze, But with VAXen in the house even magnetic tapes would freeze. Now you might think that unlike VAXen I'd know who I abuse, I've got the : Segmentation violation -- Core dumped blues. -- Core Dumped Blues -%% +% We're deep into the holiday gift-giving season, as you can tell from the fact that everywhere you look, you see jolly old St. Nick urging you to purchase things, to the point where you want to slug him right in his bowl full of jelly. -- Dave Barry, "Simple, Homespun Gifts" -%% +% Westheimer's Discovery: A couple of months in the laboratory can frequently save a couple of hours in the library. -%% +% Wethern's Law: Assumption is the mother of all screw-ups. -%% +% We've sent a man to the moon, and that's 29,000 miles away. The center of the Earth is only 4,000 miles away. You could drive that in a week, but for some reason nobody's ever done it. -- Andy Rooney -%% +% What I tell you three times is true. -%% +% What I want is all of the power and none of the responsibility. -%% +% What does it mean if there is no fortune for you? -%% +% What garlic is to food, insanity is to art. -%% +% What garlic is to salad, insanity is to art. -%% +% What good is a ticket to the good life, if you can't find the entrance? -%% +% What good is having someone who can walk on water if you don't follow in his footsteps? -%% +% What if everything is an illusion and nothing exists? In that case, I definitely overpaid for my carpet. -- Woody Allen, "Without Feathers" -%% +% What if nothing exists and we're all in somebody's dream? Or what's worse, what if only that fat guy in the third row exists? -- Woody Allen, "Without Feathers" -%% +% What is a magician but a practising theorist? -- Obi-Wan Kenobi -%% +% What is mind? No matter. What is matter? Never mind. -- Thomas Hewitt Key, 1799-1875 -%% +% What is the difference between a Turing machine and the modern computer? It's the same as that between Hillary's ascent of Everest and the establishment of a Hilton on its peak. -%% +% "What is the robbing of a bank compared to the FOUNDING of a bank?" -- Bertold Brecht -%% +% What is worth doing is worth the trouble of asking somebody to do. -%% +% What makes the Universe so hard to comprehend is that there's nothing to compare it with. -%% +% What makes the universe so hard to comprehend is that there's nothing to compare it with. -%% +% What publishers are looking for these days isn't radical feminism. It's corporate feminism -- a brand of feminism designed to sell books and magazines, three-piece suits, airline tickets, Scotch, cigarettes and, most important, corporate America's message, which runs: "Yes, women were discriminated against in the past, but that unfortunate mistake has been remedied; now every woman can attain wealth, prestige and power by dint of individual rather than collective effort." -- Susan Gordon -%% +% What sane person could live in this world and not be crazy? -- Ursula K. LeGuin -%% +% What the hell, go ahead and put all your eggs in one basket. -%% +% What the large print giveth, the small print taketh away. -%% +% What this country needs is a dime that will buy a good five-cent bagel. -%% +% What this country needs is a good 5 dollar plasma weapon. -%% +% What this country needs is a good five cent ANYTHING! -%% +% What this country needs is a good five-cent nickel. -%% +% What use is magic if it can't save a unicorn? -- Peter S. Beagle, "The Last Unicorn" -%% +% What with chromodynamics and electroweak too Our Standardized Model should please even you, Tho once you did say that of charm there was none It took courage to switch as to say Earth moves not Sun. Yet your state of the union penultimate large @@ -9013,217 +9013,217 @@ That you've built an incredible crystalline sphere Whose German attendants spread trembling and fear Of the death of our theory by Particle Zeta Which I'll bet is not there say your article, later. -- Sheldon Glashow, Physics Today, Dec. 1984 -%% +% Whatever became of Strange de Jim? Well, he found a substitute for cocaine: "You cover Q-tips with sandpaper and ram them up your nostrils as far as they will go. Then you sniff talcum powder while shredding hundred dollar bills." -- Herb Caen -%% +% Whatever became of eternal truth? -%% +% Whatever is not nailed down is mine. What I can pry loose is not nailed down. -- Collis P. Huntingdon -%% +% When God endowed human beings with brains, He did not intend to guarantee them. -%% +% When I said "we", officer, I was referring to myself, the four young ladies, and, of course, the goat. -%% +% When I was a boy I was told that anybody could become President. Now I'm beginning to believe it. -- Clarence Darrow -%% +% When I was in school, I cheated on my metaphysics exam: I looked into the soul of the boy sitting next to me. -- Woody Allen -%% +% When I was younger, I could remember anything, whether it had happened or not; but my faculties are decaying now and soon I shall be so I cannot remember any but the things that never happened. It is sad to go to pieces like this but we all have to do it. -- Mark Twain -%% +% When Marriage is Outlawed, Only Outlaws will have Inlaws. -%% +% When a Banker jumps out of a window, jump after him -- that's where the money is. -- Robespierre -%% +% When a fellow says, "It ain't the money but the principle of the thing," it's the money. -- Kim Hubbard -%% +% When a fly lands on the ceiling, does it do a half roll or a half loop? -%% +% When a place gets crowded enough to require ID's, social collapse is not far away. It is time to go elsewhere. The best thing about space travel is that it made it possible to go elsewhere. -- Robert Heinlein -%% +% When a shepherd goes to kill a wolf, and takes his dog along to see the sport, he should take care to avoid mistakes. The dog has certain relationships to the wolf the shepherd may have forgotten. -- Robert Pirsig, "Zen and the Art of Motorcycle Maintenance" -%% +% When all other means of communication fail, try words. -%% +% When does summertime come to Minnesota, you ask? Well, last year, I think it was a Tuesday. -%% +% When in doubt, do what the President does -- guess. -%% +% "When in doubt, tell the truth." -- Mark Twain -%% +% When in doubt, use brute force. -- Ken Thompson -%% +% When love is gone, there's always justice. And when justice is gone, there's always force. And when force is gone, there's always Mom. Hi, Mom! -- Laurie Anderson -%% +% When more and more people are thrown out of work, unemployment results. -- Calvin Coolidge -%% +% When someone says "I want a programming language in which I need only say what I wish done," give him a lollipop. -%% +% When the Ngdanga tribe of West Africa hold their moon love ceremonies, the men of the tribe bang their heads on sacred trees until they get a nose bleed, which usually cures them of ____that. -- Mike Harding, "The Armchair Anarchist's Almanac" -%% +% When the Universe was not so out of whack as it is today, and all the stars were lined up in their proper places, you could easily count them from left to right, or top to bottom, and the larger and bluer ones were set apart, and the smaller yellowing types pushed off to the corners as bodies of a lower grade ... -- Stanislaw Lem, "Cyberiad" -%% +% "When the going gets tough, the tough get empirical" -- Jon Carroll -%% +% When the government bureau's remedies do not match your problem, you modify the problem, not the remedy. -%% +% When two people are under the influence of the most violent, most insane, most delusive, and most transient of passions, they are required to swear that they will remain in that excited, abnormal, and exhausting condition continuously until death do them part. -- George Bernard Shaw -%% +% When we are planning for posterity, we ought to remember that virtue is not hereditary. -- Thomas Paine -%% +% "When you are in it up to your ears, keep your mouth shut." -%% +% When you do not know what you are doing, do it neatly. -%% +% "When you have to kill a man it costs nothing to be polite." -- Winston Curchill, On formal declarations of war -%% +% When you make your mark in the world, watch out for guys with erasers. -- The Wall Street Journal -%% +% When you're away, I'm restless, lonely, Wretched, bored, dejected; only Here's the rub, my darling dear I feel the same when you are near. -- Samuel Hoffenstein, "When You're Away" -%% +% When you're not looking at it, this fortune is written in FORTRAN. -%% +% Whenever I hear anyone arguing for slavery, I feel a strong impulse to see it tried on him personally. -- A. Lincoln -%% +% Whenever anyone says, "theoretically", they really mean, "not really". -- Dave Parnas -%% +% Whenever people agree with me I always feel I must be wrong. --Oscar Wilde -%% +% Whenever the literary German dives into a sentence, that is the last you are going to see of him until he emerges on the other side of his Atlantic with his verb in his mouth. -- Mark Twain "Connecticut Yankee in King Arthur's Court" -%% +% Whenever you find that you are on the side of the majority, it is time to reform. -- Mark Twain -%% +% Where humor is concerned there are no standards -- no one can say what is good or bad, although you can be sure that everyone will. -- John Kenneth Galbraith -%% +% Where there's a will, there's an Inheritance Tax. -%% +% Whether you can hear it or not The Universe is laughing behind your back -- National Lampoon, "Deteriorada" -%% +% While Europe's eye is fix'd on mighty things, The fate of empires and the fall of kings; While quacks of State must each produce his plan, And even children lisp the Rights of Man; Amid this mighty fuss just let me mention, The Rights of Woman merit some attention. -- Robert Burns, Address on "The Rights of Woman", November 26, 1792 -%% +% While anyone can admit to themselves they were wrong, the true test is admission to someone else. -%% +% While money can't buy happiness, it certainly lets you choose your own form of misery. -%% +% While money doesn't buy love, it puts you in a great bargaining position. -%% +% While most peoples' opinions change, the conviction of their correctness never does. -%% +% While you don't greatly need the outside world, it's still very reassuring to know that it's still there. -%% +% While your friend holds you affectionately by both your hands you are safe, for you can watch both of his. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Whistler's Law: You never know who is right, but you always know who is in charge. -%% +% "Who cares if it doesn't do anything? It was made with our new Triple-Iso-Bifurcated-Krypton-Gate-MOS process ..." -%% +% Who made the world I cannot tell; 'Tis made, and here am I in hell. My hand, though now my knuckles bleed, I never soiled with such a deed. -- A. E. Housman -%% +% Who needs friends when you can sit alone in your room and drink? -%% +% Whom computers would destroy, they must first drive mad. -%% +% Who's on first? -%% +% Why I Can't Go Out With You: I'd LOVE to, but ... -- I have to floss my cat. -- I've dedicated my life to linguini. @@ -9235,31 +9235,31 @@ -- I'm going down to the bakery to watch the buns rise. -- I have an appointment with a cuticle specialist. -- I have some really hard words to look up. -- I've got a Friends of the Lowly Rutabaga meeting. -- I promised to help a friend fold road maps. -%% +% "Why be a man when you can be a success?" -- Bertold Brecht -%% +% Why did the Lord give us so much quickness of movement unless it was to avoid responsibility with? -%% +% Why did the Roman Empire collapse? What is the Latin for office automation? -%% +% Why does man kill? He kills for food. And not only food: frequently there must be a beverage. -- Woody Allen, "Without Feathers" -%% +% "Why is it that we rejoice at a birth and grieve at a funeral? It is because we are not the person involved" -- Mark Twain -%% +% "Why isn't there a special name for the tops of your feet?" -- Lily Tomlin -%% +% Why not have an old-fashioned Christmas for your family this year? Just picture the scene in your living room on Christmas morning as your children open their old-fashioned presents. Your 11-year-old son: "What the heck is this?" @@ -9275,43 +9275,43 @@ You: "It's figgy pudding! What a treat!" Daughter: "It looks like goat barf." -- Dave Barry, "Simple, Homespun Gifts" -%% +% "Why was I born with such contemporaries?" -- Oscar Wilde -%% +% Wiker's Law: Government expands to absorb revenue and then some. -%% +% Williams and Holland's Law: If enough data is collected, anything may be proven by statistical methods. -%% +% Winter is the season in which people try to keep the house as warm as it was in the summer, when they complained about the heat. -%% +% Wit, n.: The salt with which the American Humorist spoils his cookery ... by leaving it out. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% With a rubber duck, one's never alone. -- "The Hitchhiker's Guide to the Galaxy" -%% +% With all the fancy scientists in the world, why can't they just once build a nuclear balm? -%% +% With every passing hour our solar system comes forty-three thousand miles closer to globular cluster M13 in the constellation Hercules, and still there are some misfits who continue to insist that there is no such thing as progress. -- Ransom K. Ferm -%% +% Without ice cream life and fame are meaningless. -%% +% Wood is highly ecological, since trees are a renewable resource. If you cut down a tree, another will grow in its place. And if you cut down the new tree, still another will grow. And if you cut down that tree, yet another will grow, only this one will be a mutation with long, poisonous tentacles and revenge in its heart, and it will sit @@ -9325,90 +9325,90 @@ heat!" The other cavemen, who did not understand English, immediately beat him to death with stones. But the key discovery had been made, and from that day forward, the cavemen had all the heat they needed, although their insurance rates went way up. -- Dave Barry, "Postpetroleum Guzzler" -%% +% Workers of the world, arise! You have nothing to lose but your chairs. -%% +% Worst Month of 1981 for Downhill Skiing: August. The lines are the shortest, though. -- Steve Rubenstein -%% +% Worst Month of the Year: February. February has only 28 days in it, which means that if you rent an apartment, you are paying for three full days you don't get. Try to avoid Februarys whenever possible. -- Steve Rubenstein -%% +% Worst Vegetable of the Year: The brussels sprout. This is also the worst vegetable of next year. -- Steve Rubenstein -%% +% "Would you tell me, please, which way I ought to go from here?" "That depends a good deal on where you want to get to," said the Cat -- Lewis Carrol -%% +% Write-Protect Tab, n.: A small sticker created to cover the unsightly notch carelessly left by disk manufacturers. The use of the tab creates an error message once in a while, but its aesthetic value far outweighs the momentary inconvenience. -- Robb Russon -%% +% Xerox does it again and again and again and ... -%% +% Xerox never comes up with anything original. -%% +% X-rated movies are all alike ... the only thing they leave to the imagination is the plot. -%% +% "Yacc" owes much to a most stimulating collection of users, who have goaded me beyond my inclination, and frequently beyond my ability in their endless search for "one more feature". Their irritating unwillingness to learn how to do things my way has usually led to my doing things their way; most of the time, they have been right. -- S. C. Johnson, "Yacc guide acknowledgements" -%% +% Year, n.: A period of three hundred and sixty-five disappointments. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Yes, but every time I try to see things your way, I get a headache. -%% +% Yes, but which self do you want to be? -%% +% Yesterday I was a dog. Today I'm a dog. Tomorrow I'll probably still be a dog. Sigh! There's so little hope for advancement. -- Snoopy -%% +% Yesterday upon the stair I met a man who wasn't there. He wasn't there again today -- I think he's from the CIA. -%% +% Yield to Temptation ... it may not pass your way again. -- Lazarus Long, "Time Enough for Love" -%% +% Yinkel, n.: A person who combs his hair over his bald spot, hoping no one will notice. -- Rich Hall, "Sniglets" -%% +% "You are old, Father William," the young man said, "All your papers these days look the same; Those William's would be better unread -- Do these facts never fill you with shame?" "In my youth," Father William replied to his son, "I wrote wonderful papers galore; But the great reputation I found that I'd won, Made it pointless to think any more." -%% +% "You are old, father William," the young man said, "And your hair has become very white; And yet you incessantly stand on your head -- Do you think, at your age, it is right?" @@ -9415,21 +9415,21 @@ "In my youth," father William replied to his son, "I feared it might injure the brain; But, now that I'm perfectly sure I have none, Why, I do it again and again." -- Lewis Carrol -%% +% "You are old," said the youth, "and I'm told by my peers That your lectures bore people to death. Yet you talk at one hundred conventions per year -- Don't you think that you should save your breath?" "I have answered three questions and that is enough," Said his father, "Don't give yourself airs! Do you think I can listen all day to such stuff? Be off, or I'll kick you downstairs!" -%% +% "You are old," said the youth, "and your jaws are too weak For anything tougher than suet; Yet you finished the goose, with the bones and the beak -- Pray, how did you manage to do it?" @@ -9436,21 +9436,21 @@ "In my youth," said his father, "I took to the law, And argued each case with my wife; And the muscular strength which it gave to my jaw, Has lasted the rest of my life." -- Lewis Carrol -%% +% "You are old," said the youth, "and your programs don't run, And there isn't one language you like; Yet of useful suggestions for help you have none -- Have you thought about taking a hike?" "Since I never write programs," his father replied, "Every language looks equally bad; Yet the people keep paying to read all my books And don't realize that they've been had." -%% +% "You are old," said the youth, "as I mentioned before, And have grown most uncommonly fat; Yet you turned a back-somersault in at the door -- Pray what is the reason of that?" @@ -9457,21 +9457,21 @@ "In my youth," said the sage, as he shook his grey locks, "I kept all my limbs very supple By the use of this ointment -- one shilling the box -- Allow me to sell you a couple?" -- Lewis Carrol -%% +% "You are old," said the youth, "as I mentioned before, And make errors few people could bear; You complain about everyone's English but yours -- Do you really think this is quite fair?" "I make lots of mistakes," Father William declared, "But my stature these days is so great That no critic can hurt me -- I've got them all scared, And to stop me it's now far too late." -%% +% "You are old," said the youth, "one would hardly suppose That your eye was as steady as ever; Yet you balanced an eel on the end of your nose -- What made you so awfully clever?" @@ -9478,16 +9478,16 @@ "I have answered three questions, and that is enough," Said his father. "Don't give yourself airs! Do you think I can listen all day to such stuff? Be off, or I'll kick you down stairs!" -- Lewis Carrol -%% +% You are only young once, but you can stay immature indefinitely. -%% +% You are wise, witty, and wonderful, but you spend too much time reading this sort of trash. -%% +% You can always tell the Christmas season is here when you start getting incredibly dense, tinfoil-and-ribbon- wrapped lumps in the mail. Fruitcakes make ideal gifts because the Postal Service has been unable to find a way to damage them. They last forever, largely because nobody ever eats them. In fact, many smart people save the fruitcakes @@ -9496,65 +9496,65 @@ The easiest way to make a fruitcake is to buy a darkish cake, then pound some old, hard fruit into it with a mallet. Be sure to wear safety glasses. -- Dave Barry, "Simple, Homespun Gifts" -%% +% You can create your own opportunities this week. Blackmail a senior executive. -%% +% You can get more of what you want with a kind word and a gun than you can with just a kind word. -- Bumper Sticker -%% +% You can make it illegal, but you can't make it unpopular. -%% +% You can measure a programmer's perspective by noting his attitude on the continuing viability of FORTRAN. -- Alan Perlis -%% +% You can take all the impact that science considerations have on funding decisions at NASA, put them in the navel of a flea, and have room left over for a caraway seed and Tony Calio's heart. -- F. Allen -%% +% You can tell how far we have to go, when FORTRAN is the language of supercomputers. -- Steven Feiner -%% +% You cannot achieve the impossible without attempting the absurd. -%% +% You cannot kill time without injuring eternity. -%% +% You cannot propel yourself forward by patting yourself on the back. -%% +% You can't carve your way to success without cutting remarks. -%% +% You can't judge a book by the way it wears its hair. -%% +% You can't start worrying about what's going to happen. You get spastic enough worrying about what's happening now. -- Lauren Bacall -%% +% "You can't teach people to be lazy - either they have it, or they don't." -- Dagwood Bumstead -%% +% You could get a new lease on life -- if only you didn't need the first and last month in advance. -%% +% You couldn't even prove the White House staff sane beyond a reasonable doubt. -- Ed Meese, on the Hinckley verdict -%% +% You don't have to think too hard when you talk to teachers. -- J. D. Salinger -%% +% You don't sew with a fork, so I see no reason to eat with knitting needles. -- Miss Piggy, on eating Chinese Food -%% +% You first have to decide whether to use the short or the long form. The short form is what the Internal Revenue Service calls "simplified", which means it is designed for people who need the help of a Sears tax-preparation expert to distinguish between their first and last names. Here's the complete text: @@ -9570,117 +9570,117 @@ The IRS wants you to use this form because it gets to keep most of your money. So unless you have pond silt for brains, you want the long form. -- Dave Barry, "Sweating Out Taxes" -%% +% You have the capacity to learn from mistakes. You'll learn a lot today. -%% +% You know you've been spending too much time on the computer when your friend misdates a check, and you suggest adding a "++" to fix it. -%% +% You may be recognized soon. Hide. -%% +% You may have heard that a dean is to faculty as a hydrant is to a dog. -- Alfred Kahn -%% +% You men out there probably think you already know how to dress for success. You know, for example, that you should not wear leisure suits or white plastic belts and shoes, unless you are going to a costume party disguised as a pig farmer vacationing at Disney World. -- Dave Barry, "How to Dress for Real Success" -%% +% You might have mail -%% +% "You must realize that the computer has it in for you. The irrefutable proof of this is that the computer always does what you tell it to do." -%% +% You need no longer worry about the future. This time tomorrow you'll be dead. -%% +% You never know how many friends you have until you rent a house on the beach. -%% +% You or I must yield up his life to Ahrimanes. I would rather it were you. I should have no hesitation in sacrificing my own life to spare yours, but we take stock next week, and it would not be fair on the company. -- J. Wellington Wells -%% +% You possess a mind not merely twisted, but actually sprained. -%% +% You should emulate your heros, but don't carry it too far. Especially if they are dead. -%% +% You should never wear your best trousers when you go out to fight for freedom and liberty. -- Henrik Ibsen -%% +% You should not use your fireplace, because scientists now believe that, contrary to popular opinion, fireplaces actually remove heat from houses. Really, that's what scientists believe. In fact many scientists actually use their fireplaces to cool their houses in the summer. If you visit a scientist's house on a sultry August day, you'll find a cheerful fire roaring on the hearth and the scientist sitting nearby, remarking on how cool he is and drinking heavily. -- Dave Barry, "Postpetroleum Guzzler" -%% +% You will be Told about it Tomorrow. Go Home and Prepare Thyself. -%% +% You will be a winner today. Pick a fight with a four-year-old. -%% +% You will be surprised by a loud noise. -%% +% You worry too much about your job. Stop it. You are not paid enough to worry. -%% +% "You'll never be the man your mother was!" -%% +% Your analyst has you mixed up with another patient. Don't believe a thing he tells you. -%% +% Your conscience never stops you from doing anything. It just stops you from enjoying it. -%% +% Your fault: core dumped -%% +% Your life would be very empty if you had nothing to regret. -%% +% Your lucky color has faded. -%% +% Your lucky number has been disconnected. -%% +% Your lucky number is 3552664958674928. Watch for it everywhere. -%% +% Your true value depends entirely on what you are compared with. -%% +% You're at the end of the road again. -%% +% You're being followed. Cut out the hanky-panky for a few days. -%% +% You're never too old to become younger. -- Mae West -%% +% You're not drunk if you can lie on the floor without holding on. -- Dean Martin -%% +% Youth is when you blame all your troubles on your parents; maturity is when you learn that everything is the fault of the younger generation. -%% +% You've been leading a dog's life. Stay off the furniture. -%% +% Zero Defects, n.: The result of shutting down a production line. -%% +% Zounds! I was never so bethumped with words since I first called my brother's father dad. -- William Shakespeare, "King John" -%% +% Zymurgy's Law of Volunteer Labor: People are always available for work in the past tense. -%% +% better !pout !cry better watchout lpr why santa claus town @@ -9695,22 +9695,22 @@ who | grep awake who | egrep 'bad|good' for (goodness sake) { be good } -%% +% /earth is 98% full ... please delete anyone you can. -%% +% f u cn rd ths, itn tyg h myxbl cd. -%% +% f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng. -%% +% pi seconds is a nanocentury. -- Tom Duff -%% +% we will invent new lullabies, new songs, new acts of love, we will cry over things we used to laugh & our new wisdom will bring tears to eyes of gentile creatures from other planets who were afraid of us till then & in the end a summer with wild winds & new friends will be. -%% +% Index: games/fortune/datfiles/fortunes-o.real ================================================================== --- games/fortune/datfiles/fortunes-o.real +++ games/fortune/datfiles/fortunes-o.real @@ -17,17 +17,17 @@ On a bad trip When the cops come When I lose my head I simply take more of my favorite drugs And then I'm not sad -- I'm dead! -%% +% NEW ADDITION TO THE LIBRARY: "Sally", the department's new inflatable doll, is available on a short-term removal basis only -- please sign her out and return her promptly to avoid extended waits. (We are still awaiting shipment of our "Big John" doll.) -%% +% ... But among the children of the Great Society there were those whose skins were black. And lo! Their portion was niggardly, and of the fatted calf they were sucking hind teat ... Now it came to pass that a prophet rose up amongst them, and they called him King. And he went unto Pharaoh and said, "Let my @@ -35,19 +35,19 @@ But Pharaoh answered: "In the fullness of time and with all deliberate speed shall this thing come to pass. When ye shall prove yourselves worthy, shall ye have your just portion -- yea, verily, like unto a snowball in Hell." -- "The Begatting of a President" -%% +% ... But the reward of a successful collaboration is a thing that cannot be produced by either of the parties working alone. It is akin to the benefits of sex with a partner, as opposed to masturbation. The latter is fun, but you show me anyone who has gotten a baby from playing with him or herself, and I'll show you an ugly baby, with just a whole bunch of knuckles. -- Harlan Ellison -%% +% ... So this is a very confusing situation, and what makes it even worse is, our standards keep changing. Take Playboy magazine. Back in the 1950s, when I started reading it strictly for the articles, Playboy was considered just about the raciest thing around, even though all it ever showed was women's breasts. Granted, any given one of @@ -54,14 +54,14 @@ these breasts would have provided adequate shelter for a family of four, but the overall effect was no more explicit than many publications we think nothing of today, such as Sports Illustrated's Annual Nipples Poking Through Swimsuits Issue. -- Dave Barry, "Pornography" -%% +% "Do you cheat on your wife?" asked the psychiatrist. "Who else?" answered the patient. -%% +% "God built a compelling sex drive into every creature, no matter what style of fucking it practiced. He made sex irresistibly pleasurable, wildly joyous, free from fears. He made it innocent merriment. "Needless to say, fucking was an immediate smash hit. Everyone @@ -69,11 +69,11 @@ lambs, rhinoceroses and gazelles, skylarks and lobsters, even insects, though most of them fuck only once in a lifetime -- fucked along innocently and merrily for hundreds of millions of years. Maybe they were dumb animals, but they knew a good thing when they had one." -- Alan Sherman, "The Rape of the A*P*E*" -%% +% Here is the problem: for many years, the Supreme Court wrestled with the issue of pornography, until finally Associate Justice John Paul Stevens came up with the famous quotation about how he couldn't define pornography, but he knew it when he saw it. So for a while, the court's policy was to have all the suspected pornography trucked to @@ -83,11 +83,11 @@ enormous mound of rubberized implements, and the court had to issue a ruling stating that it didn't know what the hell pornography was except that it was illegal and everybody should stop badgering the court about it because the court was going to take a nap. -- Dave Barry, "Pornography" -%% +% In the beginning was the DEMO Project. And the Project was without form. And darkness was upon the staff members thereof. So they spake unto their Division Head, saying, "It is a crock of shit, and it stinks." @@ -105,23 +105,23 @@ the Captain, saying, "The powerful new Project will help promote the growth of the Laboratories." And the Captain looked down upon the Project, and He saw that it was Good! -%% +% Overheard in a bar: Man: "Hey, Baby, I'd sure like to get in your pants!" Woman: "No, thanks, I've already got one ass-hole in there now." -%% +% The Gray-haired Woman's Complaint My back aches, my pussy is sore; I simply can't fuck any more; I'm covered with sweat, And you haven't come yet, And my God, it's a quarter to four! -%% +% The big problem with pornography is defining it You can't just say it's pictures of people naked. For example, you have these primitive African tribes that exist by chasing the wildebeest on foot, and they have to go around largely naked, because, as the old tribal saying goes: "N'wam k'honi soit qui mali," which means, "If you think @@ -135,18 +135,18 @@ article entitled "The Girls of the California Junior College System Hunt the Wildebeest Naked," some people would call it pornography. But others would not. And still others, such as the Spectacularly Rev. Jerry Falwell, would get upset about seeing the wildebeest naked. -- Dave Barry, "Pornography" -%% +% The defense attorney was hammering away at the plaintiff: "You claim," he jeered, "that my client came at you with a broken bottle in his hand. But is it not true, that you had something in YOUR hand?" "Yes," he admitted, "his wife. Very charming, of course, but not much good in a fight." -%% +% Them Toad Suckers How 'bout them toad suckers, ain't they clods? Sittin' there suckin' them green toady frogs! @@ -160,11 +160,11 @@ Stickin' them sucky toads in they mouth! How to be a toad sucker, no way to duck it, Get yourself a toad, rear back, and suck it! -- Mason Williams -%% +% Two little kids, aged six and eight, decide it's time to learn how to swear. So, the eight-year-old says to the six-year-old, "Okay, you say `ass' and I'll say `hell'". All excited about their plan, they troop downstairs, where their mother asks them what they'd like for breakfast. @@ -171,11 +171,11 @@ "Aw, hell," says the eight-year-old, "gimme some Cheerios." His mother backhands him off the stool, sending him bawling out of the room, and turns to the younger brother. "What'll you have?" "I dunno," quavers the six-year-old, "but you can bet your ass it ain't gonna be Cheerios." -%% +% Well, there was this tiger, who woke up one morning, and just felt great (yes, just like Tony the Tiger: GREAAAAAAT). Anyway, he just felt so good, he went out and cornered a small monkey and roared at him: "WHO IS THE MIGHTIEST OF ALL THE JUNGLE ANIMALS?" And this poor quaking little monkey replied: "You are of course, no one is @@ -190,24 +190,24 @@ him down; picks him up again, and shakes him until the tiger is just a blur of orange and black; and finally throws him violently into a nearby tree. The tiger staggers to his feet and looks at the elephant and says: "Man, just because you don't know the answer, you don't have to get so pissed." -%% +% "What the hell are you getting so upset about? I thought you didn't believe in God." "I don't," she sobbed, bursting violently into tears, "but the God I don't believe in is a good God, a just God, a merciful God. He's not the mean and stupid God you make Him out to be." -- Joseph Heller, "Catch-22" -%% +% When the surgeon came to see her on the morning after her operation, the young woman asked her somewhat hesitantly how long it would be before she could resume her sex life. "I really haven't thought about it," gulped the stunned surgeon. "You're the first patient who's asked me that after a tonsillectomy!" -%% +% The Split-Atom Blues Gimme Twinkies, gimme wine, Gimme jeans by Calvin Kline ... But if you split those atoms fine, @@ -216,133 +216,133 @@ Gimme zits, take my dough, Gimme arsenic in my jelly roll ... Call the devil and sell my soul, But Mama keep dem atoms whole! -- Milo Bloom, "Bloom County" -%% +% ... And then there's the guy who bought 20,000 bras, cut them in half, and sold 40,000 yamalchas with chin straps ... -%% +% ... the Father, the Son and the Holy Ghost would never throw the Devil out of Heaven as long as they still need him as a fourth for bridge. -- Letter in NEW LIBERTARIAN NOTES #19 -%% +% "A Mormon is a man that has the bad taste and the religion to do what a good many other people are restrained from doing by conscientious scruples and the police." -- Mr. Dooley -%% +% A Nixon [is preferable to] a Dean Rusk -- who will be passionately wrong with a high sense of consistency. -- J. K. Galbraith -%% +% A Puritan is someone who is deathly afraid that someone, somewhere, is having fun. -%% +% A bather whose clothing was strewed By breezes that left her quite nude, Saw a man come along And, unless I'm quite wrong, You expected this line to be lewd. -%% +% A beat schizophrenic said, "Me? I am not I, I'm a tree." But another, more sane, Shouted, "I'm a Great Dane!" And covered his pants leg with pee. -%% +% A conservative is a man who believes that nothing should be done for the first time. -- Alfred E. Wiggam -%% +% A conservative is a man with two perfectly good legs who has never learned to walk. -- Franklin D. Roosevelt -%% +% A friend with weed is a friend indeed. -%% +% A hard man is good to find. -%% +% A man needs a mistress, just to break the monogamy. -%% +% A mathematician named Hall Has a hexahedronical ball, And the cube of its weight Times his pecker's, plus eight Is his phone number -- give him a call.. -%% +% A non-vegetarian anti-abortionist is a contradiction in terms. --Phyllis Schlafly -%% +% A nymph hits you and steals your virginity. -%% +% A person who has both feet planted firmly in the air can be safely called a liberal. -%% +% A pretty young lady named Vogel Once sat herself down on a molehill. A curious mole Nosed into her hole -- Ms. Vogel's ok, but the mole's ill. -%% +% A pretty young maiden from France Decided she'd "just take a chance." She let herself go For an hour or so And now all her sisters are aunts. -%% +% A remarkable race are the Persians; They have such peculiar diversions. They make love the whole day In the usual way And save up the nights for perversions. -%% +% A team playing baseball in Dallas Called the umpire blind out of malice. While this worthy had fits The team made eight hits And a girl in the bleachers named Alice. -%% +% A wanton young lady from Wimley Reproached for not acting quite primly Said, "Heavens above! I know sex isn't love, But it's such an entrancing facsimile." -%% +% A widow who fancied a man some Was diddled three times in a hansome. When she clamored for more Her young man became sore And exclaimed "My name's Simpson not Samson." -%% +% "A woman is like a dresser ... some man always goin' through her drawers." --- Blind Lemon Pledge -%% +% A worried young man from Stamboul Founds lots of red spots on his tool. Said the doctor, a cynic, "Get out of my clinic; Just wipe off the lipstick, you fool!" -%% +% AI hackers do it with robots. -%% +% Achilles' Biological Findings: (1) If a child looks like his father, that's heredity. If he looks like a neighbor, that's environment. (2) A lot of time has been wasted arguing over what came first -- the chicken or the egg. It was undoubtedly the rooster. -%% +% Aide to Raygun: Sir, the poor are outside protesting your budget cuts. Raygun himself: Tell them they'll have to help themselves. Aide to Raygun: Sir, the Pentagon wants another $30 billion. Raygun himself: Tell them to help themselves. -%% +% All a hacker needs is a tight PUSHJ, a loose pair of UUOs, and a warm place to shift. -%% +% All things dull and ugly, All creatures short and squat, All things rude and nasty, The Lord God made the lot; Each little snake that poisons, Each little wasp that stings, He made their brutish venom, He made their horrid wings. All things sick and cancerous, All evil great and small, @@ -350,38 +350,38 @@ Each nasty little hornet, Each beastly little squid. Who made the spikey urchin? Who made the sharks? He did. All things scabbed and ulcerous, All pox both great and small. Putrid, foul and gangrenous, The Lord God made them all. -- Monty Python's Flying Circus -%% +% An Army travels on her stomach. -%% +% An architect fellow named Yoric Could, when feeling euphoric, Display for selection Three kinds of erection -- Corinthian, ionic, and doric. -%% +% An attorney was defending his client against a charge of first-degree murder. "Your Honor, my client is accused of stuff his lover's mutilated body into a suitcase and heading for the Mexican border. Just north of Tijuana a cop spotted her hand sticking out of the suitcase. Now, I would like to stress that my client is *___not* a murderer. A sloppy packer, maybe..." -%% +% "And Bezel saideth unto Sham: `Sham,' he saideth, `Thou shalt goest unto the town of Begorrah, and there thou shalt fetcheth unto thine bosom 35 talents, and also shalt thou fetcheth a like number of cubits, provideth that they are nice and fresh.'" -- Dave Barry, "Getting Religion" -%% +% Anxiety, n.: The first time you can't do it a second time. Panic, n.: The second time you can't do it the first time. -%% +% Back in the good ole days in Texas, when stagecoaches and the like was popular, there were three people in a stagecoach one day: a true red- blooded born-and-raised Texas gentleman, a tenderfoot city-slicker from back East, and a beautiful and well-endowed Texas lady. The city- slicker kept eyeing the lady, and finally he leaned forward and said, @@ -388,41 +388,41 @@ "Lady, I'll give you $10 for a blow job." The Texas gentleman looked appalled, pulled out his pistol, and killed the city-slicker on the spot. The lady gasped and said, "Thank you, suh, for defendin' mah honor!" Whereupon the Texan holstered his gun and said, "Your honor, hell!! No tenderfoot is gonna raise the price of women in Texas!!" -%% +% Baltimore, n.: Where the women wear turtleneck sweaters to hide their flea collars. -%% +% Bankers do it with interest (penalty for early withdrawal). -%% +% Behold the unborn fetus and Weep salt tears crocodilian; All life is sacred (save, of course, An enemy civilian). -%% +% Being stoned on marijuana isn't very different from being stoned on gin. -- Ralph Nader -%% +% Beneath this stone a virgin lies, For her life held no terrors. A virgin born, a virgin died: No hits, no runs, no errors. -%% +% Blessed are the meek for they shall inhibit the earth. -%% +% Build a better mousetrap, the saying goes -- and with the brassiere, Yankee Ingenuity did exactly that. But their true stroke of genius was the new bait. The old fashioned mousetrap was loaded with cheese; nobody cares much about cheese, except mice. But when American Know-How reloaded the brassiere with tits, every heterosexual male in the country was hopelessly trapped. -- Alan Sherman, "The Rape of the A*P*E*" -%% +% CLONE OF MY OWN (to Home on the Range) Oh, give me a clone Of my own flesh and bone With the Y chromosome changed to X. @@ -435,15 +435,15 @@ With the Y chromosome changed to X. And when we're alone, Since her mind is my own, She'll be thinking of nothing but sex. -- Randall Garrett -%% +% Captain Hook died of jock itch. -%% +% Chaste makes waste. -%% +% Chipmunks roasting on an open fire Jack Frost ripping up your nose Yuletide carolers being thrown in the fire And folks dressed up like buffaloes Everybody knows a turkey slaughtered in the snow @@ -456,17 +456,17 @@ To see if reindeer really scream when they die And so I'm offering this simple phrase To kids from one to ninety two Although it's been said many times, many ways Merry Christmas, Merry Christmas, Merry Christmas, Fuck you!! -%% +% Christian, n.: One who believes that the New Testament is a divinely inspired book admirably suited to the spiritual needs of his neighbor. One who follows the teachings of Christ in so far as they are not inconsistent with a life of sin. -%% +% Clarke's Third Law: Any sufficiently advanced technology is indistinguishable from magic. G's Third Law: @@ -473,52 +473,52 @@ In spite of all evidence to the contrary, the entire universe is composed of only two basic substances: magic and bullshit. H's Dictum: There is no magic ... -%% +% Cocaine is nature's way of telling you you have too much money. -%% +% Coito ergo sum -%% +% College is like a woman -- you work so hard to get in, and nine months later you wish you'd never come. -%% +% Communists do it without class. -%% +% Conservative, n.: One who admires radicals centuries after they're dead. -- Leo C. Rosten -%% +% Cunnilingus is next to godliness. -%% +% Dammit, how many times do I have to tell you? ____FIRST you rape, ____THEN you pillage!! -%% +% Dear Lord, observe this bended knee This visage meek and humble, And hear this confidential plea Voiced in reverent mumble: Give me Shylock, give me Fagin But O God spare me Ronald Reagan! -- Ansel Adams -%% +% Did you hear about the new German microwave oven? ... Seats 500. -%% +% Did you know that there are 71.9 acres of nipple tissue in the U.S.? -%% +% Do something big -- fuck a giant -%% +% Doctors take two aspirin and do it in the morning. -%% +% "Don't let your mouth write no check that your tail can't cash." -- Bo Diddley -%% +% Draft beer, not people -%% +% Eleven reasons a cucumber is better than a man: 1) Cucumbers can stay up all night, and you won't have to sleep in the wet spot. 2) Cucumbers don't play the guitar and try to find themselves. 3) You won't find out later that your cucumber @@ -531,38 +531,38 @@ 7) Cucumbers won't tell you size doesn't count. 8) A cucumber won't leave you for a cheerleader or an ex-nun. 9) Cucumbers don't fall asleep on your chest or drool on the pillow. 10) Cucumbers don't care if you make more money than they do. 11) With a cucumber, the toilet seat is always the way you left it. -%% +% Evangelists do it with Him watching. -%% +% Fie for shame, you lascivious, lewd, lecherous, libidinous, lustful, licentious, dirty bum!! -%% +% Floppy now, hard later. -%% +% Fornication, n.: Term used by people who don't have anybody to screw with. -%% +% George Washington not only chopped down his father's cherry tree, but he also admitted doing it. Now, do you know why his father didn't punish him? Because George still had the axe in his hand. -%% +% Getting an education at the University of California is like having $50.00 shoved up your ass, a nickel at a time. -%% +% God gives us relatives; thank goodness we can chose our friends. -%% +% God is an atheist. -%% +% God isn't dead -- he's been busted -%% +% God isn't dead, He's just trying to avoid the draft. -%% +% God must love assholes -- She made so many of them. -%% +% God wanted to have a holiday, so He asked St. Peter for suggestions on where to go. "Why not go to Jupiter?" asked St. Peter. "No, too much gravity, too much stomping around," said God. "Well, how about Mercury?" @@ -569,151 +569,151 @@ "No, it's too hot there." "Okay," said St. Peter, "What about Earth?" "No," said God, "They're such horrible gossips. When I was there 2000 years ago, I had an affair with a Jewish woman, and they're still talking about it." -%% +% Good day for water sports. Take a bath with a friend. -%% +% Grain grows best in shit -- Ursula K. LeGuin -%% +% Great Lover, n.: A man who can breathe through his ears. -%% +% Hackers do it with all sorts of characters. -%% +% Hackers do it with bugs. -%% +% Hackers do it with fewer instructions. -%% +% Hackers know all the right MOVs. -%% +% Haggis, n.: Haggis is a kind of stuff black pudding eaten by the Scots and considered by them to be not only a delicacy but fit for human consumption. The minced heart, liver and lungs of a sheep, calf or other animal's inner organs are mixed with oatmeal, sealed and boiled in maw in the sheep's intestinal stomach-bag and ... Excuse me a minute ... -%% +% Hardly a pure science, history is closer to animal husbandry than it is to mathematics, in that it involves selective breeding. The principal difference between the husbandryman and the historian is that the former breeds sheep or cows or such, and the latter breeds (assumed) facts. The husbandryman uses his skills to enrich the future; the historian uses his to enrich the past. Both are usually up to their ankles in bullshit. -- Tom Robbins -%% +% Having discovered the possibility that other creatures could be used for sexual intercourse, early man was likely to have made many such attempts ... though it is doubtful that he was so sexually carnivorous as the Christian and Jewish Adam, who, rabbinical interpreters of the Old Testament tell us, had intercourse with every creature before God finally hit upon the idea of woman and created Eve. -- R. E. Masters -%% +% He hated to mend, so young Ned Called in a cute neighbor instead. Her husband said, "Vi, When you stitched up his torn fly, Did you have to bite off the thread?" -%% +% He wasn't much of an actor, he wasn't much of a Governor -- Hell, they _H_A_D to make him President of the United States. It's the only job he's qualified for! -- Michael Cain -%% +% He who findeth sensuous pleasures in the bodies of lush, hot, pink damsels is not righteous, but he can have a lot more fun. -%% +% He who sneezes without a handkerchief takes matters into his own hands. -%% +% Her kisses left something to be desired -- the rest of her. -%% +% History has the relation to truth that theology has to religion -- i.e., none to speak of. -- Lazarus Long -%% +% "How do you like the new America? We've cut the fat out of the government, and more recently the heart and brain (the backbone was gone some time ago). All we seem to have left now is muscle. We'll be lucky to escape with our skins!" -%% +% Howard Cosell's biggest protrusion is his asshole -- John Valby -%% +% Hugh Hefner is a virgin. -%% +% I believe that Ronald Reagan will someday make this country what it once was ... an arctic wilderness -- Steve Martin -%% +% I came; I saw; I fucked up -%% +% I have a funny daddy Who goes in and out with me And everything that baby does Daddy's sure to see, And everything that baby says, My daddy's sure to tell. You _m_u_s_t have read my daddy's verse. I hope he fries in Hell. -- Ogden Nash -%% +% I love this fucking University, and this University loves fucking me. -%% +% I once met a lassie named Ruth In a long distance telephone booth. Now I know the perfection Of an ideal connection Even if somewhat uncouth. -%% +% "I own my own body, but I share" -%% +% I realize that today you have a number of top female athletes such as Martina Navratilova who can run like deer and bench-press Chevrolet trucks. But to be brutally frank, women as a group have a long way to go before they reach the level of intensity and dedication to sports that enables men to be such incredible jerks about it. -- Dave Barry, "Sports is a Drag" -%% +% I regret to say that we of the F.B.I. are powerless to act in cases of oral-genital intimacy, unless it has in some way obstructed interstate commerce. -- J. Edgar Hoover -%% +% I think every good Christian ought to kick Falwell right in the ass. -- Barry Goldwater -%% +% I think pop music has done more for oral intercourse than anything else that has ever happened, and vice versa. -- Frank Zappa -%% +% I wouldn't mind dying -- it's that business of having to stay dead that scares the shit out of me. -- R. Geis -%% +% I'd like to meet the man who invented sex and see what he's working on now. -%% +% If Helen Keller is alone in a forest and falls, does she make a sound? -%% +% If Reagan is the answer, it must have been a VERY silly question. -%% +% If guns are outlawed, how will we shoot the liberals? -%% +% If men could get pregnant, abortion would be a sacrament. -%% +% If someone were to ask me for a short cut to sensuality, I would suggest he go shopping for a used 427 Shelby-Cobra. But it is only fair to warn you that of the 300 guys who switched to them in 1966, only two went back to women. -- Mort Sahl -%% +% If you can believe ten impossible things before breakfast, then you should join THE CHURCH OF COUNTERFACTUAL BELIEF @@ -733,121 +733,121 @@ Several other important counterfactual beliefs are presently being studied, including Reaganomics, A.I., and that the moon landings were done in a Hollywood special effects studio. These will be the subject of a forthcoming Papal Bull ... -%% +% If you meet somebody who tells you that he loves you more than anybody in the whole wide world, don't trust him. It means he experiments. -%% +% If you think sex is a pain in the ass, try different position. -%% +% "If you're a real good kid, I'll give you a piggy-back ride on a buzz-saw." -- W. C. Fields -%% +% Ignorance is the Mother of Devotion. -- Robert Burton -%% +% I'm going to Iowa for an award. Then I'm appearing at Carnegie Hall, it's sold out. Then I'm sailing to France to be honored by the French government -- I'd give it all up for one erection. -- Groucho Marx -%% +% In the Garden of Eden sat Adam, Massaging the bust of his madam, He chuckled with mirth, For he knew that on earth, There were only two boobs and he had 'em. -%% +% Incest, n.: Sibling revelry. -%% +% It is a sad commentary on today's society that this fortune has to be classified as "offensive" simply because it contains the word "fuck". -%% +% "I've had one child. My husband wants to have another. I'd like to watch him have another." -%% +% Jesus died for your sins. Make it worth his time. -%% +% Jesus was killed by a Moral Majority. -%% +% John Birch Society -- that pathetic manifestation of organized apoplexy. -- Edward P. Morgan -%% +% Kasha, n.: Kasha is always defined as "buckwheat groats". There's only one problem with this definition: what the fuck are "buckwheat groats"? _I know what they are -- they're kasha. But that doesn't help ___you much. -- Arthur Naiman, "Every Goy's Guide to Yiddish" -%% +% Kill a commie for Christ! -%% +% Laissez Faire Economics is the theory that if each acts like a vulture, all will end as doves. -%% +% Large cats can be dangerous, but a little pussy never hurt anyone. -%% +% Life is like a penis: when it's soft you can't beat it, and when it's hard you get fucked. -%% +% Lisp hackers have to be bound (to-do 'it) ... -%% +% Living in Hollywood is like living in a bowl of granola. What ain't fruits and nuts is flakes. -%% +% Mathematicians do it in theory. -%% +% Mathematicians take it to the limit. -%% +% Missionary Position: The missionary on top. -%% +% Most legislators are so dumb that they couldn't pour piss out of a boot if the instructions were printed on the heel. -%% +% Motto of the Electrical Engineer: Working computer hardware is a lot like an erect penis: it stays up as long as you don't fuck with it. -%% +% My brother-in-law has found a way to make ends meet. He goes around with his head stuck up his ass. -%% +% Nancy Reagan wants divorce old Ron ... seems he's making it hard for everyone but her. -%% +% Nothing is better than Sex. Masturbation is better than nothing. Therefore, Masturbation is better than Sex. -%% +% O'Riordan's Theorem: Brains x Beauty = Constant. Purmal's Corollary: As the limit of (Brains x Beauty) goes to infinity, availability goes to zero. -%% +% Occident, n.: The part of the world lying west (or east) of the Orient. It is largely inhabited by Christians, powerful sub-tribe of the Hypocrites, whose principal industries are murder and cheating, which they are pleased to call "war" and "commerce." These, also, are the principal industries of the Orient. -- Ambrose Bierce, "The Devil's Dictionary" -%% +% Ocean, n.: A body of water occupying about two-thirds of a world made for man -- who has no gills. -%% +% Once a young gay from Khartoum Took a lesbian up to his room. They argued all night Over who had the right To do what, and with which, and to whom. -%% +% Once upon a time, there was a non-conforming sparrow who decided not to fly south for the winter. However, soon after the weather turned cold, the sparrow changed his mind and reluctantly started to fly south. After a short time, ice began to form his on his wings and he fell to earth in a barnyard almost frozen. A cow passed by and crapped on this @@ -860,11 +860,11 @@ There are three morals to this story: 1) Everyone who shits on you is not necessarily your enemy. 2) Everyone who gets you out of shit is not necessarily your friend. 3) If you are warm and happy in a pile of shit, keep your mouth shut. -%% +% One day President Reagan, Chairman Andropov, the Pope, and a boy scout were flying together in an airplane. Right out in the middle of nowhere the plane developed engine trouble and started to go down. Unfortunately, only three parachutes could be found for the four passengers! Andropov grabbed one of the parachutes and declared @@ -876,15 +876,15 @@ there is only one parachute left for the two remaining passengers. The Pope looked kindly upon the boy scout and said "I have had a long and productive life, my son. You take the parachute and leave me in God's hands." "That's very kind of you," the observant scout replied, "but there is no need. Reagan just jumped out with my knapsack." -%% +% Opinions are like assholes -- everyone's got one, but nobody wants to look at the other guy's. -- Hal Hickman -%% +% Our team usually puts the other woman at second base, where the maximum possible number of males can get there on short notice to help out in case of emergency. As far as I can tell, our second basewoman is a pretty good baseball player, better than I am, anyway, but there's no way to know for sure because if the ball gets anywhere near her, a male @@ -893,83 +893,83 @@ her. They know, deep in their souls, that if she had to choose between catching a fly ball and saving an infant's life, she probably would elect to save the infant's life, without ever considering whether there were men on base. -- Dave Barry, "Sports is a Drag" -%% +% Physicists do it with charm -%% +% Politicians do it to everyone. -%% +% Posterity will ne'er survey A nobler grave than this; Here lie the bones of Castlereagh; Stop, traveler, and piss. -- Lord Byron, on Lord Castlereagh -%% +% Procrastinators do it tomorrow. -%% +% Prostitution is the only business where you can go into the hole and still come out ahead. -%% +% Q: How do you play religious roulette? A: You stand around in a circle and blaspheme and see who gets struck by lightning first. -%% +% Q: How do you tell if an Elephant has been making love in your backyard? A: If all your trashcan liners are missing ... -%% +% Q: How do you tell if you're making love to a nurse, a schoolteacher, or an airline stewardess? A: A nurse says: "This won't hurt a bit." A schoolteacher says: "We're going to have to do this over and over again until we get it right." An airline stewardess says: "Just hold this over your mouth and nose, and breath normally." -%% +% Q: How many right-to-lifers does it take to change a light bulb? A: Two. One to screw it in and one to say that light started when the screwing began. -%% +% Q: How many supply-siders does it take to change a light bulb? A: None. The darkness will cause the light bulb to change by itself. -%% +% Q: If Tarzan was Jewish, and Jane was a princess, what would Cheetah be? A: A fur coat. -%% +% Q: What do you do with an elephant with three balls? A: Walk him and pitch to the rhino. -%% +% Q: What is "SMOORPLAY"? A: It's what SMURFS do before they SMUCK, of course! -%% +% Q: What's Jewish foreplay? A: Two hours of begging. -%% +% Q: Where can you buy black lace crotchless panties for sheep? A: Fredricks of Ithaca, New York. -%% +% Q: Where does virgin wool come from? A: Ugly sheep. -%% +% Randel, n.: A nonsensical poem recited by Irish schoolboys as an apology for farting at a friend. -- Mrs. Byrne's Dictionary of Unusual, Obscure & Preposterous Words -%% +% Reagan can't _a_c_t either -%% +% Remember when you were a kid and the boys didn't like the girls? Only sissies liked girls? What I'm trying to tell you is that nothing's changed. You think boys grow out of not liking girls, but we don't grow out of it. We just grow horny. That's the problem. We mix up liking pussy for liking girls. Believe me, one couldn't have less to do with the other. -- Jules Feiffer -%% +% Republicans raise dahlias, Dalmatians and eyebrows. Democrats raise Airedales, kids and taxes. Democrats eat the fish they catch. Republicans hang them on the wall. @@ -984,13 +984,13 @@ The remainder is thrown out. Republicans sleep in twin beds -- some even in separate rooms. That is why there are more Democrats. -- The Official Rules, as compiled by Paul Dickson -%% +% Ronald Reagan -- America's favorite placebo -%% +% Said Einstein, "I have an equation Which to some may seem rabelaisian: Let _V be virginity Approaching infinity; Let _P be a constant persuasion; @@ -998,267 +998,267 @@ "Let _V over _P be inverted With the square root of _M_u inserted _N times into _V ... The result, Q.E.D., Is a relative!" Einstein asserted. -%% +% Said a horny young girl from Milpitas, "My favorite sport is coitus." But a fullback from State Made her period late, And now she has athlete's fetus -%% +% Said a swinging young chick named Lyth Whose virtue was largely a myth, "Try as hard as I can, I can't find a man That it's fun to be virtuous with." -%% +% Save Soviet Jewry -- Win Valuable Prizes!!!! -%% +% Sex is like a bridge game -- If you have a good hand no partner is needed. -%% +% Sex is the poor man's opera. -- G. B. Shaw -%% +% She asked me if I loved her still. "Yes," I replied. "I've never had you any other way." -%% +% She hates testicles, thus limiting the men she can admire to Democratic candidates for president. -- John Greenway, "The American Tradition", on feminist Elizabeth Gould Davis -%% +% Statisticians do it with 95% confidence. -%% +% Statisticians probably do it. -%% +% Subpoena,n .: From the root "sub", below, and the Latin "poena" for male organ or penis. Therefore, "below the penis" or "by the balls." -%% +% Support the right of unborn males to bear arms! -- A public service announcement from Phyllis Schlafly, the Catholic Church, and the National Rifle Association -%% +% Sure, Reagan has promised to take senility tests. But what if he forgets? -%% +% Sure eating yogurt will improve your sex life. People know that if you'll eat that stuff, you'll eat anything. -%% +% The United States Army; 194 years of proud service, unhampered by progress. -%% +% The computer is the ultimate polluter: its shit is indistinguishable from the food it produces. -%% +% The difference between this school and a cactus plant is that the cactus has the pricks on the outside. -%% +% The other night I was having sex, but the girl hung up on me. -%% +% The problem with being best man at a wedding is that you never get a chance to prove it. -%% +% The real problem with fucking a sheep is that you have to walk around in front every time you want to kiss her. -%% +% The sergeant walked into the shower and caught me giving myself a dishonorable discharge. Without missing a beat, I said, "It's my dick and I can wash it as fast as I want!" -%% +% "The voters have spoken, the bastards ..." -%% +% "The whole world is about three drinks behind." -- Humphrey Bogart -%% +% The word "spine" is, of course, an anagram of "penis". This is true in almost fifty percent of the languages of the Galaxy, and many people have attempted to explain why. Usually these explanations get bogged down in silly puns about "standing erect". -- Donald Adams, "The Hitchhiker's Guide to the Galaxy" -%% +% The world is an 8000 mile in diameter spherical pile of shit. -%% +% There are two sides to every divorce: yours and the shithead's. -%% +% There once was a Scot named McAmeter With a tool of prodigious diameter. It was not the size That cause such surprise; 'Twas his rhythm -- iambic pentameter. -%% +% There once was a couple named Kelley, Who lived their life belly to belly. Because in their haste They used Library Paste, Instead of Petroleum Jelly. -%% +% There once was a freshman named Lin, Whose tool was as thin as a pin, A virgin named Joan From a bible belt home, Said "This won't be much of a sin." -%% +% There once was a hacker named Ken Who inherited truckloads of Yen So he built him some chicks Of silicon chips And hasn't been heard from since then. -%% +% There once was a lady from Exeter, So pretty that men craned their necks at her. One was even so brave As to take out and wave The distinguishing mark of his sex at her. -%% +% There once was a plumber from Leigh, Who was plumbing his maid by the sea, Said she, "Please stop plumbing, I think someone's coming!" Said he, "Yes I know love, it's me." -%% +% There once was a queen of Bulgaria Whose bush had grown hairier and hairier, Till a prince from Peru Who came up for a screw Had to hunt for her cunt with a terrier. -%% +% There once was a young man named Gene Who invented a screwing machine Concave and convex It served either sex And it played with itself in between. -%% +% There was a bluestocking in Florence Wrote anti-sex pamphlets in torrents, Till a Spanish grandee, Got her off with his knee, And she burned all her works with abhorrence. -%% +% There was a gay countess of Bray, And you may think it odd when I say, That in spite of high station, Rank and education, She always spelled cunt with a "k". -%% +% There was a young fellow named Bliss Whose sex life was strangely amiss, For even with Venus His recalcitrant penis Would never do better than t h i s . -%% +% There was a young girl from Hong Kong Whose cervical cap was a gong. She said with a yell, As a shot rang her bell, "I'll give you a ding for a dong!" -%% +% There was a young girl named Sapphire Who succumbed to her lover's desire. She said, "It's a sin, But now that it's in, Could you shove it a few inches higher?" -%% +% There was a young girl of Angina Who stretched catgut across her vagina. From the love-making frock (With the proper sized cock) Came Toccata and Fugue in D minor. -%% +% There was a young girl of Darjeeling Who could dance with such exquisite feeling There was never a sound For miles around Save of fly-buttons hitting the ceiling. -%% +% There was a young lad name of Durcan Who was always jerkin' his gherkin. His father said, "Durcan! Stop jerkin' your gherkin! Your gherkin's for ferkin', not jerkin'. -%% +% There was a young lady from Maine Who claimed she had men on her brain. But you knew from the view, As her abdomen grew, It was not on her brain that he'd lain. -%% +% There was a young lady named Clair Who possessed a magnificent pair; At least so I thought Till I saw one get caught On a thorn, and begin losing air. -%% +% There was a young lady named Hall, Wore a newspaper dress to a ball. The dress caught on fire And burned her entire Front page, sporting section, and all. -%% +% There was a young lady named Twiss Who said she thought fucking a bliss, For it tickled her bum And caused her to come .siht ekil gniyl ylbatrofmoc elihW -%% +% There was a young lady of Norway Who hung by her toes in a doorway. She said to her beau "Just look at me Joe I think I've discovered one more way." -%% +% There was a young man from Bel-Aire Who was screwing his girl on the stair, But the banister broke So he doubled his stroke And finished her off in mid-air. -%% +% There was a young man named Crockett Whose balls got caught in a socket. His wife was a bitch, And she threw the switch, As Crockett went off like a rocket. -%% +% There was a young man of Cape Horn Who wished he had never been born, And he wouldn't have been If his father had seen That the end of the rubber was torn. -%% +% There was a young man of St. John's Who wanted to bugger the swans. But the loyal hall porter Said, "Pray take my daughter! Those birds are reserved for the dons." -%% +% There was a young whore from kaloo Who filled her vagina with glue. She said with a grin, "If they pay to get in, They can pay to get out again too!" -%% +% There was an old man of the port Whose prick was remarkably short. When he got into bed, The old woman said, "This isn't a prick; it's a wart!" -%% +% There was an old pirate named Bates Who was learning to rhumba on skates. He fell on his cutlass Which rendered him nutless And practically useless on dates. -%% +% There were the Scots Who kept the Sabbath And everything else they could lay their hands on. Then there were the Welsh Who prayed on their knees and their neighbors. @@ -1266,27 +1266,27 @@ Who never knew what they wanted But were willing to fight for it anyway. Lastly there were the English Who considered themselves a self-made nation Thus relieving the Almighty of a dreadful responsibility. -%% +% There's more than one way to skin a cat: Way number 15 -- Krazy Glue and a toothbrush. -%% +% There's more than one way to skin a cat: Way number 27 -- Use an electric sander. -%% +% There's more than one way to skin a cat: Way number 32 -- Wrap it around a lonely frat man's pecker. -%% +% There's nothing better than good sex. But bad sex? A peanut butter and jelly sandwich is better than bad sex. -- Billy Joel -%% +% There's nothing wrong with America that a good erection wouldn't cure. -- David Mairowitz -%% +% They [District Attorneys] learn in District Attorney School that there are two sure-fire ways to get a lot of favorable publicity: (1) Go down and raid all the lockers in the local high school and confiscate 53 marijuana cigarettes and put them in a pile and hold @@ -1303,25 +1303,25 @@ where actors engage in sexual activities with live snakes and a fire extinguisher. He is going to convict the bookstore owner, and vote for the death penalty just to make sure nobody gets the wrong impression. -- Dave Barry, "Pornography" -%% +% This is National Smokers-Are-Shits Week. -%% +% This is a test of the emergency cunnilingus system. If this had been an actual emergency, you would have known it! -%% +% This limerick is **SO**FILTHY** that it would offend you. So I'll put "di-dah" for the filthy words: Di-dah, di-dah, di-dah di-dah, Di-dah di-dah di-dah, di-dah; di-dah di-dah di-dah? Di-dah di-dah di-dah. Di-dah di-dah, di-dah di-fuck. -%% +% This test has been designed to evaluate reactions of management personal to various situations. You are making a sales presentation to a group of corporate executives in the plushest office you've ever seen. The enchillada casserole and @@ -1332,19 +1332,19 @@ YOU SHOULD: (A) Offer to come back next week when the smell has gone away. (B) Point to the Chief Executive and accuse him of the offense. (C) Challenge anyone in the room to do better. -%% +% Thou shalt not omit adultery. -%% +% To a Real Woman, every ejaculation is premature. -%% +% "Tom Hayden is the kind of politician who gives opportunism a bad name." -- Gore Vidal -%% +% 'Twas orgy, and the hip and mod And as in raffish thought he sprawled, Did groove and trip out at the pad: The Radcliffe girl, no idle flirt, All whimsy were the slamming chicks, Crept past the hippies getting balled And the Radcliffe undergrad. And doffed her miniskirt. @@ -1361,72 +1361,72 @@ And paused to smoke some pot. 'Twas orgy, and the hip and mod Did groove and trip out at the pad: All whimsy were the slamming chicks, And the Radcliffe undergrad. -%% +% "Under capitalism, man exploits man. Under Communism, it's just the opposite." -- John Kenneth Galbraith -%% +% Vidi, vici, veni. (I saw, I conquered, I came.) -%% +% Virgin, n.: An ugly third grader. -%% +% War is menstruation envy. -%% +% We call our dog Egypt, because in every room he leaves a pyramid. -%% +% "We don't have to protect the environment -- the Second Coming is at hand." -- James Watt -%% +% Well, see, Joyce, there we were, trapped in the elevator. Now, I had my tennis racquet and the goldfish; she was holding the Crisco. Surely you can imagine how one thing naturally led to another! -%% +% What can you use used tampons for? Tea bags for vampires. -%% +% When God created man, She was only testing. -%% +% "When I grow up, I want to be an honest lawyer so things like that can't happen." -- Richard Nixon as a boy (on the Teapot Dome scandal) -%% +% When it all boils down to the essence of truth one must live by a dog's rule of life: if you can't eat it or fuck it, piss on it! -%% +% While I, with my usual enthusiasm, Was exploring in Ermintrude's busiasm, She explained, "They are flat, But think nothing of that -- You will find that my sweet sister Susiasm." -%% +% "White House carpenters have reworked the master bedroom, remodeling it so that Ronnie can sleep with his head in the hall. That way, by the time he wakes up, somebody will have already shined his hair." -%% +% Why is it that there are so many more horses' asses than there are horses? -- G. Gordon Liddy -%% +% Why marry a virgin? If she wasn't good enough for the rest of them then she isn't good enough for you. -%% +% Women Unite! Make *___him* sleep in the wet spot tonight! -%% +% Women who want to be equal to men lack imagination -- Graffito in a women's restroom -%% +% Womens Libbers are OK. I just wouldn't want my sister to marry one. -%% +% "Yes, that was Richard Nixon. He used to be President. When he left the White House, the Secret Service would count the silverware." -- Woody Allen, "Sleeper" -%% +% You are at a business lunch when you are suddenly overcome with an uncontrollable desire to pick your nose. Since this is definitely a no-no, you: (a) Pretend to wave to someone across the room and with one fluid @@ -1436,11 +1436,11 @@ (b) Get everyone drunk and organize a nose picking contest with a prize to the one who makes his nose bleed first. (c) Drop your napkin on the floor and when you bend over to pick it up, blow your nose on your sock. -%% +% You are making a presentation to a group of corporate executives in the plushest board room you have ever seen. The hot enchillada casserole and egg salad sandwich you had for lunch react, creating a severe pressure. Your sphincter loses its control and you break wind in a most convincing manner causing 3 water tumblers to shatter and a @@ -1449,21 +1449,21 @@ (a) Offer to come back next week when the smell has gone away. (b) Point out the Marketing Manager and accuse him of the act. (c) Challenge anyone in the room to do better. -%% +% You better believe that marijuana can cause castration. Just suppose your girlfriend gets the munchies! -%% +% You can pick your friends, and you can pick your nose, but you can't pick your friend's nose. -%% +% You come out of a woman and you spend the rest of your life trying to get back inside. -- Heathcote Williams -%% +% You have just returned from a trip to Green Bay, Wisconsin in January and tell your boss that nobody but whores and football players live there. He mentions that his wife is from Green Bay. You: (a) Pretend you are suffering from amnesia and don't remember your @@ -1470,11 +1470,11 @@ name. (b) Ask what position she played. (c) Ask if she is still working the streets. -%% +% You have prepared a proposal for your supervisor. The success of this proposal will mean increasing your salary 20%. In the middle of your proposal your supervisor leans over to look at your report and spits into your coffee. You: @@ -1482,6 +1482,6 @@ (b) Ask him if he has any communicable diseases. (c) Show him who's in command; promptly take a leak in his "In" basket. -%% +% ADDED games/fortune/datfiles/fortunes-o.sp.ok Index: games/fortune/datfiles/fortunes-o.sp.ok ================================================================== --- games/fortune/datfiles/fortunes-o.sp.ok +++ games/fortune/datfiles/fortunes-o.sp.ok @@ -0,0 +1,238 @@ +A.I +AI +Aire +amnesia +Andropov +Angina +Ansel +apoplexy +asshole +assholes +Aw +basewoman +Begorrah +bible +Bierce +Bo +Bogart +boobs +bras +brutish +buffaloes +bullshit +busiasm +Byrn +Callay +Calooh +carnivorous +Castlereagh +castration +catgut +cervical +Cheerios +chromosome +Clair +Coito +coitus +commie +containeth +Cosell's +COUNTERFACTUAL +Counterfactual +counterfactual +countess +Crisco +cubits +Cunnilingus +cunnilingus +cunt +dah +Dalmatians +Dammit +Darjeeling +deb +defendin +dem +DEMO +Di +di +Diddley +dong +doric +dunno +Durcan +ekil +elihW +enchillada +ergo +Ermintrude's +excrement +eyeing +F.B.I +Fagin +Faire +Falwell +farting +Feiffer +ferkin +fetcheth +Fie +findeth +flunkers +Fornication +frat +freakout +Fredricks +Fuck +fuck +fucked +fucking +Galbraith +galumphing +gangrenous +Geis +genital +Gimme +gimme +girlfriend +gniyl +goin +gonna +Goy's +Graffito +grandee +GREAAAAAAT +Greenway +Groucho +Haggis +hansome +Heathcote +Hefner +hexahedronical +Hitchhiker's +husbandryman +i.e +iht +intestinal +jeered +jerkin +Jewry +k'honi +kaloo +Kasha +kasha +Krazy +lassie +leapy +lecherous +LeGuin +lesbian +Libbers +Liddy +limerick +Lyth +mah +maidenhead +Mairowitz +mali +Mama +Martina +Masturbation +masturbation +McAmeter +Methadone +methedrine +Milo +Milpitas +miniskirt +mod +mousetrap +MOVs +munchies +N'wam +Nader +Naiman +Navratilova +ne'er +Nope +O'Riordan's +ok +ole +penis +pentameter +peyote +poena +pox +provideth +Purmal's +PUSHJ +Putrid +Q.E.D +qui +rabbinical +rabelaisian +racquet +Radcliff +Randel +Raygun +Reaganomics +rhumba +Rosten +Sahl +saideth +Schlafly +shalt +shit +shithead's +Shits +shits +sissies +Sittin +sleaze +SMOORPLAY +SMUCK +SMURFS +soit +spake +sphincter +spikey +Stamboul +Stickin +strewed +Subpoena,n +Suckin +suckin +sucky +suh +Susiasm +Tijuana +Tocata +tonsillectomy +trashcan +truckloads +Twas +Twinkies +Twiss +U.S +UFOs +ulcerous +UUOs +Valby +veni +vici +Vidal +Vidi +Wellesleysnatch +What'll +whimsy +Wiggam +Wildebeest +wildebeest +Wimley +yamalchas +ylbatrofmoc +yogurt +Yoric +Yuletide +Zappa +zits ADDED games/fortune/datfiles/fortunes.sp.ok Index: games/fortune/datfiles/fortunes.sp.ok ================================================================== --- games/fortune/datfiles/fortunes.sp.ok +++ games/fortune/datfiles/fortunes.sp.ok @@ -0,0 +1,1175 @@ +A.A.A.A.A +A.D +A.M +a.m +AAAAAAAAAaaaaaaaaaaaaaaaccccccccckkkkkk +aafte +Abbie +absorbin +absurdum +acacia +accursed +ACLU's +acne +Adamite +adj +Adlai +adv +Aelius +Aesop +Ahrimanes +Albran +Aldous +alimentary +alkafluence +alleygaroo +Alo +alrighty +Altito +ALU +Amerigo +Amica +Amnesia +Amp +anal +Anamalon +Anat +Anatol +animalculous +Ankh +Anoint +anomali +Antonym +anxivs +Anytime +apauling +Apocryphia +appelations +Applebome +Apr +Aquadextrous +Aquarians +arabic +Ardis +arias +Arlo +arse +ary +Ashleigh +Asimov +Aspasia +Aspin +Assateague +Assoc +Asterix +astrology +ath +Atlee +atrium +Auden +ause +ausgraben +Avogardo +avoirdupois +awai +ay +B'nai +B.C +Bacall +Bachtrian +Bagdikian's +bagel +Bai +bai +Baines +bamboozled +Banach +Barach's +Barbie +barf +Baruch's +BASICs +Basie's +Baumol +bazingas +Beagle +BEANSTACK +Beatty +Beckett +bedecked +befriends +Begatting +Begone +Behaviour +Beifeld's +Belloc +bequeathin +Berke +Bertold +Bertolt +bethumped +bi +bibles +Bierce +Billericay +bingo +bisexual +blackguard +Blaise +BLOTTO +blound +Bok +Bokonon +Bolub's +Bombeck's +bonehead +Boob's +BOOGA +Boola +boola +Boothe +Boren's +Borge +bounteous +boyfriend +Boynton +Brandwein +Brecht +brilgue +brilig +Brith +brussels +Brutus +Buckminster +Bucy's +BULLWINKLE +Bullwinkle +Bumstead +Burggoven +burgled +burneth +Busmanship +BYOB +C.I.A +CABERNET +Caen +Caeser +Caeser's +Cahn's +Caissons +caliente +Calio's +calor +Camptown +Capt +carabineri +Carotene +Carotene's +Carperpetuation +Carrol +Casablanca +castrating +CChheecckk +Celibacy +Centauri +Cerebron +Cerebus +ch +CHARDONNAY +Charnock's +Cheatham +Chem +Chichester +childproof +Chism's +Chisolm's +Chloroplast's +chromodynamics +chronodimensional +Cianci +Ciardi +Cinemuck +Clopton +cm +cmptr +cn +cnt +cockamamie +Cogito +cogito +Collis +Colloq +Colvard's +Commie +Computerdom +conks +Constipation +Contrariwise +copacetic +corpuscle +Cory +Cosmo +CPU +CPU's +cpu's +Crabgrass +crabgrass +Cray +Cripps +crunchy +Crysler +CS +Curchill +curiae +cuticle +Cyberiad +Cybernetic +D'Arcy +D.C +da +Dabba +Daft +Dagobah +Dagwood +damnfoolproof +dandruff +dans +darkish +darkroom +Darrow +Darryl +Darth +dataspec +dduupplleexx +de +Decisionmaker +Defactualization +defamed +Degen +demo +deppart +dermis +destitution +Deteriorada +DETERIORATA +dev +DeVries's +diddie +Dijkstra +DINGELL +Dingell +Dirksen +Disco +discotheques +dishes +dishrags +Disraeli +dixerunt +dm +doderez +doggy +Dolph +Donatus +Doo +DOODAH +dost +doth +dotty +Drescher +Dristan +Dropt +Ducharm's +Ducharme's +dumbfounded +Dunne +Dykstra +e.g +E.T +ecamier +Eckstein +Edpress +Eggnog +eggnog +Ehrman's +Elbert +Electrocution +Elliot +Elven +Elvish +Emmons +Emu +Encyclopadia +ENIACs +Enm +Ennui +enobled +er +ergo +Erogenous +erogeny +Ertz +Es +es +Esser +est +etus +Euell +Eustace +ev'ry +Everyting +exaulted +extemporanea +extracurricular +Exupery +Fafhrd +Fainali +fainali +Fakir +Feiffer +Feiner +fella +Ferm +fertsneet +figgy +fiks +Fillmore +Finagle's +Finagling +Firesign +fix'd +flang +Flannagan's +Flinstone +Flon's +floss +Flugg's +Flummery +Foghorn +folkloric +Follen +foo +Forbiddie +forgo +fornia +fornication +forsooth +Forssman +Frayn +freezin +Friedrich +frillant +Frisbee +Frisbeetarianism +Frito +FROB +frob +frobbing +Frobnicate +FROBNITZ +Frodo +fruitcake +Fruitcakes +fruitcakes +frumious +Fudd's +funhouse +Furbling +Furst +Fylstra +Galbraith +Galilei +Galileo +galore +Galvani +Galvani's +Gandalf +Gandhi +garnishment +Gaultier +GC +GC7500439 +gd +Geis +Genderplex +Gerat +Gerrold's +Ghostbusters +Gigo +Gilda +Gilpkerio +gimble +Gimlet +Gimmie +girrafe +Glaser +Glashow +gleekzorp +GO.SYSIN +gobbledegook +Godot +Goestheveezl +Golda +Goldenstern's +Goldwyn +Goodbye +goodbye +Goodgulf +Gopete +Gorden +Gotlieb +Goto +Gotta +gougebosquex +Goy +Goy's +goyim +goyish +goyisha +Grabel's +graffito +Greenstein +Gregorian +Grelb's +Gries +grok +Groucho +grouse +gt +guave +GUISEPPE +Guiseppe +gyre +gyrent +Hadassah +Haeckel +Hahahahahahahahaha +Haig +handcraftsmanship +handwaving +hanky +Hanukka +harmonium +Harrisberger's +Hawkwind +HED +HEE +Heineken +Heinlein +Hellman +Henny +Henrick +Henrik +Herford +hev +hexagram +Higgeldy +Hilaire +Hillary's +Hinckley +Hippogriff +hippogriff +Hitchhiker's +Hlade's +Hoare's +Hoffenstein +Hofstadter's +Homespun +honorific +HOOTCH +hooved +Hoppe +horgrave +Horngren's +hors +Housman +hullabaloo +Huntingdon +Hurewitz's +i.e +I.R.S +Iacocca +Ibson +icepacks +ID's +Iear +iear +Iears +iers +II.a +Il +im +incomprehensive +Ingliy +inkahol +Inlaws +inputdir +inquit +inrushing +interferon +ironmongery +Isaak +Isiah +Iso +Issawi's +itn +ius +Jackals +Jacquin's +Jael +Jaka +Jarry +jast +jb +jeered +Jehan +Jell +Jenerally +Jenkinson's +Jenks +Jenning's +Jersy +JFK +Jone's +Jordache +Jun +Jung +Justin +ka +Kandel +kar +karat +karma +kase +Kaul +Kehlog +Kellen +Kenobi +Kiernan +kiloliks +Kinkler's +Kistomerces +kitsch +Kitzenger +Kleptomaniac +Klone +klows +kludge +klutz +Knuth +koan +kohirnt +konsonant +konsonants +kontinue +Kool +Korda +KPH +Kr +Krogt +Ks +kwirt +Lackland's +Lactomangulation +Laetrile +Lafferty +LAFITE +Lampson +Landburgher +Langsam's +lank +Lankhamar's +Lankhmar +Larkinson's +LaRouchefoucauld +Lassie +lawnmower +Lazlo's +le +LeGuin +Leher +Lehrer +Leiber +Leibowitz's +Leipzig +Lem +Lenore +lerts +Les +les +letez +Lettvin +Levant +Leverett +lexicographer +LIBRA +Libra +libricilleux +Lieberman's +lightbulb +Lilla +limerick +lin +linguini +Linkletter +LITHP +lithtth +Liza +lobotomy +locutions +Logg's +logick +logout +logy +lojikl +Longworth +Lowery's +LSD +Ltd +Lubarsky's +Luce +Luigi +Lyndon +Lysistrata +m'I +M.T.A +ma'am +Macaroons +MacDowell +MacNelley +MacNelly +MacNiece +Macy's +Madelyn +Magnocartic +magtape +Mahatma +Mai +maindz +mal +Malek's +MANCHA +Manhandling +margarita +Marley +Maslow +masochist +Mathis +Maugham +Maughm +Maxey +McEvoy +McNulty +Medawar +Meese +megs +meik +Meir +meltdown +Mem'ry +memoraboble +memori +memorizin +Mencken +Mencken's +menswear +meowing +MERCUTIO +merinos +Merrick +Meskimen's +meta +Mewling +Meyrowitz +MHz +midterm +Mikado +Miksch's +Millay +Millions +millions +mimsy +Minas +Minnelli +minx +missle +Moby +modifaiing +mohmen +Mollison's +Mom +Mophobia +Moping +Mordor +MOS +Mosher's +mousetraps +Mudgeeraba +Mudhead +Muppet +musculus +Mustgo +MW +MX +Myung +myxbl +n'oeuvres +Nader +Naeser's +Naiman +nanocentury +nanohenry +Narnia +Nate +naugahyde +Neantical +Neizant +nell +Nerd +net.fat +net.flame +net.jobs +net.news +net.that +net.this +Newlan's +NEWSFLASH +newsmagazine +Ngdanga +Ni +ni +Nicklaus +nightie +Niklaus +Ningauble +Noelie +nog +nohow +Nome +Nora's +nostra +Novocain +nunnery +Nutley +NYT +O'Casey +O'Hara +O'Henry +O'Rourke +O'Toole's +O.K +Obi +obits +obius +Ogborn +ok +ol;lkld;f;g;dd;po +Olivier +oln +omerade +omnivorous +ompzidaize +Onan +oodsou +Ope +Ophelia +orxogrefkl +OS +ould +outcumbents +ov +oves +Ozman's +p'o +P.B.A +P.M +p.m +padanga +Paley +Pandanga +panky +Pardo's +Parnas +paroxysmally +Parrafin +PDP +Pecor's +penis +Pensacoola +Penzance +Pereant +perfum'd +Perlis +Pharaoh +Philbin +Philogyny +philogyny +Phooey +Picninnies +Piggeldy +Pirsig +PL +planaria +Platypus +platypus +pleH +Pluribus +pm +po +Podunk +Pohl's +poiuyt +Politicain +poly +polytetien +polytheism +poo +popcorn +Porcus +posibl +posthole +Postpetroleum +POWDERMILK +poz +ppo +prawns +pre +pretzel +Preudhomme's +prgrmmng +priestess +primordial +PRL +Prochnow +Profesoor +propounded +protheththing +protoplasmal +Psblurtex +Publilius +pulitzer +Pumpernickel +pur +pushy +Pynchon +qui +quia +Quinton +quop +Quux +Qvid +QWERT +qwert +QWERTYUIOP +qwertyuiop +Ra +Radner +raineth +RAMs +randchar +rapturous +raspy +raths +rd +Reba +Regan +Reggie +Reisner's +replased +replasing +rhinoceri +Richardian +ridandant +riform +rigadoon +Rigby +Rilke +rimeining +rind +riplais +rispektivli +risqu +rKe9 +Robb +Robespierre +Rogerians +Rolex +ROMs +Rooney +Rosten +Rotherham +Rouchefoucauld +Roumania +Roxbury +RPG +Rubenstein +Rubik's +Rudin's +Ruffed +Russel +Russon +Safire's +Sagittarians +Salome +Salvor +sam +Santoro +Sappho +Sargon +SARTRE +Sartre +SCCS +Schapiro's +schlichte +Schryer +Schwine +Scrubb +scullery +Se +Seeger +Sep +Serendipity +Serling +Serocki's +Sevenoaks +shalt +Shamus +shamus +Sheil +Sherany +shinnied +shlafen +Shmoedipus +Shoaff +shorn +Shuman +sightie +Sigismund +Simard +siouxeyesighed +Sixtus +sizeof +skyhigh +Skyler +sligo +SLOBOL +Slurm +Smit +Snacktrek +Sniglets +Snowman +snowman +Snowmass +Socio +Sodd's +somebody'd +sont +Sorhed +spank +speling +Spirtle +spl +Spock +sq +sswwiittcchh +Sta +Stanislaw +starfield +steamrolling +Steelypips +steeplechase +Steinbach's +Steinem +Stoffel +Stult's +suet +Sulu +Sumeria +sunbelts +Supercalifragilisticexpialidocius +svm +Swaller +swang +Swinburne +Swipple's +switchover +symptotes +synagog +Syrus +syscalls +T.V +Tabby +tachyon +Tai +taketh +Tanenbaum +tannogallate +Tarradiddles +tbsp +Teddywookie +telepath +telly +Tenessee +tequila +Terence +Tertullian +Teruillian +TH +th +Thames +theivish +thi +Thieu +thinkle +Tho +Thoul't +thru +ths +Thyself +thyself +Tierra +Tikkanen +tinhorn +TLC +tollway +Tomlin +Tonka +tornpee +Toven +trampoline +transsexual +treacle +Tricia +tripoline +Troney +Trotsky +tsetse +TSO +tsp +Tsu +tu +tuit +tuits +tuppenny +Turnaucka's +Tussman's +Tut's +Twas +Tweedledee +Tweedledum +tween +twixt +Twodor +Twodor's +tyg +U.S +UFO's +uh +ukelele +umsige +unbegot +Und +und +unvoist +uretheral +Urey +urgin's +URK +valium +Vannevar +VAX +VAX's +VAXen +VAXs +velcro +Velilind's +Venn +Vespucci +Vespuccia +Vidal +VIDEOCASSETTE +Vinchy +Vinci +Virt +Vittorini +VLSI +VMS +VODKA +Vogon +voist +vol +Volkswagon +Vonada +Vonnegut +Vonnegut's +vowlz +Vries +VSOP +vu +Vulgate +w4k +wa +Waben +Wald +Walla +Warhol +Wat +Weiler's +Weiner's +weirdo +Weisert +wench +werld +Wernher +Westheimer's +Wethern's +WHATEVERSAROUND +Whipsnade +whomped +wi +Wiker's +Wilde +wimmelten +Winchell +Winsor +Wirrten +Wirth +Withington +WOMBAT +wombat +wonse +woodburning +workingman +WORLD's +wr +wrth +wrung +wud +xanthic +xe +xen +XINU +xrewawt +xsz +Yabba +Yessir +Yinkel +Yo +yo +Yoda +Yoda's +Yorba +you'se +Youngman +Yuletide +yyoouurr +Zanuck +Zappa +Zarathustra +zayda +Zelkowitz +zephyr's +ZORAC +Zow +Zwanzig +Zymurgy's +masturbation Index: games/fortune/fortune/fortune.6 ================================================================== --- games/fortune/fortune/fortune.6 +++ games/fortune/fortune/fortune.6 @@ -1,54 +1,151 @@ -.\" Copyright (c) 1980 Regents of the University of California. -.\" All rights reserved. The Berkeley software License Agreement -.\" specifies the terms and conditions for redistribution. +.\" Copyright (c) 1985 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms are permitted +.\" provided that the above copyright notice and this paragraph are +.\" duplicated in all such forms and that any documentation, +.\" advertising materials, and other materials related to such +.\" distribution and use acknowledge that the software was developed +.\" by the University of California, Berkeley. The name of the +.\" University may not be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. .\" -.\" @(#)fortune.6 6.2 (Berkeley) 10/19/88 +.\" @(#)fortune.6 6.4 (Berkeley) 09/06/89 .\" .TH FORTUNE 6 "" .UC 4 .SH NAME fortune \- print a random, hopefully interesting, adage .SH SYNOPSIS -.B fortune +.B /usr/games/fortune [ .B \- ] [ -.B \-wslao +.B \-fwslaoe +] +[ +.B \-m +.I pattern +.B \-i ] -..[ file ] +[ [ \fIN\fP% ] \fIfile\fP/\fIdir\fP/\fBall\fP ] .SH DESCRIPTION -.I Fortune -with no arguments prints out a random adage. The flags mean: +When +.I fortune +is run with no arguments +it prints out a random epigram. The flags mean: .PP .TP 5 +.B \-f +Print out the list of files +which would be searched, +but don't print a fortune. .B \-w -Waits before termination +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. .TP 5 .B \-s -Short messages only. +Short apothegms only. .TP 5 .B \-l -Long messages only. +Long dictums only. .TP .B \-o -Choose from an alternate list of adages, +Choose from an alternate list of aphorisms, often used for potentially offensive ones. .TP .B \-a -Choose from either list of adages. +Choose from either list of maxims. +.TP +.B \-m +Print out all fortunes which match the regular expression +.I pattern . +See +.BR regex (3) +or +.BR regcmp (3) +for description of patterns. +.TP +.B \-i +Ignore case for +.B \-m +patterns. +.TP +.B \-e +Consider all fortune files to be of equal size +(see below on multiple files). +.PP +The user may specify alternate sayings. +You can specify a specific file, +a directory which contains one or more files, +or the special word +.B all +which says to use all the standard databases. +The files must be created +using +.B strfile (8) . +Any of these may be preceded by a percentage, +which is a number +.I N +between 0 and 100 inclusive, +followed by a +.B % . +If it is, +there will be a +.I 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 -..The user may specify a file of adages. -..This file must be created by strfile(6), -..and be given by the user as -...it file. -..Only one such file may be named, -..subsequent ones are ignored. +As an example, +given two databases +.B funny +and +.B not-funny , +with +.B funny +twice as big, +saying +.RS +fortune funny not-funny +.RE +will get you fortunes out of +.B funny +two-thirds of the time. +The command +.RS +fortune 90% funny 10% not-funny +.RE +will pick out 90% of its fortunes from +.B funny +(the ``10% not-funny'' is unecessary, +since 10% is all that's left). +The +.B \-e +option says to consider all files equal; +thus +.RS +fortune \-e +.RE +is equivalent to +.RS +fortune 50% funny 50% not-funny +.RE .SH FILES /usr/games/lib/fortunes.dat .SH AUTHOR Ken Arnold -...SH SEE\ ALSO -..strfile(6) +.SH "SEE ALSO" +regex(3), regcmp(3), strfile(8) Index: games/fortune/fortune/fortune.c ================================================================== --- games/fortune/fortune/fortune.c +++ games/fortune/fortune/fortune.c @@ -1,252 +1,1299 @@ /* - * Copyright (c) 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. + * Copyright (c) 1986 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 are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#ifndef lint +char copyright[] = +"@(#) Copyright (c) 1986 The Regents of the University of California.\n\ + All rights reserved.\n"; +#endif /* not lint */ + #ifndef lint -static char sccsid[] = "@(#)fortune.c 5.2 (Berkeley) 12/09/86"; -#endif not lint +static char sccsid[] = "@(#)fortune.c 5.8 (Berkeley) 09/05/89"; +#endif /* not lint */ +# include # include +# include +# include # include -# include +# include # include "strfile.h" +# include "pathnames.h" + +#ifdef SYSV +# include + +# define NO_LOCK +# define REGCMP +# ifdef NO_REGEX +# undef NO_REGEX +# endif /* NO_REGEX */ +# define index strchr +# define rindex strrchr +#endif /* SYSV */ + +#ifndef NO_REGEX +# include +#endif /* NO_REGEX */ + +# ifndef NO_LOCK +# include +# endif /* NO_LOCK */ + +# ifndef F_OK +/* codes for access() */ +# define F_OK 0 /* does file exist */ +# define X_OK 1 /* is it executable by caller */ +# define W_OK 2 /* writable by caller */ +# define R_OK 4 /* readable by caller */ +# endif /* F_OK */ # define TRUE 1 # define FALSE 0 # define bool short # define MINW 6 /* minimum wait if desired */ # define CPERS 20 /* # of chars for each sec */ # define SLEN 160 /* # of chars in short fortune */ -# define FORTFILE "/usr/games/lib/fortunes.dat" - -bool Wflag = FALSE, /* wait desired after fortune */ - Sflag = FALSE, /* short fortune desired */ - Lflag = FALSE, /* long fortune desired */ - Oflag = FALSE, /* offensive fortunes only */ - Aflag = FALSE; /* any fortune allowed */ - -char *Fortfile = FORTFILE, /* fortune database */ - *Usage[] = { - "usage: fortune [ - ] [ -wsloa ] [ file ]", - " - - give this summary of usage", - " w - have program wait after printing message in order", - " to give time to read", - " s - short fortune only", - " l - long fortune only", - " o - offensive fortunes only", - " a - any fortune", - " Mail suggested fortunes to \"fortune\"", - NULL - }; - -long Seekpts[2]; /* seek pointers to fortunes */ - -FILE *Inf; /* input file */ - -STRFILE Tbl; /* input table */ - -time_t time(); +# define POS_UNKNOWN ((unsigned long) -1) /* pos for file unknown */ +# define NO_PROB (-1) /* no prob specified for file */ + +# ifdef DEBUG +# define DPRINTF(l,x) if (Debug >= l) fprintf x; else +# undef NDEBUG +# else /* DEBUG */ +# define DPRINTF(l,x) +# define NDEBUG 1 +# endif /* DEBUG */ + +typedef struct fd { + int percent; + int fd, datfd; + unsigned long pos; + FILE *inf; + char *name; + char *path; + char *datfile, *posfile; + bool read_tbl; + bool was_pos_file; + STRFILE tbl; + int num_children; + struct fd *child, *parent; + struct fd *next, *prev; +} FILEDESC; + +bool Found_one; /* did we find a match? */ +bool Find_files = FALSE; /* just find a list of proper fortune files */ +bool Wait = FALSE; /* wait desired after fortune */ +bool Short_only = FALSE; /* short fortune desired */ +bool Long_only = FALSE; /* long fortune desired */ +bool Offend = FALSE; /* offensive fortunes only */ +bool All_forts = FALSE; /* any fortune allowed */ +bool Equal_probs = FALSE; /* scatter un-allocted prob equally */ +#ifndef NO_REGEX +bool Match = FALSE; /* dump fortunes matching a pattern */ +#endif +#ifdef DEBUG +bool Debug = FALSE; /* print debug messages */ +#endif + +char *Fortbuf = NULL; /* fortune buffer for -m */ + +int Fort_len = 0; + +off_t Seekpts[2]; /* seek pointers to fortunes */ + +FILEDESC *File_list = NULL, /* Head of file list */ + *File_tail = NULL; /* Tail of file list */ +FILEDESC *Fortfile; /* Fortune file to use */ + +STRFILE Noprob_tbl; /* sum of data for all no prob files */ + +char *do_malloc(), *copy(), *off_name(); + +FILEDESC *pick_child(), *new_fp(); + +extern char *malloc(), *index(), *rindex(), *strcpy(), *strcat(); + +extern time_t time(); + +#ifndef NO_REGEX +char *conv_pat(); +#endif + +#ifndef NO_REGEX +#ifdef REGCMP +# define RE_COMP(p) (Re_pat = regcmp(p, NULL)) +# define BAD_COMP(f) ((f) == NULL) +# define RE_EXEC(p) regex(Re_pat, (p)) + +char *Re_pat; + +char *regcmp(), *regex(); +#else +# define RE_COMP(p) (p = re_comp(p)) +# define BAD_COMP(f) ((f) != NULL) +# define RE_EXEC(p) re_exec(p) + +char *re_comp(); +#ifdef SYSV +char *re_exec(); +#else +int re_exec(); +#endif +#endif +#endif main(ac, av) int ac; char *av[]; { - register char c; - register int nchar = 0; - register int i; +#ifdef OK_TO_WRITE_DISK + int fd; +#endif /* OK_TO_WRITE_DISK */ + char line[BUFSIZ]; getargs(ac, av); - if ((Inf = fopen(Fortfile, "r+")) == NULL) { - perror(Fortfile); - exit(-1); - } - fread((char *) &Tbl, sizeof Tbl, 1, Inf); /* NOSTRICT */ - if (Tbl.str_longlen <= SLEN && Lflag) { - puts("Sorry, no long strings in this file"); - exit(0); - } - if (Tbl.str_shortlen > SLEN && Sflag) { - puts("Sorry, no short strings in this file"); - exit(0); - } - - /* - * initialize the pointer to the first -o fortune if need be. - */ - if (Tbl.str_delims[2] == 0) - Tbl.str_delims[2] = Tbl.str_delims[0]; - - for (;;) { - getfort(); - if (Sflag && !is_short()) - continue; - if (Lflag && !is_long()) - continue; - break; - } - - fseek(Inf, Seekpts[0], 0); - while (c = getc(Inf)) { - nchar++; - putchar(c); - } - fflush(stdout); - fseek(Inf, 0L, 0); + +#ifndef NO_REGEX + if (Match) + exit(find_matches() != 0); +#endif + + init_prob(); + srandom((int)(time((time_t *) NULL) + getpid())); + do { + get_fort(); + } while ((Short_only && fortlen() > SLEN) || + (Long_only && fortlen() <= SLEN)); + + open_fp(Fortfile); + (void) fseek(Fortfile->inf, Seekpts[0], 0); + for (Fort_len = 0; fgets(line, sizeof line, Fortfile->inf) != NULL && + !STR_ENDSTRING(line, Fortfile->tbl); + Fort_len++) + fputs(line, stdout); + (void) fflush(stdout); + +#ifdef OK_TO_WRITE_DISK + if ((fd = creat(Fortfile->posfile, 0666)) < 0) { + perror(Fortfile->posfile); + exit(1); + } #ifdef LOCK_EX /* * if we can, we exclusive lock, but since it isn't very * important, we just punt if we don't have easy locking * available. */ - flock(fileno(Inf), LOCK_EX); -#endif LOCK_EX - fwrite(&Tbl, 1, sizeof Tbl, Inf); -#ifdef LOCK_EX - flock(fileno(Inf), LOCK_UN); -#endif LOCK_EX - if (Wflag) - sleep(max((int) nchar / CPERS, MINW)); - exit(0); -} - -/* - * is_short: - * Return TRUE if fortune is "short". - */ -is_short() -{ - register int nchar; - - if (!(Tbl.str_flags & (STR_RANDOM | STR_ORDERED))) - return (Seekpts[1] - Seekpts[0] <= SLEN); - fseek(Inf, Seekpts[0], 0); - nchar = 0; - while (getc(Inf)) - nchar++; - return (nchar <= SLEN); -} - -/* - * is_long: - * Return TRUE if fortune is "long". - */ -is_long() -{ - register int nchar; - - if (!(Tbl.str_flags & (STR_RANDOM | STR_ORDERED))) - return (Seekpts[1] - Seekpts[0] > SLEN); - fseek(Inf, Seekpts[0], 0); - nchar = 0; - while (getc(Inf)) - nchar++; - return (nchar > SLEN); + (void) flock(fd, LOCK_EX); +#endif /* LOCK_EX */ + write(fd, (char *) &Fortfile->pos, sizeof Fortfile->pos); + if (!Fortfile->was_pos_file) + (void) chmod(Fortfile->path, 0666); +#ifdef LOCK_EX + (void) flock(fd, LOCK_UN); +#endif /* LOCK_EX */ +#endif /* OK_TO_WRITE_DISK */ + if (Wait) { + if (Fort_len == 0) + (void) fortlen(); + sleep((unsigned int) max(Fort_len / CPERS, MINW)); + } + exit(0); + /* NOTREACHED */ +} + +/* + * fortlen: + * Return the length of the fortune. + */ +fortlen() +{ + register int nchar; + char line[BUFSIZ]; + + if (!(Fortfile->tbl.str_flags & (STR_RANDOM | STR_ORDERED))) + nchar = (Seekpts[1] - Seekpts[0] <= SLEN); + else { + open_fp(Fortfile); + (void) fseek(Fortfile->inf, Seekpts[0], 0); + nchar = 0; + while (fgets(line, sizeof line, Fortfile->inf) != NULL && + !STR_ENDSTRING(line, Fortfile->tbl)) + nchar += strlen(line); + } + Fort_len = nchar; + return nchar; } /* * This routine evaluates the arguments on the command line */ -getargs(ac, av) -register int ac; -register char *av[]; +getargs(argc, argv) +register int argc; +register char **argv; +{ + register int ignore_case; +# ifndef NO_REGEX + register char *pat; +# endif /* NO_REGEX */ + extern char *optarg; + extern int optind; + int ch; + + ignore_case = FALSE; + pat = NULL; + +# ifdef DEBUG + while ((ch = getopt(argc, argv, "aDfilm:osw")) != EOF) +#else + while ((ch = getopt(argc, argv, "afilm:osw")) != EOF) +#endif /* DEBUG */ + switch(ch) { + case 'a': /* any fortune */ + All_forts++; + break; +# ifdef DEBUG + case 'D': + Debug++; + break; +# endif /* DEBUG */ + case 'e': + Equal_probs++; /* scatter un-allocted prob equally */ + break; + case 'f': /* find fortune files */ + Find_files++; + break; + case 'l': /* long ones only */ + Long_only++; + Short_only = FALSE; + break; + case 'o': /* offensive ones only */ + Offend++; + break; + case 's': /* short ones only */ + Short_only++; + Long_only = FALSE; + break; + case 'w': /* give time to read */ + Wait++; + break; +# ifdef NO_REGEX + case 'i': /* case-insensitive match */ + case 'm': /* dump out the fortunes */ + (void) fprintf(stderr, + "fortune: can't match fortunes on this system (Sorry)\n"); + exit(0); +# else /* NO_REGEX */ + case 'm': /* dump out the fortunes */ + Match++; + pat = optarg; + break; + case 'i': /* case-insensitive match */ + ignore_case++; + break; +# endif /* NO_REGEX */ + case '?': + default: + usage(); + } + argc -= optind; + argv += optind; + + if (!form_file_list(argv, argc)) + exit(1); /* errors printed through form_file_list() */ +#ifdef DEBUG + if (Debug >= 1) + print_file_list(); +#endif /* DEBUG */ + if (Find_files) { + print_file_list(); + exit(0); + } + +# ifndef NO_REGEX + if (pat != NULL) { + if (ignore_case) + pat = conv_pat(pat); + if (BAD_COMP(RE_COMP(pat))) { +#ifndef REGCMP + fprintf(stderr, "%s\n", pat); +#else /* REGCMP */ + fprintf(stderr, "bad pattern: %s\n", pat); +#endif /* REGCMP */ + } + } +# endif /* NO_REGEX */ +} + +/* + * form_file_list: + * Form the file list from the file specifications. + */ +form_file_list(files, file_cnt) +register char **files; +register int file_cnt; +{ + register int i, percent; + register char *sp; + + if (file_cnt == 0) + if (Find_files) + return add_file(NO_PROB, FORTDIR, NULL, &File_list, + &File_tail, NULL); + else + return add_file(NO_PROB, "fortunes", FORTDIR, + &File_list, &File_tail, NULL); + for (i = 0; i < file_cnt; i++) { + percent = NO_PROB; + if (!isdigit(files[i][0])) + sp = files[i]; + else { + percent = 0; + for (sp = files[i]; isdigit(*sp); sp++) + percent = percent * 10 + *sp - '0'; + if (percent > 100) { + fprintf(stderr, "percentages must be <= 100\n"); + return FALSE; + } + if (*sp == '.') { + fprintf(stderr, "percentages must be integers\n"); + return FALSE; + } + /* + * If the number isn't followed by a '%', then + * it was not a percentage, just the first part + * of a file name which starts with digits. + */ + if (*sp != '%') { + percent = NO_PROB; + sp = files[i]; + } + else if (*++sp == '\0') { + if (++i >= file_cnt) { + fprintf(stderr, "percentages must precede files\n"); + return FALSE; + } + sp = files[i]; + } + } + if (strcmp(sp, "all") == 0) + sp = FORTDIR; + if (!add_file(percent, sp, NULL, &File_list, &File_tail, NULL)) + return FALSE; + } + return TRUE; +} + +/* + * add_file: + * Add a file to the file list. + */ +add_file(percent, file, dir, head, tail, parent) +int percent; +register char *file; +char *dir; +FILEDESC **head, **tail; +FILEDESC *parent; +{ + register FILEDESC *fp; + register int fd; + register char *path, *offensive; + register bool was_malloc; + register bool isdir; + + if (dir == NULL) { + path = file; + was_malloc = FALSE; + } + else { + path = do_malloc((unsigned int) (strlen(dir) + strlen(file) + 2)); + (void) strcat(strcat(strcpy(path, dir), "/"), file); + was_malloc = TRUE; + } + if ((isdir = is_dir(path)) && parent != NULL) { + if (was_malloc) + free(path); + return FALSE; /* don't recurse */ + } + offensive = NULL; + if (!isdir && parent == NULL && (All_forts || Offend) && + !is_off_name(path)) { + offensive = off_name(path); + was_malloc = TRUE; + if (Offend) { + if (was_malloc) + free(path); + path = offensive; + file = off_name(file); + } + } + + DPRINTF(1, (stderr, "adding file \"%s\"\n", path)); +over: + if ((fd = open(path, 0)) < 0) { + /* + * This is a sneak. If the user said -a, and if the + * file we're given isn't a file, we check to see if + * there is a -o version. If there is, we treat it as + * if *that* were the file given. We only do this for + * individual files -- if we're scanning a directory, + * we'll pick up the -o file anyway. + */ + if (All_forts && offensive != NULL) { + path = offensive; + if (was_malloc) + free(path); + offensive = NULL; + was_malloc = TRUE; + DPRINTF(1, (stderr, "\ttrying \"%s\"\n", path)); + file = off_name(file); + goto over; + } + if (dir == NULL && file[0] != '/') + return add_file(percent, file, FORTDIR, head, tail, + parent); + if (parent == NULL) + perror(path); + if (was_malloc) + free(path); + return FALSE; + } + + DPRINTF(2, (stderr, "path = \"%s\"\n", path)); + + fp = new_fp(); + fp->fd = fd; + fp->percent = percent; + fp->name = file; + fp->path = path; + fp->parent = parent; + + if ((isdir && !add_dir(fp)) || + (!isdir && + !is_fortfile(path, &fp->datfile, &fp->posfile, (parent != NULL)))) + { + if (parent == NULL) + fprintf(stderr, + "fortune:%s not a fortune file or directory\n", + path); + free((char *) fp); + if (was_malloc) + free(path); + do_free(fp->datfile); + do_free(fp->posfile); + do_free(offensive); + return FALSE; + } + /* + * If the user said -a, we need to make this node a pointer to + * both files, if there are two. We don't need to do this if + * we are scanning a directory, since the scan will pick up the + * -o file anyway. + */ + if (All_forts && parent == NULL && !is_off_name(path)) + all_forts(fp, offensive); + if (*head == NULL) + *head = *tail = fp; + else if (fp->percent == NO_PROB) { + (*tail)->next = fp; + fp->prev = *tail; + *tail = fp; + } + else { + (*head)->prev = fp; + fp->next = *head; + *head = fp; + } +#ifdef OK_TO_WRITE_DISK + fp->was_pos_file = (access(fp->posfile, W_OK) >= 0); +#endif /* OK_TO_WRITE_DISK */ + + return TRUE; +} + +/* + * new_fp: + * Return a pointer to an initialized new FILEDESC. + */ +FILEDESC * +new_fp() +{ + register FILEDESC *fp; + + fp = (FILEDESC *) do_malloc(sizeof *fp); + fp->datfd = -1; + fp->pos = POS_UNKNOWN; + fp->inf = NULL; + fp->fd = -1; + fp->percent = NO_PROB; + fp->read_tbl = FALSE; + fp->next = NULL; + fp->prev = NULL; + fp->child = NULL; + fp->parent = NULL; + fp->datfile = NULL; + fp->posfile = NULL; + return fp; +} + +/* + * off_name: + * Return a pointer to the offensive version of a file of this name. + */ +char * +off_name(file) +char *file; +{ + char *new; + + new = copy(file, (unsigned int) (strlen(file) + 2)); + return strcat(new, "-o"); +} + +/* + * is_off_name: + * Is the file an offensive-style name? + */ +is_off_name(file) +char *file; +{ + int len; + + len = strlen(file); + return (len >= 3 && file[len - 2] == '-' && file[len - 1] == 'o'); +} + +/* + * all_forts: + * Modify a FILEDESC element to be the parent of two children if + * there are two children to be a parent of. + */ +all_forts(fp, offensive) +register FILEDESC *fp; +char *offensive; +{ + register char *sp; + register FILEDESC *scene, *obscene; + register int fd; + auto char *datfile, *posfile; + + if (fp->child != NULL) /* this is a directory, not a file */ + return; + if (!is_fortfile(offensive, &datfile, &posfile, FALSE)) + return; + if ((fd = open(offensive, 0)) < 0) + return; + DPRINTF(1, (stderr, "adding \"%s\" because of -a\n", offensive)); + scene = new_fp(); + obscene = new_fp(); + *scene = *fp; + + fp->num_children = 2; + fp->child = scene; + scene->next = obscene; + obscene->next = NULL; + scene->child = obscene->child = NULL; + scene->parent = obscene->parent = fp; + + fp->fd = -1; + scene->percent = obscene->percent = NO_PROB; + + obscene->fd = fd; + obscene->inf = NULL; + obscene->path = offensive; + if ((sp = rindex(offensive, '/')) == NULL) + obscene->name = offensive; + else + obscene->name = ++sp; + obscene->datfile = datfile; + obscene->posfile = posfile; + obscene->read_tbl = FALSE; +#ifdef OK_TO_WRITE_DISK + obscene->was_pos_file = (access(obscene->posfile, W_OK) >= 0); +#endif /* OK_TO_WRITE_DISK */ +} + +/* + * add_dir: + * Add the contents of an entire directory. + */ +add_dir(fp) +register FILEDESC *fp; +{ + register DIR *dir; +#ifdef SYSV + register struct dirent *dirent; /* NIH, of course! */ +#else + register struct direct *dirent; +#endif + auto FILEDESC *tailp; + auto char *name; + + (void) close(fp->fd); + fp->fd = -1; + if ((dir = opendir(fp->path)) == NULL) { + perror(fp->path); + return FALSE; + } + tailp = NULL; + DPRINTF(1, (stderr, "adding dir \"%s\"\n", fp->path)); + fp->num_children = 0; + while ((dirent = readdir(dir)) != NULL) { + if (dirent->d_namlen == 0) + continue; + name = copy(dirent->d_name, dirent->d_namlen); + if (add_file(NO_PROB, name, fp->path, &fp->child, &tailp, fp)) + fp->num_children++; + else + free(name); + } + if (fp->num_children == 0) { + fprintf(stderr, "fortune:%s:No fortune files in directory\n", fp->path); + return FALSE; + } + return TRUE; +} + +/* + * is_dir: + * Return TRUE if the file is a directory, FALSE otherwise. + */ +is_dir(file) +char *file; +{ + auto struct stat sbuf; + + if (stat(file, &sbuf) < 0) + return FALSE; + return (sbuf.st_mode & S_IFDIR); +} + +/* + * is_fortfile: + * Return TRUE if the file is a fortune database file. We try and + * exclude files without reading them if possible to avoid + * overhead. Files which start with ".", or which have "illegal" + * suffixes, as contained in suflist[], are ruled out. + */ +/* ARGSUSED */ +is_fortfile(file, datp, posp, check_for_offend) +char *file; +char **datp, **posp; +int check_for_offend; { register int i; register char *sp; - register int j; - register short bad = 0; - - for (i = 1; i < ac; i++) { - if (av[i][0] != '-') { - setuid(getuid()); - setgid(getgid()); - Fortfile = av[i]; - } - else if (av[i][1] == '\0') { - j = 0; - while (Usage[j] != NULL) - puts(Usage[j++]); - exit(0); - /* NOTREACHED */ - } - else - for (sp = &av[i][1]; *sp != '\0'; sp++) - switch (*sp) { - case 'w': /* give time to read */ - Wflag++; - break; - case 's': /* short ones only */ - Sflag++; - Lflag = 0; - break; - case 'l': /* long ones only */ - Lflag++; - Sflag = 0; - break; - case 'o': /* offensive ones only */ - Oflag++; - break; - case 'a': /* any fortune */ - Aflag++; - /* - * initialize the random number - * generator; throw away the first - * few numbers to avoid any non- - * randomness in startup - */ - srnd(time(NULL) + getpid()); - for (j = 0; j < 20; j++) - (void) rnd(100); - break; - default: - printf("unknown flag: '%c'\n", *sp); - bad++; - break; - } - } - if (bad) { - printf("use \"%s -\" to get usage\n", av[0]); - exit(-1); - } -} - -/* - * getfort: - * Get the fortune data file's seek pointer for the next fortune. - */ -getfort() -{ - register int fortune; - - /* - * Make sure all values are in range. - */ - - if (Tbl.str_delims[1] >= Tbl.str_delims[0]) - Tbl.str_delims[1] = 0; - if (Tbl.str_delims[2] >= Tbl.str_numstr) - Tbl.str_delims[2] = Tbl.str_delims[0]; - - if (Aflag) { - if (rnd(Tbl.str_numstr) < Tbl.str_delims[0]) - fortune = Tbl.str_delims[1]++; - else - fortune = Tbl.str_delims[2]++; - } - else if (Oflag) - fortune = Tbl.str_delims[2]++; - else - fortune = Tbl.str_delims[1]++; - - fseek(Inf, (long)(sizeof Seekpts[0]) * fortune + sizeof Tbl, 0); - fread((char *) Seekpts, (sizeof Seekpts[0]), 2, Inf); + register char *datfile; + static char *suflist[] = { /* list of "illegal" suffixes" */ + "dat", "pos", "c", "h", "p", "i", "f", + "pas", "ftn", "ins.c", "ins,pas", + "ins.ftn", "sml", + NULL + }; + + DPRINTF(2, (stderr, "is_fortfile(%s) returns ", file)); + + /* + * Preclude any -o files for offendable people, and any non -o + * files for completely offensive people. + */ + if (check_for_offend && !All_forts) { + i = strlen(file); + if (Offend ^ (file[i - 2] == '-' && file[i - 1] == 'o')) + return FALSE; + } + + if ((sp = rindex(file, '/')) == NULL) + sp = file; + else + sp++; + if (*sp == '.') { + DPRINTF(2, (stderr, "FALSE (file starts with '.')\n")); + return FALSE; + } + if ((sp = rindex(sp, '.')) != NULL) { + sp++; + for (i = 0; suflist[i] != NULL; i++) + if (strcmp(sp, suflist[i]) == 0) { + DPRINTF(2, (stderr, "FALSE (file has suffix \".%s\")\n", sp)); + return FALSE; + } + } + + datfile = copy(file, (unsigned int) (strlen(file) + 4)); /* +4 for ".dat" */ + strcat(datfile, ".dat"); + if (access(datfile, R_OK) < 0) { + free(datfile); + DPRINTF(2, (stderr, "FALSE (no \".dat\" file)\n")); + return FALSE; + } + if (datp != NULL) + *datp = datfile; + else + free(datfile); +#ifdef OK_TO_WRITE_DISK + if (posp != NULL) { + *posp = copy(file, (unsigned int) (strlen(file) + 4)); /* +4 for ".dat" */ + (void) strcat(*posp, ".pos"); + } +#endif /* OK_TO_WRITE_DISK */ + DPRINTF(2, (stderr, "TRUE\n")); + return TRUE; +} + +/* + * copy: + * Return a malloc()'ed copy of the string + */ +char * +copy(str, len) +char *str; +unsigned int len; +{ + char *new, *sp; + + new = do_malloc(len + 1); + sp = new; + do { + *sp++ = *str; + } while (*str++); + return new; +} + +/* + * do_malloc: + * Do a malloc, checking for NULL return. + */ +char * +do_malloc(size) +unsigned int size; +{ + char *new; + + if ((new = malloc(size)) == NULL) { + fprintf(stderr, "fortune:Out of space\n"); + exit(1); + } + return new; +} + +/* + * do_free: + * Free malloc'ed space, if any. + */ +do_free(ptr) +char *ptr; +{ + if (ptr != NULL) + free(ptr); +} + +/* + * init_prob: + * Initialize the fortune probabilities. + */ +init_prob() +{ + register FILEDESC *fp, *last; + register int percent, num_noprob, frac; + + /* + * Distribute the residual probability (if any) across all + * files with unspecified probability (i.e., probability of 0) + * (if any). + */ + + percent = 0; + num_noprob = 0; + for (fp = File_tail; fp != NULL; fp = fp->prev) + if (fp->percent == NO_PROB) { + num_noprob++; + if (Equal_probs) + last = fp; + } + else + percent += fp->percent; + DPRINTF(1, (stderr, "summing probabilities:%d%% with %d NO_PROB's", + percent, num_noprob)); + if (percent > 100) { + fprintf(stderr, "fortune:Probabilities sum to %d%%!\n", + percent); + exit(1); + } + else if (percent < 100 && num_noprob == 0) { + fprintf(stderr, + "fortune:No place to put residual probability (%d%%)\n", + percent); + exit(1); + } + else if (percent == 100 && num_noprob != 0) { + fprintf(stderr, + "fortune:No probability left to put in residual files\n"); + exit(1); + } + percent = 100 - percent; + if (Equal_probs) + if (num_noprob != 0) { + if (num_noprob > 1) { + frac = percent / num_noprob; + DPRINTF(1, (stderr, ", frac = %d%%", frac)); + for (fp = File_list; fp != last; fp = fp->next) + if (fp->percent == NO_PROB) { + fp->percent = frac; + percent -= frac; + } + } + last->percent = percent; + DPRINTF(1, (stderr, ", residual = %d%%", percent)); + } + else { + DPRINTF(1, (stderr, + ", %d%% distributed over remaining fortunes\n", + percent)); + } + DPRINTF(1, (stderr, "\n")); + +#ifdef DEBUG + if (Debug >= 1) + print_file_list(); +#endif +} + +/* + * get_fort: + * Get the fortune data file's seek pointer for the next fortune. + */ +get_fort() +{ + register FILEDESC *fp; + register int choice; + long random(); + + if (File_list->next == NULL || File_list->percent == NO_PROB) + fp = File_list; + else { + choice = random() % 100; + DPRINTF(1, (stderr, "choice = %d\n", choice)); + for (fp = File_list; fp->percent != NO_PROB; fp = fp->next) + if (choice < fp->percent) + break; + else { + choice -= fp->percent; + DPRINTF(1, (stderr, + " skip \"%s\", %d%% (choice = %d)\n", + fp->name, fp->percent, choice)); + } + DPRINTF(1, (stderr, + "using \"%s\", %d%% (choice = %d)\n", + fp->name, fp->percent, choice)); + } + if (fp->percent != NO_PROB) + get_tbl(fp); + else { + if (fp->next != NULL) { + sum_noprobs(fp); + choice = random() % Noprob_tbl.str_numstr; + DPRINTF(1, (stderr, "choice = %d (of %d) \n", choice, + Noprob_tbl.str_numstr)); + while (choice >= fp->tbl.str_numstr) { + choice -= fp->tbl.str_numstr; + fp = fp->next; + DPRINTF(1, (stderr, + " skip \"%s\", %d (choice = %d)\n", + fp->name, fp->tbl.str_numstr, + choice)); + } + DPRINTF(1, (stderr, "using \"%s\", %d\n", fp->name, + fp->tbl.str_numstr)); + } + get_tbl(fp); + } + if (fp->child != NULL) { + DPRINTF(1, (stderr, "picking child\n")); + fp = pick_child(fp); + } + Fortfile = fp; + get_pos(fp); + open_dat(fp); + (void) lseek(fp->datfd, + (off_t) (sizeof fp->tbl + fp->pos * sizeof Seekpts[0]), 0); + read(fp->datfd, Seekpts, sizeof Seekpts); +} + +/* + * pick_child + * Pick a child from a chosen parent. + */ +FILEDESC * +pick_child(parent) +FILEDESC *parent; +{ + register FILEDESC *fp; + register int choice; + + if (Equal_probs) { + choice = random() % parent->num_children; + DPRINTF(1, (stderr, " choice = %d (of %d)\n", + choice, parent->num_children)); + for (fp = parent->child; choice--; fp = fp->next) + continue; + DPRINTF(1, (stderr, " using %s\n", fp->name)); + return fp; + } + else { + get_tbl(parent); + choice = random() % parent->tbl.str_numstr; + DPRINTF(1, (stderr, " choice = %d (of %d)\n", + choice, parent->tbl.str_numstr)); + for (fp = parent->child; choice >= fp->tbl.str_numstr; + fp = fp->next) { + choice -= fp->tbl.str_numstr; + DPRINTF(1, (stderr, "\tskip %s, %d (choice = %d)\n", + fp->name, fp->tbl.str_numstr, choice)); + } + DPRINTF(1, (stderr, " using %s, %d\n", fp->name, + fp->tbl.str_numstr)); + return fp; + } +} + +/* + * sum_noprobs: + * Sum up all the noprob probabilities, starting with fp. + */ +sum_noprobs(fp) +register FILEDESC *fp; +{ + static bool did_noprobs = FALSE; + + if (did_noprobs) + return; + zero_tbl(&Noprob_tbl); + while (fp != NULL) { + get_tbl(fp); + sum_tbl(&Noprob_tbl, &fp->tbl); + fp = fp->next; + } + did_noprobs = TRUE; } max(i, j) register int i, j; { return (i >= j ? i : j); } + +/* + * open_fp: + * Assocatiate a FILE * with the given FILEDESC. + */ +open_fp(fp) +FILEDESC *fp; +{ + if (fp->inf == NULL && (fp->inf = fdopen(fp->fd, "r")) == NULL) { + perror(fp->path); + exit(1); + } +} + +/* + * open_dat: + * Open up the dat file if we need to. + */ +open_dat(fp) +FILEDESC *fp; +{ + if (fp->datfd < 0 && (fp->datfd = open(fp->datfile, 0)) < 0) { + perror(fp->datfile); + exit(1); + } +} + +/* + * get_pos: + * Get the position from the pos file, if there is one. If not, + * return a random number. + */ +get_pos(fp) +FILEDESC *fp; +{ +#ifdef OK_TO_WRITE_DISK + int fd; +#endif /* OK_TO_WRITE_DISK */ + + assert(fp->read_tbl); + if (fp->pos == POS_UNKNOWN) { +#ifdef OK_TO_WRITE_DISK + if ((fd = open(fp->posfile, 0)) < 0 || + read(fd, &fp->pos, sizeof fp->pos) != sizeof fp->pos) + fp->pos = random() % fp->tbl.str_numstr; + else if (fp->pos >= fp->tbl.str_numstr) + fp->pos %= fp->tbl.str_numstr; + if (fd >= 0) + (void) close(fd); +#else + fp->pos = random() % fp->tbl.str_numstr; +#endif /* OK_TO_WRITE_DISK */ + } + if (++(fp->pos) >= fp->tbl.str_numstr) + fp->pos -= fp->tbl.str_numstr; + DPRINTF(1, (stderr, "pos for %s is %d\n", fp->name, fp->pos)); +} + +/* + * get_tbl: + * Get the tbl data file the datfile. + */ +get_tbl(fp) +FILEDESC *fp; +{ + auto int fd; + register FILEDESC *child; + + if (fp->read_tbl) + return; + if (fp->child == NULL) { + if ((fd = open(fp->datfile, 0)) < 0) { + perror(fp->datfile); + exit(1); + } + if (read(fd, (char *) &fp->tbl, sizeof fp->tbl) != sizeof fp->tbl) { + fprintf(stderr, "fortune:%s corrupted\n", fp->path); + exit(1); + } + (void) close(fd); + } + else { + zero_tbl(&fp->tbl); + for (child = fp->child; child != NULL; child = child->next) { + get_tbl(child); + sum_tbl(&fp->tbl, &child->tbl); + } + } + fp->read_tbl = TRUE; +} + +/* + * zero_tbl: + * Zero out the fields we care about in a tbl structure. + */ +zero_tbl(tp) +register STRFILE *tp; +{ + tp->str_numstr = 0; + tp->str_longlen = 0; + tp->str_shortlen = -1; +} + +/* + * sum_tbl: + * Merge the tbl data of t2 into t1. + */ +sum_tbl(t1, t2) +register STRFILE *t1, *t2; +{ + t1->str_numstr += t2->str_numstr; + if (t1->str_longlen < t2->str_longlen) + t1->str_longlen = t2->str_longlen; + if (t1->str_shortlen > t2->str_shortlen) + t1->str_shortlen = t2->str_shortlen; +} + +#define STR(str) ((str) == NULL ? "NULL" : (str)) + +/* + * print_file_list: + * Print out the file list + */ +print_file_list() +{ + print_list(File_list, 0); +} + +/* + * print_list: + * Print out the actual list, recursively. + */ +print_list(list, lev) +register FILEDESC *list; +int lev; +{ + while (list != NULL) { + fprintf(stderr, "%*s", lev * 4, ""); + if (list->percent == NO_PROB) + fprintf(stderr, "___%%"); + else + fprintf(stderr, "%3d%%", list->percent); + fprintf(stderr, " %s", STR(list->name)); + DPRINTF(1, (stderr, " (%s, %s, %s)\n", STR(list->path), + STR(list->datfile), STR(list->posfile))); + putc('\n', stderr); + if (list->child != NULL) + print_list(list->child, lev + 1); + list = list->next; + } +} + +#ifndef NO_REGEX +/* + * conv_pat: + * Convert the pattern to an ignore-case equivalent. + */ +char * +conv_pat(orig) +register char *orig; +{ + register char *sp; + register unsigned int cnt; + register char *new; + + cnt = 1; /* allow for '\0' */ + for (sp = orig; *sp != '\0'; sp++) + if (isalpha(*sp)) + cnt += 4; + else + cnt++; + if ((new = malloc(cnt)) == NULL) { + fprintf(stderr, "pattern too long for ignoring case\n"); + exit(1); + } + + for (sp = new; *orig != '\0'; orig++) { + if (islower(*orig)) { + *sp++ = '['; + *sp++ = *orig; + *sp++ = toupper(*orig); + *sp++ = ']'; + } + else if (isupper(*orig)) { + *sp++ = '['; + *sp++ = *orig; + *sp++ = tolower(*orig); + *sp++ = ']'; + } + else + *sp++ = *orig; + } + *sp = '\0'; + return new; +} + +/* + * find_matches: + * Find all the fortunes which match the pattern we've been given. + */ +find_matches() +{ + Fort_len = maxlen_in_list(File_list); + DPRINTF(2, (stderr, "Maximum length is %d\n", Fort_len)); + Fortbuf = do_malloc((unsigned int) Fort_len); + + Found_one = FALSE; + matches_in_list(File_list); + return Found_one; + /* NOTREACHED */ +} + +/* + * maxlen_in_list + * Return the maximum fortune len in the file list. + */ +maxlen_in_list(list) +FILEDESC *list; +{ + register FILEDESC *fp; + register int len, maxlen; + + maxlen = 0; + for (fp = list; fp != NULL; fp = fp->next) { + if (fp->child != NULL) { + if ((len = maxlen_in_list(fp->child)) > maxlen) + maxlen = len; + } + else { + get_tbl(fp); + if (fp->tbl.str_longlen > maxlen) + maxlen = fp->tbl.str_longlen; + } + } + return maxlen; +} + +/* + * matches_in_list + * Print out the matches from the files in the list. + */ +matches_in_list(list) +FILEDESC *list; +{ + register char *sp; + register FILEDESC *fp; + int in_file; + + for (fp = list; fp != NULL; fp = fp->next) { + if (fp->child != NULL) { + matches_in_list(fp->child); + continue; + } + DPRINTF(1, (stderr, "searching in %s\n", fp->path)); + open_fp(fp); + sp = Fortbuf; + in_file = FALSE; + while (fgets(sp, Fort_len, fp->inf) != NULL) + if (!STR_ENDSTRING(sp, fp->tbl)) + sp += strlen(sp); + else { + *sp = '\0'; + if (RE_EXEC(Fortbuf)) { + printf("%c%c", fp->tbl.str_delim, fp->tbl.str_delim); + if (!in_file) { + printf(" (%s)", fp->name); + Found_one = TRUE; + in_file = TRUE; + } + putchar('\n'); + (void) fwrite(Fortbuf, 1, (sp - Fortbuf), stdout); + } + sp = Fortbuf; + } + } +} +# endif /* NO_REGEX */ + +usage() +{ + (void) fprintf(stderr, "fortune [-a"); +#ifdef DEBUG + (void) fprintf(stderr, "D"); +#endif /* DEBUG */ + (void) fprintf(stderr, "f"); +#ifndef NO_REGEX + (void) fprintf(stderr, "i"); +#endif /* NO_REGEX */ + (void) fprintf(stderr, "losw]"); +#ifndef NO_REGEX + (void) fprintf(stderr, " [-m pattern]"); +#endif /* NO_REGEX */ + (void) fprintf(stderr, "[ [#%%] file/directory/all]\n"); + exit(1); +} ADDED games/fortune/random.h Index: games/fortune/random.h ================================================================== --- games/fortune/random.h +++ games/fortune/random.h @@ -0,0 +1,13 @@ +/* $Header: random.h,v 1.2 87/11/21 17:19:53 arnold Exp $ */ + +#ifdef SYSV +# define srandom srand48 +# define random lrand48 +# ifdef NO_RANDOM +# undef NO_RANDOM +# endif +#endif + +void srnd(); + +long rnd(); Index: games/fortune/rnd.c ================================================================== --- games/fortune/rnd.c +++ games/fortune/rnd.c @@ -1,25 +1,25 @@ -/* - * Copyright (c) 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. - */ - -#ifndef lint -static char sccsid[] = "@(#)rnd.c 5.1 (Berkeley) 12/09/86"; -#endif not lint +/* $Header: rnd.c,v 1.7 88/07/28 19:10:55 arnold Exp $ */ + +# include "random.h" /* * code for when the good (berkeley) random number generator is around */ +long rnd(num) +long num; { + extern long random(); + return (random() % num); } +void srnd(num) +long num; { srandom(num); } #ifdef NO_RANDOM @@ -370,6 +370,6 @@ } } return( i ); } -#endif NO_RANDOM +#endif /* NO_RANDOM */ ADDED games/fortune/strfile/strfile.8 Index: games/fortune/strfile/strfile.8 ================================================================== --- games/fortune/strfile/strfile.8 +++ games/fortune/strfile/strfile.8 @@ -0,0 +1,132 @@ +.\" Copyright (c) 1989 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 are permitted +.\" provided that the above copyright notice and this paragraph are +.\" duplicated in all such forms and that any documentation, +.\" advertising materials, and other materials related to such +.\" distribution and use acknowledge that the software was developed +.\" by the University of California, Berkeley. The name of the +.\" University may not be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +.\" +.\" @(#)strfile.8 5.5 (Berkeley) 09/06/89 +.\" +.TH STRFILE 8 "" +.UC 4 +.SH NAME +strfile, unstr \- create a random access file for storing strings +.SH SYNOPSIS +.B strfile +[ +.B \-iorsx +] [ +.B \-c char +] +sourcefile +[ datafile ] +.sp +.B unstr +sourcfile +.SH DESCRIPTION +.I Strfile +takes a file which contains a set of strings and creates a data file +which contains those strings, along with a seek pointer table to the +beginning of each. +This allows random access of the strings. +.PP +The source file contains strings separated by lines containing +a single percent (``%'') sign. +.PP +The data file, if not specified on the command line, is named +.IB sourcefile .out , +and contains a header, which describes the contents of the data file, +the seek pointers to the beginning of each string, and the strings +themselves, terminated by null bytes. +.PP +The options are as follows: +.TP +.BI \-c \ char +Change the delimiting character from the percent sign to +.IR char . +.TP +.B \-i +Ignore case when ordering the strings. +.TP +.B \-o +Order the strings in alphabetical order. +The strings will be stored in the same order in the data file +as they were in the source, but the seek pointer table will be +sorted in alphabetical order of the strings pointed to. +Any +.I initial +non-alphanumeric characters are ignored. +This option sets the STR_ORDERED bit in the +.B str_flags +field of the header. +.TP +.B \-r +Randomize the order of the seek pointers in the table. +The strings will be stored in the same order in the data file +as they were in the source, but the seek pointer table will +be randomized. +This option sets the STR_RANDOM bit in the +.B str_flags +field of the header. +.TP +.B \-s +Run silently; don't give a summary of data at the end. +.TP +.B \-x +Set the rotated bit in the header to indicate the the fortunes +are rotated 13 positions in a simply caesar cypher. +.PP +The format of the header is: +.sp +.nf +#define STR_RANDOM 0x1 +#define STR_ORDERED 0x2 +#define STR_ROTATED 0x4 + +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 */ +unsigned char str_flags; /* bit field for flags */ +char str_delim; /* delimiting character */ +.fi +.PP +The field +.B str_flags +will have the bit STR_RANDOM set if the +.B \-r +flag was specified, or STR_ORDERED if the +.B \-o +flag was specified, or STR_ROTATED if the +.B \-x +flag was specified. +.PP +The purpose of +.I unstr +is to undo the work of +.IR strfile . +It prints out the strings contained in the file +.I sourcefile +in the order that they are listed in +the header file +.IB sourcefile .dat +to standard output. +It is possible to create sorted versions of input files by using +.B \-o +when +.I strfile +is run and then using +.I unstr +to dump them out in the table order. +.SH "SEE ALSO" +fortune(6) Index: games/fortune/strfile/strfile.c ================================================================== --- games/fortune/strfile/strfile.c +++ games/fortune/strfile/strfile.c @@ -1,30 +1,55 @@ /* - * Copyright (c) 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. + * Copyright (c) 1989 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 are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#ifndef lint +char copyright[] = +"@(#) Copyright (c) 1989 The Regents of the University of California.\n\ + All rights reserved.\n"; +#endif /* not lint */ + #ifndef lint -static char sccsid[] = "@(#)strfile.c 5.1 (Berkeley) 12/09/86"; -#endif not lint +static char sccsid[] = "@(#)strfile.c 5.7 (Berkeley) 09/06/89"; +#endif /* not lint */ +# include +# include # include # include # include "strfile.h" +# ifndef MAXPATHLEN +# define MAXPATHLEN 1024 +# endif /* MAXPATHLEN */ + /* * This program takes a file composed of strings seperated by * lines starting with two consecutive delimiting character (default * character is '%') and creates another file which consists of a table * describing the file (structure from "strfile.h"), a table of seek - * pointers to the start of the strings, and the strings, each terinated + * pointers to the start of the strings, and the strings, each terminated * by a null byte. Usage: * - * % strfile [ - ] [ -cC ] [ -sv ] [ -oir ] sourcefile [ datafile ] + * % strfile [-iorsv] [ -cC ] sourcefile [ datafile ] * - * - - Give a usage summary useful for jogging the memory * c - Change delimiting character from '%' to 'C' * s - Silent. Give no summary of data processed at the end of * the run. * v - Verbose. Give summary of data processed. (Default) * o - order the strings in alphabetic order @@ -31,286 +56,266 @@ * i - if ordering, ignore case * r - randomize the order of the strings * * Ken Arnold Sept. 7, 1978 -- * - * Added method to indicate dividers. A "%-" will cause the address - * to be added to the structure in one of the pointer elements. - * - * Ken Arnold Nov., 1984 -- - * * Added ordering options. */ # define TRUE 1 # define FALSE 0 -# define DELIM_CH '-' +# define STORING_PTRS (Oflag || Rflag) +# define CHUNKSIZE 512 + +#ifdef lint +# define ALWAYS atoi("1") +#else +# define ALWAYS 1 +#endif +# define ALLOC(ptr,sz) if (ALWAYS) { \ + if (ptr == NULL) \ + ptr = malloc((unsigned int) (CHUNKSIZE * sizeof *ptr)); \ + else if (((sz) + 1) % CHUNKSIZE == 0) \ + ptr = realloc((void *) ptr, ((unsigned int) ((sz) + CHUNKSIZE) * sizeof *ptr)); \ + if (ptr == NULL) { \ + fprintf(stderr, "out of space\n"); \ + exit(1); \ + } \ + } else + +#ifdef NO_VOID +# define void char +#endif typedef struct { char first; - long pos; + off_t pos; } STR; char *Infile = NULL, /* input file name */ - Outfile[100] = "", /* output file name */ - Delimch = '%', /* delimiting character */ - *Usage[] = { /* usage summary */ - "usage: strfile [ - ] [ -cC ] [ -sv ] [ -oir ] inputfile [ datafile ]", - " - - Give this usage summary", - " c - Replace delimiting character with 'C'", - " s - Silent. Give no summary", - " v - Verbose. Give summary. (default)", - " o - order strings alphabetically", - " i - ignore case in ordering", - " r - randomize the order of the strings", - " Default \"datafile\" is inputfile.dat", - NULL - }; + Outfile[MAXPATHLEN] = "", /* output file name */ + Delimch = '%'; /* delimiting character */ int Sflag = FALSE; /* silent run flag */ int Oflag = FALSE; /* ordering flag */ int Iflag = FALSE; /* ignore case flag */ int Rflag = FALSE; /* randomize order flag */ -int Delim = 0; /* current delimiter number */ +int Num_pts = 0; /* number of pointers/strings */ -long *Seekpts; +off_t *Seekpts; FILE *Sort_1, *Sort_2; /* pointers for sorting */ STRFILE Tbl; /* statistics table */ STR *Firstch; /* first chars of each string */ -char *fgets(), *malloc(), *strcpy(), *strcat(); +char *fgets(), *strcpy(), *strcat(); -long ftell(); +void *malloc(), *realloc(); +/* + * 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. + */ main(ac, av) int ac; char **av; { register char *sp, dc; - register long *lp; - register unsigned int curseek; /* number of strings */ - register long *seekpts, li; /* table of seek pointers */ register FILE *inf, *outf; + register off_t last_off, length, pos; register int first; register char *nsp; register STR *fp; static char string[257]; getargs(ac, av); /* evalute arguments */ - - /* - * initial counting of input file - */ - dc = Delimch; if ((inf = fopen(Infile, "r")) == NULL) { perror(Infile); - exit(-1); - } - for (curseek = 0; (sp = fgets(string, 256, inf)) != NULL; ) - if (*sp++ == dc && (*sp == dc || *sp == DELIM_CH)) - curseek++; - curseek++; - - /* - * save space at begginning of file for tables - */ + exit(1); + } if ((outf = fopen(Outfile, "w")) == NULL) { perror(Outfile); - exit(-1); - } - - /* - * Allocate space for the pointers, adding one to the end so the - * length of the final string can be calculated. - */ - ++curseek; - seekpts = (long *) malloc(sizeof *seekpts * curseek); /* NOSTRICT */ - if (seekpts == NULL) { - perror("calloc"); - exit(-1); - } - if (Oflag) { - Firstch = (STR *) malloc(sizeof *Firstch * curseek); - if (Firstch == NULL) { - perror("calloc"); - exit(-1); - } - } - - (void) fseek(outf, (long) (sizeof Tbl + sizeof *seekpts * curseek), 0); - (void) fseek(inf, (long) 0, 0); /* goto start of input */ - - /* - * write the strings onto the file + exit(1); + } + if (!STORING_PTRS) + (void) fseek(outf, sizeof Tbl, 0); + + /* + * Write the strings onto the file */ Tbl.str_longlen = 0; Tbl.str_shortlen = (unsigned int) 0xffffffff; - lp = seekpts; - first = Oflag; - *seekpts = ftell(outf); - fp = Firstch; - do { - sp = fgets(string, 256, inf); - if (sp == NULL || - (*sp == dc && (sp[1] == dc || sp[1] == DELIM_CH))) { - putc('\0', outf); - *++lp = ftell(outf); - li = ftell(outf) - lp[-1] - 1; - if (Tbl.str_longlen < li) - Tbl.str_longlen = li; - if (Tbl.str_shortlen > li) - Tbl.str_shortlen = li; - if (sp && sp[1] == DELIM_CH && Delim < MAXDELIMS) - Tbl.str_delims[Delim++] = lp - seekpts; - first = Oflag; - } - else { - if (first) { - for (nsp = sp; !isalnum(*nsp); nsp++) - continue; - if (Iflag && isupper(*nsp)) - fp->first = tolower(*nsp); - else - fp->first = *nsp; - fp->pos = *lp; - fp++; - first = FALSE; - } - fputs(sp, outf); + Tbl.str_delim = dc; + 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 - strlen(sp); + last_off = pos; + if (!length) + continue; + add_offset(outf, pos); + if (Tbl.str_longlen < length) + Tbl.str_longlen = length; + if (Tbl.str_shortlen > length) + Tbl.str_shortlen = length; + first = Oflag; + } + else if (first) { + for (nsp = sp; !isalnum(*nsp); nsp++) + continue; + ALLOC(Firstch, Num_pts); + fp = &Firstch[Num_pts - 1]; + if (Iflag && isupper(*nsp)) + fp->first = tolower(*nsp); + else + fp->first = *nsp; + fp->pos = Seekpts[Num_pts - 1]; + first = FALSE; } } while (sp != NULL); /* * write the tables in */ (void) fclose(inf); - Tbl.str_numstr = curseek - 1; + Tbl.str_numstr = Num_pts - 1; if (Oflag) - do_order(seekpts, outf); + do_order(); else if (Rflag) - randomize(seekpts); + randomize(); - (void) fseek(outf, (long) 0, 0); + (void) fseek(outf, (off_t) 0, 0); (void) fwrite((char *) &Tbl, sizeof Tbl, 1, outf); - (void) fwrite((char *) seekpts, sizeof *seekpts, curseek, outf); + if (STORING_PTRS) + (void) fwrite((char *) Seekpts, sizeof *Seekpts, (int) Num_pts, outf); (void) fclose(outf); if (!Sflag) { - printf("\"%s\" converted to \"%s\"\n", Infile, Outfile); - if (curseek == 0) + printf("\"%s\" created\n", Outfile); + if (Num_pts == 2) puts("There was 1 string"); else - printf("There were %u strings\n", curseek - 1); - printf("Longest string: %u byte%s\n", Tbl.str_longlen, + printf("There were %d strings\n", Num_pts - 1); + printf("Longest string: %lu byte%s\n", Tbl.str_longlen, Tbl.str_longlen == 1 ? "" : "s"); - printf("Shortest string: %u byte%s\n", Tbl.str_shortlen, + printf("Shortest string: %lu byte%s\n", Tbl.str_shortlen, Tbl.str_shortlen == 1 ? "" : "s"); } exit(0); + /* NOTREACHED */ } /* * This routine evaluates arguments from the command line */ -getargs(ac, av) -register int ac; -register char **av; -{ - register char *sp; - register int i; - register int bad, j; - - bad = 0; - for (i = 1; i < ac; i++) - if (*av[i] == '-' && av[i][1]) { - for (sp = &av[i][1]; *sp; sp++) - switch (*sp) { - case 'c': /* new delimiting char */ - if ((Delimch = *++sp) == '\0') { - --sp; - Delimch = *av[++i]; - } - if (Delimch <= 0 || Delimch > '~' || - Delimch == DELIM_CH) { - printf("bad delimiting character: '\\%o\n'", - Delimch); - bad++; - } - break; - case 's': /* silent */ - Sflag++; - break; - case 'v': /* verbose */ - Sflag = 0; - break; - case 'o': /* order strings */ - Oflag++; - break; - case 'i': /* ignore case in ordering */ - Iflag++; - break; - case 'r': /* ignore case in ordering */ - Rflag++; - break; - default: /* unknown flag */ - bad++; - printf("bad flag: '%c'\n", *sp); - break; - } - } - else if (*av[i] == '-') { - for (j = 0; Usage[j]; j++) - puts(Usage[j]); - exit(0); - } - else if (Infile) - (void) strcpy(Outfile, av[i]); - else - Infile = av[i]; - if (!Infile) { - bad++; - puts("No input file name"); - } - if (*Outfile == '\0' && !bad) { +getargs(argc, argv) +int argc; +char **argv; +{ + extern char *optarg; + extern int optind; + int ch; + + while ((ch = getopt(argc, argv, "c:iors")) != EOF) + 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': /* ignore case in ordering */ + Rflag++; + break; + case 's': /* silent */ + Sflag++; + 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"); } - if (bad) { - puts("use \"strfile -\" to get usage"); - exit(-1); +} + +usage() +{ + (void) fprintf(stderr, + "strfile [-iors] [-c char] sourcefile [datafile]\n"); + exit(1); +} + +/* + * add_offset: + * Add an offset to the list, or write it out, as appropriate. + */ +add_offset(fp, off) +FILE *fp; +off_t off; +{ + if (!STORING_PTRS) + fwrite(&off, 1, sizeof off, fp); + else { + ALLOC(Seekpts, Num_pts + 1); + Seekpts[Num_pts] = off; } + Num_pts++; } /* * do_order: * Order the strings alphabetically (possibly ignoring case). */ -do_order(seekpts, outf) -long *seekpts; -FILE *outf; +do_order() { register int i; - register long *lp; + register off_t *lp; register STR *fp; extern int cmp_str(); - (void) fflush(outf); - Sort_1 = fopen(Outfile, "r"); - Sort_2 = fopen(Outfile, "r"); - Seekpts = seekpts; - qsort((char *) Firstch, Tbl.str_numstr, sizeof *Firstch, cmp_str); + 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; + lp = Seekpts; fp = Firstch; while (i--) *lp++ = fp++->pos; (void) fclose(Sort_1); (void) fclose(Sort_2); @@ -319,86 +324,98 @@ /* * cmp_str: * Compare two strings in the file */ +char * +unctrl(c) +char c; +{ + static char buf[3]; + + if (isprint(c)) { + buf[0] = c; + buf[1] = '\0'; + } + else if (c == 0177) { + buf[0] = '^'; + buf[1] = '?'; + } + else { + buf[0] = '^'; + buf[1] = c + 'A' - 1; + } + return buf; +} + cmp_str(p1, p2) STR *p1, *p2; { register int c1, c2; + register int n1, n2; + +# define SET_N(nf,ch) (nf = (ch == '\n')) +# define IS_END(ch,nf) (ch == Delimch && nf) c1 = p1->first; c2 = p2->first; if (c1 != c2) return c1 - c2; (void) fseek(Sort_1, p1->pos, 0); (void) fseek(Sort_2, p2->pos, 0); + n1 = FALSE; + n2 = FALSE; while (!isalnum(c1 = getc(Sort_1)) && c1 != '\0') - continue; + SET_N(n1, c1); while (!isalnum(c2 = getc(Sort_2)) && c2 != '\0') - continue; + SET_N(n2, c2); - while (c1 != '\0' && c2 != '\0') { + 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. */ -randomize(seekpts) -register long *seekpts; +randomize() { - register int cnt, i, j, start; - register long tmp; - register long *origsp; + register int cnt, i; + register off_t tmp; + register off_t *sp; + extern time_t time(); Tbl.str_flags |= STR_RANDOM; - srnd(time((long *) NULL) + getpid()); - origsp = seekpts; - for (j = 0; j <= Delim; j++) { - - /* - * get the starting place for the block - */ - - if (j == 0) - start = 0; - else - start = Tbl.str_delims[j - 1]; - - /* - * get the ending point - */ - - if (j == Delim) - cnt = Tbl.str_numstr; - else - cnt = Tbl.str_delims[j]; - - /* - * move things around randomly - */ - - for (seekpts = &origsp[start]; cnt > start; cnt--, seekpts++) { - i = rnd(cnt - start); - tmp = seekpts[0]; - seekpts[0] = seekpts[i]; - seekpts[i] = tmp; - } + 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; } } Index: games/fortune/strfile/strfile.h ================================================================== --- games/fortune/strfile/strfile.h +++ games/fortune/strfile/strfile.h @@ -1,26 +1,45 @@ /* - * Copyright (c) 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. + * Copyright (c) 1989 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 are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)strfile.h 5.5 (Berkeley) 09/06/89 */ -/* @(#)strfile.h 1.2 (Berkeley) 5/14/81 */ +# ifndef __STRFILE__ -# define MAXDELIMS 3 +# define __STRFILE__ /* * bits for flag field */ # define STR_RANDOM 0x1 # define STR_ORDERED 0x2 - -struct strfile { /* information table */ - unsigned int str_numstr; /* # of strings in the file */ - unsigned int str_longlen; /* length of longest string */ - unsigned int str_shortlen; /* length of shortest string */ - long str_delims[MAXDELIMS]; /* delimiter markings */ - int str_flags; /* bit field for flags */ -}; - -typedef struct strfile STRFILE; +# define STR_ROTATED 0x4 + +# define STR_ENDSTRING(line,tbl) ((line)[0] == (tbl).str_delim && (line)[1] == '\n') + +typedef struct { /* information table */ + 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 */ + unsigned char str_flags; /* bit field for flags */ + char str_delim; /* delimiting character */ +} STRFILE; + +# endif /* __STRFILE__ */ Index: games/fortune/tools/Do_troff ================================================================== --- games/fortune/tools/Do_troff +++ games/fortune/tools/Do_troff @@ -1,4 +1,27 @@ #!/bin/csh -f +# +# Copyright (c) 1989 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 are permitted +# provided that the above copyright notice and this paragraph are +# duplicated in all such forms and that any documentation, +# advertising materials, and other materials related to such +# distribution and use acknowledge that the software was developed +# by the University of California, Berkeley. The name of the +# University may not be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +# +# @(#)Do_troff 5.3 (Berkeley) 09/05/89 +# set file=$1 shift -( echo ".ds Se $file" ; cat Troff.mac ; sed -f Troff.sed $file ) | $* -me +( echo ".ds Se $file" ; cat Troff.mac ; sed -f Troff.sed $file ) | \ + $* -me >& $file.tr +echo troff output in $file.tr Index: games/fortune/unstr/unstr.c ================================================================== --- games/fortune/unstr/unstr.c +++ games/fortune/unstr/unstr.c @@ -1,20 +1,34 @@ /* - * Copyright (c) 1986 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. + * Copyright (c) 1989 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 are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef lint -static char sccsid[] = "@(#)unstr.c 5.1 (Berkeley) 12/09/86"; -#endif not lint - -# include -# include "strfile.h" - -# define TRUE 1 -# define FALSE 0 +char copyright[] = +"@(#) Copyright (c) 1989 The Regents of the University of California.\n\ + All rights reserved.\n"; +#endif /* not lint */ + +#ifndef lint +static char sccsid[] = "@(#)unstr.c 5.4 (Berkeley) 09/05/89"; +#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 @@ -25,113 +39,85 @@ * they are treated literally as the input and output files. * * Ken Arnold Aug 13, 1978 */ -# define DELIM_CH '-' - -char Infile[100], /* name of input file */ - Outfile[100]; /* name of output file */ - -short Oflag = FALSE; /* use order of initial table */ - -FILE *Inf, *Outf; - -char *rindex(), *malloc(), *strcat(), *strcpy(); - +# include +# include +# include "strfile.h" +# include +# include + +# 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; + +char *strcat(), *strcpy(); + +/* ARGSUSED */ main(ac, av) int ac; char **av; { - register char c; - register int nstr, delim; - static STRFILE tbl; /* description table */ - - getargs(ac, av); - if ((Inf = fopen(Infile, "r")) == NULL) { - perror(Infile); - exit(-1); - /* NOTREACHED */ - } - if ((Outf = fopen(Outfile, "w")) == NULL) { - perror(Outfile); - exit(-1); - /* NOTREACHED */ - } - (void) fread((char *) &tbl, sizeof tbl, 1, Inf); - if (Oflag) { - order_unstr(&tbl); - exit(0); - /* NOTREACHED */ - } - nstr = tbl.str_numstr; - (void) fseek(Inf, (long) (sizeof (long) * (nstr + 1)), 1); - delim = 0; - for (nstr = 0; (c = getc(Inf)) != EOF; nstr++) - if (c != '\0') - putc(c, Outf); - else if (nstr != tbl.str_numstr - 1) - if (nstr == tbl.str_delims[delim]) { - fputs("%-\n", Outf); - delim++; - } - else - fputs("%%\n", Outf); - exit(0); - /* NOTREACHED */ -} - -getargs(ac, av) -register int ac; -register char **av; -{ - register char *sp; - - if (ac > 1 && strcmp(av[1], "-o") == 0) { - Oflag++; - ac--; - av++; - } - if (ac < 2) { - printf("usage: %s datafile[.dat] [ outfile ]\n", av[0]); - exit(-1); - } - (void) strcpy(Infile, av[1]); - if (ac < 3) { - (void) strcpy(Outfile, Infile); - if ((sp = rindex(av[1], '.')) && strcmp(sp, ".dat") == 0) - Outfile[strlen(Outfile) - 4] = '\0'; - else - (void) strcat(Infile, ".dat"); - } - else - (void) strcpy(Outfile, av[2]); + static STRFILE tbl; /* description table */ + + getargs(av); + if ((Inf = fopen(Infile, "r")) == NULL) { + perror(Infile); + exit(1); + } + if ((Dataf = fopen(Datafile, "r")) == NULL) { + perror(Datafile); + exit(1); + } + (void) fread((char *) &tbl, sizeof tbl, 1, Dataf); + 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); +} + +getargs(av) +register char *av[]; +{ + if (!*++av) { + (void) fprintf(stderr, "usage: unstr datafile\n"); + exit(1); + } + Infile = *av; + (void) strcpy(Datafile, Infile); + (void) strcat(Datafile, ".dat"); } order_unstr(tbl) -STRFILE *tbl; -{ - register int i, c; - register int delim; - register long *seekpts; - - seekpts = (long *) malloc(sizeof *seekpts * tbl->str_numstr); /* NOSTRICT */ - if (seekpts == NULL) { - perror("malloc"); - exit(-1); - /* NOTREACHED */ - } - (void) fread((char *) seekpts, sizeof *seekpts, tbl->str_numstr, Inf); - delim = 0; - for (i = 0; i < tbl->str_numstr; i++, seekpts++) { - if (i != 0) - if (i == tbl->str_delims[delim]) { - fputs("%-\n", Outf); - delim++; - } - else - fputs("%%\n", Outf); - (void) fseek(Inf, *seekpts, 0); - while ((c = getc(Inf)) != '\0') - putc(c, Outf); +register STRFILE *tbl; +{ + register int i; + register char *sp; + auto 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, pos, 0); + if (i != 0) + (void) printf("%c\n", Delimch); + for (;;) { + sp = fgets(buf, sizeof buf, Inf); + if (sp == NULL || STR_ENDSTRING(sp, *tbl)) + break; + else + fputs(sp, stdout); + } } } Index: libexec/rlogind/rlogind.c ================================================================== --- libexec/rlogind/rlogind.c +++ libexec/rlogind/rlogind.c @@ -1,11 +1,5 @@ - -/* - * $Source: /mit/kerberos/ucb/mit/rlogind/RCS/rlogind.c,v $ - * $Header: rlogind.c,v 5.0 89/06/26 18:31:01 kfall Locked $ - */ - /* * Copyright (c) 1983, 1988 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted @@ -26,13 +20,20 @@ "@(#) Copyright (c) 1983, 1988 The Regents of the University of California.\n\ All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)rlogind.c 5.35 (Berkeley) 4/2/89"; +static char sccsid[] = "@(#)rlogind.c 5.37 (Berkeley) 09/06/89"; #endif /* not lint */ +#ifdef KERBEROS +/* From: + * $Source: /mit/kerberos/ucb/mit/rlogind/RCS/rlogind.c,v $ + * $Header: rlogind.c,v 5.0 89/06/26 18:31:01 kfall Locked $ + */ + +#endif /* * remote login server: * \0 * remuser\0 * locuser\0 @@ -73,29 +74,22 @@ u_char tick_buf[sizeof(KTEXT_ST)]; Key_schedule schedule; int encrypt = 0, retval, use_kerberos = 0, vacuous = 0; int do_krb_login(); -#if BSD > 43 -#define ARGSTR "lnkvx" -#else -#define ARGSTR "nkvx" -#endif -#else -#if BSD > 43 -#define ARGSTR "ln" -#else -#define ARGSTR "n" -#endif +#define ARGSTR "alnkvx" +#else +#define ARGSTR "aln" #endif /* KERBEROS */ char *env[2]; #define NMAX 30 char lusername[NMAX+1], rusername[NMAX+1]; static char term[64] = "TERM="; #define ENVSIZE (sizeof("TERM=")-1) /* skip null for concatenation */ int keepalive = 1; +int check_all = 0; #define SUPERUSER(pwd) ((pwd)->pw_uid == 0) extern int errno; int reapchild(); @@ -105,27 +99,26 @@ main(argc, argv) int argc; char **argv; { extern int opterr, optind; -#if BSD > 43 extern int _check_rhosts_file; -#endif int ch; int on = 1, fromlen; struct sockaddr_in from; openlog("rlogind", LOG_PID | LOG_CONS, LOG_AUTH); opterr = 0; while ((ch = getopt(argc, argv, ARGSTR)) != EOF) switch (ch) { -#if BSD > 43 + case 'a': + check_all = 1; + break; case 'l': _check_rhosts_file = 0; break; -#endif case 'n': keepalive = 0; break; #ifdef KERBEROS case 'k': @@ -202,11 +195,11 @@ * Only the name is used below. */ hp = &hostent; hp->h_name = inet_ntoa(fromp->sin_addr); hostok++; - } else if (local_domain(hp->h_name)) { + } else if (check_all || local_domain(hp->h_name)) { /* * If name returned by gethostbyaddr is in our domain, * attempt to verify that we haven't been fooled by someone * in a remote net; look up the name and check that this * address corresponds to the name. @@ -726,31 +719,51 @@ #endif /* KERBEROS */ usage() { #ifdef KERBEROS - syslog(LOG_ERR, "usage: rlogind [-k | -v] [-l] [-n]"); + syslog(LOG_ERR, "usage: rlogind [-k | -v] [-a] [-l] [-n]"); #else - syslog(LOG_ERR, "usage: rlogind [-l] [-n]"); + syslog(LOG_ERR, "usage: rlogind [-a] [-l] [-n]"); #endif } /* * Check whether host h is in our local domain, - * as determined by the part of the name following - * the first '.' in its name and in ours. + * defined as sharing the last two components of the domain part, + * or the entire domain part if the local domain has only one component. * If either name is unqualified (contains no '.'), * assume that the host is local, as it will be * interpreted as such. */ local_domain(h) char *h; { char localhost[MAXHOSTNAMELEN]; - char *p1, *p2 = index(h, '.'); + char *p1, *p2, *topdomain(); + localhost[0] = 0; (void) gethostname(localhost, sizeof(localhost)); - p1 = index(localhost, '.'); + p1 = topdomain(localhost); + p2 = topdomain(h); if (p1 == NULL || p2 == NULL || !strcasecmp(p1, p2)) return(1); return(0); } + +char * +topdomain(h) + char *h; +{ + register char *p; + char *maybe = NULL; + int dots = 0; + + for (p = h + strlen(h); p >= h; p--) { + if (*p == '.') { + if (++dots == 2) + return (p); + maybe = p; + } + } + return (maybe); +} Index: libexec/telnetd/state.c ================================================================== --- libexec/telnetd/state.c +++ libexec/telnetd/state.c @@ -14,11 +14,11 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef lint -static char sccsid[] = "@(#)state.c 5.1 (Berkeley) 09/01/89"; +static char sccsid[] = "@(#)state.c 5.2 (Berkeley) 09/05/89"; #endif /* not lint */ #include "telnetd.h" char doopt[] = { IAC, DO, '%', 'c', 0 }; @@ -854,11 +854,11 @@ } /* end of case TELOPT_TSPEED */ case TELOPT_TTYPE: { /* Yaaaay! */ static char terminalname[5+41] = "TERM="; - if (hisopts[TELOPT_TSPEED] == OPT_NO) /* Ignore if option disabled */ + if (hisopts[TELOPT_TTYPE] == OPT_NO) /* Ignore if option disabled */ break; settimer(ttypesubopt); if (SB_GET() != TELQUAL_IS) { return; /* ??? XXX but, this is the most robust */ Index: libexec/telnetd/sys_term.c ================================================================== --- libexec/telnetd/sys_term.c +++ libexec/telnetd/sys_term.c @@ -14,11 +14,11 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef lint -static char sccsid[] = "@(#)sys_term.c 5.1 (Berkeley) 09/01/89"; +static char sccsid[] = "@(#)sys_term.c 5.2 (Berkeley) 09/05/89"; #endif /* not lint */ #include "telnetd.h" #include "pathnames.h" @@ -822,11 +822,11 @@ #endif /* CRAY */ /* * set up standard paths before forking to login */ -#ifdef BSD >43 +#if BSD >43 if (setsid() < 0) fatalperror(net, "setsid"); if (ioctl(t, TIOCSCTTY, (char *)0) < 0) fatalperror(net, "ioctl(sctty)"); #endif Index: libexec/telnetd/telnetd.c ================================================================== --- libexec/telnetd/telnetd.c +++ libexec/telnetd/telnetd.c @@ -20,11 +20,11 @@ "@(#) Copyright (c) 1989 Regents of the University of California.\n\ All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)telnetd.c 5.38 (Berkeley) 09/01/89"; +static char sccsid[] = "@(#)telnetd.c 5.39 (Berkeley) 09/05/89"; #endif /* not lint */ #include "telnetd.h" /* @@ -366,12 +366,10 @@ /* * Do some tests where it is desireable to wait for a response. * Rather than doing them slowly, one at a time, do them all * at once. */ - if (!myopts[TELOPT_ECHO]) - dooption(TELOPT_ECHO); if (!myopts[TELOPT_SGA]) dooption(TELOPT_SGA); /* * Is the client side a 4.2 (NOT 4.3) system? We need to know this * because 4.2 clients are unable to deal with TCP urgent data. @@ -413,10 +411,31 @@ * Kludge upon kludge. */ while (hiswants[TELOPT_NAWS] != hisopts[TELOPT_NAWS]) ttloop(); + /* + * On the off chance that the telnet client is broken and does not + * respond to the DO ECHO we sent, (after all, we did send the + * DO NAWS negotiation after the DO ECHO, and we won't get here + * until a response to the DO NAWS comes back) simulate the + * receipt of a will echo. This will also send a WONT ECHO + * to the client, since we assume that the client failed to + * respond because it believes that it is already in DO ECHO + * mode, which we do not want. + */ + if (hiswants[TELOPT_ECHO] == OPT_YES) + willoption(TELOPT_ECHO, 0); + + /* + * Finally, to clean things up, we turn on our echo. This + * will break stupid 4.2 telnets out of local terminal echo. + */ + + if (!myopts[TELOPT_ECHO]) + dooption(TELOPT_ECHO); + /* * Turn on packet mode, and default to line at at time mode. */ (void) ioctl(p, TIOCPKT, (char *)&on); #ifdef LINEMODE Index: old/MAKEHOSTS/MAKEHOSTS.sh ================================================================== --- old/MAKEHOSTS/MAKEHOSTS.sh +++ old/MAKEHOSTS/MAKEHOSTS.sh @@ -13,15 +13,15 @@ # from this software without specific prior written permission. # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)MAKEHOSTS.sh 5.1 (Berkeley) 03/13/89 +# @(#)MAKEHOSTS.sh 5.2 (Berkeley) 09/05/89 # # program to link to -RSH=/usr/ucb/rsh +RSH=/usr/bin/rsh # address search pattern to recognize local hosts LOCALADDR='^128\.32' # awk pattern for uninteresting (eg, long form) alias Index: sbin/newfs/Makefile ================================================================== --- sbin/newfs/Makefile +++ sbin/newfs/Makefile @@ -12,13 +12,13 @@ # from this software without specific prior written permission. # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # -# @(#)Makefile 7.5 (Berkeley) 05/11/89 +# @(#)Makefile 7.7 (Berkeley) 09/06/89 # -CFLAGS= -O +CFLAGS= -O -DMFS LIBC= /lib/libc.a SRCS= newfs.c mkfs.c OBJS= newfs.o mkfs.o MAN= newfs.0 @@ -36,12 +36,14 @@ depend: ${SRCS} mkdep ${CFLAGS} ${SRCS} install: ${MAN} install -s -o bin -g bin -m 755 newfs ${DESTDIR}/sbin/newfs + rm -f ${DESTDIR}/sbin/memfs + ln ${DESTDIR}/sbin/newfs ${DESTDIR}/sbin/memfs install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat8 lint: ${SRCS} lint ${CFLAGS} ${SRCS} tags: ${SRCS} ctags ${SRCS} Index: sbin/newfs/mkfs.c ================================================================== --- sbin/newfs/mkfs.c +++ sbin/newfs/mkfs.c @@ -1,22 +1,35 @@ /* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. + * Copyright (c) 1980, 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef lint -static char sccsid[] = "@(#)mkfs.c 6.10 (Berkeley) 07/01/89"; -#endif not lint +static char sccsid[] = "@(#)mkfs.c 6.11 (Berkeley) 09/06/89"; +#endif /* not lint */ #ifndef STANDALONE #include #include #endif #include #include +#include +#include #include #include #include #include #include @@ -53,10 +66,11 @@ #define POWEROF2(num) (((num) & ((num) - 1)) == 0) /* * variables set up by front end. */ +extern int memfs; /* run as the memory based filesystem */ extern int Nflag; /* run mkfs without writing file system */ extern int fssize; /* file system size */ extern int ntracks; /* # tracks/cylinder */ extern int nsectors; /* # sectors/track */ extern int nphyssectors; /* # sectors/track including spares */ @@ -78,10 +92,13 @@ extern int rotdelay; /* rotational delay between blocks */ extern int maxbpg; /* maximum blocks per file in a cyl group */ extern int nrpos; /* # of distinguished rotational positions */ extern int bbsize; /* boot block size */ extern int sbsize; /* superblock size */ +extern u_long memleft; /* virtual memory available */ +extern caddr_t membase; /* start address of memory based filesystem */ +extern caddr_t malloc(), calloc(); union { struct fs fs; char pad[SBSIZE]; } fsun; @@ -108,61 +125,81 @@ register long i, mincpc, mincpg, inospercg; long cylno, rpos, blk, j, warn = 0; long used, mincpgcnt, bpcg; long mapcramped, inodecramped; long postblsize, rotblsize, totalsbsize; + int ppid, status, started(); #ifndef STANDALONE time(&utime); #endif + if (memfs) { + ppid = getpid(); + (void) signal(SIGUSR1, started); + if (i = fork()) { + if (i == -1) { + perror("memfs"); + exit(10); + } + if (waitpid(i, &status, 0) != -1 && WIFEXITED(status)) + exit(WEXITSTATUS(status)); + exit(11); + /* NOTREACHED */ + } + (void)malloc(0); + if (fssize * sectorsize > memleft) + fssize = (memleft - 16384) / sectorsize; + if ((membase = malloc(fssize * sectorsize)) == 0) + exit(12); + } fsi = fi; fso = fo; /* * Validate the given file system size. * Verify that its last block can actually be accessed. */ if (fssize <= 0) - printf("preposterous size %d\n", fssize), exit(1); + printf("preposterous size %d\n", fssize), exit(13); wtfs(fssize - 1, sectorsize, (char *)&sblock); /* * collect and verify the sector and track info */ sblock.fs_nsect = nsectors; sblock.fs_ntrak = ntracks; if (sblock.fs_ntrak <= 0) - printf("preposterous ntrak %d\n", sblock.fs_ntrak), exit(1); + printf("preposterous ntrak %d\n", sblock.fs_ntrak), exit(14); if (sblock.fs_nsect <= 0) - printf("preposterous nsect %d\n", sblock.fs_nsect), exit(1); + printf("preposterous nsect %d\n", sblock.fs_nsect), exit(15); /* * collect and verify the block and fragment sizes */ sblock.fs_bsize = bsize; sblock.fs_fsize = fsize; if (!POWEROF2(sblock.fs_bsize)) { printf("block size must be a power of 2, not %d\n", sblock.fs_bsize); - exit(1); + exit(16); } if (!POWEROF2(sblock.fs_fsize)) { printf("fragment size must be a power of 2, not %d\n", sblock.fs_fsize); - exit(1); + exit(17); } if (sblock.fs_fsize < sectorsize) { printf("fragment size %d is too small, minimum is %d\n", sblock.fs_fsize, sectorsize); - exit(1); + exit(18); } if (sblock.fs_bsize < MINBSIZE) { printf("block size %d is too small, minimum is %d\n", sblock.fs_bsize, MINBSIZE); - exit(1); + exit(19); } if (sblock.fs_bsize < sblock.fs_fsize) { printf("block size (%d) cannot be smaller than fragment size (%d)\n", sblock.fs_bsize, sblock.fs_fsize); - exit(1); + exit(20); } sblock.fs_bmask = ~(sblock.fs_bsize - 1); sblock.fs_fmask = ~(sblock.fs_fsize - 1); /* * Planning now for future expansion. @@ -188,11 +225,11 @@ sblock.fs_fragshift++; if (sblock.fs_frag > MAXFRAG) { printf("fragment size %d is too small, minimum with block size %d is %d\n", sblock.fs_fsize, sblock.fs_bsize, sblock.fs_bsize / MAXFRAG); - exit(1); + exit(21); } sblock.fs_nrpos = nrpos; sblock.fs_nindir = sblock.fs_bsize / sizeof(daddr_t); sblock.fs_inopb = sblock.fs_bsize / sizeof(struct dinode); sblock.fs_nspf = sblock.fs_fsize / sectorsize; @@ -252,11 +289,11 @@ continue; } if (sblock.fs_fsize == sblock.fs_bsize) { printf("There is no block size that"); printf(" can support this disk\n"); - exit(1); + exit(22); } sblock.fs_frag >>= 1; sblock.fs_fragshift -= 1; sblock.fs_fsize <<= 1; sblock.fs_nspf <<= 1; @@ -310,11 +347,11 @@ bsize, sblock.fs_bsize); if (sblock.fs_fsize != fsize) printf("\t%s to be changed from %d to %d\n", "and the fragment size", fsize, sblock.fs_fsize); - exit(1); + exit(23); } /* * Calculate the number of cylinders per group */ sblock.fs_cpg = cpg; @@ -345,31 +382,31 @@ sblock.fs_ipg = roundup((sblock.fs_cpg * bpcg - used) / density, INOPB(&sblock)); } sblock.fs_fpg = (sblock.fs_cpg * sblock.fs_spc) / NSPF(&sblock); if ((sblock.fs_cpg * sblock.fs_spc) % NSPB(&sblock) != 0) { - printf("newfs: panic (fs_cpg * fs_spc) % NSPF != 0"); - exit(2); + printf("panic (fs_cpg * fs_spc) % NSPF != 0"); + exit(24); } if (sblock.fs_cpg < mincpg) { printf("cylinder groups must have at least %d cylinders\n", mincpg); - exit(1); + exit(25); } else if (sblock.fs_cpg != cpg) { if (!cpgflg) printf("Warning: "); else if (!mapcramped && !inodecramped) - exit(1); + exit(26); if (mapcramped && inodecramped) printf("Block size and bytes per inode restrict"); else if (mapcramped) printf("Block size restricts"); else printf("Bytes per inode restrict"); printf(" cylinders per group to %d.\n", sblock.fs_cpg); if (cpgflg) - exit(1); + exit(27); } sblock.fs_cgsize = fragroundup(&sblock, CGSIZE(&sblock)); /* * Now have size for file system and nsect and ntrak. * Determine number of cylinders and blocks in the file system. @@ -380,11 +417,11 @@ sblock.fs_ncyl++; warn = 1; } if (sblock.fs_ncyl < 1) { printf("file systems must have at least one cylinder\n"); - exit(1); + exit(28); } /* * Determine feasability/values of rotational layout tables. * * The size of the rotational layout tables is limited by the @@ -462,15 +499,21 @@ printf("inode blocks/cyl group (%d) >= data blocks (%d)\n", cgdmin(&sblock, i) - cgbase(&sblock, i) / sblock.fs_frag, sblock.fs_fpg / sblock.fs_frag); printf("number of cylinders per cylinder group (%d) %s.\n", sblock.fs_cpg, "must be increased"); - exit(1); + exit(29); } j = sblock.fs_ncg - 1; if ((i = fssize - j * sblock.fs_fpg) < sblock.fs_fpg && cgdmin(&sblock, j) - cgbase(&sblock, j) > i) { + if (j == 0) { + printf("Filesystem must have at least %d sectors\n", + NSPF(&sblock) * + (cgdmin(&sblock, 0) + 3 * sblock.fs_frag)); + exit(30); + } printf("Warning: inode blocks/cyl group (%d) >= data blocks (%d) in last\n", (cgdmin(&sblock, j) - cgbase(&sblock, j)) / sblock.fs_frag, i / sblock.fs_frag); printf(" cylinder group. This implies %d sector(s) cannot be allocated.\n", i * NSPF(&sblock)); @@ -478,11 +521,11 @@ sblock.fs_ncyl -= sblock.fs_ncyl % sblock.fs_cpg; sblock.fs_size = fssize = sblock.fs_ncyl * sblock.fs_spc / NSPF(&sblock); warn = 0; } - if (warn) { + if (warn && !memfs) { printf("Warning: %d sector(s) in last cylinder unallocated\n", sblock.fs_spc - (fssize * NSPF(&sblock) - (sblock.fs_ncyl - 1) * sblock.fs_spc)); } @@ -514,30 +557,37 @@ sblock.fs_fmod = 0; sblock.fs_ronly = 0; /* * Dump out summary information about file system. */ - printf("%s:\t%d sectors in %d cylinders of %d tracks, %d sectors\n", - fsys, sblock.fs_size * NSPF(&sblock), sblock.fs_ncyl, - sblock.fs_ntrak, sblock.fs_nsect); - printf("\t%.1fMB in %d cyl groups (%d c/g, %.2fMB/g, %d i/g)\n", - (float)sblock.fs_size * sblock.fs_fsize * 1e-6, sblock.fs_ncg, - sblock.fs_cpg, (float)sblock.fs_fpg * sblock.fs_fsize * 1e-6, - sblock.fs_ipg); + if (!memfs) { + printf("%s:\t%d sectors in %d %s of %d tracks, %d sectors\n", + fsys, sblock.fs_size * NSPF(&sblock), sblock.fs_ncyl, + "cylinders", sblock.fs_ntrak, sblock.fs_nsect); + printf("\t%.1fMB in %d cyl groups (%d c/g, %.2fMB/g, %d i/g)\n", + (float)sblock.fs_size * sblock.fs_fsize * 1e-6, + sblock.fs_ncg, sblock.fs_cpg, + (float)sblock.fs_fpg * sblock.fs_fsize * 1e-6, + sblock.fs_ipg); + } /* * Now build the cylinders group blocks and * then print out indices of cylinder groups. */ - printf("super-block backups (for fsck -b #) at:"); + if (!memfs) + printf("super-block backups (for fsck -b #) at:"); for (cylno = 0; cylno < sblock.fs_ncg; cylno++) { initcg(cylno); + if (memfs) + continue; if (cylno % 9 == 0) printf("\n"); printf(" %d,", fsbtodb(&sblock, cgsblock(&sblock, cylno))); } - printf("\n"); - if (Nflag) + if (!memfs) + printf("\n"); + if (Nflag && !memfs) exit(0); /* * Now construct the initial file system, * then write out the super-block. */ @@ -561,10 +611,15 @@ */ pp->p_fstype = FS_BSDFFS; pp->p_fsize = sblock.fs_fsize; pp->p_frag = sblock.fs_frag; pp->p_cpg = sblock.fs_cpg; + /* + * Notify parent process of success. + */ + if (memfs) + kill(ppid, SIGUSR1); } /* * Initialize a cylinder group. */ @@ -730,11 +785,14 @@ #endif /* * create the root directory */ node.i_number = ROOTINO; - node.i_mode = IFDIR | UMASK; + if (memfs) + node.i_mode = IFDIR | 01777; + else + node.i_mode = IFDIR | UMASK; node.i_nlink = PREDEFDIR; node.i_size = makedir(root_dir, PREDEFDIR); node.i_db[0] = alloc(sblock.fs_fsize, node.i_mode); node.i_blocks = btodb(fragroundup(&sblock, node.i_size)); wtfs(fsbtodb(&sblock, node.i_db[0]), sblock.fs_fsize, buf); @@ -829,11 +887,11 @@ c = itog(&sblock, ip->i_number); rdfs(fsbtodb(&sblock, cgtod(&sblock, 0)), sblock.fs_cgsize, (char *)&acg); if (acg.cg_magic != CG_MAGIC) { printf("cg 0: bad magic number\n"); - exit(1); + exit(31); } acg.cg_cs.cs_nifree--; setbit(cg_inosused(&acg), ip->i_number); wtfs(fsbtodb(&sblock, cgtod(&sblock, 0)), sblock.fs_cgsize, (char *)&acg); @@ -840,17 +898,96 @@ sblock.fs_cstotal.cs_nifree--; fscs[0].cs_nifree--; if (ip->i_number >= sblock.fs_ipg * sblock.fs_ncg) { printf("fsinit: inode value out of range (%d).\n", ip->i_number); - exit(1); + exit(32); } d = fsbtodb(&sblock, itod(&sblock, ip->i_number)); rdfs(d, sblock.fs_bsize, buf); buf[itoo(&sblock, ip->i_number)].di_ic = ip->i_ic; wtfs(d, sblock.fs_bsize, buf); } + +/* + * Notify parent process that the filesystem has created itself successfully. + */ +started() +{ + + exit(0); +} + +/* + * Replace libc function with one suited to our needs. + */ +caddr_t +malloc(size) + register u_long size; +{ + u_long base, i; + static u_long pgsz; + struct rlimit rlp; + + if (pgsz == 0) { + base = sbrk(0); + pgsz = getpagesize() - 1; + i = (base + pgsz) &~ pgsz; + base = sbrk(i - base); + if (getrlimit(RLIMIT_DATA, &rlp) < 0) + perror("getrlimit"); + rlp.rlim_cur = rlp.rlim_max; + if (setrlimit(RLIMIT_DATA, &rlp) < 0) + perror("setrlimit"); + memleft = rlp.rlim_max - base; + } + size = (size + pgsz) &~ pgsz; + if (size > memleft) + size = memleft; + memleft -= size; + if (size == 0) + return (0); + return ((caddr_t)sbrk(size)); +} + +/* + * Replace libc function with one suited to our needs. + */ +caddr_t +realloc(ptr, size) + char *ptr; + u_long size; +{ + + /* always fail for now */ + return ((caddr_t)0); +} + +/* + * Replace libc function with one suited to our needs. + */ +char * +calloc(size, numelm) + u_long size, numelm; +{ + caddr_t base; + + size *= numelm; + base = malloc(size); + bzero(base, size); + return (base); +} + +/* + * Replace libc function with one suited to our needs. + */ +free(ptr) + char *ptr; +{ + + /* do not worry about it for now */ +} /* * read a block from the file system */ rdfs(bno, size, bf) @@ -858,20 +995,24 @@ int size; char *bf; { int n; + if (memfs) { + bcopy(membase + bno * sectorsize, bf, size); + return; + } if (lseek(fsi, bno * sectorsize, 0) < 0) { printf("seek error: %ld\n", bno); perror("rdfs"); - exit(1); + exit(33); } n = read(fsi, bf, size); if(n != size) { printf("read error: %ld\n", bno); perror("rdfs"); - exit(1); + exit(34); } } /* * write a block to the file system @@ -881,22 +1022,26 @@ int size; char *bf; { int n; + if (memfs) { + bcopy(bf, membase + bno * sectorsize, size); + return; + } if (Nflag) return; if (lseek(fso, bno * sectorsize, 0) < 0) { printf("seek error: %ld\n", bno); perror("wtfs"); - exit(1); + exit(35); } n = write(fso, bf, size); if(n != size) { printf("write error: %ld\n", bno); perror("wtfs"); - exit(1); + exit(36); } } /* * check if a block is available Index: sbin/newfs/newfs.c ================================================================== --- sbin/newfs/newfs.c +++ sbin/newfs/newfs.c @@ -1,20 +1,31 @@ /* - * Copyright (c) 1983 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. + * Copyright (c) 1983, 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ +#ifndef lint +static char sccsid[] = "@(#)newfs.c 6.19 (Berkeley) 09/06/89"; +#endif /* not lint */ + #ifndef lint char copyright[] = -"@(#) Copyright (c) 1983 Regents of the University of California.\n\ +"@(#) Copyright (c) 1983, 1989 Regents of the University of California.\n\ All rights reserved.\n"; -#endif not lint - -#ifndef lint -static char sccsid[] = "@(#)newfs.c 6.18 (Berkeley) 07/01/89"; -#endif not lint +#endif /* not lint */ /* * newfs: friendly front end to mkfs */ #include @@ -22,10 +33,11 @@ #include #include #include #include #include +#include #include #include #include @@ -85,14 +97,14 @@ */ #define MAXBLKPG(bsize) ((bsize) / sizeof(daddr_t)) /* * Each file system has a number of inodes statically allocated. - * We allocate one inode slot per NBPI bytes, expecting this + * We allocate one inode slot per NFPI fragments, expecting this * to be far more than we will ever need. */ -#define NBPI 2048 +#define NFPI 4 /* * For each cylinder we keep track of the availability of blocks at different * rotational positions, so that we can lay out the data to be picked * up with minimum rotational latency. NRPOS is the default number of @@ -100,10 +112,11 @@ * of our summary information is 2ms for a typical 3600 rpm drive. */ #define NRPOS 8 /* number distinct rotational positions */ +int memfs; /* run as the memory based filesystem */ int Nflag; /* run without writing file system */ int fssize; /* file system size */ int ntracks; /* # tracks/cylinder */ int nsectors; /* # sectors/track */ int nphyssectors; /* # sectors/track including spares */ @@ -123,41 +136,52 @@ int bsize = 0; /* block size */ int cpg = DESCPG; /* cylinders/cylinder group */ int cpgflg; /* cylinders/cylinder group flag was given */ int minfree = MINFREE; /* free space threshold */ int opt = DEFAULTOPT; /* optimization preference (space or time) */ -int density = NBPI; /* number of bytes per inode */ +int density; /* number of bytes per inode */ int maxcontig = MAXCONTIG; /* max contiguous blocks to allocate */ int rotdelay = ROTDELAY; /* rotational delay between blocks */ int maxbpg; /* maximum blocks per file in a cyl group */ int nrpos = NRPOS; /* # of distinguished rotational positions */ int bbsize = BBSIZE; /* boot block size */ int sbsize = SBSIZE; /* superblock size */ +u_long memleft; /* virtual memory available */ +caddr_t membase; /* start address of memory based filesystem */ #ifdef COMPAT int unlabelled; #endif char device[MAXPATHLEN]; +char *progname; extern int errno; char *index(); char *rindex(); main(argc, argv) int argc; char *argv[]; { - char *cp, *special; + char *cp, *special, *rindex(); register struct partition *pp; register struct disklabel *lp; struct disklabel *getdisklabel(); struct partition oldpartition; + struct mfs_args args; struct stat st; int fsi, fso; register int i; int status; + char buf[BUFSIZ]; + if ((progname = rindex(*argv, '/') + 1) == (char *)1) + progname = *argv; + if (!strcmp(progname, "memfs")) { + Nflag++; + memfs++; + } argc--, argv++; while (argc > 0 && argv[0][0] == '-') { for (cp = &argv[0][1]; *cp; cp++) switch (*cp) { @@ -354,15 +378,21 @@ } next: argc--, argv++; } if (argc < 1) { + if (memfs) + fprintf(stderr, + "usage: memfs [ fsoptions ] special-device %s\n", + "mount-point"); + else #ifdef COMPAT - fprintf(stderr, - "usage: newfs [ fsoptions ] special-device [device-type]\n"); + fprintf(stderr, "usage: %s\n", + "newfs [ fsoptions ] special-device [device-type]"); #else - fprintf(stderr, "usage: newfs [ fsoptions ] special-device\n"); + fprintf(stderr, + "usage: newfs [ fsoptions ] special-device\n"); #endif fprintf(stderr, "where fsoptions are:\n"); fprintf(stderr, "\t-N do not create file system, %s\n", "just print out parameters"); fprintf(stderr, "\t-b block size\n"); @@ -400,22 +430,22 @@ special = device; if (!Nflag) { fso = open(special, O_WRONLY); if (fso < 0) { perror(special); - exit(1); + exit(2); } } else fso = -1; fsi = open(special, O_RDONLY); if (fsi < 0) { perror(special); - exit(1); + exit(3); } if (fstat(fsi, &st) < 0) { - fprintf(stderr, "newfs: "); perror(special); - exit(2); + fprintf(stderr, "%s: ", progname); perror(special); + exit(4); } if ((st.st_mode & S_IFMT) != S_IFCHR) fatal("%s: not a character device", special); cp = index(argv[0], '\0') - 1; if (cp == 0 || (*cp < 'a' || *cp > 'h') && !isdigit(*cp)) @@ -431,11 +461,11 @@ pp = &lp->d_partitions[*cp - 'a']; if (pp->p_size == 0) fatal("%s: `%c' partition is unavailable", argv[0], *cp); if (fssize == 0) fssize = pp->p_size; - if (fssize > pp->p_size) + if (fssize > pp->p_size && !memfs) fatal("%s: maximum file system size on the `%c' partition is %d", argv[0], *cp, pp->p_size); if (rpm == 0) { rpm = lp->d_rpm; if (rpm <= 0) @@ -474,10 +504,12 @@ if (bsize == 0) { bsize = pp->p_frag * pp->p_fsize; if (bsize <= 0) bsize = MIN(DFL_BLKSIZE, 8 * fsize); } + if (density == 0) + density = NFPI * fsize; if (minfree < 10 && opt != FS_OPTSPACE) { fprintf(stderr, "Warning: changing optimization to space "); fprintf(stderr, "because minfree is less than 10%%\n"); opt = FS_OPTSPACE; } @@ -522,10 +554,23 @@ if (realsectorsize != DEV_BSIZE) pp->p_size *= DEV_BSIZE / realsectorsize; #endif if (!Nflag && bcmp(pp, &oldpartition, sizeof(oldpartition))) rewritelabel(special, fso, lp); + if (!Nflag) + close(fso); + close(fsi); + if (memfs) { + sprintf(buf, "memfs:%d", getpid()); + args.name = buf; + args.base = membase; + args.size = fssize * sectorsize; + if (mount(MOUNT_MFS, argv[1], 0, &args) < 0) { + perror("memfs: mount"); + exit(5); + } + } exit(0); } #ifdef COMPAT struct disklabel * @@ -596,36 +641,37 @@ if (!isdigit(*cp)) *cp = 'c'; cfd = open(specname, O_WRONLY); if (cfd < 0) { perror(specname); - exit(2); + exit(6); } bzero(blk, sizeof(blk)); *(struct disklabel *)(blk + LABELOFFSET) = *lp; alt = lp->d_ncylinders * lp->d_secpercyl - lp->d_nsectors; for (i = 1; i < 11 && i < lp->d_nsectors; i += 2) { if (lseek(cfd, (off_t)(alt + i) * lp->d_secsize, L_SET) == -1) { perror("lseek to badsector area"); - exit(30); + exit(7); } if (write(cfd, blk, lp->d_secsize) < lp->d_secsize) { int oerrno = errno; fprintf(stderr, "alternate label %d ", i/2); errno = oerrno; perror("write"); } } + close(cfd); } #endif } /*VARARGS*/ fatal(fmt, arg1, arg2) char *fmt; { - fprintf(stderr, "newfs: "); + fprintf(stderr, "%s: ", progname); fprintf(stderr, fmt, arg1, arg2); putc('\n', stderr); - exit(10); + exit(8); } Index: sbin/shutdown/shutdown.c ================================================================== --- sbin/shutdown/shutdown.c +++ sbin/shutdown/shutdown.c @@ -20,11 +20,11 @@ "@(#) Copyright (c) 1988 Regents of the University of California.\n\ All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)shutdown.c 5.10 (Berkeley) 04/02/89"; +static char sccsid[] = "@(#)shutdown.c 5.11 (Berkeley) 09/05/89"; #endif /* not lint */ #include #include #include @@ -155,11 +155,11 @@ } } mbuflen = strlen(mbuf); if (offset) - printf("Shutdown at %.24s.", ctime(&shuttime)); + printf("Shutdown at %.24s.\n", ctime(&shuttime)); else printf("Shutdown NOW!\n"); if (!(whom = getlogin())) whom = (pw = getpwuid(getuid())) ? pw->pw_name : "???"; Index: sys/conf/files ================================================================== --- sys/conf/files +++ sys/conf/files @@ -71,11 +71,12 @@ ufs/ufs_lookup.c standard ufs/ufs_subr.c standard ufs/ufs_tables.c standard ufs/ufs_vfsops.c standard ufs/ufs_vnops.c standard -ufs/mfs_vnops.c optional MFS +ufs/mfs_vnops.c optional mfs +ufs/mfs_vfsops.c optional mfs nfs/nfs_bio.c optional nfs nfs/nfs_client.c optional nfs nfs/nfs_node.c optional nfs nfs/nfs_serv.c optional nfs nfs/nfs_socket.c optional nfs Index: sys/deprecated/kdb/kdb_input.c ================================================================== --- sys/deprecated/kdb/kdb_input.c +++ sys/deprecated/kdb/kdb_input.c @@ -1,11 +1,11 @@ /* * Copyright (c) 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)kdb_input.c 7.3 (Berkeley) 12/15/86 + * @(#)kdb_input.c 7.4 (Berkeley) 09/06/89 */ #include "../kdb/defs.h" char line[LINSIZ]; @@ -37,24 +37,24 @@ do { (void) kdbreadc(lp); if (mkfault) error((char *)0); switch (*lp) { - case CTRL(h): case 0177: + case CTRL('h'): case 0177: if (lp > line) kdbwrite(erase, 3), lp--; break; - case CTRL(u): + case CTRL('u'): while (lp > line) kdbwrite(erase, 3), lp--; break; - case CTRL(r): + case CTRL('r'): kdbwrite("^R\n", 3); if (lp > line) kdbwrite(line, lp-line); break; - case CTRL(w): + case CTRL('w'): if (lp <= line) break; do { if (!isspace(*lp)) goto erasenb; Index: sys/kern/kern_ktrace.c ================================================================== --- sys/kern/kern_ktrace.c +++ sys/kern/kern_ktrace.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)kern_ktrace.c 1.5 (Berkeley) 07/05/89 + * @(#)kern_ktrace.c 7.1 (Berkeley) 09/04/89 */ #ifdef KTRACE #include "param.h" Index: sys/kern/kern_proc.c ================================================================== --- sys/kern/kern_proc.c +++ sys/kern/kern_proc.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)kern_proc.c 7.6 (Berkeley) 05/09/89 + * @(#)kern_proc.c 7.7 (Berkeley) 09/06/89 */ #include "param.h" #include "systm.h" #include "map.h" @@ -32,10 +32,11 @@ #include "file.h" #include "../ufs/quota.h" #include "uio.h" #include "malloc.h" #include "mbuf.h" +#include "ioctl.h" #include "tty.h" #include "machine/reg.h" #include "machine/pte.h" #include "machine/psl.h" Index: sys/kern/tty_compat.c ================================================================== --- sys/kern/tty_compat.c +++ sys/kern/tty_compat.c @@ -1,20 +1,21 @@ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)tty_compat.c 7.1 (Berkeley) 09/03/89 + * @(#)tty_compat.c 7.2 (Berkeley) 09/04/89 */ /* * mapping routines for old line discipline (yuck) */ #ifdef COMPAT_43 #include "param.h" #include "systm.h" +#include "dir.h" #include "user.h" #include "ioctl.h" #include "tty.h" #include "termios.h" #include "proc.h" Index: sys/kern/uipc_mbuf.c ================================================================== --- sys/kern/uipc_mbuf.c +++ sys/kern/uipc_mbuf.c @@ -12,59 +12,58 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)uipc_mbuf.c 7.4.1.3 (Berkeley) 02/15/89 + * @(#)uipc_mbuf.c 7.11 (Berkeley) 09/04/89 */ -#include "../machine/pte.h" - #include "param.h" #include "dir.h" #include "user.h" #include "proc.h" #include "cmap.h" +#include "malloc.h" #include "map.h" +#define MBTYPES #include "mbuf.h" #include "vm.h" #include "kernel.h" #include "syslog.h" #include "domain.h" #include "protosw.h" +#include "machine/pte.h" mbinit() { int s; -#if CLBYTES < 4096 -#define NCL_INIT (4096/CLBYTES) +#if MCLBYTES < 4096 +#define NCL_INIT (4096/MCLBYTES) #else #define NCL_INIT 1 #endif s = splimp(); - if (m_clalloc(NCL_INIT, MPG_MBUFS, M_DONTWAIT) == 0) - goto bad; - if (m_clalloc(NCL_INIT, MPG_CLUSTERS, M_DONTWAIT) == 0) + if (m_clalloc(NCL_INIT, M_DONTWAIT) == 0) goto bad; splx(s); return; bad: panic("mbinit"); } /* + * Allocate some number of mbuf clusters + * and place on cluster free list. * Must be called at splimp. */ /* ARGSUSED */ -caddr_t -m_clalloc(ncl, how, canwait) +m_clalloc(ncl, canwait) register int ncl; - int how; { int npg, mbx; - register struct mbuf *m; + register caddr_t p; register int i; static int logged; npg = ncl * CLSIZE; mbx = rmalloc(mbmap, (long)npg); @@ -73,75 +72,73 @@ logged++; log(LOG_ERR, "mbuf map full\n"); } return (0); } - m = cltom(mbx * NBPG / MCLBYTES); + p = cltom(mbx * NBPG / MCLBYTES); if (memall(&Mbmap[mbx], npg, proc, CSYS) == 0) { rmfree(mbmap, (long)npg, (long)mbx); return (0); } - vmaccess(&Mbmap[mbx], (caddr_t)m, npg); - switch (how) { - - case MPG_CLUSTERS: - ncl = ncl * CLBYTES / MCLBYTES; - for (i = 0; i < ncl; i++) { - m->m_off = 0; - m->m_next = mclfree; - mclfree = m; - m += MCLBYTES / sizeof (*m); - mbstat.m_clfree++; - } - mbstat.m_clusters += ncl; - break; - - case MPG_MBUFS: - for (i = ncl * CLBYTES / sizeof (*m); i > 0; i--) { - m->m_off = 0; - m->m_type = MT_DATA; - mbstat.m_mtypes[MT_DATA]++; - mbstat.m_mbufs++; - (void) m_free(m); - m++; - } - break; - - case MPG_SPACE: - mbstat.m_space++; - break; - } - return ((caddr_t)m); + vmaccess(&Mbmap[mbx], p, npg); + ncl = ncl * CLBYTES / MCLBYTES; + for (i = 0; i < ncl; i++) { + ((union mcluster *)p)->mcl_next = mclfree; + mclfree = (union mcluster *)p; + p += MCLBYTES; + mbstat.m_clfree++; + } + mbstat.m_clusters += ncl; + return (1); +} + +/* + * When MGET failes, ask protocols to free space when short of memory, + * then re-attempt to allocate an mbuf. + */ +struct mbuf * +m_retry(i, t) + int i, t; +{ + register struct mbuf *m; + + m_reclaim(); +#define m_retry(i, t) (struct mbuf *)0 + MGET(m, i, t); +#undef m_retry + return (m); } /* - * Must be called at splimp. + * As above; retry an MGETHDR. */ -m_expand(canwait) - int canwait; +struct mbuf * +m_retryhdr(i, t) + int i, t; +{ + register struct mbuf *m; + + m_reclaim(); +#define m_retryhdr(i, t) (struct mbuf *)0 + MGETHDR(m, i, t); +#undef m_retryhdr + return (m); +} + +m_reclaim() { register struct domain *dp; register struct protosw *pr; - int tries; - - for (tries = 0;; ) { - if (m_clalloc(1, MPG_MBUFS, canwait)) - return (1); - if (canwait == 0 || tries++) - return (0); - - /* ask protocols to free space */ - for (dp = domains; dp; dp = dp->dom_next) - for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; - pr++) - if (pr->pr_drain) - (*pr->pr_drain)(); - mbstat.m_drain++; - } -} - -/* NEED SOME WAY TO RELEASE SPACE */ + int s = splimp(); + + for (dp = domains; dp; dp = dp->dom_next) + for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) + if (pr->pr_drain) + (*pr->pr_drain)(); + splx(s); + mbstat.m_drain++; +} /* * Space allocation routines. * These are also available as macros * for critical paths. @@ -153,10 +150,20 @@ register struct mbuf *m; MGET(m, canwait, type); return (m); } + +struct mbuf * +m_gethdr(canwait, type) + int canwait, type; +{ + register struct mbuf *m; + + MGETHDR(m, canwait, type); + return (m); +} struct mbuf * m_getclr(canwait, type) int canwait, type; { @@ -177,80 +184,79 @@ MFREE(m, n); return (n); } -/* - * Get more mbufs; called from MGET macro if mfree list is empty. - * Must be called at splimp. - */ -/*ARGSUSED*/ -struct mbuf * -m_more(canwait, type) - int canwait, type; -{ - register struct mbuf *m; - - while (m_expand(canwait) == 0) { - if (canwait == M_WAIT) { - mbstat.m_wait++; - m_want++; - sleep((caddr_t)&mfree, PZERO - 1); - if (mfree) - break; - } else { - mbstat.m_drops++; - return (NULL); - } - } -#define m_more(x,y) (panic("m_more"), (struct mbuf *)0) - MGET(m, canwait, type); -#undef m_more - return (m); -} - m_freem(m) register struct mbuf *m; { register struct mbuf *n; - register int s; if (m == NULL) return; - s = splimp(); do { MFREE(m, n); } while (m = n); - splx(s); } /* * Mbuffer utility routines. */ + +/* + * Lesser-used path for M_PREPEND: + * allocate new mbuf to prepend to chain, + * copy junk along. + */ +struct mbuf * +m_prepend(m, len, how) + register struct mbuf *m; + int len, how; +{ + struct mbuf *mn; + + MGET(mn, how, m->m_type); + if (mn == (struct mbuf *)NULL) { + m_freem(m); + return ((struct mbuf *)NULL); + } + if (m->m_flags & M_PKTHDR) { + M_COPY_PKTHDR(mn, m); + m->m_flags &= ~M_PKTHDR; + } + mn->m_next = m; + m = mn; + if (len < MHLEN) + MH_ALIGN(m, len); + m->m_len = len; + return (m); +} /* /* - * Make a copy of an mbuf chain starting "off" bytes from the beginning, + * Make a copy of an mbuf chain starting "off0" bytes from the beginning, * continuing for "len" bytes. If len is M_COPYALL, copy to end of mbuf. - * Should get M_WAIT/M_DONTWAIT from caller. + * The wait parameter is a choice of M_WAIT/M_DONTWAIT from caller. */ struct mbuf * -m_copy(m, off, len) +m_copym(m, off0, len, wait) register struct mbuf *m; - int off; + int off0, wait; register int len; { register struct mbuf *n, **np; - struct mbuf *top, *p; + register int off = off0; + struct mbuf *top; + int copyhdr = 0; - if (len == 0) - return (0); if (off < 0 || len < 0) - panic("m_copy"); + panic("m_copym"); + if (off == 0 && m->m_flags & M_PKTHDR) + copyhdr = 1; while (off > 0) { if (m == 0) - panic("m_copy"); + panic("m_copym"); if (off < m->m_len) break; off -= m->m_len; m = m->m_next; } @@ -257,22 +263,31 @@ np = ⊤ top = 0; while (len > 0) { if (m == 0) { if (len != M_COPYALL) - panic("m_copy"); + panic("m_copym"); break; } - MGET(n, M_DONTWAIT, m->m_type); + MGET(n, wait, m->m_type); *np = n; if (n == 0) goto nospace; + if (copyhdr) { + M_COPY_PKTHDR(n, m); + if (len == M_COPYALL) + n->m_pkthdr.len -= off0; + else + n->m_pkthdr.len = len; + copyhdr = 0; + } n->m_len = MIN(len, m->m_len - off); - if (m->m_off > MMAXOFF) { - p = mtod(m, struct mbuf *); - n->m_off = ((int)p - (int)n) + off; - mclrefcnt[mtocl(p)]++; + if (m->m_flags & M_EXT) { + n->m_data = m->m_data + off; + mclrefcnt[mtocl(m->m_ext.ext_buf)]++; + n->m_ext = m->m_ext; + n->m_flags |= M_EXT; } else bcopy(mtod(m, caddr_t)+off, mtod(n, caddr_t), (unsigned)n->m_len); if (len != M_COPYALL) len -= n->m_len; @@ -318,18 +333,23 @@ off = 0; m = m->m_next; } } +/* + * Concatenate mbuf chain n to m. + * Both chains must be of the same type (e.g. MT_DATA). + * Any m_pkthdr is not updated. + */ m_cat(m, n) register struct mbuf *m, *n; { while (m->m_next) m = m->m_next; while (n) { - if (m->m_off >= MMAXOFF || - m->m_off + m->m_len + n->m_len > MMAXOFF) { + if (m->m_flags & M_EXT || + m->m_data + m->m_len + n->m_len >= &m->m_dat[MLEN]) { /* just join the two chains */ m->m_next = n; return; } /* splat the data from one into the other */ @@ -338,31 +358,37 @@ m->m_len += n->m_len; n = m_free(n); } } -m_adj(mp, len) +m_adj(mp, req_len) struct mbuf *mp; - register int len; { + register int len = req_len; register struct mbuf *m; register count; if ((m = mp) == NULL) return; if (len >= 0) { + /* + * Trim from head. + */ while (m != NULL && len > 0) { if (m->m_len <= len) { len -= m->m_len; m->m_len = 0; m = m->m_next; } else { m->m_len -= len; - m->m_off += len; - break; + m->m_data += len; + len = 0; } } + m = mp; + if (mp->m_flags & M_PKTHDR) + m->m_pkthdr.len -= (req_len - len); } else { /* * Trim from tail. Scan the mbuf chain, * calculating its length and finding the last mbuf. * If the adjustment only affects this mbuf, then just @@ -380,16 +406,21 @@ if (m->m_len >= len) { m->m_len -= len; return; } count -= len; + if (count < 0) + count = 0; /* * Correct length for chain is "count". * Find the mbuf with last data, adjust its length, * and toss data from remaining mbufs on chain. */ - for (m = mp; m; m = m->m_next) { + m = mp; + if (m->m_flags & M_PKTHDR) + m->m_pkthdr.len = count; + for (; m; m = m->m_next) { if (m->m_len >= count) { m->m_len = count; break; } count -= m->m_len; @@ -402,11 +433,11 @@ /* * Rearange an mbuf chain so that len bytes are contiguous * and in the data area of an mbuf (so that mtod and dtom * will work for a structure of size len). Returns the resulting * mbuf chain on success, frees it and returns null on failure. - * If there is room, it will add up to MPULL_EXTRA bytes to the + * If there is room, it will add up to max_protohdr-len extra bytes to the * contiguous region in an attempt to avoid being called next time. */ struct mbuf * m_pullup(n, len) register struct mbuf *n; @@ -414,32 +445,43 @@ { register struct mbuf *m; register int count; int space; - if (n->m_off + len <= MMAXOFF && n->m_next) { + /* + * If first mbuf has no cluster, and has room for len bytes + * without shifting current data, pullup into it, + * otherwise allocate a new mbuf to prepend to the chain. + */ + if ((n->m_flags & M_EXT) == 0 && + n->m_data + len < &n->m_dat[MLEN] && n->m_next) { + if (n->m_len >= len) + return (n); m = n; n = n->m_next; len -= m->m_len; } else { - if (len > MLEN) + if (len > MHLEN) goto bad; MGET(m, M_DONTWAIT, n->m_type); if (m == 0) goto bad; m->m_len = 0; + if (n->m_flags & M_PKTHDR) + M_COPY_PKTHDR(m, n); } - space = MMAXOFF - m->m_off; + space = &m->m_dat[MLEN] - (m->m_data + m->m_len); do { - count = MIN(MIN(space - m->m_len, len + MPULL_EXTRA), n->m_len); - bcopy(mtod(n, caddr_t), mtod(m, caddr_t)+m->m_len, + count = min(min(max(len, max_protohdr), space), n->m_len); + bcopy(mtod(n, caddr_t), mtod(m, caddr_t) + m->m_len, (unsigned)count); len -= count; m->m_len += count; n->m_len -= count; + space -= count; if (n->m_len) - n->m_off += count; + n->m_data += count; else n = m_free(n); } while (len > 0 && n); if (len > 0) { (void) m_free(m); Index: sys/kern/vfs_conf.c ================================================================== --- sys/kern/vfs_conf.c +++ sys/kern/vfs_conf.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)vfs_conf.c 7.1 (Berkeley) 04/24/89 + * @(#)vfs_conf.c 7.2 (Berkeley) 09/05/89 */ #include "param.h" #include "mount.h" @@ -40,16 +40,25 @@ extern struct vfsops ufs_vfsops; #ifdef NFS extern struct vfsops nfs_vfsops; #endif + +#ifdef MFS +extern struct vfsops mfs_vfsops; +#endif struct vfsops *vfssw[] = { (struct vfsops *)0, /* 0 = MOUNT_NONE */ &ufs_vfsops, /* 1 = MOUNT_UFS */ #ifdef NFS &nfs_vfsops, /* 2 = MOUNT_NFS */ #else (struct vfsops *)0, #endif - (struct vfsops *)0, /* 3 = MOUNT_PC */ +#ifdef MFS + &mfs_vfsops, /* 3 = MOUNT_MFS */ +#else + (struct vfsops *)0, +#endif + (struct vfsops *)0, /* 4 = MOUNT_PC */ }; Index: sys/kern/vfs_subr.c ================================================================== --- sys/kern/vfs_subr.c +++ sys/kern/vfs_subr.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)vfs_subr.c 7.5 (Berkeley) 06/27/89 + * @(#)vfs_subr.c 7.6 (Berkeley) 09/05/89 */ /* * External virtual filesystem routines */ @@ -102,12 +102,14 @@ */ vfs_lock(mp) register struct mount *mp; { - if (mp->m_flag & M_MLOCK) - return (EBUSY); + while(mp->m_flag & M_MLOCK) { + mp->m_flag |= M_MWAIT; + sleep((caddr_t)mp, PVFS); + } mp->m_flag |= M_MLOCK; return (0); } /* Index: sys/kern/vfs_syscalls.c ================================================================== --- sys/kern/vfs_syscalls.c +++ sys/kern/vfs_syscalls.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)vfs_syscalls.c 7.14 (Berkeley) 07/04/89 + * @(#)vfs_syscalls.c 7.15 (Berkeley) 09/05/89 */ #include "param.h" #include "systm.h" #include "syscontext.h" @@ -92,10 +92,11 @@ error = VFS_MOUNT(mp, uap->dir, uap->data, ndp); cache_purge(vp); VOP_UNLOCK(vp); if (!error) { vfs_unlock(mp); + error = VFS_START(mp, 0); } else { vfs_remove(mp); free((caddr_t)mp, M_MOUNT); vrele(vp); } @@ -246,11 +247,12 @@ sfsp = uap->buf; mp = rootfs; count = 0; do { count++; - if (sfsp && count <= maxcount) { + if (sfsp && count <= maxcount && + ((mp->m_flag & M_MLOCK) == 0)) { if (error = VFS_STATFS(mp, sfsp)) RETURN (error); sfsp++; } mp = mp->m_prev; ADDED sys/net/if_llc.h Index: sys/net/if_llc.h ================================================================== --- sys/net/if_llc.h +++ sys/net/if_llc.h @@ -0,0 +1,66 @@ +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)if_llc.h 7.1 (Berkeley) 09/04/89 + */ + +/* + * IEEE 802.2 Link Level Control headers, for use in conjunction with + * 802.{3,4,5} media access control methods. + * + * Headers here do not use bit fields due to shortcommings in many + * compilers. + */ + +struct llc { + u_char llc_dsap; + u_char llc_ssap; + union { + struct { + u_char control; + u_char format_id; + u_char class; + u_char window_x2; + } type_u; + struct { + u_char num_snd_x2; + u_char num_rcv_x2; + } type_i; + struct { + u_char control; + u_char num_rcv_x2; + } type_s; + struct { + u_char control; + u_char org_code[3]; + u_short ether_type; + } type_snap; + } llc_un; +}; +#define llc_control llc_un.type_u.control +#define llc_fid llc_un.type_u.format_id +#define llc_class llc_un.type_u.class +#define llc_window llc_un.type_u.window_x2 + +#define LLC_UI 0x3 +#define LLC_UI_P 0x13 +#define LLC_XID 0xaf +#define LLC_XID_P 0xbf +#define LLC_TEST 0xe3 +#define LLC_TEST_P 0xf3 + +#define LLC_ISO_LSAP 0xfe +#define LLC_SNAP_LSAP 0xaa Index: sys/net/if_loop.c ================================================================== --- sys/net/if_loop.c +++ sys/net/if_loop.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)if_loop.c 7.7 (Berkeley) 04/25/89 + * @(#)if_loop.c 7.8 (Berkeley) 09/04/89 */ /* * Loopback interface driver for protocol testing and timing. */ @@ -27,11 +27,11 @@ #include "socket.h" #include "errno.h" #include "ioctl.h" #include "../net/if.h" -#include "../net/iftypes.h" +#include "../net/if_types.h" #include "../net/netisr.h" #include "../net/route.h" #include "machine/mtpr.h" Index: sys/net/if_sl.c ================================================================== --- sys/net/if_sl.c +++ sys/net/if_sl.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)if_sl.c 7.16 (Berkeley) 06/30/89 + * @(#)if_sl.c 7.17 (Berkeley) 09/04/89 */ /* * Serial Line interface * @@ -88,11 +88,11 @@ * and improve performance, we require that packets fit in an mbuf * cluster, that there be enough extra room for the ifnet pointer that * IP input requires and, if we get a compressed packet, there's * enough extra room to expand the header into a max length tcp/ip * header (128 bytes). So, SLMTU can be at most - * MCLBYTES - sizeof(struct ifnet *) - 128 + * MCLBYTES - 128 * * To insure we get good interactive response, the MTU wants to be * the smallest size that amortizes the header cost. (Remember * that even with type-of-service queuing, we have to wait for any * in-progress packet to finish. I.e., we wait, on the average, @@ -106,14 +106,16 @@ * bytes). In 4.3tahoe+ systems, we can set an MTU in a route * so we do that & leave the interface MTU relatively high (so we * don't IP fragment when acting as a gateway to someone using a * stupid MTU). */ -#define SLMTU 576 -#define BUFOFFSET (128+sizeof(struct ifnet **)) +#define SLMTU 576 +#define BUFOFFSET 128 +#define SLBUFSIZE (SLMTU + BUFOFFSET) #define SLIP_HIWAT 1024 /* don't start a new packet if HIWAT on queue */ #define CLISTRESERVE 1024 /* Can't let clists get too low */ + /* * SLIP ABORT ESCAPE MECHANISM: * (inspired by HAYES modem escape arrangement) * 1sec escape 1sec escape 1sec escape { 1sec escape 1sec escape } * signals a "soft" exit from slip mode by usermode process @@ -125,14 +127,13 @@ #define ABT_SOFT 3 /* count of escapes */ /* * The following disgusting hack gets around the problem that IP TOS - * can't be set in BSD/Sun OS yet. We want to put "interactive" - * traffic on a high priority queue. To decide if traffic is - * interactive, we check that a) it is TCP and b) one of it's ports - * if telnet, rlogin or ftp control. + * can't be set yet. We want to put "interactive" traffic on a high + * priority queue. To decide if traffic is interactive, we check that + * a) it is TCP and b) one of its ports is telnet, rlogin or ftp control. */ static u_short interactive_ports[8] = { 0, 513, 0, 0, 0, 21, 0, 23, }; @@ -177,11 +178,11 @@ register caddr_t p; if (sc->sc_ep == (u_char *) 0) { MCLALLOC(p, M_WAIT); if (p) - sc->sc_ep = (u_char *)p + (BUFOFFSET + SLMTU); + sc->sc_ep = (u_char *)p + SLBUFSIZE; else { printf("sl%d: can't allocate buffer\n", sc - sl_softc); sc->sc_if.if_flags &= ~IFF_UP; return (0); } @@ -207,11 +208,11 @@ if (error = suser(u.u_cred, &u.u_acflag)) return (error); if (tp->t_line == SLIPDISC) - return (EBUSY); + return (0); for (nsl = NSL, sc = sl_softc; --nsl >= 0; sc++) if (sc->sc_ttyp == NULL) { if (slinit(sc) == 0) return (ENOBUFS); @@ -240,11 +241,11 @@ sc = (struct sl_softc *)tp->t_sc; if (sc != NULL) { if_down(&sc->sc_if); sc->sc_ttyp = NULL; tp->t_sc = NULL; - MCLFREE((struct mbuf *)(sc->sc_ep - (SLMTU + BUFOFFSET))); + MCLFREE((caddr_t)(sc->sc_ep - SLBUFSIZE)); sc->sc_ep = 0; sc->sc_mp = 0; sc->sc_buf = 0; } splx(s); @@ -288,40 +289,39 @@ /* * Queue a packet. Start transmission if not active. */ sloutput(ifp, m, dst) - register struct ifnet *ifp; + struct ifnet *ifp; register struct mbuf *m; struct sockaddr *dst; { - register struct sl_softc *sc; + register struct sl_softc *sc = &sl_softc[ifp->if_unit]; register struct ip *ip; register struct ifqueue *ifq; int s; /* * `Cannot happen' (see slioctl). Someday we will extend * the line protocol to support other address families. */ if (dst->sa_family != AF_INET) { - printf("sl%d: af%d not supported\n", ifp->if_unit, + printf("sl%d: af%d not supported\n", sc->sc_if.if_unit, dst->sa_family); m_freem(m); return (EAFNOSUPPORT); } - sc = &sl_softc[ifp->if_unit]; if (sc->sc_ttyp == NULL) { m_freem(m); return (ENETDOWN); /* sort of */ } if ((sc->sc_ttyp->t_state & TS_CARR_ON) == 0) { m_freem(m); return (EHOSTUNREACH); } - ifq = &ifp->if_snd; + ifq = &sc->sc_if.if_snd; if ((ip = mtod(m, struct ip *))->ip_p == IPPROTO_TCP) { register int p = ((int *)ip)[ip->ip_hl]; if (INTERACTIVE(p & 0xffff) || INTERACTIVE(p >> 16)) ifq = &sc->sc_fastq; @@ -348,15 +348,13 @@ splx(s); sc->sc_if.if_oerrors++; return (ENOBUFS); } IF_ENQUEUE(ifq, m); - if (sc->sc_ttyp->t_outq.c_cc == 0) { - splx(s); + if (sc->sc_ttyp->t_outq.c_cc == 0) slstart(sc->sc_ttyp); - } else - splx(s); + splx(s); return (0); } /* * Start output on interface. Get another datagram @@ -495,37 +493,38 @@ static struct mbuf * sl_btom(sc, len) register struct sl_softc *sc; register int len; { - register u_char *cp; register struct mbuf *m; MGETHDR(m, M_DONTWAIT, MT_DATA); if (m == NULL) return (NULL); /* - * If we have more than MLEN bytes, it's cheaper to + * If we have more than MHLEN bytes, it's cheaper to * queue the cluster we just filled & allocate a new one * for the input buffer. Otherwise, fill the mbuf we * allocated above. Note that code in the input routine * guarantees that packet will fit in a cluster. */ - cp = sc->sc_buf; if (len >= MHLEN) { MCLGET(m, M_DONTWAIT); if ((m->m_flags & M_EXT) == 0) { - /* we couldn't get a cluster - if memory's this - * low, it's time to start dropping packets. */ - m_freem(m); + /* + * we couldn't get a cluster - if memory's this + * low, it's time to start dropping packets. + */ + (void) m_free(m); return (NULL); } - sc->sc_ep = mtod(m, u_char *) + (BUFOFFSET + SLMTU); - m->m_data = (caddr_t)cp; + sc->sc_ep = mtod(m, u_char *) + SLBUFSIZE; + m->m_data = (caddr_t)sc->sc_buf; + m->m_ext.ext_buf = (caddr_t)((int)sc->sc_buf &~ MCLOFSET); } else - bcopy((caddr_t)cp, mtod(m, caddr_t), len); + bcopy((caddr_t)sc->sc_buf, mtod(m, caddr_t), len); m->m_len = len; m->m_pkthdr.len = len; m->m_pkthdr.rcvif = &sc->sc_if; return (m); ADDED sys/net/if_types.h Index: sys/net/if_types.h ================================================================== --- sys/net/if_types.h +++ sys/net/if_types.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 1982, 1989 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)if_types.h 7.1 (Berkeley) 09/04/89 + */ + + +/* interface types for benefit of parsing media address headers */ +#define IFT_LOOP 0x1 /* loopback */ +#define IFT_XETHER 0x2 /* old 3MBaud experimental ethernet */ +#define IFT_ETHER 0x3 /* 802.3 */ +#define IFT_IMP 0x4 /* Arpanet imp interface */ +#define IFT_P8010 0x5 /* Pronet 10/Pronet 80 */ +#define IFT_EON 0x6 /* ISO over IP */ +#define IFT_HY 0x7 /* Hyperchannel */ Index: sys/netns/ns_cksum.c ================================================================== --- sys/netns/ns_cksum.c +++ sys/netns/ns_cksum.c @@ -12,14 +12,14 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)ns_cksum.c 7.3 (Berkeley) 06/29/88 + * @(#)ns_cksum.c 7.4 (Berkeley) 09/04/89 */ -#include "types.h" +#include "param.h" #include "mbuf.h" /* * Checksum routine for Network Systems Protocol Packets (Big-Endian). * * This routine is very heavily used in the network Index: sys/sys/errno.h ================================================================== --- sys/sys/errno.h +++ sys/sys/errno.h @@ -12,59 +12,59 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)errno.h 7.5 (Berkeley) 08/21/89 + * @(#)errno.h 7.6 (Berkeley) 09/04/89 */ -#define EPERM 1 /* Operation not permitted */ +#define EPERM 1 /* Not owner */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ -#define EINTR 4 /* Interrupted function call */ -#define EIO 5 /* Input/output error */ +#define EINTR 4 /* Interrupted system call */ +#define EIO 5 /* I/O error */ #define ENXIO 6 /* No such device or address */ #define E2BIG 7 /* Arg list too long */ #define ENOEXEC 8 /* Exec format error */ #define EBADF 9 /* Bad file descriptor */ -#define ECHILD 10 /* No child processes */ - /* 11 - was EAGAIN */ -#define ENOMEM 12 /* Not enough space */ +#define ECHILD 10 /* No children */ +#define EDEADLK 11 /* Resource deadlock avoided */ + /* 11 was EAGAIN */ +#define ENOMEM 12 /* Not enough memory */ #define EACCES 13 /* Permission denied */ #define EFAULT 14 /* Bad address */ #ifndef _POSIX_SOURCE #define ENOTBLK 15 /* Block device required */ +#define EBUSY 16 /* Device busy */ #endif -#define EBUSY 16 /* Resource busy */ #define EEXIST 17 /* File exists */ -#define EXDEV 18 /* Improper link */ +#define EXDEV 18 /* Cross-device link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ -#define ENFILE 23 /* Too many open files in system */ +#define ENFILE 23 /* File table overflow */ #define EMFILE 24 /* Too many open files */ -#define ENOTTY 25 /* Inappropriate I/O control op. */ +#define ENOTTY 25 /* Inappropriate ioctl for device */ #ifndef _POSIX_SOURCE #define ETXTBSY 26 /* Text file busy */ #endif #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ -#define ESPIPE 29 /* Invalid seek */ +#define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ /* math software */ -#define EDOM 33 /* Domain error */ +#define EDOM 33 /* Argument too large */ #define ERANGE 34 /* Result too large */ /* non-blocking and interrupt i/o */ -#define EDEADLK 35 /* Resource deadlock avoided */ -#define EAGAIN EDEADLK /* Resource temporarily unavailable */ +#define EAGAIN 35 /* Resource temporarily unavailable */ #ifndef _POSIX_SOURCE -#define EWOULDBLOCK EDEADLK /* Operation would block */ +#define EWOULDBLOCK EAGAIN /* Operation would block */ #define EINPROGRESS 36 /* Operation now in progress */ #define EALREADY 37 /* Operation already in progress */ /* ipc/network software */ @@ -96,18 +96,18 @@ #define ETIMEDOUT 60 /* Connection timed out */ #define ECONNREFUSED 61 /* Connection refused */ /* */ #define ELOOP 62 /* Too many levels of symbolic links */ -#endif -#define ENAMETOOLONG 63 /* Filename too long */ +#endif /* _POSIX_SOURCE */ +#define ENAMETOOLONG 63 /* File name too long */ /* should be rearranged */ #ifndef _POSIX_SOURCE #define EHOSTDOWN 64 /* Host is down */ #define EHOSTUNREACH 65 /* No route to host */ -#endif +#endif /* _POSIX_SOURCE */ #define ENOTEMPTY 66 /* Directory not empty */ /* quotas & mush */ #ifndef _POSIX_SOURCE #define EPROCLIM 67 /* Too many processes */ @@ -120,9 +120,9 @@ #define EBADRPC 72 /* RPC struct is bad */ #define ERPCMISMATCH 73 /* RPC version wrong */ #define EPROGUNAVAIL 74 /* RPC prog. not avail */ #define EPROGMISMATCH 75 /* Program version wrong */ #define EPROCUNAVAIL 76 /* Bad procedure for program */ -#endif +#endif /* _POSIX_SOURCE */ #define ENOLCK 77 /* No locks available */ #define ENOSYS 78 /* Function not implemented */ Index: sys/sys/ioctl.h ================================================================== --- sys/sys/ioctl.h +++ sys/sys/ioctl.h @@ -4,11 +4,11 @@ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)ioctl.h 7.8 (Berkeley) 12/20/88 + * @(#)ioctl.h 7.9 (Berkeley) 09/04/89 */ /* * Ioctl definitions */ @@ -100,22 +100,27 @@ #define IOC_INOUT (IOC_IN|IOC_OUT) #define IOC_DIRMASK 0xe0000000 /* mask for IN/OUT/VOID */ #define _IOC(inout,group,num,len) \ (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num)) -#define _IO(g,n) _IOC(IOC_VOID, 0, (g), (n)) +#define _IO(g,n) _IOC(IOC_VOID, (g), (n), 0) #define _IOR(g,n,t) _IOC(IOC_OUT, (g), (n), sizeof(t)) #define _IOW(g,n,t) _IOC(IOC_IN, (g), (n), sizeof(t)) /* this should be _IORW, but stdio got there first */ #define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t)) #endif /* * tty ioctl commands */ +#ifdef USE_OLD_TTY +#define TIOCGETD _IOR('t', 0, int) /* get line discipline */ +#define TIOCSETD _IOW('t', 1, int) /* set line discipline */ +#else #define TIOCGETDCOMPAT _IOR('t', 0, int) /* get line discipline */ #define TIOCSETDCOMPAT _IOW('t', 1, int) /* set line discipline */ +#endif #define TIOCHPCL _IO('t', 2) /* hang up on last close */ #define TIOCMODG _IOR('t', 3, int) /* get modem control state */ #define TIOCMODS _IOW('t', 4, int) /* set modem control state */ #define TIOCM_LE 0001 /* line enable */ #define TIOCM_DTR 0002 /* data terminal ready */ @@ -192,12 +197,14 @@ #define TIOCSETAFS _IOW('t', 25, struct termios) /* SETAF ign hdw state */ #define TCGETA TIOCGETA #define TCSETA TIOCSETA #define TCSETAW TIOCSETAW #define TCSETAF TIOCSETAF +#ifndef USE_OLD_TTY #define TIOCGETD _IOR('t', 26, int) /* get line discipline */ #define TIOCSETD _IOW('t', 27, int) /* set line discipline */ +#endif /* locals, from 127 down */ #define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */ #define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */ #define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */ #define TIOCLGET _IOR('t', 124, int) /* get local modes */ @@ -247,13 +254,16 @@ #define TIOCUCNTL _IOW('t', 102, int) /* pty: set/clr usr cntl mode */ #define UIOCCMD(n) _IO('u', n) /* usr cntl op "n" */ #define TIOCCONS _IO('t', 98) /* become virtual console */ #define TIOCSCTTY _IO('t', 97) /* become controlling tty */ -#define OTTYDISC 0 /* termios */ -#define NTTYDISC 0 /* COMPAT_43 */ +#define TTYDISC 0 /* termios tty line discipline */ +#ifdef USE_OLD_TTY +#define OTTYDISC 0 /* COMPAT_43 (alias) */ #define NETLDISC 1 /* line discip for berk net */ +#define NTTYDISC 2 /* COMPAT_43 (alias) */ +#endif #define TABLDISC 3 /* tablet discipline */ #define SLIPDISC 4 /* serial IP discipline */ #define FIOCLEX _IO('f', 1) /* set close on exec on fd */ #define FIONCLEX _IO('f', 2) /* remove close on exec */ @@ -292,14 +302,14 @@ #define OSIOCGIFNETMASK _IOWR('i',21, struct ifreq) /* get net addr mask */ #define SIOCGIFNETMASK _IOWR('i',37, struct ifreq) /* get net addr mask */ #define SIOCSIFNETMASK _IOW('i',22, struct ifreq) /* set net addr mask */ #define SIOCGIFMETRIC _IOWR('i',23, struct ifreq) /* get IF metric */ #define SIOCSIFMETRIC _IOW('i',24, struct ifreq) /* set IF metric */ -#define SIOCDIFADDR _IOW('i',38, struct ifreq) /* delete IF addr */ -#define SIOCAIFADDR _IOW('i',39, struct ifaliasreq) /* add/chg IF alias */ +#define SIOCDIFADDR _IOW('i',25, struct ifreq) /* delete IF addr */ +#define SIOCAIFADDR _IOW('i',26, struct ifaliasreq) /* add/chg IF alias */ #define SIOCSARP _IOW('i', 30, struct arpreq) /* set arp entry */ #define OSIOCGARP _IOWR('i',31, struct arpreq) /* get arp entry */ #define SIOCGARP _IOWR('i',38, struct arpreq) /* get arp entry */ #define SIOCDARP _IOW('i', 32, struct arpreq) /* delete arp entry */ #endif Index: sys/sys/ktrace.h ================================================================== --- sys/sys/ktrace.h +++ sys/sys/ktrace.h @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)ktrace.h 1.2 (Berkeley) 05/01/89 + * @(#)ktrace.h 7.1 (Berkeley) 09/04/89 */ /* * operations to ktrace system call (op & 0x3) */ Index: sys/sys/mbuf.h ================================================================== --- sys/sys/mbuf.h +++ sys/sys/mbuf.h @@ -12,61 +12,102 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)mbuf.h 7.8.1.3 (Berkeley) 02/14/89 - */ - -/* - * Constants related to memory allocator. - */ -#define MSIZE 128 /* size of an mbuf */ - -#if CLBYTES > 1024 -#define MCLBYTES 1024 -#define MCLSHIFT 10 -#define MCLOFSET (MCLBYTES - 1) -#else -#define MCLBYTES CLBYTES -#define MCLSHIFT CLSHIFT -#define MCLOFSET CLOFSET -#endif - -#define MMINOFF 12 /* mbuf header length */ -#define MTAIL 4 -#define MMAXOFF (MSIZE-MTAIL) /* offset where data ends */ -#define MLEN (MSIZE-MMINOFF-MTAIL) /* mbuf data length */ -#ifdef GATEWAY -#define NMBCLUSTERS 512 -#else -#define NMBCLUSTERS 256 -#endif -#define NMBPCL (CLBYTES/MSIZE) /* # mbufs per cluster */ + * @(#)mbuf.h 7.12 (Berkeley) 09/04/89 + */ + +#ifndef M_WAITOK +#include "malloc.h" +#endif + +/* + * Mbufs are of a single size, MSIZE (machine/machparam.h), which + * includes overhead. An mbuf may add a single "mbuf cluster" of size + * MCLBYTES (also in machine/machparam.h), which has no additional overhead + * and is used instead of the internal data area; this is done when + * at least MINCLSIZE of data must be stored. + */ + +#define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */ +#define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */ + +#define MINCLSIZE (MHLEN + MLEN) /* smallest amount to put in cluster */ +#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */ /* * Macros for type conversion + * mtod(m,t) - convert mbuf pointer to data pointer of correct type + * dtom(x) - convert data pointer within mbuf to mbuf pointer (XXX) + * mtocl(x) - convert pointer within cluster to cluster index # + * cltom(x) - convert cluster # to ptr to beginning of cluster */ - -/* network cluster number to virtual address, and back */ -#define cltom(x) ((struct mbuf *)((int)mbutl + ((x) << MCLSHIFT))) -#define mtocl(x) (((int)x - (int)mbutl) >> MCLSHIFT) - -/* address in mbuf to mbuf head */ +#define mtod(m,t) ((t)((m)->m_data)) #define dtom(x) ((struct mbuf *)((int)x & ~(MSIZE-1))) +#define mtocl(x) (((u_int)x - (u_int)mbutl) >> MCLSHIFT) +#define cltom(x) ((caddr_t)mbutl[x]) + +/* header at beginning of each mbuf: */ +struct m_hdr { + struct mbuf *mh_next; /* next buffer in chain */ + struct mbuf *mh_nextpkt; /* next chain in queue/record */ + int mh_len; /* amount of data in this mbuf */ + caddr_t mh_data; /* location of data */ + short mh_type; /* type of data in this mbuf */ + short mh_flags; /* flags; see below */ +}; + +/* record/packet header in first mbuf of chain; valid if M_PKTHDR set */ +struct pkthdr { + int len; /* total packet length */ + struct ifnet *rcvif; /* rcv interface */ +}; -/* mbuf head, to typed data */ -#define mtod(x,t) ((t)((int)(x) + (x)->m_off)) +/* description of external storage mapped into mbuf, valid if M_EXT set */ +struct m_ext { + caddr_t ext_buf; /* start of buffer */ + void (*ext_free)(); /* free routine if not the usual */ + u_int ext_size; /* size of buffer, for ext_free */ +}; struct mbuf { - struct mbuf *m_next; /* next buffer in chain */ - u_long m_off; /* offset of data */ - short m_len; /* amount of data in this mbuf */ - short m_type; /* mbuf type (0 == free) */ - u_char m_dat[MLEN]; /* data storage */ - struct mbuf *m_act; /* link in higher-level mbuf list */ + struct m_hdr m_hdr; + union { + struct { + struct pkthdr MH_pkthdr; /* M_PKTHDR set */ + union { + struct m_ext MH_ext; /* M_EXT set */ + char MH_databuf[MHLEN]; + } MH_dat; + } MH; + char M_databuf[MLEN]; /* !M_PKTHDR, !M_EXT */ + } M_dat; }; +#define m_next m_hdr.mh_next +#define m_len m_hdr.mh_len +#define m_data m_hdr.mh_data +#define m_type m_hdr.mh_type +#define m_flags m_hdr.mh_flags +#define m_nextpkt m_hdr.mh_nextpkt +#define m_act m_nextpkt +#define m_pkthdr M_dat.MH.MH_pkthdr +#define m_ext M_dat.MH.MH_dat.MH_ext +#define m_pktdat M_dat.MH.MH_dat.MH_databuf +#define m_dat M_dat.M_databuf + +/* mbuf flags */ +#define M_EXT 0x0001 /* has associated external storage */ +#define M_PKTHDR 0x0002 /* start of record */ +#define M_EOR 0x0004 /* end of record */ + +/* mbuf pkthdr flags, also in m_flags */ +#define M_BCAST 0x0100 /* send/received as link-level broadcast */ +#define M_MCAST 0x0200 /* send/received as link-level multicast */ + +/* flags copied when copying m_pkthdr */ +#define M_COPYFLAGS (M_PKTHDR|M_EOR|M_BCAST|M_MCAST) /* mbuf types */ #define MT_FREE 0 /* should be on free list */ #define MT_DATA 1 /* dynamic (data) allocation */ #define MT_HEADER 2 /* packet header */ @@ -74,113 +115,253 @@ #define MT_PCB 4 /* protocol control block */ #define MT_RTABLE 5 /* routing tables */ #define MT_HTABLE 6 /* IMP host tables */ #define MT_ATABLE 7 /* address resolution tables */ #define MT_SONAME 8 /* socket name */ -#define MT_ZOMBIE 9 /* zombie proc status */ #define MT_SOOPTS 10 /* socket options */ #define MT_FTABLE 11 /* fragment reassembly header */ #define MT_RIGHTS 12 /* access rights */ #define MT_IFADDR 13 /* interface address */ - -/* flags to m_get */ -#define M_DONTWAIT 0 -#define M_WAIT 1 - -/* flags to m_pgalloc */ -#define MPG_MBUFS 0 /* put new mbufs on free list */ -#define MPG_CLUSTERS 1 /* put new clusters on free list */ -#define MPG_SPACE 2 /* don't free; caller wants space */ +#define MT_CONTROL 14 /* extra-data protocol message */ +#define MT_OOBDATA 15 /* expedited data */ + +/* flags to m_get/MGET */ +#define M_DONTWAIT M_NOWAIT +#define M_WAIT M_WAITOK + +/* + * mbuf allocation/deallocation macros: + * + * MGET(struct mbuf *m, int how, int type) + * allocates an mbuf and initializes it to contain internal data. + * + * MGETHDR(struct mbuf *m, int how, int type) + * allocates an mbuf and initializes it to contain a packet header + * and internal data. + */ +#define MGET(m, how, type) { \ + MALLOC((m), struct mbuf *, MSIZE, mbtypes[type], (how)); \ + if (m) { \ + (m)->m_type = (type); \ + mbstat.m_mtypes[type]++; \ + (m)->m_next = (struct mbuf *)NULL; \ + (m)->m_nextpkt = (struct mbuf *)NULL; \ + (m)->m_data = (m)->m_dat; \ + (m)->m_flags = 0; \ + } else \ + (m) = m_retry((how), (type)); \ +} + +#define MGETHDR(m, how, type) { \ + MALLOC((m), struct mbuf *, MSIZE, mbtypes[type], (how)); \ + if (m) { \ + (m)->m_type = (type); \ + mbstat.m_mtypes[type]++; \ + (m)->m_next = (struct mbuf *)NULL; \ + (m)->m_nextpkt = (struct mbuf *)NULL; \ + (m)->m_data = (m)->m_pktdat; \ + (m)->m_flags = M_PKTHDR; \ + } else \ + (m) = m_retryhdr((how), (type)); \ +} + +/* + * Mbuf cluster macros. + * MCLALLOC(caddr_t p, int how) allocates an mbuf cluster. + * MCLGET adds such clusters to a normal mbuf; + * the flag M_EXT is set upon success. + * MCLFREE releases a reference to a cluster allocated by MCLALLOC, + * freeing the cluster if the reference count has reached 0. + * + * Normal mbuf clusters are normally treated as character arrays + * after allocation, but use the first word of the buffer as a free list + * pointer while on the free list. + */ +union mcluster { + union mcluster *mcl_next; + char mcl_buf[MCLBYTES]; +}; + +#define MCLALLOC(p, how) \ + { int ms = splimp(); \ + if (mclfree == 0) \ + (void)m_clalloc(1, (how)); \ + if ((p) = (caddr_t)mclfree) { \ + ++mclrefcnt[mtocl(p)]; \ + mbstat.m_clfree--; \ + mclfree = ((union mcluster *)(p))->mcl_next; \ + } \ + splx(ms); \ + } + +#define MCLGET(m, how) \ + { MCLALLOC((m)->m_ext.ext_buf, (how)); \ + if ((m)->m_ext.ext_buf != NULL) { \ + (m)->m_data = (m)->m_ext.ext_buf; \ + (m)->m_flags |= M_EXT; \ + (m)->m_ext.ext_size = MCLBYTES; \ + } \ + } + +#define MCLFREE(p) \ + { int ms = splimp(); \ + if (--mclrefcnt[mtocl(p)] == 0) { \ + ((union mcluster *)(p))->mcl_next = mclfree; \ + mclfree = (union mcluster *)(p); \ + mbstat.m_clfree++; \ + } \ + splx(ms); \ + } + +/* + * MFREE(struct mbuf *m, struct mbuf *n) + * Free a single mbuf and associated external storage. + * Place the successor, if any, in n. + */ +#ifdef notyet +#define MFREE(m, n) \ + { mbstat.m_mtypes[(m)->m_type]--; \ + if ((m)->m_flags & M_EXT) { \ + if ((m)->m_ext.ext_free) \ + (*((m)->m_ext.ext_free))((m)->m_ext.ext_buf, \ + (m)->m_ext.ext_size); \ + else \ + MCLFREE((m)->m_ext.ext_buf); \ + } \ + (n) = (m)->m_next; \ + FREE((m), mbtypes[(m)->m_type]); \ + } +#else /* notyet */ +#define MFREE(m, nn) \ + { mbstat.m_mtypes[(m)->m_type]--; \ + if ((m)->m_flags & M_EXT) { \ + MCLFREE((m)->m_ext.ext_buf); \ + } \ + (nn) = (m)->m_next; \ + FREE((m), mbtypes[(m)->m_type]); \ + } +#endif + +/* + * Copy mbuf pkthdr from from to to. + * from must have M_PKTHDR set, and to must be empty. + */ +#define M_COPY_PKTHDR(to, from) { \ + (to)->m_pkthdr = (from)->m_pkthdr; \ + (to)->m_flags = (from)->m_flags & M_COPYFLAGS; \ + (to)->m_data = (to)->m_pktdat; \ +} + +/* + * Set the m_data pointer of a newly-allocated mbuf (m_get/MGET) to place + * an object of the specified size at the end of the mbuf, longword aligned. + */ +#define M_ALIGN(m, len) \ + { (m)->m_data += (MLEN - (len)) &~ (sizeof(long) - 1); } +/* + * As above, for mbufs allocated with m_gethdr/MGETHDR + * or initialized by M_COPY_PKTHDR. + */ +#define MH_ALIGN(m, len) \ + { (m)->m_data += (MHLEN - (len)) &~ (sizeof(long) - 1); } + +/* + * Compute the amount of space available + * before the current start of data in an mbuf. + */ +#define M_LEADINGSPACE(m) \ + ((m)->m_flags & M_EXT ? /* (m)->m_data - (m)->m_ext.ext_buf */ 0 : \ + (m)->m_flags & M_PKTHDR ? (m)->m_data - (m)->m_pktdat : \ + (m)->m_data - (m)->m_dat) + +/* + * Compute the amount of space available + * after the end of data in an mbuf. + */ +#define M_TRAILINGSPACE(m) \ + ((m)->m_flags & M_EXT ? (m)->m_ext.ext_buf + (m)->m_ext.ext_size - \ + ((m)->m_data + (m)->m_len) : \ + &(m)->m_dat[MLEN] - ((m)->m_data + (m)->m_len)) + +/* + * Arrange to prepend space of size plen to mbuf m. + * If a new mbuf must be allocated, how specifies whether to wait. + * If how is M_DONTWAIT and allocation fails, the original mbuf chain + * is freed and m is set to NULL. + */ +#define M_PREPEND(m, plen, how) { \ + if (M_LEADINGSPACE(m) >= (plen)) { \ + (m)->m_data -= (plen); \ + (m)->m_len += (plen); \ + } else \ + (m) = m_prepend((m), (plen), (how)); \ + if ((m) && (m)->m_flags & M_PKTHDR) \ + (m)->m_pkthdr.len += (plen); \ +} + +/* change mbuf to new type */ +#define MCHTYPE(m, t) { \ + mbstat.m_mtypes[(m)->m_type]--; \ + mbstat.m_mtypes[t]++; \ + (m)->m_type = t;\ +} /* length to m_copy to copy all */ #define M_COPYALL 1000000000 -/* - * m_pullup will pull up additional length if convenient; - * should be enough to hold headers of second-level and higher protocols. - */ -#define MPULL_EXTRA 32 - -#define MGET(m, i, t) \ - { int ms = splimp(); \ - if ((m)=mfree) \ - { if ((m)->m_type != MT_FREE) panic("mget"); (m)->m_type = t; \ - mbstat.m_mtypes[MT_FREE]--; mbstat.m_mtypes[t]++; \ - mfree = (m)->m_next; (m)->m_next = 0; \ - (m)->m_off = MMINOFF; } \ - else \ - (m) = m_more(i, t); \ - splx(ms); } -/* - * Mbuf page cluster macros. - * MCLALLOC allocates mbuf page clusters. - * Note that it works only with a count of 1 at the moment. - * MCLGET adds such clusters to a normal mbuf. - * m->m_len is set to MCLBYTES upon success, and to MLEN on failure. - * MCLFREE frees clusters allocated by MCLALLOC. - */ -#define MCLALLOC(m, i) \ - { int ms = splimp(); \ - if (mclfree == 0) \ - (void)m_clalloc((i), MPG_CLUSTERS, M_DONTWAIT); \ - if ((m)=mclfree) \ - {++mclrefcnt[mtocl(m)];mbstat.m_clfree--;mclfree = (m)->m_next;} \ - splx(ms); } -#define M_HASCL(m) ((m)->m_off >= MSIZE) -#define MTOCL(m) ((struct mbuf *)(mtod((m), int) &~ MCLOFSET)) - -#define MCLGET(m) \ - { struct mbuf *p; \ - MCLALLOC(p, 1); \ - if (p) { \ - (m)->m_off = (int)p - (int)(m); \ - (m)->m_len = MCLBYTES; \ - } else \ - (m)->m_len = MLEN; \ - } -#define MCLFREE(m) { \ - if (--mclrefcnt[mtocl(m)] == 0) \ - { (m)->m_next = mclfree;mclfree = (m);mbstat.m_clfree++;} \ - } -#define MFREE(m, n) \ - { int ms = splimp(); \ - if ((m)->m_type == MT_FREE) panic("mfree"); \ - mbstat.m_mtypes[(m)->m_type]--; mbstat.m_mtypes[MT_FREE]++; \ - (m)->m_type = MT_FREE; \ - if (M_HASCL(m)) { \ - (n) = MTOCL(m); \ - MCLFREE(n); \ - } \ - (n) = (m)->m_next; (m)->m_next = mfree; \ - (m)->m_off = 0; (m)->m_act = 0; mfree = (m); \ - splx(ms); \ - if (m_want) { \ - m_want = 0; \ - wakeup((caddr_t)&mfree); \ - } \ - } +/* compatiblity with 4.3 */ +#define m_copy(m, o, l) m_copym((m), (o), (l), M_DONTWAIT) /* * Mbuf statistics. */ struct mbstat { u_long m_mbufs; /* mbufs obtained from page pool */ u_long m_clusters; /* clusters obtained from page pool */ - u_long m_space; /* interface pages obtained from page pool */ + u_long m_spare; /* spare field */ u_long m_clfree; /* free clusters */ u_long m_drops; /* times failed to find space */ u_long m_wait; /* times waited for space */ u_long m_drain; /* times drained protocols for space */ u_short m_mtypes[256]; /* type specific mbuf allocations */ }; #ifdef KERNEL -extern struct mbuf mbutl[]; /* virtual address of net free mem */ -extern struct pte Mbmap[]; /* page tables to map Netutl */ +extern char mbutl[][MCLBYTES]; /* virtual address of mclusters */ +extern struct pte Mbmap[]; /* page tables to map mbutl */ struct mbstat mbstat; int nmbclusters; -struct mbuf *mfree, *mclfree; -char mclrefcnt[NMBCLUSTERS + 1]; -int m_want; -struct mbuf *m_get(),*m_getclr(),*m_free(),*m_more(),*m_copy(),*m_pullup(); -caddr_t m_clalloc(); +union mcluster *mclfree; +char mclrefcnt[NMBCLUSTERS + CLBYTES/MCLBYTES]; +int max_linkhdr; /* largest link-level header */ +int max_protohdr; /* largest protocol header */ +int max_hdr; /* largest link+protocol header */ +int max_datalen; /* MHLEN - max_hdr */ +struct mbuf *m_get(), *m_gethdr(), *m_getclr(), *m_retry(), *m_retryhdr(); +struct mbuf *m_free(), *m_copym(), *m_pullup(), *m_prepend(); +int m_clalloc(); +extern int mbtypes[]; /* XXX */ + +#ifdef MBTYPES +int mbtypes[] = { /* XXX */ + M_FREE, /* MT_FREE 0 /* should be on free list */ + M_MBUF, /* MT_DATA 1 /* dynamic (data) allocation */ + M_MBUF, /* MT_HEADER 2 /* packet header */ + M_SOCKET, /* MT_SOCKET 3 /* socket structure */ + M_PCB, /* MT_PCB 4 /* protocol control block */ + M_RTABLE, /* MT_RTABLE 5 /* routing tables */ + M_HTABLE, /* MT_HTABLE 6 /* IMP host tables */ + 0, /* MT_ATABLE 7 /* address resolution tables */ + M_MBUF, /* MT_SONAME 8 /* socket name */ + 0, /* 9 */ + M_SOOPTS, /* MT_SOOPTS 10 /* socket options */ + M_FTABLE, /* MT_FTABLE 11 /* fragment reassembly header */ + M_MBUF, /* MT_RIGHTS 12 /* access rights */ + M_IFADDR, /* MT_IFADDR 13 /* interface address */ + M_MBUF, /* MT_CONTROL 14 /* extra-data protocol message */ + M_MBUF, /* MT_OOBDATA 15 /* expedited data */ +#ifdef DATAKIT + 25, 26, 27, 28, 29, 30, 31, 32 /* datakit ugliness */ +#endif +}; +#endif #endif Index: sys/sys/mount.h ================================================================== --- sys/sys/mount.h +++ sys/sys/mount.h @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)mount.h 7.4 (Berkeley) 05/27/89 + * @(#)mount.h 7.5 (Berkeley) 09/05/89 */ typedef quad fsid_t; /* file system id type */ /* @@ -48,52 +48,38 @@ uid_t m_exroot; /* exported mapping for uid 0 */ qaddr_t m_data; /* private data */ }; /* - * mount flags. - * M_MLOCK lock the mount entry so that name lookup cannot proceed - * past the mount point. This keeps the subtree stable during mounts - * and unmounts. + * Mount flags. */ #define M_RDONLY 0x01 /* read only filesystem */ #define M_SYNCHRONOUS 0x02 /* file system written synchronously */ -#define M_MLOCK 0x04 /* lock so that subtree is stable */ -#define M_MWAIT 0x08 /* someone is waiting for lock */ -#define M_NOEXEC 0x10 /* can't exec from filesystem */ -#define M_NOSUID 0x20 /* don't honor setuid bits on fs */ -#define M_NODEV 0x40 /* don't interpret special files */ +#define M_NOEXEC 0x04 /* can't exec from filesystem */ +#define M_NOSUID 0x08 /* don't honor setuid bits on fs */ +#define M_NODEV 0x10 /* don't interpret special files */ /* * exported mount flags. */ #define M_EXPORTED 0x100 /* file system is exported */ #define M_EXRDONLY 0x200 /* exported read only */ - /* - * Set/clear the M_MLOCK + * filesystem control flags. + * + * M_MLOCK lock the mount entry so that name lookup cannot proceed + * past the mount point. This keeps the subtree stable during mounts + * and unmounts. */ -#define VFSLOCK(mp) { \ - while ((mp)->m_flag & M_MLOCK) { \ - (mp)->m_flag |= M_MWAIT; \ - (void) sleep((caddr_t)(mp), PVFS); \ - } \ - (mp)->m_flag |= M_MLOCK; \ -} - -#define VFSUNLOCK(mp) { \ - (mp)->m_flag &= ~M_MLOCK; \ - if ((mp)->m_flag&M_MWAIT) { \ - (mp)->m_flag &= ~M_MWAIT; \ - wakeup((caddr_t)(mp)); \ - } \ -} +#define M_MLOCK 0x1000 /* lock so that subtree is stable */ +#define M_MWAIT 0x2000 /* someone is waiting for lock */ /* * Operations supported on mounted file system. */ struct vfsops { int (*vfs_mount)( /* mp, path, data, ndp */ ); + int (*vfs_start)( /* mp, flags */ ); int (*vfs_unmount)( /* mp, forcibly */ ); int (*vfs_root)( /* mp, vpp */ ); int (*vfs_statfs)( /* mp, sbp */ ); int (*vfs_sync)( /* mp, waitfor */ ); int (*vfs_fhtovp)( /* mp, fidp, vpp */ ); @@ -100,12 +86,13 @@ int (*vfs_vptofh)( /* vp, fidp */ ); }; #define VFS_MOUNT(MP, PATH, DATA, NDP) \ (*(MP)->m_op->vfs_mount)(MP, PATH, DATA, NDP) +#define VFS_START(MP, FLAGS) (*(MP)->m_op->vfs_start)(MP, FLAGS) #define VFS_UNMOUNT(MP, FORCIBLY) (*(MP)->m_op->vfs_unmount)(MP, FORCIBLY) -#define VFS_ROOT(MP, VPP) (*(MP)->m_op->vfs_root)(MP,VPP) +#define VFS_ROOT(MP, VPP) (*(MP)->m_op->vfs_root)(MP, VPP) #define VFS_STATFS(MP, SBP) (*(MP)->m_op->vfs_statfs)(MP, SBP) #define VFS_SYNC(MP, WAITFOR) (*(MP)->m_op->vfs_sync)(MP, WAITFOR) #define VFS_FHTOVP(MP, FIDP, VPP) (*(MP)->m_op->vfs_fhtovp)(MP, FIDP, VPP) #define VFS_VPTOFH(VP, FIDP) (*(VP)->v_mount->m_op->vfs_vptofh)(VP, FIDP) @@ -120,11 +107,11 @@ /* * file system statistics */ -#define MNAMELEN 32 /* length of buffer for returned name */ +#define MNAMELEN 90 /* length of buffer for returned name */ struct statfs { short f_type; /* type of filesystem (see below) */ short f_flags; /* copy of mount flags */ long f_fsize; /* fundamental file system block size */ @@ -133,22 +120,23 @@ long f_bfree; /* free blocks in fs */ long f_bavail; /* free blocks avail to non-superuser */ long f_files; /* total file nodes in file system */ long f_ffree; /* free file nodes in fs */ fsid_t f_fsid; /* file system id */ - long f_spare[6]; /* spare for later */ + long f_spare[9]; /* spare for later */ char f_mntonname[MNAMELEN]; /* directory on which mounted */ char f_mntfromname[MNAMELEN];/* mounted filesystem */ }; /* * File system types. */ #define MOUNT_NONE 0 #define MOUNT_UFS 1 #define MOUNT_NFS 2 -#define MOUNT_PC 3 -#define MOUNT_MAXTYPE 3 +#define MOUNT_MFS 3 +#define MOUNT_PC 4 +#define MOUNT_MAXTYPE 4 /* * Arguments to mount UFS */ struct ufs_args { @@ -161,10 +149,21 @@ struct fhandle { fsid_t fh_fsid; /* File system id of mount point */ struct fid fh_fid; /* Id of file */ }; typedef struct fhandle fhandle_t; + +#ifdef MFS +/* + * Arguments to mount MFS + */ +struct mfs_args { + char *name; + caddr_t base; + u_long size; +}; +#endif MFS #ifdef NFS /* * File Handle (32 bytes for version 2), variable up to 1024 for version 3 */ Index: sys/sys/namei.h ================================================================== --- sys/sys/namei.h +++ sys/sys/namei.h @@ -1,7 +1,7 @@ /* - * Copyright (c) 1985, 1989 Regents of the University of California. + * Copyright (c) 1982, 1986 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms are permitted * provided that the above copyright notice and this paragraph are * duplicated in all such forms and that any documentation, @@ -12,127 +12,97 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)namei.h 7.6 (Berkeley) 08/25/89 + * @(#)namei.h 7.3.1.1 (Berkeley) 09/04/89 */ #ifndef _NAMEI_ #define _NAMEI_ #ifdef KERNEL -#include "../ufs/dir.h" #include "uio.h" #else #include -#include #endif /* * Encapsulation of namei parameters. * One of these is located in the u. area to * minimize space allocated on the kernel stack. */ struct nameidata { - /* arguments to namei and related context: */ caddr_t ni_dirp; /* pathname pointer */ - enum uio_seg ni_segflg; /* location of pathname */ short ni_nameiop; /* see below */ - struct vnode *ni_cdir; /* current directory */ - struct vnode *ni_rdir; /* root directory, if not normal root */ - struct ucred *ni_cred; /* credentials */ - - /* shared between namei, lookup routines and commit routines: */ - caddr_t ni_pnbuf; /* pathname buffer */ - char *ni_ptr; /* current location in pathname */ - char *ni_next; /* next location in pathname */ - u_int ni_pathlen; /* remaining chars in path */ - u_long ni_hash; /* hash value of current component */ - short ni_namelen; /* length of current component */ - short ni_loopcnt; /* count of symlinks encountered */ - char ni_makeentry; /* 1 => add entry to name cache */ - char ni_isdotdot; /* 1 => current component name is .. */ - - /* results: */ - struct vnode *ni_vp; /* vnode of result */ - struct vnode *ni_dvp; /* vnode of intermediate directory */ - struct direct ni_dent; /* final component name */ - - /* side effects: */ - /* BEGIN UFS SPECIFIC */ - off_t ni_endoff; /* end of useful directory contents */ - struct ndirinfo { /* saved info for new dir entry */ - struct iovec nd_iovec; /* pointed to by ni_iov */ - struct uio nd_uio; /* directory I/O parameters */ - } ni_nd; - /* END UFS SPECIFIC */ + short ni_error; /* error return if any */ + off_t ni_endoff; /* end of useful stuff in directory */ + struct inode *ni_pdir; /* inode of parent directory of dirp */ + struct iovec ni_iovec; /* MUST be pointed to by ni_iov */ + struct uio ni_uio; /* directory I/O parameters */ + struct direct ni_dent; /* current directory entry */ }; -#define ni_base ni_nd.nd_iovec.iov_base -#define ni_count ni_nd.nd_iovec.iov_len -#define ni_segflg ni_nd.nd_uio.uio_segflg -#define ni_iov ni_nd.nd_uio.uio_iov -#define ni_iovcnt ni_nd.nd_uio.uio_iovcnt -#define ni_offset ni_nd.nd_uio.uio_offset -#define ni_resid ni_nd.nd_uio.uio_resid -#define ni_rw ni_nd.nd_uio.uio_rw -#define ni_uio ni_nd.nd_uio +#define ni_base ni_iovec.iov_base +#define ni_count ni_iovec.iov_len +#define ni_iov ni_uio.uio_iov +#define ni_iovcnt ni_uio.uio_iovcnt +#define ni_offset ni_uio.uio_offset +#define ni_segflg ni_uio.uio_segflg +#define ni_resid ni_uio.uio_resid #ifdef KERNEL /* * namei operations and modifiers */ #define LOOKUP 0 /* perform name lookup only */ #define CREATE 1 /* setup for file creation */ #define DELETE 2 /* setup for file deletion */ -#define RENAME 3 /* setup for file renaming */ -#define OPFLAG 3 /* mask for operation */ -#define LOCKLEAF 0x04 /* lock inode on return */ -#define LOCKPARENT 0x08 /* want parent vnode returned locked */ -#define WANTPARENT 0x10 /* want parent vnode returned unlocked */ +#define LOCKPARENT 0x10 /* see the top of namei */ #define NOCACHE 0x20 /* name must not be left in cache */ #define FOLLOW 0x40 /* follow symbolic links */ #define NOFOLLOW 0x0 /* don't follow symbolic links (pseudo) */ -#define NOMOUNT 0x80 /* don't cross mount points */ #endif /* * This structure describes the elements in the cache of recent * names looked up by namei. */ - -#define NCHNAMLEN 15 /* maximum name segment length we bother with */ - struct namecache { struct namecache *nc_forw; /* hash chain, MUST BE FIRST */ struct namecache *nc_back; /* hash chain, MUST BE FIRST */ struct namecache *nc_nxt; /* LRU chain */ struct namecache **nc_prev; /* LRU chain */ - struct vnode *nc_dvp; /* vnode of parent of name */ - u_long nc_dvpid; /* capability number of nc_dvp */ - struct vnode *nc_vp; /* vnode the name refers to */ - u_long nc_vpid; /* capability number of nc_vp */ + struct inode *nc_ip; /* inode the name refers to */ + ino_t nc_ino; /* ino of parent of name */ + dev_t nc_dev; /* dev of parent of name */ + dev_t nc_idev; /* dev of the name ref'd */ + long nc_id; /* referenced inode's id */ char nc_nlen; /* length of name */ +#define NCHNAMLEN 15 /* maximum name segment length we bother with */ char nc_name[NCHNAMLEN]; /* segment name */ }; - #ifdef KERNEL struct namecache *namecache; int nchsize; -u_long nextvnodeid; #endif /* * Stats on usefulness of namei caches. */ struct nchstats { - long ncs_goodhits; /* hits that we can really use */ - long ncs_neghits; /* negative hits that we can use */ + long ncs_goodhits; /* hits that we can reall use */ long ncs_badhits; /* hits we must drop */ long ncs_falsehits; /* hits with id mismatch */ long ncs_miss; /* misses */ long ncs_long; /* long names that ignore cache */ long ncs_pass2; /* names found with passes == 2 */ long ncs_2passes; /* number of times we attempt it */ }; -#endif /* _NAMEI_ */ + +#define NAMEI(ndp, nameiop, segflg, dirp) \ + ndp->ni_nameiop = nameiop, \ + ndp->ni_segflg = segflg, \ + ndp->ni_dirp = dirp, \ + namei(ndp); + +#endif /* !_NAMEI_ */ Index: sys/sys/protosw.h ================================================================== --- sys/sys/protosw.h +++ sys/sys/protosw.h @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)protosw.h 7.3 (Berkeley) 06/27/88 + * @(#)protosw.h 7.4 (Berkeley) 09/04/89 */ /* * Protocol switch table. * @@ -132,10 +132,11 @@ * spread out codes so new ICMP codes can be * accomodated more easily */ #define PRC_IFDOWN 0 /* interface transition */ #define PRC_ROUTEDEAD 1 /* select new route if possible */ +#define PRC_QUENCH2 3 /* DEC congestion bit says slow down */ #define PRC_QUENCH 4 /* some said to slow down */ #define PRC_MSGSIZE 5 /* message size forced drop */ #define PRC_HOSTDEAD 6 /* normally from IMP */ #define PRC_HOSTUNREACH 7 /* ditto */ #define PRC_UNREACH_NET 8 /* no route to network */ @@ -154,11 +155,11 @@ #define PRC_NCMDS 21 #ifdef PRCREQUESTS char *prcrequests[] = { - "IFDOWN", "ROUTEDEAD", "#2", "#3", + "IFDOWN", "ROUTEDEAD", "#2", "DEC-BIT-QUENCH2", "QUENCH", "MSGSIZE", "HOSTDEAD", "HOSTUNREACH", "NET-UNREACH", "HOST-UNREACH", "PROTO-UNREACH", "PORT-UNREACH", "FRAG-UNREACH", "SRCFAIL-UNREACH", "NET-REDIRECT", "HOST-REDIRECT", "TOSNET-REDIRECT", "TOSHOST-REDIRECT", "TX-INTRANS", "TX-REASS", "PARAMPROB" Index: sys/sys/socket.h ================================================================== --- sys/sys/socket.h +++ sys/sys/socket.h @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)socket.h 7.5 (Berkeley) 12/13/88 + * @(#)socket.h 7.6 (Berkeley) 09/04/89 */ /* * Definitions related to sockets: types, address families, options. */ Index: sys/sys/socketvar.h ================================================================== --- sys/sys/socketvar.h +++ sys/sys/socketvar.h @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)socketvar.h 7.5 (Berkeley) 08/21/88 + * @(#)socketvar.h 7.6 (Berkeley) 09/04/89 */ /* * Kernel structure per socket. * Contains send and receive buffer queues, @@ -47,11 +47,11 @@ short so_q0len; /* partials on so_q0 */ short so_qlen; /* number of connections on so_q */ short so_qlimit; /* max number queued connections */ short so_timeo; /* connection timeout */ u_short so_error; /* error affecting connection */ - short so_pgrp; /* pgrp for signals */ + pid_t so_pgid; /* pgid for signals */ u_long so_oobmark; /* chars to oob mark */ /* * Variables for socket buffering. */ struct sockbuf { @@ -60,19 +60,20 @@ u_long sb_mbcnt; /* chars of mbufs used */ u_long sb_mbmax; /* max chars of mbufs to use */ u_long sb_lowat; /* low water mark (not used yet) */ struct mbuf *sb_mb; /* the mbuf chain */ struct proc *sb_sel; /* process selecting read/write */ - short sb_timeo; /* timeout (not used yet) */ short sb_flags; /* flags, see below */ + short sb_timeo; /* timeout (not used yet) */ } so_rcv, so_snd; #define SB_MAX (64*1024) /* max chars in sockbuf */ -#define SB_LOCK 0x01 /* lock on data queue (so_rcv only) */ +#define SB_LOCK 0x01 /* lock on data queue */ #define SB_WANT 0x02 /* someone is waiting to lock */ #define SB_WAIT 0x04 /* someone is waiting for data/space */ #define SB_SEL 0x08 /* buffer is selected */ #define SB_COLL 0x10 /* collision selecting */ + caddr_t so_tpcb; /* Wisc. protocol control block XXX*/ }; /* * Socket state bits. */ Index: sys/sys/ttydefaults.h ================================================================== --- sys/sys/ttydefaults.h +++ sys/sys/ttydefaults.h @@ -1,11 +1,11 @@ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)ttydefaults.h 1.2 (Berkeley) 10/18/88 + * @(#)ttydefaults.h 7.1 (Berkeley) 09/04/89 */ /* * System wide defaults of terminal state. */ @@ -31,23 +31,24 @@ #define CSTOP CTRL('s') #define CLNEXT CTRL('v') #define CFLUSHO CTRL('o') #define CWERASE CTRL('w') #define CREPRINT CTRL('r') +#define CQUOTE '\\' #define CEOT CEOF -/* COMPAT_43 */ +/* aliases */ #define CBRK CEOL #define CRPRNT CREPRINT #define CFLUSH CFLUSHO /* * Settings on first open of a tty. */ -#define TTYDEF_IFLAG (BRKINT | ISTRIP | IMAXBEL | IEXTEN | IXON) +#define TTYDEF_IFLAG (BRKINT | ISTRIP | IMAXBEL | IXON) #define TTYDEF_OFLAG (0) -#define TTYDEF_LFLAG (ECHO | ICANON | ISIG) +#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN) #define TTYDEF_CFLAG (CREAD | CS7 | PARENB | HUPCL) #define TTYDEF_SPEED (B9600) #endif /*_TTYDEFAULTS_*/ Index: sys/sys/un.h ================================================================== --- sys/sys/un.h +++ sys/sys/un.h @@ -12,19 +12,20 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)un.h 7.3 (Berkeley) 06/27/88 + * @(#)un.h 7.4 (Berkeley) 09/04/89 */ /* * Definitions for UNIX IPC domain. */ struct sockaddr_un { - short sun_family; /* AF_UNIX */ + u_char sun_len; /* sockaddr len including null */ + u_char sun_family; /* AF_UNIX */ char sun_path[108]; /* path name (gag) */ }; #ifdef KERNEL int unp_discard(); #endif Index: sys/tahoe/conf/Makefile.tahoe ================================================================== --- sys/tahoe/conf/Makefile.tahoe +++ sys/tahoe/conf/Makefile.tahoe @@ -1,6 +1,6 @@ -# @(#)Makefile.tahoe 1.19 (Berkeley) 05/18/89 +# @(#)Makefile.tahoe 1.20 (Berkeley) 09/06/89 # # Makefile for 4.3 BSD # # This makefile is constructed from a machine description: # config machineid @@ -73,19 +73,19 @@ assym.s machdep.o: Makefile # depends on KDB (cons.o also depends on GENERIC) trap.o cons.o: Makefile -assym.s: ../sys/param.h ../tahoe/pte.h ../sys/buf.h ../sys/vmparam.h \ - ../sys/vmmeter.h ../ufs/dir.h ../sys/cmap.h ../sys/map.h \ - ../tahoevba/vbaparam.h ../sys/proc.h ../sys/msgbuf.h ../tahoe/scb.h \ - machine/vmparam.h - ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} ../tahoe/genassym.c - ./a.out >assym.s; rm -f a.out - -depend: assym.s +assym.s: genassym + ./genassym >assym.s + +genassym: + cc ${INCLUDES} ${IDENT} ${PARAM} -o genassym ../tahoe/genassym.c + +depend: assym.s mkdep ${COPTS} ${CFILES} ioconf.c + mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ../tahoe/genassym.c links: egrep '#if' ${CFILES} | sed -f ../conf/defines | \ sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ Index: sys/tahoe/include/param.h ================================================================== --- sys/tahoe/include/param.h +++ sys/tahoe/include/param.h @@ -1,11 +1,11 @@ /* * Copyright (c) 1982, 1986, 1988 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)param.h 7.1 (Berkeley) 05/21/88 + * @(#)param.h 7.2 (Berkeley) 09/04/89 */ /* * Machine dependent constants for TAHOE. */ @@ -13,26 +13,11 @@ #ifndef BYTE_ORDER #include #endif -#define CHAR_BIT NBBY -#define CHAR_MAX 0x7f -#define CHAR_MIN 0x80 -#define CLK_TCK 60 /* for times() */ -#define INT_MAX 0x7fffffff -#define INT_MIN 0x80000000 -#define LONG_MAX 0x7fffffff -#define LONG_MIN 0x80000000 -#define SCHAR_MAX 0x7f -#define SCHAR_MIN 0x80 -#define SHRT_MAX 0x7fff -#define SHRT_MIN 0x8000 -#define UCHAR_MAX 0xff -#define UINT_MAX 0xffffffff -#define ULONG_MAX 0xffffffff -#define USHRT_MAX 0xffff +#include #define NBPG 1024 /* bytes/page */ #define PGOFSET (NBPG-1) /* byte offset into page */ #define PGSHIFT 10 /* LOG2(NBPG) */ #define NPTEPG (NBPG/(sizeof (struct pte))) @@ -50,10 +35,34 @@ #define SSIZE 2 /* initial stack size/NBPG */ #define SINCR 2 /* increment of stack/NBPG */ #define UPAGES 6 /* pages of u-area (2 stack pages) */ +/* + * Constants related to network buffer management. + * MCLBYTES must be no larger than CLBYTES (the software page size), and, + * on machines that exchange pages of input or output buffers with mbuf + * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple + * of the hardware page size. + */ +#define MSIZE 128 /* size of an mbuf */ +#define MAPPED_MBUFS /* can do scatter-gather I/O */ +#if CLBYTES > 1024 +#define MCLBYTES 1024 +#define MCLSHIFT 10 +#define MCLOFSET (MCLBYTES - 1) +#else +#define MCLBYTES CLBYTES +#define MCLSHIFT CLSHIFT +#define MCLOFSET CLOFSET +#endif +#ifdef GATEWAY +#define NMBCLUSTERS 512 /* map size, max cluster allocation */ +#else +#define NMBCLUSTERS 256 /* map size, max cluster allocation */ +#endif + #define MAXCKEY 255 /* maximal allowed code key */ #define MAXDKEY 255 /* maximal allowed data key */ #define NCKEY (MAXCKEY+1) /* # code keys, including 0 (reserved) */ #define NDKEY (MAXDKEY+1) /* # data keys, including 0 (reserved) */ Index: sys/tahoe/vba/vdreg.h ================================================================== --- sys/tahoe/vba/vdreg.h +++ sys/tahoe/vba/vdreg.h @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)vdreg.h 7.3 (Berkeley) 08/27/88 + * @(#)vdreg.h 7.4 (Berkeley) 09/04/89 */ /* * Versabus VDDC/SMDE disk controller definitions. */ @@ -335,10 +335,11 @@ #define VDOP_INIT 0xc00 /* initialize controller */ #define VDOP_DIAG 0xd00 /* diagnose (self-test) controller */ #define VDOP_CONFIG 0xe00 /* reset & configure drive */ #define VDOP_STATUS 0xf00 /* get drive status */ #define VDOP_IDENT 0x700 /* identify controller */ +#define VDOP_PROBE 0x500 /* probe drives and update status */ #define VDOP_ABORT 0x80000000 /* abort current command */ /* * DCB status definitions. Index: sys/ufs/ffs/ffs_vfsops.c ================================================================== --- sys/ufs/ffs/ffs_vfsops.c +++ sys/ufs/ffs/ffs_vfsops.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)ffs_vfsops.c 7.19 (Berkeley) 08/26/89 + * @(#)ffs_vfsops.c 7.20 (Berkeley) 09/05/89 */ #include "param.h" #include "systm.h" #include "time.h" @@ -37,19 +37,21 @@ /* * ufs vfs operations. */ int ufs_mount(); +int ufs_start(); int ufs_unmount(); int ufs_root(); int ufs_statfs(); int ufs_sync(); int ufs_fhtovp(); int ufs_vptofh(); struct vfsops ufs_vfsops = { ufs_mount, + ufs_start, ufs_unmount, ufs_root, ufs_statfs, ufs_sync, ufs_fhtovp, @@ -255,10 +257,21 @@ if (bp) brelse(bp); return (error); } +/* + * Make a filesystem operational. + * Nothing to do at the moment. + */ +ufs_start(mp, flags) + struct mount *mp; + int flags; +{ + + return (0); +} /* * unmount system call */ ufs_unmount(mp, flags) Index: sys/ufs/ffs/ufs_vfsops.c ================================================================== --- sys/ufs/ffs/ufs_vfsops.c +++ sys/ufs/ffs/ufs_vfsops.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)ufs_vfsops.c 7.19 (Berkeley) 08/26/89 + * @(#)ufs_vfsops.c 7.20 (Berkeley) 09/05/89 */ #include "param.h" #include "systm.h" #include "time.h" @@ -37,19 +37,21 @@ /* * ufs vfs operations. */ int ufs_mount(); +int ufs_start(); int ufs_unmount(); int ufs_root(); int ufs_statfs(); int ufs_sync(); int ufs_fhtovp(); int ufs_vptofh(); struct vfsops ufs_vfsops = { ufs_mount, + ufs_start, ufs_unmount, ufs_root, ufs_statfs, ufs_sync, ufs_fhtovp, @@ -255,10 +257,21 @@ if (bp) brelse(bp); return (error); } +/* + * Make a filesystem operational. + * Nothing to do at the moment. + */ +ufs_start(mp, flags) + struct mount *mp; + int flags; +{ + + return (0); +} /* * unmount system call */ ufs_unmount(mp, flags) Index: sys/ufs/lfs/lfs_vfsops.c ================================================================== --- sys/ufs/lfs/lfs_vfsops.c +++ sys/ufs/lfs/lfs_vfsops.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)lfs_vfsops.c 7.19 (Berkeley) 08/26/89 + * @(#)lfs_vfsops.c 7.20 (Berkeley) 09/05/89 */ #include "param.h" #include "systm.h" #include "time.h" @@ -37,19 +37,21 @@ /* * ufs vfs operations. */ int ufs_mount(); +int ufs_start(); int ufs_unmount(); int ufs_root(); int ufs_statfs(); int ufs_sync(); int ufs_fhtovp(); int ufs_vptofh(); struct vfsops ufs_vfsops = { ufs_mount, + ufs_start, ufs_unmount, ufs_root, ufs_statfs, ufs_sync, ufs_fhtovp, @@ -255,10 +257,21 @@ if (bp) brelse(bp); return (error); } +/* + * Make a filesystem operational. + * Nothing to do at the moment. + */ +ufs_start(mp, flags) + struct mount *mp; + int flags; +{ + + return (0); +} /* * unmount system call */ ufs_unmount(mp, flags) ADDED sys/ufs/mfs/mfs_vfsops.c Index: sys/ufs/mfs/mfs_vfsops.c ================================================================== --- sys/ufs/mfs/mfs_vfsops.c +++ sys/ufs/mfs/mfs_vfsops.c @@ -0,0 +1,123 @@ +/* + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)mfs_vfsops.c 7.1 (Berkeley) 09/05/89 + */ + +#include "param.h" +#include "buf.h" +#include "mount.h" +#include "time.h" +#include "vnode.h" +#include "../ufs/ufsmount.h" +#include "../ufs/inode.h" +#include "../ufs/fs.h" + +extern int mfs_running; /* 1 => daemon has started running */ +extern struct vnodeops mfs_vnodeops; + +/* + * mfs vfs operations. + */ +int mfs_mount(); +int mfs_start(); +int ufs_unmount(); +int ufs_root(); +int ufs_statfs(); +int ufs_sync(); +int ufs_fhtovp(); +int ufs_vptofh(); + +struct vfsops mfs_vfsops = { + mfs_mount, + mfs_start, + ufs_unmount, + ufs_root, + ufs_statfs, + ufs_sync, + ufs_fhtovp, + ufs_vptofh, +}; + +/* + * VFS Operations. + * + * mount system call + */ +mfs_mount(mp, path, data, ndp) + struct mount *mp; + char *path; + caddr_t data; + struct nameidata *ndp; +{ + struct vnode *devvp; + struct mfs_args args; + struct ufsmount *ump; + register struct fs *fs; + static int mfs_minor; + u_int size; + int error; + + if (error = copyin(data, (caddr_t)&args, sizeof (struct mfs_args))) + return (error); + if ((error = bdevvp(NODEV, &devvp)) != 0) + return (error); + devvp->v_op = &mfs_vnodeops; + devvp->v_rdev = makedev(255, mfs_minor++); + VTOI(devvp)->i_diroff = (long)args.base; + VTOI(devvp)->i_endoff = args.size; + error = mountfs(devvp, mp); + if (error) { + vrele(devvp); + return (error); + } + ump = VFSTOUFS(mp); + fs = ump->um_fs; + (void) copyinstr(path, fs->fs_fsmnt, sizeof(fs->fs_fsmnt) - 1, &size); + bzero(fs->fs_fsmnt + size, sizeof(fs->fs_fsmnt) - size); + (void) copyinstr(args.name, ump->um_mntname, MNAMELEN - 1, &size); + bzero(ump->um_mntname + size, MNAMELEN - size); + return (0); +} + +/* + * Used to grab the process and keep it in the kernel to service + * memory filesystem I/O requests. + * + * Loop servicing I/O requests. + * Copy the requested data into or out of the memory filesystem + * address space. + */ +/* ARGSUSED */ +mfs_start(mp, flags) + struct mount *mp; + int flags; +{ + register struct vnode *vp = VFSTOUFS(mp)->um_devvp; + register struct inode *ip = VTOI(vp); + register struct buf *bp; + register caddr_t base; + + mfs_running++; + sleep((caddr_t)vp, PRIBIO); + base = (caddr_t)ip->i_diroff; + while (bp = (struct buf *)ip->i_spare[0]) { + mfs_doio(bp, base); + wakeup((caddr_t)bp); + sleep((caddr_t)vp, PRIBIO); + } + return (0); +} ADDED sys/ufs/mfs/mfs_vnops.c Index: sys/ufs/mfs/mfs_vnops.c ================================================================== --- sys/ufs/mfs/mfs_vnops.c +++ sys/ufs/mfs/mfs_vnops.c @@ -0,0 +1,281 @@ +/* + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)mfs_vnops.c 7.1 (Berkeley) 09/05/89 + */ + +#include "param.h" +#include "time.h" +#include "proc.h" +#include "buf.h" +#include "vmmac.h" +#include "errno.h" +#include "map.h" +#include "vnode.h" +#include "../ufs/inode.h" +#include "../ufs/mfsiom.h" +#include "../machine/vmparam.h" +#include "../machine/pte.h" +#include "../machine/mtpr.h" + +int mfs_running; /* 1 => daemon has started running */ +static int mfsmap_want; /* 1 => need kernel I/O resources */ +struct map mfsmap[MFS_MAPSIZE]; +extern char mfsiobuf[]; + +/* + * mfs vnode operations. + */ +int mfs_open(), + mfs_strategy(), + mfs_ioctl(), + mfs_close(), + ufs_inactive(), + mfs_badop(), + mfs_nullop(); + +struct vnodeops mfs_vnodeops = { + mfs_badop, + mfs_badop, + mfs_badop, + mfs_open, + mfs_close, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_ioctl, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_badop, + ufs_inactive, + mfs_badop, + mfs_badop, + mfs_badop, + mfs_strategy, +}; + +/* + * Vnode Operations. + * + * Open called to allow memory filesystem to initialize and + * validate before actual IO. Nothing to do here as the + * filesystem is ready to go in the process address space. + */ +/* ARGSUSED */ +mfs_open(vp, mode, cred) + register struct vnode *vp; + int mode; + struct ucred *cred; +{ + + if (vp->v_type != VBLK) { + panic("mfs_ioctl not VBLK"); + /* NOTREACHED */ + } + return (0); +} + +/* + * Ioctl operation. + */ +/* ARGSUSED */ +mfs_ioctl(vp, com, data, fflag, cred) + struct vnode *vp; + int com; + caddr_t data; + int fflag; + struct ucred *cred; +{ + + return (-1); +} + +/* + * Pass I/O requests to the memory filesystem process. + */ +mfs_strategy(bp) + register struct buf *bp; +{ + register struct inode *ip = VTOI(bp->b_vp); + int error; + + ILOCK(ip); + if (!mfs_running) { + mfs_doio(bp, (caddr_t)ip->i_diroff); + } else { + ip->i_spare[0] = (long)bp; + wakeup((caddr_t)bp->b_vp); + } + error = biowait(bp); + IUNLOCK(ip); + return (error); +} + +/* + * Memory file system I/O. + * + * Essentially play ubasetup() and disk interrupt service routine by + * doing the copies to or from the memfs process. If doing physio + * (i.e. pagein), we must map the I/O through the kernel virtual + * address space. + */ +mfs_doio(bp, base) + register struct buf *bp; + caddr_t base; +{ + register struct pte *pte, *ppte; + register caddr_t vaddr; + int off, npf, npf2, reg; + caddr_t kernaddr, offset; + + /* + * For phys I/O, map the b_addr into kernel virtual space using + * the Mfsiomap pte's. + */ + if ((bp->b_flags & B_PHYS) == 0) { + kernaddr = bp->b_un.b_addr; + } else { + if (bp->b_flags & (B_PAGET | B_UAREA | B_DIRTY)) + panic("swap on memfs?"); + off = (int)bp->b_un.b_addr & PGOFSET; + npf = btoc(bp->b_bcount + off); + /* + * Get some mapping page table entries + */ + while ((reg = rmalloc(mfsmap, (long)npf)) == 0) { + mfsmap_want++; + sleep((caddr_t)&mfsmap_want, PZERO-1); + } + reg--; + pte = vtopte(bp->b_proc, btop(bp->b_un.b_addr)); + /* + * Do vmaccess() but with the Mfsiomap page table. + */ + ppte = &Mfsiomap[reg]; + vaddr = &mfsiobuf[reg * NBPG]; + kernaddr = vaddr + off; + for (npf2 = npf; npf2; npf2--) { + mapin(ppte, (u_int)vaddr, pte->pg_pfnum, + (int)(PG_V|PG_KW)); +#if defined(tahoe) + if ((bp->b_flags & B_READ) == 0) + mtpr(P1DC, vaddr); +#endif + ppte++; + pte++; + vaddr += NBPG; + } + } + offset = base + (bp->b_blkno << DEV_BSHIFT); + if (bp->b_flags & B_READ) + bp->b_error = copyin(offset, kernaddr, bp->b_bcount); + else + bp->b_error = copyout(kernaddr, offset, bp->b_bcount); + if (bp->b_error) + bp->b_flags |= B_ERROR; + /* + * Release pte's used by physical I/O. + */ + if (bp->b_flags & B_PHYS) { + rmfree(mfsmap, (long)npf, (long)++reg); + if (mfsmap_want) { + mfsmap_want = 0; + wakeup((caddr_t)&mfsmap_want); + } + } + biodone(bp); +} + +/* + * Memory filesystem close routine + */ +/* ARGSUSED */ +mfs_close(vp, flag, cred) + register struct vnode *vp; + int flag; + struct ucred *cred; +{ + register struct inode *ip = VTOI(vp); + + /* + * On last close of a memory filesystem + * we must invalidate any in core blocks, so that + * we can, free up its vnode. + */ + bflush(vp->v_mount); + if (binval(vp->v_mount)) + return (0); + /* + * We don't want to really close the device if it is still + * in use. Since every use (buffer, inode, swap, cmap) + * holds a reference to the vnode, and because we ensure + * that there cannot be more than one vnode per device, + * we need only check that we are down to the last + * reference before closing. + */ + if (vp->v_count > 1) { + printf("mfs_close: ref count %d > 1\n", vp->v_count); + return (0); + } + /* + * Send a request to the filesystem server to exit. + */ + ILOCK(ip); + ip->i_spare[0] = 0; + wakeup((caddr_t)vp); + IUNLOCK(ip); + return (0); +} + +/* + * Block device bad operation + */ +mfs_badop() +{ + + printf("mfs_badop called\n"); + return (ENXIO); +} + +/* + * Block device null operation + */ +mfs_nullop() +{ + + return (0); +} + +/* + * Memory based filesystem initialization. + */ +mfs_init() +{ + + rminit(mfsmap, (long)MFS_MAPREG, (long)1, "mfs mapreg", MFS_MAPSIZE); +} ADDED sys/ufs/mfs/mfsiom.h Index: sys/ufs/mfs/mfsiom.h ================================================================== --- sys/ufs/mfs/mfsiom.h +++ sys/ufs/mfs/mfsiom.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)mfsiom.h 7.1 (Berkeley) 09/05/89 + */ + +#define MFS_MAPREG (MAXPHYS/NBPG + 2) /* Kernel mapping pte's */ +#define MFS_MAPSIZE 10 /* Size of alloc map for pte's */ Index: sys/ufs/ufs/ufs_vfsops.c ================================================================== --- sys/ufs/ufs/ufs_vfsops.c +++ sys/ufs/ufs/ufs_vfsops.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)ufs_vfsops.c 7.19 (Berkeley) 08/26/89 + * @(#)ufs_vfsops.c 7.20 (Berkeley) 09/05/89 */ #include "param.h" #include "systm.h" #include "time.h" @@ -37,19 +37,21 @@ /* * ufs vfs operations. */ int ufs_mount(); +int ufs_start(); int ufs_unmount(); int ufs_root(); int ufs_statfs(); int ufs_sync(); int ufs_fhtovp(); int ufs_vptofh(); struct vfsops ufs_vfsops = { ufs_mount, + ufs_start, ufs_unmount, ufs_root, ufs_statfs, ufs_sync, ufs_fhtovp, @@ -255,10 +257,21 @@ if (bp) brelse(bp); return (error); } +/* + * Make a filesystem operational. + * Nothing to do at the moment. + */ +ufs_start(mp, flags) + struct mount *mp; + int flags; +{ + + return (0); +} /* * unmount system call */ ufs_unmount(mp, flags) Index: sys/vax/conf/Makefile.vax ================================================================== --- sys/vax/conf/Makefile.vax +++ sys/vax/conf/Makefile.vax @@ -1,11 +1,11 @@ # # Copyright (c) 1980, 1986 Regents of the University of California. # All rights reserved. The Berkeley software License Agreement # specifies the terms and conditions for redistribution. # -# @(#)Makefile.vax 7.13 (Berkeley) 05/18/89 +# @(#)Makefile.vax 7.15 (Berkeley) 09/06/89 # # Makefile for 4.3 BSD # # This makefile is constructed from a machine description: # config machineid @@ -70,11 +70,11 @@ @echo 'as -o locore.o $${AHEADS} locore.i' @as -o locore.o ${AHEADS} locore.i @rm locore.i emulate.o: ../vax/emulate.s - /lib/cpp -I. ${COPTS} ../vax/emulate.s | ${AS} -o emulate.o + cpp -I. ${COPTS} ../vax/emulate.s | ${AS} -o emulate.o # the following is necessary because autoconf.o depends on #if GENERIC autoconf.o tu.o: Makefile # the following are necessary because the files depend on the types of @@ -89,19 +89,19 @@ trap.o: Makefile # depend on maxusers assym.s: Makefile -assym.s: ../sys/param.h machine/pte.h ../sys/buf.h ../sys/vmparam.h \ - ../sys/vmmeter.h ../ufs/dir.h ../sys/cmap.h ../sys/map.h \ - ../vaxuba/ubavar.h ../vaxuba/ubareg.h ../sys/proc.h ../sys/msgbuf.h \ - ../sys/text.h ../sys/user.h ../vax/rpb.h machine/vmparam.h - cc ${INCLUDES} ${IDENT} ${PARAM} ../vax/genassym.c - ./a.out >assym.s; rm -f a.out - -depend: assym.s +assym.s: genassym + ./genassym >assym.s + +genassym: + cc ${INCLUDES} ${IDENT} ${PARAM} -o genassym ../vax/genassym.c + +depend: assym.s mkdep ${COPTS} ${CFILES} ioconf.c + mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ../vax/genassym.c links: egrep '#if' ${CFILES} | sed -f ../conf/defines | \ sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ Index: sys/vax/if/if_dmc.c ================================================================== --- sys/vax/if/if_dmc.c +++ sys/vax/if/if_dmc.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)if_dmc.c 7.6 (Berkeley) 04/25/89 + * @(#)if_dmc.c 7.8 (Berkeley) 09/04/89 */ #include "dmc.h" #if NDMC > 0 @@ -43,10 +43,12 @@ #include "protosw.h" #include "socket.h" #include "syslog.h" #include "vmmac.h" #include "errno.h" +#include "time.h" +#include "kernel.h" #include "../net/if.h" #include "../net/netisr.h" #include "../net/route.h" @@ -62,12 +64,10 @@ #include "if_uba.h" #include "if_dmc.h" #include "../vaxuba/ubareg.h" #include "../vaxuba/ubavar.h" -#include "../h/time.h" -#include "../h/kernel.h" /* * output timeout value, sec.; should depend on line speed. */ int dmc_timeout = 20; @@ -276,11 +276,11 @@ /* * Check to see that an address has been set * (both local and destination for an address family). */ for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next) - if (ifa->ifa_addr.sa_family && ifa->ifa_dstaddr.sa_family) + if (ifa->ifa_addr->sa_family && ifa->ifa_dstaddr->sa_family) break; if (ifa == (struct ifaddr *) 0) return; if ((addr->bsel1&DMC_RUN) == 0) { @@ -600,16 +600,10 @@ * which are at the front of any trailer data. */ m = if_ubaget(&sc->sc_ifuba, ifrw, len, off, ifp); if (m == 0) goto setup; - if (off) { - ifp = *(mtod(m, struct ifnet **)); - m->m_off += 2 * sizeof (u_short); - m->m_len -= 2 * sizeof (u_short); - *(mtod(m, struct ifnet **)) = ifp; - } switch (dh->dmc_type) { #ifdef INET case DMC_IPTYPE: schednetisr(NETISR_IP); @@ -760,16 +754,17 @@ } switch (dst->sa_family) { #ifdef INET case AF_INET: - off = ntohs((u_short)mtod(m, struct ip *)->ip_len) - m->m_len; + off = m->m_pkthdr.len - m->m_len; if ((ifp->if_flags & IFF_NOTRAILERS) == 0) if (off > 0 && (off & 0x1ff) == 0 && - m->m_off >= MMINOFF + 2 * sizeof (u_short)) { + (m->m_flags & M_EXT) == 0 && + m->m_data >= m->m_pktdat + 2 * sizeof (u_short)) { type = DMC_TRAILER + (off>>9); - m->m_off -= 2 * sizeof (u_short); + m->m_data -= 2 * sizeof (u_short); m->m_len += 2 * sizeof (u_short); *mtod(m, u_short *) = htons((u_short)DMC_IPTYPE); *(mtod(m, u_short *) + 1) = htons((u_short)m->m_len); goto gottrailertype; } @@ -805,23 +800,14 @@ gottype: /* * Add local network header * (there is space for a uba on a vax to step on) */ - if (m->m_off > MMAXOFF || - MMINOFF + sizeof(struct dmc_header) > m->m_off) { - m = m_get(M_DONTWAIT, MT_HEADER); - if (m == 0) { - error = ENOBUFS; - goto bad; - } - m->m_next = m0; - m->m_off = MMINOFF; - m->m_len = sizeof (struct dmc_header); - } else { - m->m_off -= sizeof (struct dmc_header); - m->m_len += sizeof (struct dmc_header); + M_PREPEND(m, sizeof(struct dmc_header), M_DONTWAIT); + if (m == 0) { + error = ENOBUFS; + goto bad; } dh = mtod(m, struct dmc_header *); dh->dmc_type = htons((u_short)type); /* Index: sys/vax/if/if_dmv.c ================================================================== --- sys/vax/if/if_dmv.c +++ sys/vax/if/if_dmv.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)if_dmv.c 7.7 (Berkeley) 10/22/88 + * @(#)if_dmv.c 7.8 (Berkeley) 09/04/89 */ /* * DMV-11 Driver * @@ -227,14 +227,14 @@ return (0); } (void) spl6(); addr->bsel0 = DMV_RQI|DMV_IEI|DMV_IEO; DELAY(1000000); + dmv_softc[ui->ui_unit].sc_ipl = br = qbgetpri(); addr->bsel1 = DMV_MCLR; for (i = 100000; i && (addr->bsel1 & DMV_RUN) == 0; i--) ; - dmv_softc[ui->ui_unit].sc_ipl = br = qbgetpri(); return (sizeof(struct dmvdevice)); } /* * Interface exists: make available by filling in network interface Index: sys/vax/if/if_qe.c ================================================================== --- sys/vax/if/if_qe.c +++ sys/vax/if/if_qe.c @@ -15,11 +15,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)if_qe.c 7.11 (Berkeley) 02/17/89 + * @(#)if_qe.c 7.12 (Berkeley) 09/04/89 */ /* from @(#)if_qe.c 1.15 (ULTRIX) 4/16/86 */ /**************************************************************** @@ -148,10 +148,17 @@ #ifdef NS #include "../netns/ns.h" #include "../netns/ns_if.h" #endif + +#ifdef ISO +#include "../netiso/iso.h" +#include "../netiso/iso_var.h" +#include "../netiso/iso_snpac.h" +extern struct snpa_cache all_es, all_is; +#endif #include "../vax/pte.h" #include "../vax/cpu.h" #include "../vax/mtpr.h" #include "if_qereg.h" @@ -213,11 +220,11 @@ struct uba_device *qeinfo[NQE]; extern struct timeval time; int qeprobe(), qeattach(), qeintr(), qetimeout(); -int qeinit(), qeoutput(), qeioctl(), qereset(); +int qeinit(), qeioctl(), qereset(), qestart(); u_short qestd[] = { 0 }; struct uba_driver qedriver = { qeprobe, 0, qeattach, 0, qestd, "qe", qeinfo }; @@ -348,11 +355,12 @@ * Save the vector for initialization at reset time. */ sc->qe_intvec = addr->qe_vector; ifp->if_init = qeinit; - ifp->if_output = qeoutput; + ifp->if_output = ether_output; + ifp->if_start = qestart; ifp->if_ioctl = qeioctl; ifp->if_reset = qereset; ifp->if_watchdog = qetimeout; sc->qe_uba.iff_flags = UBA_CANTWAIT; if_attach(ifp); @@ -463,21 +471,22 @@ addr->qe_rcvlist_lo = (short)sc->rringaddr; addr->qe_rcvlist_hi = (short)((int)sc->rringaddr >> 16); ifp->if_flags |= IFF_UP | IFF_RUNNING; sc->qe_flags |= QEF_RUNNING; qesetup( sc ); - qestart( unit ); + (void) qestart( ifp ); splx( s ); } /* * Start output on interface. * */ -qestart(unit) - int unit; +qestart(ifp) + struct ifnet *ifp; { + int unit = ifp->if_unit; struct uba_device *ui = qeinfo[unit]; register struct qe_softc *sc = &qe_softc[unit]; register struct qedevice *addr; register struct qe_ring *rp; register index; @@ -509,11 +518,11 @@ sc->setupqueued = 0; } else { IF_DEQUEUE(&sc->qe_if.if_snd, m); if( m == 0 ){ splx(s); - return; + return (0); } buf_addr = sc->qe_ifw[index].ifw_info; len = if_ubaput(&sc->qe_uba, &sc->qe_ifw[index], m); } /* @@ -544,10 +553,11 @@ addr->qe_xmtlist_lo = (short)buf_addr; addr->qe_xmtlist_hi = (short)(buf_addr >> 16); } } splx( s ); + return (0); } /* * Ethernet interface interrupt processor */ @@ -556,14 +566,15 @@ { register struct qe_softc *sc = &qe_softc[unit]; struct qedevice *addr = (struct qedevice *)qeinfo[unit]->ui_addr; int buf_addr, csr; -/* +#ifdef notdef splx(sc->ipl); -*/ +#else (void) splimp(); +#endif csr = addr->qe_csr; addr->qe_csr = QE_RCV_ENABLE | QE_INT_ENABLE | QE_XMIT_INT | QE_RCV_INT | QE_ILOOP; if( csr & QE_RCV_INT ) qerint( unit ); if( csr & QE_XMIT_INT ) @@ -633,11 +644,11 @@ ifxp->ifw_xtofree = 0; } } sc->otindex = ++sc->otindex % NXMT; } - qestart( unit ); + (void) qestart( &sc->qe_if ); } /* * Ethernet interface receiver interrupt. * If can't determine length from type, then have to drop packet. @@ -695,136 +706,10 @@ rp->qe_addr_hi = (short)((int)bufaddr >> 16); rp->qe_flag = rp->qe_status1 = QE_NOTYET; rp->qe_valid = 1; } } -/* - * Ethernet output routine. - * Encapsulate a packet of type family for the local net. - * Use trailer local net encapsulation if enough data in first - * packet leaves a multiple of 512 bytes of data in remainder. - */ -qeoutput(ifp, m0, dst) - struct ifnet *ifp; - struct mbuf *m0; - struct sockaddr *dst; -{ - int type, s, error; - u_char edst[6]; - struct in_addr idst; - register struct qe_softc *is = &qe_softc[ifp->if_unit]; - register struct mbuf *m = m0; - register struct ether_header *eh; - register int off; - int usetrailers; - - if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) { - error = ENETDOWN; - goto bad; - } - - switch (dst->sa_family) { - -#ifdef INET - case AF_INET: - idst = ((struct sockaddr_in *)dst)->sin_addr; - if (!arpresolve(&is->qe_ac, m, &idst, edst, &usetrailers)) - return (0); /* if not yet resolved */ - off = ntohs((u_short)mtod(m, struct ip *)->ip_len) - m->m_len; - if (usetrailers && off > 0 && (off & 0x1ff) == 0 && - m->m_off >= MMINOFF + 2 * sizeof (u_short)) { - type = ETHERTYPE_TRAIL + (off>>9); - m->m_off -= 2 * sizeof (u_short); - m->m_len += 2 * sizeof (u_short); - *mtod(m, u_short *) = htons((u_short)ETHERTYPE_IP); - *(mtod(m, u_short *) + 1) = htons((u_short)m->m_len); - goto gottrailertype; - } - type = ETHERTYPE_IP; - off = 0; - goto gottype; -#endif -#ifdef NS - case AF_NS: - type = ETHERTYPE_NS; - bcopy((caddr_t)&(((struct sockaddr_ns *)dst)->sns_addr.x_host), - (caddr_t)edst, sizeof (edst)); - off = 0; - goto gottype; -#endif - - - case AF_UNSPEC: - eh = (struct ether_header *)dst->sa_data; - bcopy((caddr_t)eh->ether_dhost, (caddr_t)edst, sizeof (edst)); - type = eh->ether_type; - goto gottype; - - default: - printf("qe%d: can't handle af%d\n", ifp->if_unit, - dst->sa_family); - error = EAFNOSUPPORT; - goto bad; - } - -gottrailertype: - /* - * Packet to be sent as trailer: move first packet - * (control information) to end of chain. - */ - while (m->m_next) - m = m->m_next; - m->m_next = m0; - m = m0->m_next; - m0->m_next = 0; - m0 = m; - -gottype: - /* - * Add local net header. If no space in first mbuf, - * allocate another. - */ - if (m->m_off > MMAXOFF || - MMINOFF + sizeof (struct ether_header) > m->m_off) { - m = m_get(M_DONTWAIT, MT_HEADER); - if (m == 0) { - error = ENOBUFS; - goto bad; - } - m->m_next = m0; - m->m_off = MMINOFF; - m->m_len = sizeof (struct ether_header); - } else { - m->m_off -= sizeof (struct ether_header); - m->m_len += sizeof (struct ether_header); - } - eh = mtod(m, struct ether_header *); - eh->ether_type = htons((u_short)type); - bcopy((caddr_t)edst, (caddr_t)eh->ether_dhost, sizeof (edst)); - bcopy((caddr_t)is->qe_addr, (caddr_t)eh->ether_shost, sizeof (is->qe_addr)); - - /* - * Queue message on interface, and start output if interface - * not yet active. - */ - s = splimp(); - if (IF_QFULL(&ifp->if_snd)) { - IF_DROP(&ifp->if_snd); - splx(s); - m_freem(m); - return (ENOBUFS); - } - IF_ENQUEUE(&ifp->if_snd, m); - qestart(ifp->if_unit); - splx(s); - return (0); - -bad: - m_freem(m0); - return (error); -} - /* * Process an ioctl request. */ qeioctl(ifp, cmd, data) @@ -839,11 +724,11 @@ switch (cmd) { case SIOCSIFADDR: ifp->if_flags |= IFF_UP; qeinit(ifp->if_unit); - switch(ifa->ifa_addr.sa_family) { + switch(ifa->ifa_addr->sa_family) { #ifdef INET case AF_INET: ((struct arpcom *)ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr; arpwhohas((struct arpcom *)ifp, &IA_SIN(ifa)->sin_addr); @@ -939,14 +824,19 @@ /* * Duplicate the first half. */ bcopy((caddr_t)sc->setup_pkt[0], (caddr_t)sc->setup_pkt[8], 64); /* - * Fill in the broadcast address. + * Fill in the broadcast (and ISO multicast) address(es). */ - for ( i = 0; i < 6 ; i++ ) + for ( i = 0; i < 6 ; i++ ) { sc->setup_pkt[i][2] = 0xff; +#ifdef ISO + sc->setup_pkt[i][3] = all_es.sc_snpa[i]; + sc->setup_pkt[i][4] = all_is.sc_snpa[i]; +#endif + } sc->setupqueued++; } /* * Pass a packet to the higher levels. @@ -992,53 +882,12 @@ * information to be at the front, but we still have to drop * the type and length which are at the front of any trailer data. */ m = if_ubaget(&sc->qe_uba, ifrw, len, off, &sc->qe_if); - if (m == 0) - return; - - if (off) { - struct ifnet *ifp; - - ifp = *(mtod(m, struct ifnet **)); - m->m_off += 2 * sizeof (u_short); - m->m_len -= 2 * sizeof (u_short); - *(mtod(m, struct ifnet **)) = ifp; - } - switch (eh->ether_type) { - -#ifdef INET - case ETHERTYPE_IP: - schednetisr(NETISR_IP); - inq = &ipintrq; - break; - - case ETHERTYPE_ARP: - arpinput(&sc->qe_ac, m); - return; -#endif -#ifdef NS - case ETHERTYPE_NS: - schednetisr(NETISR_NS); - inq = &nsintrq; - break; - -#endif - - default: - m_freem(m); - return; - } - - s = splimp(); - if (IF_QFULL(inq)) { - IF_DROP(inq); - m_freem(m); - } else - IF_ENQUEUE(inq, m); - splx(s); + if (m) + ether_input(&sc->qe_if, eh, m); } /* * Watchdog timeout routine. There is a condition in the hardware that * causes the board to lock up under heavy load. This routine detects @@ -1076,8 +925,8 @@ addr->qe_csr = QE_RCV_ENABLE | QE_INT_ENABLE | QE_XMIT_INT | QE_RCV_INT | QE_ILOOP; addr->qe_rcvlist_lo = (short)sc->rringaddr; addr->qe_rcvlist_hi = (short)((int)sc->rringaddr >> 16); sc->qe_flags |= QEF_RUNNING; - qestart(ifp->if_unit); + (void) qestart(ifp); } #endif Index: sys/vax/if/if_uba.c ================================================================== --- sys/vax/if/if_uba.c +++ sys/vax/if/if_uba.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)if_uba.c 7.12 (Berkeley) 04/22/89 + * @(#)if_uba.c 7.13 (Berkeley) 09/04/89 */ #include "param.h" #include "systm.h" #include "malloc.h" @@ -143,70 +143,77 @@ return (1); } /* * Pull read data off a interface. - * Len is length of data, with local net header stripped. + * Totlen is length of data, with local net header stripped. * Off is non-zero if a trailer protocol was used, and * gives the offset of the trailer information. - * We copy the trailer information and then all the normal + * We copy the header from the trailer and then all the normal * data into mbufs. When full cluster sized units are present * on the interface on cluster boundaries we can get them more * easily by remapping, and take advantage of this here. - * Prepend a pointer to the interface structure, + * Save a pointer to the interface structure and the total length, * so that protocols can determine where incoming packets arrived. * Note: we may be called to receive from a transmit buffer by some * devices. In that case, we must force normal mapping of the buffer, * so that the correct data will appear (only unibus maps are * changed when remapping the transmit buffers). */ struct mbuf * -if_ubaget(ifu, ifr, totlen, off0, ifp) +if_ubaget(ifu, ifr, totlen, off, ifp) struct ifubinfo *ifu; register struct ifrw *ifr; - int totlen, off0; + register int totlen; + int off; struct ifnet *ifp; { struct mbuf *top, **mp; register struct mbuf *m; register caddr_t cp = ifr->ifrw_addr + ifu->iff_hlen, pp; - register int len, off = off0; + register int len; + caddr_t epkt = cp + totlen; top = 0; mp = ⊤ + /* + * Skip the trailer header (type and trailer length). + */ + if (off) { + off += 2 * sizeof(u_short); + totlen -= 2 * sizeof(u_short); + cp += off; + } + MGETHDR(m, M_DONTWAIT, MT_DATA); + if (m == 0) + return ((struct mbuf *)NULL); + m->m_pkthdr.rcvif = ifp; + m->m_pkthdr.len = totlen; + m->m_len = MHLEN; + if (ifr->ifrw_flags & IFRW_W) rcv_xmtbuf((struct ifxmt *)ifr); - while (totlen > 0) { - if (top == 0) { - MGETHDR(m, M_DONTWAIT, MT_DATA); - } else { - MGET(m, M_DONTWAIT, MT_DATA); - } - if (m == 0) { - m_freem(top); - top = 0; - goto out; - } - if (off) { - len = totlen - off; - cp = ifr->ifrw_addr + ifu->iff_hlen + off; - } else - len = totlen; - if (top == 0) { - m->m_pkthdr.rcvif = ifp; - m->m_pkthdr.len = totlen; /* should subtract trailer */ - m->m_len = MHLEN; - } else - m->m_len = MLEN; + + while (totlen > 0) { + if (top) { + MGET(m, M_DONTWAIT, MT_DATA); + if (m == 0) { + m_freem(top); + top = 0; + goto out; + } + m->m_len = MLEN; + } + len = min(totlen, epkt - cp); if (len >= MINCLSIZE) { struct pte *cpte, *ppte; int x, *ip, i; MCLGET(m, M_DONTWAIT); if ((m->m_flags & M_EXT) == 0) goto nopage; - len = MIN(len, MCLBYTES); + len = min(len, MCLBYTES); m->m_len = len; if (!claligned(cp)) goto copy; /* @@ -243,26 +250,13 @@ bcopy(cp, mtod(m, caddr_t), (unsigned)len); cp += len; nocopy: *mp = m; mp = &m->m_next; - if (off) { - /* sort of an ALGOL-W style for statement... */ - off += len; - if (off == totlen) { - cp = ifr->ifrw_addr + ifu->iff_hlen; - off = 0; - totlen = off0; - } - } else - totlen -= len; - } - if (off0) { - m = top; - m->m_pkthdr.len -= 2*sizeof(u_short); - m->m_len -= 2*sizeof(u_short); - m->m_data += 2*sizeof(u_short); + totlen -= len; + if (cp == epkt) + cp = ifr->ifrw_addr + ifu->iff_hlen; } out: if (ifr->ifrw_flags & IFRW_W) restor_xmtbuf((struct ifxmt *)ifr); return (top); Index: sys/vax/if/if_vv.c ================================================================== --- sys/vax/if/if_vv.c +++ sys/vax/if/if_vv.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)if_vv.c 7.4 (Berkeley) 10/22/88 + * @(#)if_vv.c 7.5 (Berkeley) 09/04/89 */ #include "vv.h" #if NVV > 0 @@ -55,18 +55,19 @@ * The old warning about use without Wire Centers applies only to CTL * (p1002) cards with serial <= 057, which have not received ECO 176-743, * which was implemented in March, 1982. Most such CTLs have received * this ECO. */ -#include "../machine/pte.h" - #include "param.h" #include "systm.h" #include "mbuf.h" #include "buf.h" +#include "time.h" +#include "kernel.h" #include "protosw.h" #include "socket.h" +#include "syslog.h" #include "vmmac.h" #include "errno.h" #include "ioctl.h" #include "../net/if.h" @@ -78,10 +79,11 @@ #include "../netinet/in_systm.h" #include "../netinet/in_var.h" #include "../netinet/ip.h" #endif +#include "../vax/pte.h" #include "../vax/cpu.h" #include "../vax/mtpr.h" #include "if_vv.h" #include "if_uba.h" #include "../vaxuba/ubareg.h" @@ -112,11 +114,11 @@ * debugging and tracing stuff */ int vv_tracehdr = 0; /* 1 => trace headers (slowly!!) */ #define vvtracehdr if (vv_tracehdr) vvprt_hdr -#define vvprintf if (vs->vs_if.if_flags & IFF_DEBUG) printf +#define vvlog if (vs->vs_if.if_flags & IFF_DEBUG) log /* * externals, types, etc. */ int vvprobe(), vvattach(), vvreset(), vvinit(); @@ -130,10 +132,12 @@ #define LOOPBACK /* use loopback for packets meant for us */ #ifdef LOOPBACK extern struct ifnet loif; #endif + +extern wakeup(); /* * Software status of each interface. * * Each interface is referenced by a network interface structure, @@ -161,13 +165,16 @@ short vs_otimeout; /* number of output timeouts */ short vs_ibadf; /* number of input bad formats */ short vs_parity; /* number of parity errors on 10 meg, */ /* link data errors on 80 meg */ short vs_ipl; /* interrupt priority on Q-bus */ + short vs_flags; /* board state: */ +#define VS_RUNNING 0x01 /* board has been initialized */ +#define VS_INIT 0x02 /* board being initialized */ } vv_softc[NVV]; -#define NOHOST 0xffff /* illegal host number */ +#define NOHOST 0xff /* illegal host number */ /* * probe the interface to see that the registers exist, and then * cause an interrupt to find its vector */ @@ -229,10 +236,11 @@ vs->vs_if.if_watchdog = vvwatchdog; vs->vs_ifuba.ifu_flags = UBA_CANTWAIT | UBA_NEEDBDP; /* use flag to determine if this is proNET-80 */ vs->vs_is80 = (short)(ui->ui_flags & 01); + vs->vs_host = NOHOST; #if defined(VAX750) /* don't chew up 750 bdp's */ if (cpu == VAX_750 && ui->ui_unit > 0) vs->vs_ifuba.ifu_flags &= ~UBA_NEEDBDP; @@ -251,19 +259,21 @@ if (unit >= NVV || (ui = vvinfo[unit]) == 0 || ui->ui_alive == 0 || ui->ui_ubanum != uban) return; printf(" vv%d", unit); - vvinit(unit); + vv_softc[unit].vs_if.if_flags &= ~IFF_RUNNING; + vv_softc[unit].vs_flags &= ~VS_RUNNING; + vvinit(unit, 0); } /* * Initialization of interface; clear recorded pending * operations, and reinitialize UNIBUS usage. */ -vvinit(unit) - int unit; +vvinit(unit, cansleep) + int unit, cansleep; { register struct vv_softc *vs; register struct uba_device *ui; register struct vvreg *addr; register int ubaaddr, s; @@ -272,38 +282,60 @@ ui = vvinfo[unit]; if (vs->vs_if.if_addrlist == (struct ifaddr *)0) return; + /* + * Prevent multiple instances of vvinit + * from trying simultaneously. + */ + while (vs->vs_flags & VS_INIT) { + if (cansleep) + sleep((caddr_t)vs); + else + return; + } + if (vs->vs_flags & VS_RUNNING) + return; + vs->vs_flags = VS_INIT; + addr = (struct vvreg *)ui->ui_addr; if ((vs->vs_if.if_flags & IFF_RUNNING) == 0 && if_ubainit(&vs->vs_ifuba, ui->ui_ubanum, sizeof (struct vv_header), (int)btoc(VVMRU)) == 0) { printf("vv%d: can't initialize, if_ubainit() failed\n", unit); vs->vs_if.if_flags &= ~IFF_UP; + vs->vs_flags = 0; return; } vs->vs_if.if_flags |= IFF_RUNNING; /* * Now that the uba is set up, figure out our address and * update complete our host address. */ - if ((vs->vs_host = vvidentify(unit)) == NOHOST) { + if (cansleep) + vs->vs_host = vvidentify(unit); + if (vs->vs_host == NOHOST) { vs->vs_if.if_flags &= ~IFF_UP; + vs->vs_flags = 0; return; } - printf("vv%d: host %u\n", unit, vs->vs_host); + vvlog(LOG_DEBUG, "vv%d: host %u\n", unit, vs->vs_host); /* * Reset the interface, and stay in the ring */ addr->vvocsr = VV_RST; /* take over output */ addr->vvocsr = VV_CPB; /* clear packet buffer */ addr->vvicsr = VV_RST | VV_HEN; /* take over input, */ /* keep relay closed */ - DELAY(500000); /* let contacts settle */ + if (cansleep) { + timeout(wakeup, (caddr_t)vs, hz/2); + sleep((caddr_t)vs, PZERO); /* let contacts settle */ + } else + DELAY(500000); /* let contacts settle */ vs->vs_init = 0; /* clear counters, etc. */ vs->vs_refused = 0; vs->vs_timeouts = 0; vs->vs_otimeout = 0; @@ -322,10 +354,12 @@ addr->vviea = (u_short)(ubaaddr >> 16); addr->vviwc = -(VVBUFSIZE) >> 1; addr->vvicsr = VV_IEN | VV_HEN | VV_DEN | VV_ENB; vs->vs_oactive = 1; vs->vs_if.if_flags |= IFF_UP; + vs->vs_flags = VS_RUNNING; /* clear VS_INIT */ + wakeup((caddr_t)vs); vvxint(unit); splx(s); } /* @@ -366,11 +400,11 @@ * if_ubainit() aquired for us. */ m = m_get(M_DONTWAIT, MT_HEADER); if (m == NULL) { printf("vv%d: can't initialize, m_get() failed\n", unit); - return (0); + return (NOHOST); } m->m_next = 0; m->m_off = MMINOFF; m->m_len = sizeof(struct vv_header); v = mtod(m, struct vv_header *); @@ -401,11 +435,12 @@ /* * let the flag and token timers pop so that the init ring bit * will be allowed to work, by waiting about 1 second */ - DELAY(1000000L); + timeout(wakeup, (caddr_t)vs, hz); + sleep((caddr_t)vs, PZERO); /* * retry loop */ while ((successes < VVIDENTSUCC) && (failures < VVIDENTRETRY)) @@ -416,14 +451,16 @@ addr->vviba = (u_short) ubaaddr; addr->vviea = (u_short) (ubaaddr >> 16); addr->vviwc = -(VVBUFSIZE) >> 1; addr->vvicsr = vv_modes[i] | VV_DEN | VV_ENB; +#ifdef notdef /* purge stale data from BDP */ if (vs->vs_ifuba.ifu_flags & UBA_NEEDBDP) UBAPURGE(vs->vs_ifuba.ifu_uba, vs->vs_ifuba.ifu_w.ifrw_bdp); +#endif /* do a transmit */ ubaaddr = UBAI_ADDR(vs->vs_ifuba.ifu_w.ifrw_info); addr->vvocsr = VV_RST; /* abort last try */ addr->vvoba = (u_short) ubaaddr; @@ -450,14 +487,16 @@ /* Purge BDP before looking at received packet */ if (vs->vs_ifuba.ifu_flags & UBA_NEEDBDP) UBAPURGE(vs->vs_ifuba.ifu_uba, vs->vs_ifuba.ifu_r.ifrw_bdp); +#ifdef notdef m = if_rubaget(&vs->vs_ifuba, sizeof(struct vv_header), 0, &vs->vs_if); if (m != NULL) m_freem(m); +#endif v = (struct vv_header *)(vs->vs_ifuba.ifu_r.ifrw_addr); /* check message type, catch our node address */ if ((v->vh_type & 0xff) == RING_DIAGNOSTICS) { @@ -579,20 +618,20 @@ register struct uba_device *ui; register struct vv_softc *vs; register struct vvreg *addr; register int oc; -#ifdef QBA - splx(vv_softc[unit].vs_ipl); -#endif ui = vvinfo[unit]; vs = &vv_softc[unit]; +#ifdef QBA + splx(vs->vs_ipl); +#endif vs->vs_if.if_timer = 0; addr = (struct vvreg *)ui->ui_addr; oc = 0xffff & (addr->vvocsr); if (vs->vs_oactive == 0) { - vvprintf("vv%d: stray interrupt vvocsr = %b\n", unit, + vvlog(LOG_DEBUG, "vv%d: stray interrupt vvocsr = %b\n", unit, oc, VV_OBITS); return; } /* @@ -615,12 +654,12 @@ vs->vs_oactive = 0; vs->vs_tries = 0; if (oc & VVXERR) { vs->vs_if.if_oerrors++; - vvprintf("vv%d: error vvocsr = %b\n", unit, 0xffff & oc, - VV_OBITS); + vvlog(LOG_ERR, "vv%d: error vvocsr = %b\n", + unit, 0xffff & oc, VV_OBITS); } if (vs->vs_ifuba.ifu_xtofree) { m_freem(vs->vs_ifuba.ifu_xtofree); vs->vs_ifuba.ifu_xtofree = 0; } @@ -634,18 +673,15 @@ */ vvwatchdog(unit) int unit; { register struct vv_softc *vs; - register int s; vs = &vv_softc[unit]; - vvprintf("vv%d: lost a transmit interrupt.\n", unit); + log(LOG_ERR, "vv%d: lost transmit interrupt\n", unit); vs->vs_timeouts++; - s = splimp(); vvstart(unit); - splx(s); } /* * proNET interface receiver interrupt. * If input error just drop packet. @@ -664,14 +700,14 @@ register struct ifqueue *inq; register struct mbuf *m; int ubaaddr, len, off, s; short resid; + vs = &vv_softc[unit]; #ifdef QBA - splx(vv_softc[unit].vs_ipl); + splx(vs->vs_ipl); #endif - vs = &vv_softc[unit]; vs->vs_if.if_ipackets++; addr = (struct vvreg *)vvinfo[unit]->ui_addr; /* * Purge BDP @@ -681,11 +717,11 @@ /* * receive errors? */ if (addr->vvicsr & VVRERR) { - vvprintf("vv%d: receive error, vvicsr = %b\n", unit, + vvlog(LOG_INFO, "vv%d: receive error, vvicsr = %b\n", unit, 0xffff&(addr->vvicsr), VV_IBITS); if (addr->vvicsr & VV_BDF) vs->vs_ibadf++; goto dropit; } @@ -726,54 +762,56 @@ resid |= 0176000; /* high 6 bits are undefined */ len = ((VVBUFSIZE >> 1) + resid) << 1; len -= sizeof(struct vv_header); if ((addr->vvicsr & VV_DPR) || len > VVMRU || len <= 0) { - vvprintf("vv%d: len too long or short, \ + vvlog(LOG_DEBUG, "vv%d: len too long or short, \ len = %d, vvicsr = %b\n", unit, len, 0xffff&(addr->vvicsr), VV_IBITS); goto dropit; } /* check the protocol header version */ if (vv->vh_version != RING_VERSION) { - vvprintf("vv%d: bad protocol header version %d\n", + vvlog(LOG_DEBUG, "vv%d: bad protocol header version %d\n", unit, vv->vh_version & 0xff); goto dropit; } #define vvdataaddr(vv, off, type) ((type)(((caddr_t)((vv)+1)+(off)))) if (vv->vh_type == RING_TRAILER ) { off = ntohs((u_short)vv->vh_info); if (off > VVMTU) { - vvprintf("vv%d: off > VVMTU, off = %d, vvicsr = %b\n", - unit, off, 0xffff&(addr->vvicsr), VV_IBITS); + vvlog(LOG_DEBUG, + "vv%d: off > VVMTU, off = %d, vvicsr = %b\n", + unit, off, 0xffff&(addr->vvicsr), VV_IBITS); goto dropit; } vv->vh_type = ntohs(*vvdataaddr(vv, off, u_short *)); resid = ntohs(*(vvdataaddr(vv, off+sizeof(u_short), u_short *))); if (off + resid > len) { - vvprintf("vv%d: trailer packet too short\n", unit); - vvprintf("vv%d: off = %d, resid = %d, vvicsr = %b\n", - unit, off, resid, - 0xffff&(addr->vvicsr), VV_IBITS); + vvlog(LOG_DEBUG, "vv%d: trailer packet too short\n", + unit); + vvlog(LOG_DEBUG, + "vv%d: off = %d, resid = %d, vvicsr = %b\n", + unit, off, resid, 0xffff&(addr->vvicsr), VV_IBITS); goto dropit; } len = off + resid; } else off = 0; if (len == 0) { - vvprintf("vv%d: len is zero, vvicsr = %b\n", unit, + vvlog(LOG_DEBUG, "vv%d: len is zero, vvicsr = %b\n", unit, 0xffff&(addr->vvicsr), VV_IBITS); goto dropit; } m = if_rubaget(&vs->vs_ifuba, len, off, &vs->vs_if); if (m == NULL) { - vvprintf("vv%d: if_rubaget() failed, vvicsr = %b\n", unit, - 0xffff&(addr->vvicsr), VV_IBITS); + vvlog(LOG_DEBUG, "vv%d: if_rubaget() failed, vvicsr = %b\n", + unit, 0xffff&(addr->vvicsr), VV_IBITS); goto dropit; } if (off) { struct ifnet *ifp; @@ -796,11 +834,12 @@ schednetisr(NETISR_IP); inq = &ipintrq; break; #endif default: - vvprintf("vv%d: unknown pkt type 0x%x\n", unit, vv->vh_type); + vvlog(LOG_DEBUG, "vv%d: unknown pkt type 0x%x\n", + unit, vv->vh_type); m_freem(m); goto setup; } s = splimp(); if (IF_QFULL(inq)) { @@ -849,10 +888,12 @@ register int s; int type, dest, error; m = m0; unit = ifp->if_unit; + if ((ifp->if_flags & IFF_UP) == 0) + return (ENETDOWN); addr = (struct vvreg *)vvinfo[unit]->ui_addr; vs = &vv_softc[unit]; /* * Check to see if the input side has wedged due the UBA @@ -865,11 +906,11 @@ * Avoid the race with an input interrupt by watching to see * if any packets come in. */ s = vs->vs_if.if_ipackets; if (addr->vvicsr & VV_RDY && s == vs->vs_if.if_ipackets) { - vvprintf("vv%d: lost a receive interrupt, icsr = %b\n", + log(LOG_ERR, "vv%d: lost a receive interrupt, icsr = %b\n", unit, 0xffff&(addr->vvicsr), VV_IBITS); s = splimp(); vvrint(unit); splx(s); } @@ -982,18 +1023,20 @@ vvioctl(ifp, cmd, data) register struct ifnet *ifp; int cmd; caddr_t data; { + register struct vv_softc *vs = &vv_softc[ifp->if_unit]; struct ifaddr *ifa = (struct ifaddr *) data; + struct vvreg *addr = (struct vvreg *)(vvinfo[ifp->if_unit]); int s = splimp(), error = 0; switch (cmd) { case SIOCSIFADDR: - if ((ifp->if_flags & IFF_RUNNING) == 0) - vvinit(ifp->if_unit); + if ((vs->vs_flags & VS_RUNNING) == 0) + vvinit(ifp->if_unit, 1); /* * Did self-test succeed? */ if ((ifp->if_flags & IFF_UP) == 0) error = ENETDOWN; @@ -1003,19 +1046,31 @@ * and board address. */ switch (ifa->ifa_addr.sa_family) { case AF_INET: if ((in_lnaof(IA_SIN(ifa)->sin_addr) & 0xff) != - vv_softc[ifp->if_unit].vs_host) + vs->vs_host) error = EADDRNOTAVAIL; break; } } break; + + case SIOCSIFFLAGS: + if ((ifp->if_flags & IFF_UP) == 0 && + vs->vs_flags & VS_RUNNING) { + addr->vvicsr = VV_RST; + addr->vvocsr = VV_RST; + vs->vs_flags &= ~VS_RUNNING; + } else if (ifp->if_flags & IFF_UP && + (vs->vs_flags & VS_RUNNING) == 0) + vvinit(ifp->if_unit, 1); + break; default: error = EINVAL; + break; } splx(s); return (error); } Index: sys/vax/include/param.h ================================================================== --- sys/vax/include/param.h +++ sys/vax/include/param.h @@ -1,11 +1,11 @@ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)param.h 7.10 (Berkeley) 01/21/88 + * @(#)param.h 7.11 (Berkeley) 09/04/89 */ /* * Machine dependent constants for VAX. */ @@ -13,26 +13,11 @@ #ifndef BYTE_ORDER #include #endif -#define CHAR_BIT NBBY -#define CHAR_MAX 0x7f -#define CHAR_MIN 0x80 -#define CLK_TCK 60 /* for times() */ -#define INT_MAX 0x7fffffff -#define INT_MIN 0x80000000 -#define LONG_MAX 0x7fffffff -#define LONG_MIN 0x80000000 -#define SCHAR_MAX 0x7f -#define SCHAR_MIN 0x80 -#define SHRT_MAX 0x7fff -#define SHRT_MIN 0x8000 -#define UCHAR_MAX 0xff -#define UINT_MAX 0xffffffff -#define ULONG_MAX 0xffffffff -#define USHRT_MAX 0xffff +#include #define NBPG 512 /* bytes/page */ #define PGOFSET (NBPG-1) /* byte offset into page */ #define PGSHIFT 9 /* LOG2(NBPG) */ #define NPTEPG (NBPG/(sizeof (struct pte))) @@ -51,10 +36,34 @@ #define SSIZE 4 /* initial stack size/NBPG */ #define SINCR 4 /* increment of stack/NBPG */ #define UPAGES 10 /* pages of u-area */ +/* + * Constants related to network buffer management. + * MCLBYTES must be no larger than CLBYTES (the software page size), and, + * on machines that exchange pages of input or output buffers with mbuf + * clusters (MAPPED_MBUFS), MCLBYTES must also be an integral multiple + * of the hardware page size. + */ +#define MSIZE 128 /* size of an mbuf */ +#define MAPPED_MBUFS /* can do scatter-gather I/O */ +#if CLBYTES > 1024 +#define MCLBYTES 1024 +#define MCLSHIFT 10 +#define MCLOFSET (MCLBYTES - 1) +#else +#define MCLBYTES CLBYTES +#define MCLSHIFT CLSHIFT +#define MCLOFSET CLOFSET +#endif +#ifdef GATEWAY +#define NMBCLUSTERS 512 /* map size, max cluster allocation */ +#else +#define NMBCLUSTERS 256 /* map size, max cluster allocation */ +#endif + /* * Some macros for units conversion */ /* Core clicks (512 bytes) to segments and vice versa */ #define ctos(x) (x) Index: sys/vax/uba/dh.c ================================================================== --- sys/vax/uba/dh.c +++ sys/vax/uba/dh.c @@ -1,11 +1,11 @@ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)dh.c 7.7 (Berkeley) 04/25/89 + * @(#)dh.c 7.8 (Berkeley) 09/06/89 */ #include "dh.h" #if NDH > 0 /* @@ -53,15 +53,15 @@ u_short dmstd[] = { 0 }; struct uba_driver dmdriver = { dmprobe, 0, dmattach, 0, dmstd, "dm", dminfo }; #ifndef PORTSELECTOR -#define ISPEED B9600 -#define IFLAGS (EVENP|ODDP|ECHO) +#define ISPEED TTYDEF_SPEED +#define LFLAG TTYDEF_LFLAG #else #define ISPEED B4800 -#define IFLAGS (EVENP|ODDP) +#define LFLAG (TTYDEF_LFLAG&~ECHO) #endif #define FASTTIMER (hz/30) /* scan rate with silos on */ /* @@ -78,10 +78,31 @@ int dhrate[NDH]; /* smoothed input count */ int dhhighrate = 100; /* silo on if dhchars > dhhighrate */ int dhlowrate = 75; /* silo off if dhrate < dhlowrate */ static short timerstarted; int dhstart(), ttrstrt(); + +struct speedtab dhspeedtab[] = { + 19200, 14, + 9600, 13, + 4800, 12, + 2400, 11, + 1800, 10, + 1200, 9, + 600, 8, + 300, 7, + 200, 6, + 150, 5, + 134, 4, + 110, 3, + 75, 2, + 50, 1, + 0, 0, + EXTA, 14, + EXTB, 15, + -1, -1 +}; /* * The clist space is mapped by one terminal driver onto each UNIBUS. * The identity of the board which allocated resources is recorded, * so the process may be repeated after UNIBUS resets. @@ -179,10 +200,11 @@ register struct tty *tp; register int unit, dh; register struct dhdevice *addr; register struct uba_device *ui; int s; + int dhparam(); unit = minor(dev); dh = unit >> 4; if (unit >= NDH*16 || (ui = dhinfo[dh])== 0 || ui->ui_alive == 0) return (ENXIO); @@ -190,10 +212,12 @@ if (tp->t_state&TS_XCLUDE && u.u_uid!=0) return (EBUSY); addr = (struct dhdevice *)ui->ui_addr; tp->t_addr = (caddr_t)addr; tp->t_oproc = dhstart; + tp->t_param = dhparam; + tp->t_dev = dev; tp->t_state |= TS_WOPEN; /* * While setting up state for this uba and this dh, * block uba resets which can clear the state. */ @@ -218,25 +242,28 @@ */ if ((tp->t_state&TS_ISOPEN) == 0) { ttychars(tp); #ifndef PORTSELECTOR if (tp->t_ispeed == 0) { +#endif + tp->t_iflag = TTYDEF_IFLAG; + tp->t_oflag = TTYDEF_OFLAG; + tp->t_cflag = TTYDEF_CFLAG; + tp->t_lflag = LFLAG; + tp->t_ispeed = tp->t_ospeed = ISPEED; +#ifdef PORTSELECTOR + tp->t_cflag |= HUPCL; #else - tp->t_state |= TS_HUPCLS; -#endif PORTSELECTOR - tp->t_ispeed = ISPEED; - tp->t_ospeed = ISPEED; - tp->t_flags = IFLAGS; -#ifndef PORTSELECTOR - } -#endif PORTSELECTOR - dhparam(unit); + } +#endif + dhparam(tp, &tp->t_termios); + ttsetwater(tp); } /* * Wait for carrier, then process line discipline specific open. */ - dmopen(dev); + dmopen(dev, flag); return ((*linesw[tp->t_line].l_open)(dev, tp)); } /* * Close a DH11 line, turning off the DM11. @@ -251,41 +278,41 @@ unit = minor(dev); tp = &dh11[unit]; (*linesw[tp->t_line].l_close)(tp); ((struct dhdevice *)(tp->t_addr))->dhbreak &= ~(1<<(unit&017)); - if (tp->t_state&TS_HUPCLS || (tp->t_state&TS_ISOPEN)==0) + if (tp->t_cflag&HUPCL || (tp->t_state&TS_ISOPEN)==0) dmctl(unit, DML_OFF, DMSET); ttyclose(tp); } -dhread(dev, uio) +dhread(dev, uio, flag) dev_t dev; struct uio *uio; { register struct tty *tp = &dh11[minor(dev)]; - return ((*linesw[tp->t_line].l_read)(tp, uio)); + return ((*linesw[tp->t_line].l_read)(tp, uio, flag)); } -dhwrite(dev, uio) +dhwrite(dev, uio, flag) dev_t dev; struct uio *uio; { register struct tty *tp = &dh11[minor(dev)]; - return ((*linesw[tp->t_line].l_write)(tp, uio)); + return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); } /* * DH11 receiver interrupt. */ dhrint(dh) int dh; { register struct tty *tp; - register c; + register c, cc; register struct dhdevice *addr; register struct tty *tp0; register struct uba_device *ui; int overrun = 0; @@ -306,35 +333,20 @@ #ifdef PORTSELECTOR if ((tp->t_state&TS_WOPEN) == 0) #endif continue; } - if (c & DH_PE) - if ((tp->t_flags&(EVENP|ODDP))==EVENP - || (tp->t_flags&(EVENP|ODDP))==ODDP ) - continue; - if ((c & DH_DO) && overrun == 0) { + cc = c&0xff; + if (c&DH_PE) + cc |= TTY_PE; + if ((c&DH_DO) && overrun == 0) { log(LOG_WARNING, "dh%d: silo overflow\n", dh); overrun = 1; } - if (c & DH_FE) - /* - * At framing error (break) generate - * a null (in raw mode, for getty), or a - * interrupt (in cooked/cbreak mode). - */ - if (tp->t_flags&RAW) - c = 0; - else - c = tp->t_intrc; -#if NBK > 0 - if (tp->t_line == NETLDISC) { - c &= 0177; - BKINPUT(c, tp); - } else -#endif - (*linesw[tp->t_line].l_rint)(c, tp); + if (c&DH_FE) + cc |= TTY_FE; + (*linesw[tp->t_line].l_rint)(cc, tp); } } /* * Ioctl for DH11. @@ -350,16 +362,12 @@ tp = &dh11[unit]; error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag); if (error >= 0) return (error); error = ttioctl(tp, cmd, data, flag); - if (error >= 0) { - if (cmd == TIOCSETP || cmd == TIOCSETN || cmd == TIOCLBIS || - cmd == TIOCLBIC || cmd == TIOCLSET) - dhparam(unit); + if (error >= 0) return (error); - } switch (cmd) { case TIOCSBRK: ((struct dhdevice *)(tp->t_addr))->dhbreak |= 1<<(unit&017); break; @@ -384,45 +392,59 @@ /* * Set parameters from open or stty into the DH hardware * registers. */ -dhparam(unit) - register int unit; -{ +dhparam(tp, t) register struct tty *tp; + register struct termios *t; +{ register struct dhdevice *addr; register int lpar; + register int cflag = t->c_cflag; + int unit = minor(tp->t_dev); int s; + int ispeed = ttspeedtab(t->c_ispeed, dhspeedtab); + int ospeed = ttspeedtab(t->c_ospeed, dhspeedtab); - tp = &dh11[unit]; - addr = (struct dhdevice *)tp->t_addr; + /* check requested parameters */ + if (ospeed < 0 || ispeed < 0 || (cflag&CSIZE) == CS5) + return(EINVAL); + if (ispeed == 0) + ispeed = ospeed; + /* and copy to tty */ + tp->t_ispeed = t->c_ispeed; + tp->t_ospeed = t->c_ospeed; + tp->t_cflag = cflag; /* * Block interrupts so parameters will be set * before the line interrupts. */ + addr = (struct dhdevice *)tp->t_addr; s = spl5(); addr->un.dhcsrl = (unit&0xf) | DH_IE; - if ((tp->t_ispeed)==0) { - tp->t_state |= TS_HUPCLS; + if (ospeed == 0) { + tp->t_cflag |= HUPCL; dmctl(unit, DML_OFF, DMSET); splx(s); - return; - } - lpar = ((tp->t_ospeed)<<10) | ((tp->t_ispeed)<<6); - if ((tp->t_ispeed) == B134) - lpar |= BITS6|PENABLE|HDUPLX; - else if (tp->t_flags & (RAW|LITOUT|PASS8)) - lpar |= BITS8; - else - lpar |= BITS7|PENABLE; - if ((tp->t_flags&EVENP) == 0) + return 0; + } + lpar = (ospeed<<10) | (ispeed<<6); + switch (cflag&CSIZE) { + case CS6: lpar |= BITS6; break; + case CS7: lpar |= BITS7; break; + case CS8: lpar |= BITS8; break; + } + if (cflag&PARENB) + lpar |= PENABLE; + if (cflag&PARODD) lpar |= OPAR; - if ((tp->t_ospeed) == B110) + if (cflag&CSTOPB) lpar |= TWOSB; addr->dhlpr = lpar; splx(s); + return 0; } /* * DH11 transmitter interrupt. * Restart each line which used to be active but has @@ -501,11 +523,11 @@ goto out; /* * If there are sleepers, and output has drained below low * water mark, wake up the sleepers. */ - if (tp->t_outq.c_cc<=TTLOWAT(tp)) { + if (tp->t_outq.c_cc<=tp->t_lowat) { if (tp->t_state&TS_ASLEEP) { tp->t_state &= ~TS_ASLEEP; wakeup((caddr_t)&tp->t_outq); } if (tp->t_wsel) { @@ -518,11 +540,11 @@ * Now restart transmission unless the output queue is * empty. */ if (tp->t_outq.c_cc == 0) goto out; - if (tp->t_flags & (RAW|LITOUT)) + if (1 || !(tp->t_oflag&OPOST)) /*XXX*/ nch = ndqb(&tp->t_outq, 0); else { nch = ndqb(&tp->t_outq, 0200); /* * If first thing on queue is a delay process it. @@ -679,11 +701,11 @@ } /* * Turn on the line associated with dh dev. */ -dmopen(dev) +dmopen(dev, flag) dev_t dev; { register struct tty *tp; register struct dmdevice *addr; register struct uba_device *ui; @@ -708,11 +730,12 @@ addr->dmcsr = unit; addr->dmlstat = DML_ON; if ((addr->dmlstat & DML_CAR) || (dhsoftCAR[dm] & (1 << unit))) tp->t_state |= TS_CARR_ON; addr->dmcsr = DM_IE|DM_SE; - if (tp->t_state & TS_CARR_ON) + if (tp->t_state&TS_CARR_ON || flag&O_NONBLOCK || + tp->t_cflag&CLOCAL) break; sleep((caddr_t)&tp->t_rawq, TTIPRI); } splx(s); } Index: sys/vax/uba/dhu.c ================================================================== --- sys/vax/uba/dhu.c +++ sys/vax/uba/dhu.c @@ -1,11 +1,11 @@ /* * Copyright (c) 1985, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)dhu.c 7.6 (Berkeley) 05/01/89 + * @(#)dhu.c 7.7 (Berkeley) 09/06/89 */ /* * based on dh.c 6.3 84/03/15 * and on dmf.c 6.2 84/02/16 @@ -106,10 +106,12 @@ 150, 4, 134, 3, 110, 2, 75, 1, 0, 0, + EXTA, 14, + EXTB, 9, -1, -1, }; short dhusoftCAR[NDHU]; @@ -256,11 +258,12 @@ */ s = spltty(); if ((dhumctl(dev, DHU_ON, DMSET) & DHU_CAR) || (dhusoftCAR[dhu] & (1<<(unit&0xf)))) tp->t_state |= TS_CARR_ON; - while ((tp->t_state & TS_CARR_ON) == 0) { + while (!(flag&O_NONBLOCK) && !(tp->t_cflag&CLOCAL) && + (tp->t_state & TS_CARR_ON) == 0) { tp->t_state |= TS_WOPEN; sleep((caddr_t)&tp->t_rawq, TTIPRI); } (void) splx(s); return ((*linesw[tp->t_line].l_open)(dev, tp)); @@ -296,26 +299,26 @@ (void) dhumctl(unit, DHU_OFF, DMSET); #endif PORTSELECTOR ttyclose(tp); } -dhuread(dev, uio) +dhuread(dev, uio, flag) dev_t dev; struct uio *uio; { register struct tty *tp = &dhu_tty[UNIT(dev)]; - return ((*linesw[tp->t_line].l_read)(tp, uio)); + return ((*linesw[tp->t_line].l_read)(tp, uio, flag)); } -dhuwrite(dev, uio) +dhuwrite(dev, uio, flag) dev_t dev; struct uio *uio; { register struct tty *tp = &dhu_tty[UNIT(dev)]; - return ((*linesw[tp->t_line].l_write)(tp, uio)); + return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); } /* * DHU11 receiver interrupt. */ @@ -366,51 +369,20 @@ #ifdef PORTSELECTOR if ((tp->t_state&TS_WOPEN) == 0) #endif continue; } -#ifdef COMPAT_43 - if (tp->t_line != POSXDISC) { - if (creg & DHU_RB_PE) - if ((tp->t_flags&(EVENP|ODDP)) == EVENP || - (tp->t_flags&(EVENP|ODDP)) == ODDP) - continue; - if ((creg & DHU_RB_DO) && overrun == 0) { - log(LOG_WARNING, "dhu%d: silo overflow\n", dhu); - overrun = 1; - } - if (creg & DHU_RB_FE) - /* - * At framing error (break) generate - * a null (in raw mode, for getty), or a - * interrupt (in cooked/cbreak mode). - */ - if (tp->t_flags&RAW) - c = 0; - else - c = tp->t_intrc; - } else { -#endif /*COMPAT_43*/ - if (creg & DHU_RB_PE) - c |= TTY_PE; - if (creg & DHU_RB_DO && overrun == 0) { - log(LOG_WARNING, "dhu%d: silo overflow\n", dhu); - overrun = 1; - } - if (creg & DHU_RB_FE) - c |= TTY_FE; -#ifdef COMPAT_43 - } -#endif - -#if NBK > 0 - if (tp->t_line == NETLDISC) { - c &= 0x7f; - BKINPUT(c, tp); - } else -#endif - (*linesw[tp->t_line].l_rint)(c, tp); + if (creg & DHU_RB_PE) + c |= TTY_PE; + if (creg & DHU_RB_DO && overrun == 0) { + log(LOG_WARNING, "dhu%d: silo overflow\n", dhu); + overrun = 1; + } + if (creg & DHU_RB_FE) + c |= TTY_FE; + + (*linesw[tp->t_line].l_rint)(c, tp); } } /* * Ioctl for DHU11. @@ -566,15 +538,12 @@ if ((cflag&PARODD) == 0) lpar |= DHU_LP_EPAR; } if (cflag&CSTOPB) lpar |= DHU_LP_TWOSB; - if (cflag&CREAD) - addr->dhucsr = DHU_SELECT(unit) | DHU_IE; - else - addr->dhucsr = DHU_SELECT(unit) | DHU_CS_TIE; + addr->dhucsr = DHU_SELECT(unit) | DHU_IE; addr->dhulpr = lpar; splx(s); } /* @@ -669,11 +638,11 @@ * Now restart transmission unless the output queue is * empty. */ if (tp->t_outq.c_cc == 0) goto out; - if (!(tp->t_oflag & OPOST)) + if (1 || !(tp->t_oflag & OPOST)) /*XXX*/ nch = ndqb(&tp->t_outq, 0); else { nch = ndqb(&tp->t_outq, 0200); /* * If first thing on queue is a delay process it. Index: sys/vax/uba/dmf.c ================================================================== --- sys/vax/uba/dmf.c +++ sys/vax/uba/dmf.c @@ -1,11 +1,11 @@ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)dmf.c 7.7 (Berkeley) 05/09/89 + * @(#)dmf.c 7.8 (Berkeley) 09/06/89 */ /* * DMF32 driver * @@ -49,11 +49,10 @@ #include "dmxreg.h" #include "dmfreg.h" #include "dmreg.h" extern int dmx_timeout; /* silo timeout, in ms */ -extern char dmx_speeds[]; int dmfstart(); /* * The clist space is mapped by one terminal driver onto each UNIBUS. * The identity of the board which allocated resources is recorded, @@ -188,10 +187,11 @@ register struct dmx_softc *sc; int unit, dmf; register struct dmfdevice *addr; register struct uba_device *ui; int s; + int dmxparam(); unit = minor(dev); if (unit & 0200) return (dmflopen(dev,flag)); dmf = unit >> 3; @@ -202,10 +202,11 @@ sc = &dmf_softc[dmf]; addr = (struct dmfdevice *)ui->ui_addr; tp->t_addr = (caddr_t)(&addr->dmfa); tp->t_oproc = dmfstart; tp->t_dev = dev; /* needed before dmxopen */ + tp->t_param = dmxparam; /* * While setting up state for this uba, * block uba resets which can clear the state. */ @@ -215,11 +216,11 @@ cbase[ui->ui_ubanum] = UBAI_ADDR(uballoc(ui->ui_ubanum, (caddr_t)cfree, nclist*sizeof(struct cblock), 0)); } splx(s); - return (dmxopen(tp, sc)); + return (dmxopen(tp, sc, flag)); } /* * Close a DMF32 line. */ @@ -236,20 +237,20 @@ return; } dmxclose(&dmf_tty[unit]); } -dmfread(dev, uio) +dmfread(dev, uio, flag) dev_t dev; struct uio *uio; { register struct tty *tp; if (minor(dev) & 0200) return(ENXIO); tp = &dmf_tty[minor(dev)]; - return ((*linesw[tp->t_line].l_read)(tp, uio)); + return ((*linesw[tp->t_line].l_read)(tp, uio, flag)); } dmfwrite(dev, uio) dev_t dev; struct uio *uio; @@ -356,11 +357,11 @@ addr->dmfa.csr = DMF_IE; addr->dmfa.rsp = dmx_timeout; tp = &dmf_tty[dmf * 8]; for (i = 0; i < 8; i++, tp++) { if (tp->t_state & (TS_ISOPEN|TS_WOPEN)) { - dmxparam(tp); + dmxparam(tp, &tp->t_termios); (void) dmxmctl(tp, DMF_ON, DMSET); tp->t_state &= ~TS_BUSY; dmfstart(tp); } } Index: sys/vax/uba/dmx.c ================================================================== --- sys/vax/uba/dmx.c +++ sys/vax/uba/dmx.c @@ -1,11 +1,11 @@ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)dmx.c 1.1 (Berkeley) 08/15/89 + * @(#)dmx.c 1.2 (Berkeley) 09/06/89 */ /* * Common code for DMF32 and DMZ32 drivers */ @@ -39,15 +39,15 @@ #include "ubavar.h" #include "dmxreg.h" #include "dmreg.h" #ifndef PORTSELECTOR -#define ISPEED B9600 -#define IFLAGS (EVENP|ODDP|ECHO) +#define ISPEED TTYDEF_SPEED +#define LFLAG TTYDEF_LFLAG #else #define ISPEED B4800 -#define IFLAGS (EVENP|ODDP) +#define IFLAGS (TTYDEF_LFLAG&~ECHO) #endif #ifndef DMX_TIMEOUT #define DMX_TIMEOUT 10 #endif @@ -82,11 +82,11 @@ int ttrstrt(); /* * DMF/DMZ open common code */ -dmxopen(tp, sc) +dmxopen(tp, sc, flag) register struct tty *tp; register struct dmx_softc *sc; { int s, unit; int dmxparam(); @@ -105,21 +105,23 @@ */ if ((tp->t_state&TS_ISOPEN) == 0) { ttychars(tp); #ifndef PORTSELECTOR if (tp->t_ispeed == 0) { +#endif + tp->t_iflag = TTYDEF_IFLAG; + tp->t_oflag = TTYDEF_OFLAG; + tp->t_cflag = TTYDEF_CFLAG; + tp->t_lflag = LFLAG; + tp->t_ispeed = tp->t_ospeed = ISPEED; +#ifdef PORTSELECTOR + tp->t_cflag |= HUPCL; #else - tp->t_state |= TS_HUPCLS; -#endif PORTSELECTOR - tp->t_ispeed = ISPEED; - tp->t_ospeed = ISPEED; - tp->t_flags = IFLAGS; -#ifndef PORTSELECTOR - } -#endif PORTSELECTOR - } - dmxparam(tp); + } +#endif + } + dmxparam(tp, &tp->t_termios); unit = minor(tp->t_dev) & 07; /* * Wait for carrier, then process line discipline specific open. */ @@ -126,11 +128,12 @@ s = spltty(); for (;;) { if ((dmxmctl(tp, DMF_ON, DMSET) & DMF_CAR) || (sc->dmx_softCAR & (1 << unit))) tp->t_state |= TS_CARR_ON; - if (tp->t_state & TS_CARR_ON) + if (tp->t_state&TS_CARR_ON || flag&O_NONBLOCK || + tp->t_cflag&CLOCAL) break; tp->t_state |= TS_WOPEN; sleep((caddr_t)&tp->t_rawq, TTIPRI); } splx(s); @@ -141,19 +144,19 @@ register struct tty *tp; { (*linesw[tp->t_line].l_close)(tp); (void) dmxmctl(tp, DMF_BRK, DMBIC); - if (tp->t_state & TS_HUPCLS || (tp->t_state & TS_ISOPEN) == 0) + if (tp->t_cflag & HUPCL || (tp->t_state & TS_ISOPEN) == 0) (void) dmxmctl(tp, DMF_OFF, DMSET); ttyclose(tp); } dmxrint(sc) register struct dmx_softc *sc; { - register c; + register c, cc; register struct tty *tp; register struct dmx_octet *addr; int unit; int overrun = 0; @@ -161,11 +164,11 @@ /* * Loop fetching characters from the silo for this * octet until there are no more in the silo. */ while ((c = addr->rbuf) < 0) { - + cc = c&0xff; unit = (c >> 8) & 07; tp = sc->dmx_tty + unit; if (c & DMF_DSC) { addr->csr = DMF_IE | DMFIR_RMSTSC | unit; if (addr->rmstsc & DMF_CAR) @@ -184,32 +187,22 @@ #endif continue; } if (c & (DMF_PE|DMF_DO|DMF_FE)) { if (c & DMF_PE) - if ((tp->t_flags & (EVENP|ODDP)) == EVENP - || (tp->t_flags & (EVENP|ODDP)) == ODDP) - continue; + cc |= TTY_PE; if ((c & DMF_DO) && overrun == 0) { log(LOG_WARNING, "dm%c%d: silo overflow, line %d\n", sc->dmx_type, sc->dmx_unit, sc->dmx_unit0 + unit); overrun = 1; } if (c & DMF_FE) - /* - * At framing error (break) generate - * a null (in raw mode, for getty), or an - * interrupt (in cooked/cbreak mode). - */ - if (tp->t_flags & RAW) - c = 0; - else - c = tp->t_intrc; - } - (*linesw[tp->t_line].l_rint)(c, tp); + cc |= TTY_FE; + } + (*linesw[tp->t_line].l_rint)(cc, tp); } } dmxioctl(tp, cmd, data, flag) register struct tty *tp; @@ -219,16 +212,13 @@ error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag); if (error >= 0) return (error); error = ttioctl(tp, cmd, data, flag); - if (error >= 0) { - if (cmd == TIOCSETP || cmd == TIOCSETN || cmd == TIOCLBIS || - cmd == TIOCLBIC || cmd == TIOCLSET) - dmxparam(tp); + if (error >= 0) return (error); - } + switch (cmd) { case TIOCSBRK: (void) dmxmctl(tp, DMF_BRK, DMBIS); break; @@ -352,49 +342,64 @@ /* * Set parameters from open or ioctl into the hardware registers. */ -dmxparam(tp) +dmxparam(tp, t) register struct tty *tp; + register struct termios *t; { register struct dmx_octet *addr; register int lpar, lcr; + register int cflag = t->c_cflag; int s, unit; + int ispeed = ttspeedtab(t->c_ispeed, dmxspeedtab); + int ospeed = ttspeedtab(t->c_ospeed, dmxspeedtab); + + /* check requested parameters */ + if (ospeed < 0 || ispeed < 0 || (cflag&CSIZE) == CS5) + return(EINVAL); + if (ispeed == 0) + ispeed = ospeed; + /* and copy to tty */ + tp->t_ispeed = t->c_ispeed; + tp->t_ospeed = t->c_ospeed; + tp->t_cflag = cflag; addr = (struct dmx_octet *)tp->t_addr; unit = minor(tp->t_dev) & 07; /* * Block interrupts so parameters will be set * before the line interrupts. */ s = spltty(); addr->csr = unit | DMFIR_LCR | DMF_IE; - if (tp->t_ispeed == 0) { - tp->t_state |= TS_HUPCLS; + if (ospeed == 0) { + tp->t_cflag |= HUPCL; (void) dmxmctl(tp, DMF_OFF, DMSET); splx(s); return; } - lpar = (dmx_speeds[tp->t_ospeed]<<12) | (dmx_speeds[tp->t_ispeed]<<8); + lpar = (ospeed<<12) | (ispeed<<8); lcr = DMF_ENA; - if ((tp->t_ispeed) == B134) - lpar |= BITS6|PENABLE; - else if (tp->t_flags & (RAW|LITOUT|PASS8)) - lpar |= BITS8; - else { - lpar |= BITS7|PENABLE; - /* CHECK FOR XON/XOFF AND SET lcr |= DMF_AUTOX; */ - } - if (tp->t_flags&EVENP) - lpar |= EPAR; - if ((tp->t_ospeed) == B110) - lpar |= TWOSB; + switch (cflag&CSIZE) { + case CS6: lpar |= BITS6; break; + case CS7: lpar |= BITS7; break; + case CS8: lpar |= BITS8; break; + } + if (cflag&PARENB) + lpar |= PENABLE; + if (!(cflag&PARODD)) + lpar |= EPAR; + if (cflag&CSTOPB) + lpar |= TWOSB; + lpar |= (unit&07); addr->lpr = lpar; addr->lctms = (addr->lctms &~ 0xff) | lcr; splx(s); + return 0; } /* * Process a transmit interrupt on an octet. */ @@ -477,11 +482,11 @@ } /* * If there are sleepers, and output has drained below low * water mark, wake up the sleepers. */ - if (tp->t_outq.c_cc <= TTLOWAT(tp)) { + if (tp->t_outq.c_cc <= tp->t_lowat) { if (tp->t_state & TS_ASLEEP) { tp->t_state &= ~TS_ASLEEP; wakeup((caddr_t)&tp->t_outq); } if (tp->t_wsel) { @@ -494,11 +499,11 @@ * Now restart transmission unless the output queue is * empty. */ if (tp->t_outq.c_cc == 0) goto out; - if (tp->t_flags & (RAW|LITOUT)) + if (1 || !(tp->t_oflag&OPOST)) /*XXX*/ nch = ndqb(&tp->t_outq, 0); else { if ((nch = ndqb(&tp->t_outq, 0200)) == 0) { /* * If first thing on queue is a delay process it. ADDED sys/vax/uba/dmx.h Index: sys/vax/uba/dmx.h ================================================================== --- sys/vax/uba/dmx.h +++ sys/vax/uba/dmx.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 1986 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + * + * @(#)dmx.h 7.1 (Berkeley) 09/04/89 + * + * Common structures and definitions + * for merged DMF and DMZ drivers. + */ + +/* + * Software status per octet + */ + +struct dmx_softc { + char dmx_flags; /* flags, below */ + char dmx_type; /* hardware type as character */ + char dmx_softCAR; /* softCAR flags per octet */ + char dmx_ubanum; /* uba number */ + short dmx_unit; /* board unit number */ + short dmx_unit0; /* line number of first line */ + struct dmx_octet *dmx_octet; /* hardware registers */ + struct tty *dmx_tty; /* base of ttys for octet */ + int dmx_dmacount[8]; /* output dma count, per line */ +}; + +/* + * flags + */ +#define DMX_ACTIVE 0x01 /* has been opened */ ADDED sys/vax/uba/dmxreg.h Index: sys/vax/uba/dmxreg.h ================================================================== --- sys/vax/uba/dmxreg.h +++ sys/vax/uba/dmxreg.h @@ -0,0 +1,101 @@ +/* + * Copyright (c) 1986 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + * + * @(#)dmxreg.h 7.1 (Berkeley) 09/04/89 + * + * Common structures and definitions + * for merged DMF and DMZ drivers. + */ + +/* + * Hardware registers per octet of asynchronous lines + */ +struct dmx_octet { + short csr; /* control-status register */ + short lpr; /* line parameter register */ + short rbuf; /* receiver buffer (ro) */ + union { + u_short irw; /* indirect register word */ + u_char irc[2]; /* " " bytes */ + } octun; +}; + +#define rsp rbuf /* receive silo parameter register (wo) */ +#define tbuf octun.irc[0] /* transmit buffer */ +#define tsc octun.irc[0] /* transmit silo count */ +#define rmstsc octun.irw /* rcv modem status, xmit silo count */ +#define rms octun.irc[1] /* receive modem status */ +#define lctms octun.irw /* line control, transmit modem status */ +#define tba octun.irw /* transmit buffer address */ +#define tcc octun.irw /* transmit character count */ + +/* bits in dmfcsr */ +#define DMF_TI 0100000 /* transmit interrupt */ +#define DMF_TIE 0040000 /* transmit interrupt enable */ +#define DMF_NXM 0030000 /* non-existent memory (which bit?) */ +#define DMF_LIN 0003400 /* transmit line number */ +#define DMF_RI 0000200 /* receiver interrupt */ +#define DMF_RIE 0000100 /* receiver interrupt enable */ +#define DMF_CLR 0000040 /* master reset */ +#define DMF_IAD 0000037 /* indirect address register */ + +#define DMF_IE (DMF_TIE|DMF_RIE) + +#define DMFIR_RMSTSC 000 /* select rmstsc indirect register */ +#define DMFIR_TBUF 000 /* select tbuf indirect register */ +#define DMFIR_LCR 010 /* select lcr indirect register */ +#define DMFIR_TBA 020 /* select tba indirect register */ +#define DMFIR_TCC 030 /* select tcc indirect register */ + +/* bits in dmflpr */ +#define BITS6 0010 /* 6 bits per character */ +#define BITS7 0020 /* 7 bits per character */ +#define BITS8 0030 /* 8 bits per character */ +#define PENABLE 0040 /* parity enable */ +#define EPAR 0100 /* even parity */ +#define TWOSB 0200 /* two stop bits */ + +#define DMF_SILOCNT 32 /* size of DMF output silo (per line) */ + +/* bits in dmfrbuf */ +#define DMF_DSC 0004000 /* data set change */ +#define DMF_PE 0010000 /* parity error */ +#define DMF_FE 0020000 /* framing error */ +#define DMF_DO 0040000 /* data overrun */ + +/* bits in dmfrmstsc */ +#define DMF_TSC 0x00ff /* transmit silo count */ +#define DMF_USRR 0x0400 /* user modem signal (pin 25) */ +#define DMF_SR 0x0800 /* secondary receive */ +#define DMF_CTS 0x1000 /* clear to send */ +#define DMF_CAR 0x2000 /* carrier detect */ +#define DMF_RNG 0x4000 /* ring */ +#define DMF_DSR 0x8000 /* data set ready */ + +/* bits in dmflctms (tms half) */ +#define DMF_USRW 0x0100 /* user modem signal (pin 18) */ +#define DMF_DTR 0x0200 /* data terminal ready */ +#define DMF_RATE 0x0400 /* data signal rate select */ +#define DMF_SRTS 0x0800 /* secondary request to send (dmf) */ +#define DMF_RTS 0x1000 /* request to send */ +#define DMF_PREEMPT 0x8000 /* preempt output */ + +/* bits in dmflctms (lc half) */ +#define DMF_MIE 0040 /* modem interrupt enable */ +#define DMF_FLUSH 0020 /* flush transmit silo */ +#define DMF_BRK 0010 /* send break bit */ +#define DMF_RE 0004 /* receive enable */ +#define DMF_AUTOX 0002 /* auto XON/XOFF */ +#define DMF_TE 0001 /* transmit enable */ + +#define DMF_ENA (DMF_MIE|DMF_RE|DMF_TE) + +/* flags for modem control */ +#define DMF_ON (DMF_DTR|DMF_RTS|DMF_ENA) +#define DMF_OFF 0 + +/* bits added to dm lsr for DMGET/DMSET */ +#define DML_USR 0001000 /* usr modem sig, not a real DM bit */ +#define DML_DSR 0000400 /* data set ready, not a real DM bit */ Index: sys/vax/uba/dmz.c ================================================================== --- sys/vax/uba/dmz.c +++ sys/vax/uba/dmz.c @@ -1,11 +1,11 @@ /* * Copyright (c) 1985, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)dmz.c 7.5 (Berkeley) 04/25/89 + * @(#)dmz.c 7.6 (Berkeley) 09/06/89 */ /* * DMZ-32 driver */ @@ -40,11 +40,10 @@ #include "dmxreg.h" #include "dmzreg.h" #include "dmreg.h" extern int dmx_timeout; /* silo timeout, in ms */ -extern char dmx_speeds[]; int dmzstart(); /* * The clist space is mapped by one terminal driver onto each UNIBUS. * The identity of the board which allocated resources is recorded, @@ -137,10 +136,11 @@ register struct tty *tp; struct dmx_softc *sc; int unit, dmz; struct uba_device *ui; int s; + int dmxparam(); unit = minor(dev); dmz = DMZ(unit); if (unit >= NDMZ*24 || (ui = dmzinfo[dmz])== 0 || ui->ui_alive == 0) return (ENXIO); @@ -148,10 +148,11 @@ tp = &dmz_tty[unit]; sc = &dmz_softc[unit / 8]; tp->t_addr = (caddr_t)sc->dmx_octet; tp->t_oproc = dmzstart; tp->t_dev = dev; /* needed before dmxopen */ + tp->t_param = dmxparam; /* * While setting up state for this uba, * block uba resets which can clear the state. */ @@ -161,11 +162,11 @@ cbase[ui->ui_ubanum] = UBAI_ADDR(uballoc(ui->ui_ubanum, (caddr_t)cfree, nclist*sizeof(struct cblock), 0)); } splx(s); - return (dmxopen(tp, sc)); + return (dmxopen(tp, sc, flag)); } /* * Close a DMZ32 line. */ @@ -176,18 +177,18 @@ { dmxclose(&dmz_tty[minor(dev)]); } -dmzread(dev, uio) +dmzread(dev, uio, flag) dev_t dev; struct uio *uio; { register struct tty *tp; tp = &dmz_tty[minor(dev)]; - return ((*linesw[tp->t_line].l_read)(tp, uio)); + return ((*linesw[tp->t_line].l_read)(tp, uio, flag)); } dmzwrite(dev, uio) dev_t dev; struct uio *uio; @@ -335,14 +336,14 @@ * reset it. */ tp = &dmz_tty[dmz * 24]; for (i = 0; i < 24; i++, tp++) { if (tp->t_state & (TS_ISOPEN | TS_WOPEN)) { - dmxparam(tp); + dmxparam(tp, &tp->t_termios); (void) dmxmctl(tp, DMF_ON, DMSET); tp->t_state &= ~TS_BUSY; dmzstart(tp); } } } } #endif Index: sys/vax/uba/dz.c ================================================================== --- sys/vax/uba/dz.c +++ sys/vax/uba/dz.c @@ -1,24 +1,20 @@ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)dz.c 7.3 (Berkeley) 04/25/89 + * @(#)dz.c 7.4 (Berkeley) 09/06/89 */ #include "dz.h" #if NDZ > 0 /* * DZ-11/DZ-32 Driver * * This driver mimics dh.c; see it for explanation of common code. */ -#include "bk.h" - -#include "machine/pte.h" - #include "param.h" #include "systm.h" #include "ioctl.h" #include "tty.h" #include "dir.h" @@ -35,10 +31,11 @@ #include "syslog.h" #include "pdma.h" #include "ubavar.h" #include "dzreg.h" +#include "machine/pte.h" /* * Driver information for auto-configuration stuff. */ int dzprobe(), dzattach(), dzrint(); @@ -80,19 +77,35 @@ /* * Pdma structures for fast output code */ struct pdma dzpdma[NDZLINE]; -char dz_speeds[] = - { 0,020,021,022,023,024,0,025,026,027,030,032,034,036,037,0 }; +struct speedtab dzspeedtab[] = { + 0, 0, + 50, 020, + 75, 021, + 110, 022, + 134, 023, + 150, 024, + 300, 025, + 600, 026, + 1200, 027, + 1800, 030, + 2400, 032, + 4800, 034, + 9600, 036, + 19200, 037, + EXTA, 037, + -1, -1 +}; #ifndef PORTSELECTOR -#define ISPEED B9600 -#define IFLAGS (EVENP|ODDP|ECHO) +#define ISPEED TTYDEF_SPEED +#define LFLAG TTYDEF_LFLAG #else #define ISPEED B4800 -#define IFLAGS (EVENP|ODDP) +#define LFLAG (TTYDEF_LFLAG&~ECHO) #endif dzprobe(reg) caddr_t reg; { @@ -141,36 +154,43 @@ dzopen(dev, flag) dev_t dev; { register struct tty *tp; register int unit; + int dzparam(); unit = minor(dev); if (unit >= dz_cnt || dzpdma[unit].p_addr == 0) return (ENXIO); tp = &dz_tty[unit]; tp->t_addr = (caddr_t)&dzpdma[unit]; tp->t_oproc = dzstart; + tp->t_param = dzparam; + tp->t_dev = dev; if ((tp->t_state & TS_ISOPEN) == 0) { ttychars(tp); #ifndef PORTSELECTOR if (tp->t_ispeed == 0) { -#else - tp->t_state |= TS_HUPCLS; -#endif PORTSELECTOR - tp->t_ispeed = ISPEED; - tp->t_ospeed = ISPEED; - tp->t_flags = IFLAGS; -#ifndef PORTSELECTOR - } -#endif PORTSELECTOR - dzparam(unit); +#endif + tp->t_iflag = TTYDEF_IFLAG; + tp->t_oflag = TTYDEF_OFLAG; + tp->t_cflag = TTYDEF_CFLAG; + tp->t_lflag = LFLAG; + tp->t_ispeed = tp->t_ospeed = ISPEED; +#ifdef PORTSELECTOR + tp->t_cflag |= HUPCL; +#else + } +#endif + dzparam(tp, &tp->t_termios); + ttsetwater(tp); } else if (tp->t_state&TS_XCLUDE && u.u_uid != 0) return (EBUSY); (void) dzmctl(dev, DZ_ON, DMSET); (void) spl5(); - while ((tp->t_state & TS_CARR_ON) == 0) { + while (!(flag&O_NONBLOCK) && !(tp->t_cflag&CLOCAL) && + (tp->t_state & TS_CARR_ON) == 0) { tp->t_state |= TS_WOPEN; sleep((caddr_t)&tp->t_rawq, TTIPRI); } (void) spl0(); return ((*linesw[tp->t_line].l_open)(dev, tp)); @@ -192,41 +212,42 @@ dzaddr = dzpdma[unit].p_addr; if (dzaddr->dzcsr&DZ_32) (void) dzmctl(dev, DZ_BRK, DMBIC); else dzaddr->dzbrk = (dz_brk[dz] &= ~(1 << (unit&07))); - if ((tp->t_state&(TS_HUPCLS|TS_WOPEN)) || (tp->t_state&TS_ISOPEN) == 0) + if (tp->t_cflag&HUPCL || tp->t_state&TS_WOPEN || + (tp->t_state&TS_ISOPEN) == 0) (void) dzmctl(dev, DZ_OFF, DMSET); ttyclose(tp); } -dzread(dev, uio) +dzread(dev, uio, flag) dev_t dev; struct uio *uio; { register struct tty *tp; tp = &dz_tty[minor(dev)]; - return ((*linesw[tp->t_line].l_read)(tp, uio)); + return ((*linesw[tp->t_line].l_read)(tp, uio, flag)); } -dzwrite(dev, uio) +dzwrite(dev, uio, flag) dev_t dev; struct uio *uio; { register struct tty *tp; tp = &dz_tty[minor(dev)]; - return ((*linesw[tp->t_line].l_write)(tp, uio)); + return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); } /*ARGSUSED*/ dzrint(dz) int dz; { register struct tty *tp; - register int c; + register int c, cc; register struct dzdevice *dzaddr; register struct tty *tp0; register int unit; int overrun = 0; @@ -250,10 +271,11 @@ (void)(*linesw[tp->t_line].l_modem)(tp, 1); } else if ((*linesw[tp->t_line].l_modem)(tp, 0) == 0) dzaddr->dzlcs = DZ_ACK|(c&7); } while ((c = dzaddr->dzrbuf) < 0) { /* char present */ + cc = c&0xff; dzchars[dz]++; tp = tp0 + ((c>>8)&07); if (tp >= &dz_tty[dz_cnt]) continue; if ((tp->t_state & TS_ISOPEN) == 0) { @@ -262,29 +284,18 @@ if ((tp->t_state&TS_WOPEN) == 0) #endif continue; } if (c&DZ_FE) - if (tp->t_flags & RAW) - c = 0; - else - c = tp->t_intrc; + cc |= TTY_FE; if (c&DZ_DO && overrun == 0) { log(LOG_WARNING, "dz%d,%d: silo overflow\n", dz, (c>>8)&7); overrun = 1; } if (c&DZ_PE) - if (((tp->t_flags & (EVENP|ODDP)) == EVENP) - || ((tp->t_flags & (EVENP|ODDP)) == ODDP)) - continue; -#if NBK > 0 - if (tp->t_line == NETLDISC) { - c &= 0177; - BKINPUT(c, tp); - } else -#endif - (*linesw[tp->t_line].l_rint)(c, tp); + cc |= TTY_PE; + (*linesw[tp->t_line].l_rint)(cc, tp); } } /*ARGSUSED*/ dzioctl(dev, cmd, data, flag) @@ -300,16 +311,13 @@ tp = &dz_tty[unit]; error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag); if (error >= 0) return (error); error = ttioctl(tp, cmd, data, flag); - if (error >= 0) { - if (cmd == TIOCSETP || cmd == TIOCSETN || cmd == TIOCLBIS || - cmd == TIOCLBIC || cmd == TIOCLSET) - dzparam(unit); + if (error >= 0) return (error); - } + switch (cmd) { case TIOCSBRK: dzaddr = ((struct pdma *)(tp->t_addr))->p_addr; if (dzaddr->dzcsr&DZ_32) @@ -380,38 +388,52 @@ if (bits & DZ_ST) b |= DML_ST; if (bits & DZ_RTS) b |= DML_RTS; return(b); } -dzparam(unit) - register int unit; -{ +dzparam(tp, t) register struct tty *tp; + register struct termios *t; +{ register struct dzdevice *dzaddr; register int lpr; - - tp = &dz_tty[unit]; + register int cflag = t->c_cflag; + int unit = minor(tp->t_dev); + int ospeed = ttspeedtab(t->c_ospeed, dzspeedtab); + + /* check requested parameters */ + if (ospeed < 0 || (t->c_ispeed && t->c_ispeed != t->c_ospeed) || + (cflag&CSIZE) == CS5 || (cflag&CSIZE) == CS6) + return(EINVAL); + /* and copy to tty */ + tp->t_ispeed = t->c_ispeed; + tp->t_ospeed = t->c_ospeed; + tp->t_cflag = cflag; + dzaddr = dzpdma[unit].p_addr; if (dzsilos & (1 << (unit >> 3))) dzaddr->dzcsr = DZ_IEN | DZ_SAE; else dzaddr->dzcsr = DZ_IEN; dzact |= (1<<(unit>>3)); - if (tp->t_ispeed == 0) { + if (ospeed == 0) { (void) dzmctl(unit, DZ_OFF, DMSET); /* hang up line */ return; } - lpr = (dz_speeds[tp->t_ispeed]<<8) | (unit & 07); - if (tp->t_flags & (RAW|LITOUT|PASS8)) - lpr |= BITS8; + lpr = (ospeed<<8) | (unit & 07); + if ((cflag&CSIZE) == CS7) + lpr |= BITS7; else - lpr |= (BITS7|PENABLE); - if ((tp->t_flags & EVENP) == 0) + lpr |= BITS8; + if (cflag&PARENB) + lpr |= PENABLE; + if (cflag&PARODD) lpr |= OPAR; - if (tp->t_ispeed == B110) + if (cflag&CSTOPB) lpr |= TWOSB; dzaddr->dzlpr = lpr; + return 0; } dzxint(tp) register struct tty *tp; { @@ -450,11 +472,11 @@ dp = (struct pdma *)tp->t_addr; dzaddr = dp->p_addr; s = spl5(); if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP)) goto out; - if (tp->t_outq.c_cc <= TTLOWAT(tp)) { + if (tp->t_outq.c_cc <= tp->t_lowat) { if (tp->t_state&TS_ASLEEP) { tp->t_state &= ~TS_ASLEEP; wakeup((caddr_t)&tp->t_outq); } if (tp->t_wsel) { Index: sys/vax/uba/qv.c ================================================================== --- sys/vax/uba/qv.c +++ sys/vax/uba/qv.c @@ -12,11 +12,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)qv.c 1.10 (Berkeley) 04/25/89 + * @(#)qv.c 1.11 (Berkeley) 09/05/89 */ /* * derived from: @(#)qv.c 1.8 (ULTRIX) 8/21/85 */ @@ -116,11 +116,10 @@ #include "qvioctl.h" #include "tty.h" #include "map.h" #include "buf.h" #include "vm.h" -#include "bk.h" #include "clist.h" #include "file.h" #include "uio.h" #include "kernel.h" #include "syslog.h" @@ -909,11 +908,11 @@ /* * If there are sleepers, and output has drained below low * water mark, wake up the sleepers. */ - if ( tp->t_outq.c_cc<=TTLOWAT(tp) ) { + if ( tp->t_outq.c_cc<= tp->t_lowat ) { if (tp->t_state&TS_ASLEEP){ tp->t_state &= ~TS_ASLEEP; wakeup((caddr_t)&tp->t_outq); } } Index: sys/vax/uba/uda.c ================================================================== --- sys/vax/uba/uda.c +++ sys/vax/uba/uda.c @@ -15,11 +15,11 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)uda.c 7.23 (Berkeley) 05/29/89 + * @(#)uda.c 7.24.1.1 (Berkeley) 09/04/89 */ /* * UDA50/MSCP device driver */ @@ -515,11 +515,11 @@ return (1); } /* * Attach a found slave. Make sure the watchdog timer is running. - * If this disk is being profiled, fill in the `wpms' value (used by + * If this disk is being profiled, fill in the `mspw' value (used by * what?). Set up the inverting pointer, and attempt to bring the * drive on line and read its label. */ udaattach(ui) register struct uba_device *ui; @@ -543,11 +543,11 @@ if (MSCP_MID_ECH(1, ra_info[unit].ra_mediaid) == 'X' - '@') { printf(": floppy"); return; } if (ui->ui_dk >= 0) - dk_wpms[ui->ui_dk] = (60 * 31 * 256); /* approx */ + dk_mspw[ui->ui_dk] = 1.0 / (60 * 31 * 256); /* approx */ udaip[ui->ui_ctlr][ui->ui_slave] = ui; if (uda_rainit(ui, 0)) printf(": offline"); else if (ra_info[unit].ra_state == OPEN) { @@ -825,16 +825,18 @@ return (0); ra->ra_state = RDLABEL; /* * Set up default sizes until we have the label, or longer * if there is none. Set secpercyl, as readdisklabel wants - * to compute b_cylin (although we do not need it). + * to compute b_cylin (although we do not need it), and set + * nsectors in case diskerr is called. */ lp->d_secpercyl = 1; lp->d_npartitions = 1; lp->d_secsize = 512; lp->d_secperunit = ra->ra_dsize; + lp->d_nsectors = ra->ra_geom.rg_nsectors; lp->d_partitions[0].p_size = lp->d_secperunit; lp->d_partitions[0].p_offset = 0; /* * Read pack label. @@ -1904,12 +1906,10 @@ * Dump all of physical memory, or as much as will fit in the * space provided. */ start = 0; num = maxfree; - if (dumplo < 0) - return (EINVAL); if (dumplo + num >= maxsz) num = maxsz - dumplo; blkoff += dumplo; /* Index: sys/vax/vax/cons.c ================================================================== --- sys/vax/vax/cons.c +++ sys/vax/vax/cons.c @@ -1,11 +1,11 @@ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)cons.c 7.6 (Berkeley) 06/27/89 + * @(#)cons.c 7.8 (Berkeley) 09/05/89 */ /* * VAX console driver (and floppy interface) */ @@ -125,11 +125,11 @@ register int c; register struct tty *tp; if (cnpolling) return; - c = mfpr(RXDB); + c = mfpr(RXDB)&0xff; if (c&RXDB_ID) { #if VAX780 if (cpu == VAX_780) cnrfl(c); #endif @@ -138,17 +138,19 @@ tp = &cons; #ifdef KADB if (!kdbrintr(c, tp)) #endif if ((tp->t_cflag&CSIZE) == CS7) { +#ifdef notyet if (tp->t_cflag&PARENB) { if ((tp->t_cflag&PARODD) && (partab[c&0177]&0200) == (c&0200)) c |= TTY_PE; else if ((partab[c&0177]&0200) != (c&0200)) c |= TTY_PE; } +#endif c &= ~0200; } (*linesw[tp->t_line].l_rint)(c, tp); } @@ -202,11 +204,11 @@ register int c, s; s = spl5(); if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP)) goto out; - if (tp->t_outq.c_cc <= TTLOWAT(tp)) { + if (tp->t_outq.c_cc <= tp->t_lowat) { if (tp->t_state&TS_ASLEEP) { tp->t_state &= ~TS_ASLEEP; wakeup((caddr_t)&tp->t_outq); } if (tp->t_wsel) { @@ -225,16 +227,18 @@ c &= 0177; c |= (tp->t_cflag&PARODD ? ~partab[c] : partab[c]) & 0200; } #else if ((tp->t_cflag&CSIZE) == CS7) { +#ifdef notyet if (tp->t_cflag&PARENB) { if (tp->t_cflag&PARODD) c = (~(partab[c&0177])&0200)|(c&0177); else c = (partab[c&0177]&0200)|(c&0177); } else +#endif c &= 0177; } #endif mtpr(TXDB, c); consdone = 0; Index: sys/vax/vax/genassym.c ================================================================== --- sys/vax/vax/genassym.c +++ sys/vax/vax/genassym.c @@ -1,11 +1,11 @@ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)genassym.c 7.4 (Berkeley) 07/01/89 + * @(#)genassym.c 7.5 (Berkeley) 09/04/89 */ #define KERNEL #define VAX780 1 #define VAX750 1 @@ -80,10 +80,11 @@ printf("#define\tCLSIZE %d\n", CLSIZE); printf("#define\tMAXPHYS %d\n", MAXPHYS); printf("#define\tSYSPTSIZE %d\n", SYSPTSIZE); printf("#define\tUSRPTSIZE %d\n", USRPTSIZE); printf("#define\tMSGBUFPTECNT %d\n", btoc(sizeof (struct msgbuf))); + printf("#define\tMCLBYTES %d\n", MCLBYTES); printf("#define\tNMBCLUSTERS %d\n", NMBCLUSTERS); printf("#define\tU_PROCP %d\n", &up->u_procp); printf("#define\tU_RU %d\n", &up->u_ru); printf("#define\tRU_MINFLT %d\n", &rup->ru_minflt); printf("#else\n"); Index: sys/vax/vax/in_cksum.c ================================================================== --- sys/vax/vax/in_cksum.c +++ sys/vax/vax/in_cksum.c @@ -12,14 +12,14 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)in_cksum.c 7.3 (Berkeley) 06/29/88 + * @(#)in_cksum.c 7.4 (Berkeley) 09/04/89 */ -#include "types.h" +#include "param.h" #include "mbuf.h" /* * Checksum routine for Internet Protocol family headers (VAX Version). * Index: sys/vax/vax/locore.s ================================================================== --- sys/vax/vax/locore.s +++ sys/vax/vax/locore.s @@ -1,18 +1,17 @@ /* * Copyright (c) 1980, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)locore.s 7.19 (Berkeley) 09/03/89 + * @(#)locore.s 7.19.1.1 (Berkeley) 09/04/89 */ #include "psl.h" #include "pte.h" #include "errno.h" -#include "syscall.h" #include "cmap.h" #include "mtpr.h" #include "trap.h" #include "cpu.h" @@ -870,24 +869,10 @@ */ SYSMAP(kmempt ,kmembase ,300*CLSIZE ) #ifdef GPROF SYSMAP(profmap ,profbase ,600*CLSIZE ) #endif -#ifdef MFS -#include "../ufs/mfsiom.h" - /* - * Used by the mfs_doio() routine for physical I/O - */ - SYSMAP(Mfsiomap ,mfsiobuf ,MFS_MAPREG ) -#endif /* MFS */ -#ifdef NFS -#include "../nfs/nfsiom.h" - /* - * Used by the nfs_doio() routine for physical I/O - */ - SYSMAP(Nfsiomap ,nfsiobuf ,NFS_MAPREG ) -#endif /* NFS */ SYSMAP(ekmempt ,kmemlimit ,0 ) SYSMAP(UMBAbeg ,umbabeg ,0 ) SYSMAP(Nexmap ,nexus ,16*MAXNNEXUS ) #ifdef QBA @@ -1106,16 +1091,18 @@ /* signal trampoline code: it is known that this code takes exactly 19 bytes */ /* in ../vax/pcb.h and in the movc3 above */ sigcode: calls $4,8(pc) # params pushed by sendsig movl sp,ap # calls frame built by sendsig - chmk $SYS_sigcleanup # cleanup mask and onsigstack + chmk $103 # cleanup mask and onsigstack halt # sigreturn() does not return! .word 0x3f # registers 0-5 callg (ap),*16(ap) # call the signal handler ret # return to code above + .set exec,11 + .set exit,1 .globl _icode .globl _initflags .globl _szicode /* * Icode is copied out to process 1 to exec /etc/init. @@ -1124,13 +1111,13 @@ _icode: pushab b`argv-l0(pc) l0: pushab b`init-l1(pc) l1: pushl $2 movl sp,ap - chmk $SYS_exec + chmk $exec pushl r0 - chmk $SYS_exit + chmk $exit init: .asciz "/sbin/init" .align 2 _initflags: .long 0 Index: sys/vax/vax/ns_cksum.c ================================================================== --- sys/vax/vax/ns_cksum.c +++ sys/vax/vax/ns_cksum.c @@ -12,14 +12,14 @@ * from this software without specific prior written permission. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#)ns_cksum.c 7.3 (Berkeley) 06/29/88 + * @(#)ns_cksum.c 7.4 (Berkeley) 09/04/89 */ -#include "types.h" +#include "param.h" #include "mbuf.h" /* * Checksum routine for Network Systems Protocol Packets (VAX Version). Index: sys/vax/vax/trap.c ================================================================== --- sys/vax/vax/trap.c +++ sys/vax/vax/trap.c @@ -1,19 +1,20 @@ /* * Copyright (c) 1982, 1986 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * - * @(#)trap.c 7.5 (Berkeley) 09/03/89 + * @(#)trap.c 7.3.1.1 (Berkeley) 09/04/89 */ #include "psl.h" #include "reg.h" #include "pte.h" #include "param.h" #include "systm.h" +#include "dir.h" #include "user.h" #include "assym.s" #include "proc.h" #include "seg.h" #include "trap.h" @@ -58,11 +59,10 @@ unsigned code; int pc, psl; { register int *locr0 = ((int *)&psl)-PS; register int i; - unsigned ucode = code; register struct proc *p; struct timeval syst; syst = u.u_ru.ru_stime; if (USERMODE(locr0[PS])) { @@ -87,11 +87,11 @@ break; case T_PRIVINFLT+USER: /* privileged instruction fault */ case T_RESADFLT+USER: /* reserved addressing fault */ case T_RESOPFLT+USER: /* reserved operand fault */ - ucode = type &~ USER; + u.u_code = type &~ USER; i = SIGILL; break; case T_ASTFLT+USER: astoff(); @@ -100,10 +100,11 @@ u.u_procp->p_flag &= ~SOWEUPC; } goto out; case T_ARITHTRAP+USER: + u.u_code = code; i = SIGFPE; break; /* * If the user SP is above the stack segment, @@ -138,14 +139,15 @@ i = SIGEMT; break; case T_COMPATFLT+USER: /* compatibility mode fault */ u.u_acflag |= ACOMPAT; + u.u_code = code; i = SIGILL; break; } - trapsignal(i, ucode); + psignal(u.u_procp, i); out: p = u.u_procp; if (p->p_cursig || ISSIG(p)) psig(); p->p_pri = p->p_usrpri; @@ -189,11 +191,11 @@ { register int *locr0 = ((int *)&psl)-PS; register caddr_t params; /* known to be r10 below */ register int i; /* known to be r9 below */ register struct sysent *callp; - register struct proc *p; + register struct proc *p = u.u_procp; int opc; struct timeval syst; syst = u.u_ru.ru_stime; if (!USERMODE(locr0[PS])) @@ -247,11 +249,11 @@ if (i) putchar(')', 0); putchar('\n', 0); } #endif - (*(callp->sy_call))(&u); + (*(callp->sy_call))(); } if (u.u_eosys == NORMALRETURN) { if (u.u_error) { locr0[R0] = u.u_error; locr0[PS] |= PSL_C; /* carry bit */ @@ -292,5 +294,17 @@ if (ticks) addupc(locr0[PC], &u.u_prof, ticks); } curpri = p->p_pri; } + +/* + * nonexistent system call-- signal process (may want to handle it) + * flag error if process won't see signal immediately + * Q: should we do that all the time ?? + */ +nosys() +{ + if (u.u_signal[SIGSYS] == SIG_IGN || u.u_signal[SIGSYS] == SIG_HOLD) + u.u_error = EINVAL; + psignal(u.u_procp, SIGSYS); +} Index: usr.bin/renice/renice.c ================================================================== --- usr.bin/renice/renice.c +++ usr.bin/renice/renice.c @@ -1,20 +1,31 @@ /* - * Copyright (c) 1980 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. + * Copyright (c) 1983 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef lint char copyright[] = -"@(#) Copyright (c) 1980 Regents of the University of California.\n\ +"@(#) Copyright (c) 1989 The Regents of the University of California.\n\ All rights reserved.\n"; -#endif not lint +#endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)renice.c 5.1 (Berkeley) 05/28/85"; -#endif not lint +static char sccsid[] = "@(#)renice.c 5.2 (Berkeley) 09/05/89"; +#endif /* not lint */ #include #include #include #include Index: usr.bin/xinstall/xinstall.c ================================================================== --- usr.bin/xinstall/xinstall.c +++ usr.bin/xinstall/xinstall.c @@ -20,11 +20,11 @@ "@(#) Copyright (c) 1987 Regents of the University of California.\n\ All rights reserved.\n"; #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)xinstall.c 5.14 (Berkeley) 05/10/89"; +static char sccsid[] = "@(#)xinstall.c 5.15 (Berkeley) 09/04/89"; #endif /* not lint */ #include #include #include @@ -174,19 +174,19 @@ copy(from_fd, from_name, to_fd, to_name); (void)close(from_fd); if (!docopy) (void)unlink(from_name); } - /* set owner, group, mode for target */ - if (fchmod(to_fd, mode)) { - PERROR("install: fchmod: ", to_name); - bad(); - } if ((group || owner) && fchown(to_fd, owner ? pp->pw_uid : -1, group ? gp->gr_gid : -1)) { PERROR("install: fchown: ", to_name); bad(); + } + /* set owner, group, mode for target */ + if (fchmod(to_fd, mode)) { + PERROR("install: fchmod: ", to_name); + bad(); } (void)close(to_fd); } /* ADDED usr.sbin/mtree/Makefile Index: usr.sbin/mtree/Makefile ================================================================== --- usr.sbin/mtree/Makefile +++ usr.sbin/mtree/Makefile @@ -0,0 +1,47 @@ +# +# Copyright (c) 1989 The Regents of the University of California. +# All rights reserved. +# +# Redistribution and use in source and binary forms are permitted +# provided that the above copyright notice and this paragraph are +# duplicated in all such forms and that any documentation, +# advertising materials, and other materials related to such +# distribution and use acknowledge that the software was developed +# by the University of California, Berkeley. The name of the +# University may not be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +# +# @(#)Makefile 5.1 (Berkeley) 09/04/89 +# +CFLAGS= -O +LIBC= /lib/libc.a +SRCS= compare.c cwalk.c mtree.c spec.c util.c +OBJS= compare.o cwalk.o mtree.o spec.o util.o +MAN= mtree.0 + +all: mtree + +mtree: ${OBJS} ${LIBC} + ${CC} -o $@ ${CFLAGS} ${OBJS} + +clean: + rm -f ${MAN} ${OBJS} core mtree + +cleandir: + rm -f ${OBJS} core mtree tags .depend + +depend: ${SRCS} + mkdep ${CFLAGS} ${SRCS} + +install: ${MAN} + install -s -o bin -g bin -m 755 mtree ${DESTDIR}/usr/sbin + install -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 + +lint: ${SRCS} + lint ${CFLAGS} ${SRCS} + +tags: ${SRCS} + ctags ${SRCS} ADDED usr.sbin/mtree/compare.c Index: usr.sbin/mtree/compare.c ================================================================== --- usr.sbin/mtree/compare.c +++ usr.sbin/mtree/compare.c @@ -0,0 +1,171 @@ +/* + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static char sccsid[] = "@(#)compare.c 5.1 (Berkeley) 09/04/89"; +#endif /* not lint */ + +#include +#include +#include +#include +#include "mtree.h" + +#define LABEL { \ + if (!label++) \ + (void)printf("%s: ", path + 2); \ +} + +compare(name, s1, s2) + char *name; + register INFO *s1; + register struct stat *s2; +{ + extern int errno, exitval, uflag; + extern char path[]; + int label; + char *p, *ftype(), *inotype(), *rlink(); + + label = 0; + switch(s1->type) { + case F_BLOCK: + if (!S_ISBLK(s2->st_mode)) + goto typeerr; + break; + case F_CHAR: + if (!S_ISCHR(s2->st_mode)) + goto typeerr; + break; + case F_DIR: + if (!S_ISDIR(s2->st_mode)) + goto typeerr; + break; + case F_FILE: + if (!S_ISREG(s2->st_mode)) + goto typeerr; + break; + case F_LINK: + if (!S_ISLNK(s2->st_mode)) + goto typeerr; + break; + case F_SOCK: + if (!S_ISFIFO(s2->st_mode)) { +typeerr: LABEL; + (void)printf("\n\ttype (%s, %s)", + ftype(s1->type), inotype(s2->st_mode)); + } + break; + } + if (s1->flags&F_MODE && s1->st_mode != (s2->st_mode&07777)) { + LABEL; + (void)printf("\n\tpermissions (%#o, %#o%s", + s1->st_mode, s2->st_mode&07777, uflag ? "" : ")"); + if (uflag) + if (chmod(path, s1->st_mode)) + (void)printf(", not modified: %s)", + strerror(errno)); + else + (void)printf(", modified)"); + } + if (s1->flags&F_OWNER && s1->st_uid != s2->st_uid) { + LABEL; + (void)printf("\n\towner (%u, %u%s", + s1->st_uid, s2->st_uid, uflag ? "" : ")"); + if (uflag) + if (chown(path, s1->st_uid, -1)) + (void)printf(", not modified: %s)", + strerror(errno)); + else + (void)printf(", modified)"); + } + if (s1->flags&F_GROUP && s1->st_gid != s2->st_gid) { + LABEL; + (void)printf("\n\tgroup (%u, %u%s", + s1->st_gid, s2->st_gid, uflag ? "" : ")"); + if (uflag) + if (chown(path, -1, s1->st_gid)) + (void)printf(", not modified: %s)", + strerror(errno)); + else + (void)printf(", modified)"); + } + if (s1->flags&F_NLINK && s1->type != F_DIR && + s1->st_nlink != s2->st_nlink) { + LABEL; + (void)printf("\n\tlink count (%u, %u)", + s1->st_nlink, s2->st_nlink); + } + if (s1->flags&F_SIZE && s1->st_size != s2->st_size) { + LABEL; + (void)printf("\n\tsize (%ld, %ld)", s1->st_size, s2->st_size); + } + if (s1->flags&F_SLINK) { + p = rlink(name); + if (strcmp(p, s1->slink)) { + LABEL; + (void)printf("\n\tlink ref (%s, %s)", p, s1->slink); + } + } + if (label) { + exitval = 2; + putchar('\n'); + } +} + +char * +inotype(type) + mode_t type; +{ + switch(type&S_IFMT) { + case S_IFCHR: + return("char"); + case S_IFBLK: + return("block"); + case S_IFDIR: + return("directory"); + case S_IFREG: + return("file"); + case S_IFLNK: + return("link"); + case S_IFSOCK: + return("socket"); + default: + return("unknown"); + } + /* NOTREACHED */ +} + +char * +ftype(type) + u_int type; +{ + switch(type) { + case F_BLOCK: + return("block"); + case F_CHAR: + return("char"); + case F_DIR: + return("dir"); + case F_FILE: + return("file"); + case F_LINK: + return("link"); + case F_SOCK: + return("socket"); + } + /* NOTREACHED */ +} ADDED usr.sbin/mtree/create.c Index: usr.sbin/mtree/create.c ================================================================== --- usr.sbin/mtree/create.c +++ usr.sbin/mtree/create.c @@ -0,0 +1,276 @@ +/* + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static char sccsid[] = "@(#)create.c 5.3 (Berkeley) 09/06/89"; +#endif /* not lint */ + +#include +#include +#include +#include +#include +#include "mtree.h" + +cwalk(parent, tail) + ENTRY *parent; + register char *tail; +{ + extern ENTRY *root; + extern dev_t device; + extern int dflag, xflag, errno, alphasort(); + extern char path[]; + register ENTRY *centry, *level; + struct dirent *dp, **dir_list; + struct stat sbuf; + int cnt, dir_cnt; + char *emalloc(), *rlink(); + + *tail++ = '/'; + dir_cnt = scandir(".", &dir_list, NULL, alphasort); + if (dir_cnt == -1 || xflag && lstat(".", &sbuf)) { + (void)fprintf(stderr, "mtree: %s: %s\n", path + 2, + strerror(errno)); + exit(1); + } + device = sbuf.st_dev; + for (cnt = 0; cnt < dir_cnt; ++cnt) { + dp = dir_list[cnt]; + if (dp->d_name[0] == '.' && + (!dp->d_name[1] || dp->d_name[1] == '.' && !dp->d_name[2])) + continue; + bcopy(dp->d_name, tail, dp->d_namlen + 1); + if (lstat(dp->d_name, &sbuf)) { + (void)fprintf(stderr, "mtree: %s: %s\n", + path + 2, strerror(errno)); + exit(1); + } + if (dflag && !S_ISDIR(sbuf.st_mode)) + continue; + + centry = (ENTRY *)emalloc(sizeof(ENTRY)); + if (!(centry->name = strdup(dp->d_name))) + nomem(); + centry->nlen = dp->d_namlen; + + switch(sbuf.st_mode&S_IFMT) { + case S_IFDIR: + centry->info.type = F_DIR; + break; + case S_IFCHR: + centry->info.type = F_CHAR; + break; + case S_IFBLK: + centry->info.type = F_BLOCK; + break; + case S_IFREG: + centry->info.type = F_FILE; + break; + case S_IFLNK: + centry->info.type = F_LINK; + centry->info.slink = strdup(rlink(dp->d_name)); + break; + case S_IFSOCK: + centry->info.type = F_SOCK; + break; + default: + (void)fprintf(stderr, "mtree: unknown file type %s.\n", + path + 2); + exit(1); + } + centry->info.st_uid = sbuf.st_uid; + centry->info.st_gid = sbuf.st_gid; + centry->info.st_size = sbuf.st_size; + centry->info.st_mode = sbuf.st_mode&07777; + centry->info.st_nlink = sbuf.st_nlink; + centry->info.st_uid = sbuf.st_uid; + + if (!root) { + level = root = centry; + root->parent = root->child = NULL; + } + else if (parent) { + centry->parent = parent; + parent->child = centry; + level = centry; + parent = NULL; + } + else { + centry->parent = level->parent; + level = level->next = centry; + } + stats(¢ry->info); + if (!S_ISDIR(sbuf.st_mode) || xflag && device != sbuf.st_dev) + continue; + if (chdir(dp->d_name)) { + (void)fprintf(stderr, "mtree: %s: %s\n", path + 2, + strerror(errno)); + exit(1); + } + cwalk(level, tail + dp->d_namlen); + if (chdir("..")) { + (void)fprintf(stderr, "mtree: ..: %s\n", + strerror(errno)); + exit(1); + } + } +} + +#define LABEL { \ + if (!label++) \ + (void)printf("%s", level->nlen > 7 ? "\t" : "\t\t"); \ + else \ + (void)putchar(' '); \ +} + +extern mode_t dmode; /* default directory mode */ +extern mode_t fmode; /* default file mode */ +uid_t uid, gid; /* default owner, group */ +u_int type; +pwalk(level, tabs) + ENTRY *level; + int tabs; +{ + INFO *ip; + register int cnt; + int label; + char *ftype(); + + for (; level; level = level->next) { + for (cnt = tabs; cnt--; ) + (void)putchar('\t'); + (void)printf("%s", level->name); + label = 0; + if ((ip = &level->info)->type != type) { + LABEL; + (void)printf("type=%s", ftype(ip->type)); + } + if (ip->st_uid != uid) { + LABEL; + (void)printf("owner=%u", ip->st_uid); + } + if (ip->st_gid != gid) { + LABEL; + (void)printf("group=%u", ip->st_gid); + } + if (ip->type == F_DIR) { + if (ip->st_mode != dmode) { + LABEL; + (void)printf("mode=%o", ip->st_mode); + } + } else { + if (ip->st_mode != fmode) { + LABEL; + (void)printf("mode=%o", ip->st_mode); + } + if (ip->st_nlink != 1) { + LABEL; + (void)printf("nlink=%u", ip->st_nlink); + } + } + LABEL; + (void)printf("size=%ld", ip->st_size); + if (ip->slink) + (void)printf(" link=%s", ip->slink); + (void)putchar('\n'); + if (level->child) + pwalk(level->child, tabs + 1); + if (ip->type == F_DIR) { + for (cnt = tabs; cnt--; ) + (void)putchar('\t'); + (void)printf("..\n"); + } + } +} + +ID *uhead; +ID *ghead; +u_long dmodes[0777 + 1]; +u_long fmodes[0777 + 1]; + +stats(ip) + INFO *ip; +{ + register ID *p; + + if (ip->type == F_DIR) + ++dmodes[ip->st_mode&0777]; + else + ++fmodes[ip->st_mode&0777]; + for (p = uhead;; p = p->next) + if (!p) { + p = (ID *)emalloc(sizeof(ID)); + p->id = ip->st_uid; + p->next = uhead; + uhead = p; + break; + } else if (p->id == ip->st_uid) { + ++p->cnt; + break; + } + for (p = ghead;; p = p->next) + if (!p) { + p = (ID *)emalloc(sizeof(ID)); + p->id = ip->st_gid; + p->next = ghead; + ghead = p; + break; + } else if (p->id == ip->st_gid) { + ++p->cnt; + break; + } +} + +shostats() +{ + register ID *p; + register mode_t cnt; + register u_long max; + + for (max = 0, cnt = 0777; cnt; --cnt) + if (dmodes[cnt] > max) { + max = dmodes[cnt]; + dmode = cnt; + } + (void)printf("/set dmode=%o\n", dmode); + for (max = 0, cnt = 0777; cnt; --cnt) + if (fmodes[cnt] > max) { + max = dmodes[cnt]; + fmode = cnt; + } + (void)printf("/set fmode=%o\n", fmode); + for (max = 0, p = uhead; p; p = p->next) + if (p->cnt > max) { + max = p->cnt; + uid = p->id; + } + (void)printf("/set owner=%u\n", uid); + for (max = 0, p = ghead; p; p = p->next) + if (p->cnt > max) { + max = p->cnt; + gid = p->id; + } + (void)printf("/set group=%u\n", gid); + (void)printf("/set nlink=1\n"); + if (dflag) { + type = F_DIR; + (void)printf("/set type=dir\n\n"); + } else { + type = F_FILE; + (void)printf("/set type=file\n\n"); + } +} ADDED usr.sbin/mtree/mtree.8 Index: usr.sbin/mtree/mtree.8 ================================================================== --- usr.sbin/mtree/mtree.8 +++ usr.sbin/mtree/mtree.8 @@ -0,0 +1,228 @@ +.\" Copyright (c) 1989 The Regents of the University of California. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms are permitted +.\" provided that the above copyright notice and this paragraph are +.\" duplicated in all such forms and that any documentation, +.\" advertising materials, and other materials related to such +.\" distribution and use acknowledge that the software was developed +.\" by the University of California, Berkeley. The name of the +.\" University may not be used to endorse or promote products derived +.\" from this software without specific prior written permission. +.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +.\" +.\" @(#)mtree.8 5.2 (Berkeley) 09/05/89 +.\" +.TH MTREE 8 "" +.UC 7 +.SH NAME +mtree \- map a directory hierarchy +.SH SYNOPSIS +.B mtree +[ +.B \-cderux +] [ +.B \-f +spec ] [ +.B \-p +path ] +.SH DESCRIPTION +.I Mtree +maps a directory hierarchy, or tree, to a specification. +The +specification is read from the standard input by default, or from +the file +.I spec +if the +.I \-f +option is provided. +.I Mtree +then walks the tree specified by the +.I \-p +option, or by default, the tree rooted in the current directory, and +verifies that the tree matches the specification. +Messages are written to standard output for any nodes which exist +only in the specification or the tree and for any nodes whose +characteristics do not match those of the specification. +.PP +The options are as follows: +.TP +\-c +Print to standard output a specification for the tree. +.TP +\-d +Ignore everything except directory type nodes. +.TP +\-e +Stops +.I mtree +from objecting to nodes that are in the tree but not in the +specification. +.TP +\-r +Remove any nodes in the tree that are not described in the +specification. +.TP +\-u +The +.I \-u +option causes +.I mtree +to modify the owner, group, and permissions of existing nodes to +match the specification. +Missing directories are also created. +.TP +\-x +Don't traverse any mount points when creating a specification. +.PP +Specifications consist of ``keywords'', i.e. special strings that specify +values relating to nodes. +No keywords have default values, and if a keyword has no set value no +checks on it are performed. +The only keyword which +.B must +be set is +.BR type . +Currently supported keywords are as follows: +.TP +.B cksum +The checksum of the file using the algorithm specified by +the program +.IR cksum (1). +Ignored for any nodes other than type +.BR file . +.TP +.B dmode +The directory type node's permissions as an octal value. +This keyword may only be used globally, i.e. not as part of a node +specification line. +.TP +.B fmode +The file type node's permissions as an octal value. +This keyword may only be used globally, i.e. not as part of a node +specification line. +.TP +.B group +The group of the node; may be either numeric or symbolic. +.TP +.B mode +The current node's permissions as an octal value. +This keyword may only be used locally, i.e. not for setting a value +to be retained for future node specifications. +.TP +.B nlink +The number of hard links the node is expected to have. +Ignored for nodes of type +.BR directory . +.TP +.B owner +The owner of the node; may be either numeric or symbolic. +.TP +.B size +The size, in bytes, of the node. +Ignored for any nodes other than type +.BR file . +.TP +.B slink +The file a symbolic link is expected to reference. +Ignored for any nodes other than type +.BR link . +.TP +.B type +The type of the node; may be set to one of the following: +.TS +l l. +\fBblock\fP block special device +\fBchar\fP character special device +\fBdir\fP directory +\fBfile\fP regular file +\fBlink\fP symbolic link +\fBsocket\fP socket +.TE +.PP +There are five types of lines in a specification. +.PP +The first type sets the value of a keyword and consists of three fields: +the string +.BR /set , +a keyword, an equals sign, and the keyword's value. +Whitespace is required between the +.B set +and the keyword, but no whitespace is allowed in the rest of the line. +Once a key word is set, the value remains unchanged until either +reset or unset. +.PP +The second type of line unsets keywords and consists of two fields: +the string +.B /unset +and a keyword, separated by whitespace. +.PP +The third type of line consists of two fields: the string +.B /ignore +and a name, separated by whitespace. +This causes +.I mtree +to ignore the referenced file as well as all files below it in the tree. +.PP +The fourth type of line is a node specification and consists of the name +of a file followed by zero or more whitespace separated fields. +The name may be preceded by any amount of whitespace characters. +Each of these fields consists of a keyword, followed by an equals +sign (=), followed by the keyword's value, without intervening whitespace. +The values override, without changing, the current value of the +corresponding keyword. +.PP +The node name may contain any of the standard file name matching characters. +In this case, any file in the current directory with a name matching the +pattern will have the specification applied to it. +.PP +All paths are relative. +Any directory specification will cause the current directory path to +descend one level. +Any non-directory will be presumed to be below the current directory +path. +Which brings us to the last type of line in a specification: a line +containing just the string +.B .. +causes the current directory path to ascend one level. +.PP +Empty lines and lines whose first non-whitespace character is a hash mark +(``#'') are ignored. +.PP +.I Mtree +exits 0 on success and >0 if an error occurred or the tree did not +match the specification. +.SH "SEE ALSO" +find(1), stat(2), ftwalk(3), mkproto(8) +.SH EXAMPLE +.TS +l l l l l l. +# BSD root file system +# +/set type=file +/set owner=bin +/set group=bin +/set dmode=755 +/set fmode=555 +/set links=1 + +bin type=directory + adb + cat +\.. +/set fmode=640 +dev + MAKEDEV + kmem type=char group=kmem + null type=char group=kmem + rdk* type=char group=operator + dk* type=block group=operator +\.. +etc type=directory + disklabels type=directory + * mode=444 + \.. +\.. +.TE ADDED usr.sbin/mtree/mtree.c Index: usr.sbin/mtree/mtree.c ================================================================== --- usr.sbin/mtree/mtree.c +++ usr.sbin/mtree/mtree.c @@ -0,0 +1,240 @@ +/* + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +char copyright[] = +"@(#) Copyright (c) 1989 The Regents of the University of California.\n\ + All rights reserved.\n"; +#endif /* not lint */ + +#ifndef lint +static char sccsid[] = "@(#)mtree.c 5.3 (Berkeley) 09/06/89"; +#endif /* not lint */ + +#include +#include +#include +#include +#include +#include "mtree.h" + +extern int errno; +ENTRY *root; +dev_t device; +int cflag, dflag, eflag, rflag, uflag, xflag, exitval; +char path[MAXPATHLEN]; + +main(argc, argv) + int argc; + char **argv; +{ + extern char *optarg; + struct stat sbuf; + int ch; + char *p; + + p = NULL; + while ((ch = getopt(argc, argv, "cdef:p:rux")) != EOF) + switch((char)ch) { + case 'c': + cflag = 1; + break; + case 'd': + dflag = 1; + break; + case 'e': + eflag = 1; + break; + case 'f': + if (!(freopen(optarg, "r", stdin))) { + (void)fprintf(stderr, + "mtree: can't read %s.\n", optarg); + exit(1); + } + break; + case 'p': + p = optarg; + break; + case 'r': + rflag = 1; + break; + case 'u': + uflag = 1; + break; + case 'x': + xflag = 1; + break; + case '?': + default: + (void)fprintf(stderr, + "usage: mtree [-cderux] [-p path] [-f spec]\n"); + exit(1); + } + if (!cflag) + spec(); + if (p && chdir(p)) { + (void)fprintf(stderr, + "mtree: %s: %s\n", p, strerror(errno)); + exit(1); + } + path[0] = '.'; + if (cflag) { + headers(); + cwalk((ENTRY *)NULL, path + 1); + shostats(); + pwalk(root, 0); + } else { + if (xflag) { + if (lstat(".", &sbuf)) { + (void)fprintf(stderr, "mtree: root: %s\n", + strerror(errno)); + exit(1); + } + device = sbuf.st_dev; + } + vwalk(root, path + 1); + miss(root, path + 1); + } + exit(exitval); +} + +vwalk(level, tail) + register ENTRY *level; + register char *tail; +{ + register ENTRY *ep; + register DIR *dirp; + register struct dirent *dp; + struct stat sbuf; + + if (!(dirp = opendir("."))) { + (void)fprintf(stderr, "mtree: %s: %s\n", + level == root ? "root" : path, strerror(errno)); + exit(1); + } + *tail++ = '/'; + while ((dp = readdir(dirp))) { + if (dp->d_name[0] == '.' && + (!dp->d_name[1] || dp->d_name[1] == '.' && !dp->d_name[2])) + continue; + bcopy(dp->d_name, tail, dp->d_namlen + 1); + for (ep = level; ep; ep = ep->next) + if (!strcmp(ep->name, dp->d_name)) + break; + if (ep && ep->flags&F_IGN) { + ep->flags |= F_VISIT; + continue; + } + if (lstat(dp->d_name, &sbuf)) { + (void)fprintf(stderr, "mtree: %s: %s\n", + path + 2, strerror(errno)); + exit(1); + } + if (!dflag || S_ISDIR(sbuf.st_mode)) + if (ep) { + compare(ep->name, &ep->info, &sbuf); + ep->flags |= F_VISIT; + } else if (!eflag) { + (void)printf("extra: %s%s", + path + 2, rflag ? "" : "\n"); + if (rflag) + if (unlink(path)) + (void)printf(", not removed: %s\n", + strerror(errno)); + else + (void)printf(", removed\n"); + } + if (S_ISDIR(sbuf.st_mode) && + (!xflag || device == sbuf.st_dev)) { + if (chdir(dp->d_name)) { + (void)fprintf(stderr, "mtree: %s: %s\n", + path + 2, strerror(errno)); + exit(1); + } + vwalk(ep ? ep->child : ep, tail + dp->d_namlen); + if (chdir("..")) { + (void)fprintf(stderr, "mtree: ..: %s\n", + strerror(errno)); + exit(1); + } + } + } + (void)closedir(dirp); +} + +miss(level, tail) + register ENTRY *level; + register char *tail; +{ + register int create; + register char *p; + + for (*tail++ = '/'; level; level = level->next) { + if (level->info.type != F_DIR && + (dflag || level->flags&F_VISIT)) + continue; + (void)strcpy(tail, level->name); + if (!(level->flags&F_VISIT)) + (void)printf("missing: %s%s", path + 2, + uflag ? "" : "\n"); + if (level->info.type != F_DIR) + continue; + create = 0; + if (uflag) + if (mkdir(path, 0777)) + (void)printf(" (not created: %s)\n", + strerror(errno)); + else { + create = 1; + (void)printf(" (created)\n"); + } + for (p = tail; *p; ++p); + miss(level->child, p); + if (create) { + *p = '\0'; + dirset(&level->info); + } + } +} + +dirset(s1) + register INFO *s1; +{ + extern int errno; + register struct stat *s2; + struct stat sbuf; + + if (stat(path, &sbuf)) { + (void)fprintf(stderr, + "mtree: %s: %s\n", path, strerror(errno)); + return; + } + s2 = &sbuf; + + if (s1->flags&F_MODE && s1->st_mode != (s2->st_mode&07777) && + chmod(path, s1->st_mode)) + (void)printf("%s: permissions not set: %s\n", + path + 2, strerror(errno)); + if (s1->flags&F_OWNER && s1->st_uid != s2->st_uid && + chown(path, s1->st_uid, -1)) + (void)printf("%s: owner not modified: %s\n", + path + 2, strerror(errno)); + if (s1->flags&F_GROUP && s1->st_gid != s2->st_gid && + chown(path, -1, s1->st_gid)) + (void)printf("%s: group not modified: %s\n", + path + 2, strerror(errno)); +} ADDED usr.sbin/mtree/mtree.h Index: usr.sbin/mtree/mtree.h ================================================================== --- usr.sbin/mtree/mtree.h +++ usr.sbin/mtree/mtree.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + * + * @(#)mtree.h 5.1 (Berkeley) 09/04/89 + */ + +typedef struct _id { + struct _id *next; + u_int id; + u_long cnt; +} ID; + +typedef struct _info { +#define F_CKSUM 0x001 /* check sum */ +#define F_DMODE 0x002 /* directory mode */ +#define F_FMODE 0x004 /* directory mode */ +#define F_GROUP 0x008 /* group */ +#define F_MODE 0x010 /* directory mode */ +#define F_NLINK 0x020 /* number of links */ +#define F_OWNER 0x040 /* owner */ +#define F_SIZE 0x080 /* size */ +#define F_SLINK 0x100 /* link count */ +#define F_TYPE 0x200 /* file type */ + u_int flags; /* items set */ + +#define F_BLOCK 0x001 /* block special */ +#define F_CHAR 0x002 /* char special */ +#define F_DIR 0x004 /* directory */ +#define F_FILE 0x008 /* regular file */ +#define F_LINK 0x010 /* symbolic link */ +#define F_SOCK 0x020 /* socket */ + u_int type; /* file type */ + + uid_t st_uid; + gid_t st_gid; + off_t st_size; + mode_t st_mode; + nlink_t st_nlink; + u_long cksum; /* check sum */ + char *slink; /* symbolic link reference */ +} INFO; + +typedef struct _entry { + struct _entry *next, *child, *parent; /* tree links */ + INFO info; /* node info structure */ +#define F_DONE 0x01 /* directory done */ +#define F_IGN 0x02 /* ignore this node on down */ +#define F_VISIT 0x04 /* visited this node */ + u_int flags; /* flags */ + char *name; /* node name */ + int nlen; /* name length */ +} ENTRY; ADDED usr.sbin/mtree/spec.c Index: usr.sbin/mtree/spec.c ================================================================== --- usr.sbin/mtree/spec.c +++ usr.sbin/mtree/spec.c @@ -0,0 +1,133 @@ +/* + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static char sccsid[] = "@(#)spec.c 5.2 (Berkeley) 09/06/89"; +#endif /* not lint */ + +#include +#include +#include +#include +#include "mtree.h" + +extern ENTRY *root; /* root of the tree */ +int lineno; /* current spec line number */ +mode_t dmode; +mode_t fmode; + +spec() +{ + register char *p; + ENTRY *centry, *last; + INFO info; + int ch, ignore; + char buf[2048], *emalloc(); + + info.flags = 0; + last = NULL; + for (lineno = 1; fgets(buf, sizeof(buf), stdin); ++lineno) { + if (!(p = index(buf, '\n'))) { + (void)fprintf(stderr, + "mtree: line %d too long.\n", lineno); + while ((ch = getchar()) != '\n' && ch != EOF); + continue; + } + *p = '\0'; + for (p = buf; *p && isspace(*p); ++p); + if (!*p || *p == '#') + continue; + + /* grab file name, "$", "set", or "unset" */ + if (!(p = strtok(buf, "\n\t "))) + specerr(); + + ignore = 0; + if (p[0] == '/') + switch(p[1]) { + case 'i': + ignore = 1; + if (!(p = strtok((char *)NULL, "\t "))) + specerr(); + break; + case 's': + if (strcmp(p + 1, "set")) + break; + if (!(p = strtok((char *)NULL, "\t "))) + specerr(); + set(p, &info, 1); + continue; + case 'u': + if (strcmp(p + 1, "unset")) + break; + if (!(p = strtok((char *)NULL, "\t "))) + specerr(); + unset(p, &info); + continue; + } + + if (index(p, '/')) { + (void)fprintf(stderr, + "mtree: file names may not contain slashes.\n"); + specerr(); + } + + if (!(info.flags&F_TYPE)) { + (void)fprintf(stderr, "mtree: no type set.\n"); + specerr(); + } + + if (!strcmp(p, "..")) { + /* don't go up, if haven't gone down */ + if (!root) + noparent(); + if (last->info.type != F_DIR || last->flags&F_DONE) { + if (last == root) + noparent(); + last = last->parent; + } + last->flags |= F_DONE; + continue; + } + + centry = (ENTRY *)emalloc(sizeof(ENTRY)); + if (!(centry->name = strdup(p))) + nomem(); + centry->info = info; + centry->info.st_mode = info.type == F_DIR ? dmode : fmode; + centry->flags = ignore; + while (p = strtok((char *)NULL, "\t ")) + set(p, ¢ry->info, 0); + + if (!root) { + last = root = centry; + root->parent = root; + } else if (last->info.type == F_DIR && !(last->flags&F_DONE)) { + centry->parent = last; + last = last->child = centry; + } else { + centry->parent = last->parent; + last = last->next = centry; + } + } +} + +noparent() +{ + (void)fprintf(stderr, "mtree: no parent node.\n"); + specerr(); +} ADDED usr.sbin/mtree/util.c Index: usr.sbin/mtree/util.c ================================================================== --- usr.sbin/mtree/util.c +++ usr.sbin/mtree/util.c @@ -0,0 +1,287 @@ +/* + * Copyright (c) 1989 The Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that the above copyright notice and this paragraph are + * duplicated in all such forms and that any documentation, + * advertising materials, and other materials related to such + * distribution and use acknowledge that the software was developed + * by the University of California, Berkeley. The name of the + * University may not be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef lint +static char sccsid[] = "@(#)util.c 5.1 (Berkeley) 09/04/89"; +#endif /* not lint */ + +#include +#include +#include +#include +#include +#include +#include +#include "mtree.h" + +set(p, ip, override) + register char *p; + INFO *ip; + int override; +{ + extern mode_t dmode, fmode; + int val; + char *kw; + gid_t getgroup(); + uid_t getowner(); + long atol(), strtol(); + + for (kw = p; *p && *p != '='; ++p); + if (!*p) + specerr(); + *p++ = '\0'; + ip->flags |= val = key(kw); + + switch(val) { + case F_CKSUM: + ip->cksum = atol(p); + break; + case F_DMODE: + if (!override) { + (void)fprintf(stderr, + "mtree: keyword dmode is global only.\n"); + specerr(); + } + dmode = (mode_t)strtol(p, (char **)NULL, 8); + break; + case F_FMODE: + if (!override) { + (void)fprintf(stderr, + "mtree: keyword fmode is global only.\n"); + specerr(); + } + fmode = (mode_t)strtol(p, (char **)NULL, 8); + break; + case F_GROUP: + ip->st_gid = getgroup(p); + break; + case F_MODE: + if (override) { + (void)fprintf(stderr, + "mtree: keyword mode is local only.\n"); + specerr(); + } + ip->st_mode = (mode_t)strtol(p, (char **)NULL, 8); + break; + case F_NLINK: + if ((ip->st_nlink = atoi(p)) <= 0) + specerr(); + break; + case F_OWNER: + ip->st_uid = getowner(p); + break; + case F_SIZE: + if ((ip->st_size = atol(p)) < 0) + specerr(); + break; + case F_SLINK: + if (!(ip->slink = strdup(p))) + nomem(); + break; + case F_TYPE: + ip->type = fkey(p); + break; + } +} + +unset(p, ip) + char *p; + INFO *ip; +{ + ip->flags &= !key(p); +} + +key(p) + char *p; +{ + switch(*p) { + case 'c': + if (!strcmp(p, "cksum")) + return(F_CKSUM); + break; + case 'd': + if (!strcmp(p, "dmode")) + return(F_DMODE); + break; + case 'f': + if (!strcmp(p, "fmode")) + return(F_FMODE); + break; + case 'g': + if (!strcmp(p, "group")) + return(F_GROUP); + break; + case 'm': + if (!strcmp(p, "mode")) + return(F_MODE); + break; + case 'n': + if (!strcmp(p, "nlink")) + return(F_NLINK); + break; + case 'o': + if (!strcmp(p, "owner")) + return(F_OWNER); + break; + case 's': + if (!strcmp(p, "size")) + return(F_SIZE); + if (!strcmp(p, "slink")) + return(F_SLINK); + break; + case 't': + if (!strcmp(p, "type")) + return(F_TYPE); + break; + } + (void)fprintf(stderr, "mtree: unknown keyword.\n"); + specerr(); + /* NOTREACHED */ +} + +fkey(p) + char *p; +{ + switch(*p) { + case 'b': + if (!strcmp(p, "block")) + return(F_BLOCK); + break; + case 'c': + if (!strcmp(p, "char")) + return(F_CHAR); + break; + case 'd': + if (!strcmp(p, "dir")) + return(F_DIR); + break; + case 'f': + if (!strcmp(p, "file")) + return(F_FILE); + break; + case 'l': + if (!strcmp(p, "link")) + return(F_LINK); + break; + case 's': + if (!strcmp(p, "socket")) + return(F_SOCK); + break; + } + (void)fprintf(stderr, "mtree: unknown file type.\n"); + specerr(); + /* NOTREACHED */ +} + +uid_t +getowner(p) + register char *p; +{ + struct passwd *pw; + int val; + + if (isdigit(*p)) { + if ((val = atoi(p)) >= 0) + return((uid_t)val); + (void)fprintf(stderr, "mtree: illegal uid value %s.\n", p); + } else if (pw = getpwnam(p)) + return(pw->pw_uid); + else + (void)fprintf(stderr, "mtree: unknown user %s.\n", p); + specerr(); + /* NOTREACHED */ +} + +gid_t +getgroup(p) + register char *p; +{ + struct group *gr; + int val; + + if (isdigit(*p)) { + if ((val = atoi(p)) >= 0) + return((gid_t)val); + (void)fprintf(stderr, "mtree: illegal gid value %s.\n", p); + } else if (gr = getgrnam(p)) + return(gr->gr_gid); + else + (void)fprintf(stderr, "mtree: unknown group %s.\n", p); + specerr(); + /* NOTREACHED */ +} + +char * +rlink(name) + char *name; +{ + extern int errno; + extern char path[]; + int len; + static char lbuf[MAXPATHLEN]; + + len = readlink(name, lbuf, sizeof(lbuf)); + if (len == -1) { + (void)fprintf(stderr, "mtree: %s: %s.\n", + path + 2, strerror(errno)); + exit(1); + } + lbuf[len] = '\0'; + return(lbuf); +} + +headers() +{ + time_t clock, time(); + char curp[MAXPATHLEN], *ctime(), *getlogin(); + + if (!getwd(curp)) { + (void)fprintf(stderr, "mtree: %s\n", curp); + exit(1); + } + (void)time(&clock); + (void)printf("#\n#\t%s\n#\tby: %s\n#\t%s#\n", + curp, getlogin(), ctime(&clock)); +} + +specerr() +{ + extern int lineno; + + (void)fprintf(stderr, + "mtree: line %d of the specification is incorrect.\n", lineno); + exit(1); +} + +char * +emalloc(size) + int size; +{ + char *p, *malloc(); + + /* NOSTRICT */ + if (!(p = malloc((u_int)size))) + nomem(); + bzero(p, size); + return(p); +} + +nomem() +{ + (void)fprintf(stderr, "mtree: no more memory.\n"); + exit(1); +}