home *** CD-ROM | disk | FTP | other *** search
- ABOUT RNPREJUDICE
-
- The rnprejudice patch is intended to solve the problem where you are looking
- at a news article and think, "Isn't that the person who said...?" It allows
- you to have a file containing a set of entries, each of which consists of a
- person's address and an associated comment. The comment is printed out
- under the From line of any article by that person. So if someone posts
- something really stupid (or really clever) you can arrange for all their
- subsequent articles to be branded (or emblazoned) with your own personal
- prejudice against (or for) that person.
-
- The modified rn looks in the RNPREJUDICE environment variable for the name
- of the prejudice file. You can define this variable in your login script,
- or via the -E option to rn.
-
- Lines in the prejudice file beginning with # are comments. Unindented lines
- contain mail addresses which are checked against the From line of each
- article. If a match is found, the indented lines following the match will
- be printed. The From line must match exactly, i.e., the case of letters
- must be the same. The parenthesised personal name is ignored in the match.
-
- # Here is an example rnprejudice file.
- em@dce.ie
- Author of rnprejudice patch
- emcmanus@cs.tcd.ie
- Author of rnprejudice patch
- # If someone has multiple addresses, they must have multiple entries.
- questionable@severed-head.com
- Believes that the Earth is flat, that skyscapers are the remnants of
- a lost civilisation, and that Reagan wasn't so bad after all.
- BIFF@BIT.NET
- Classic BIFF
-
- In your .rnmac file you might define a macro like this:
- # Edit the rnprejudice file
- * !echo '%t' >>$RNPREJUDICE; vi + $RNPREJUDICE\n
- This appends the e-mail address from the current article to the prejudice
- file and starts you up in the editor, where you can add the comment. When
- you return from the edit, rn will notice that the file has been edited and
- read in the new copy.
-
-
- APPLYING THE PATCH
-
- In the rn source directory, feed the file RNPREJ.PATCH to the patch program.
- This makes a small change to art.c so that it calls a function to look up
- the From line of an article after displaying it, and modifies the Makefile
- to know about the new files checkfrom.c, stb.c, and stb.h. Because the
- changes are so small, they should work with most versions of rn. The patch
- was derived from version 4.3.2.2, patchlevel 44.
-
- "make rn" should recompile rn without problems. If the new files fail to
- compile, mail me <em@dce.ie> with a description of the problem.
-
-
- IMPLEMENTATION NOTES
-
- Since the prejudice entries are kept entirely in memory, the patched rn
- probably won't run on machines with small address spaces.
-
- The in-memory data are handled by the code in stb.c. This uses a binary
- tree for each possible initial letter. If you keep your rnprejudice file
- in alphabetical order, performance will be bad. A hash table might be
- better, but I wanted to avoid a big overhead when the prejudice file is
- small. (In my experience it grows pretty quickly, though.) It would be
- easy to replace this file with a different implementation.
-
- There are some things that could be improved:
- * Lookups should not be case-sensitive, at least for the domain portion of
- the address. The addresses in people's postings tend to show up with
- consistent case however.
- * It would be convenient if you could have different aliases for the same
- person, rather than having to enter the same prejudice multiple times as
- at present. Each block of unindented lines could be taken as a set of
- addresses for the same person.
- * It might be better to look up the name in the parenthesised comment instead
- of or as well as the mail address.
- * If you change the RNPREJUDICE environment variable within rn (using &-E)
- the code does not notice. This could be fixed, but I don't see any need
- at present.
-
-
- STATUS
-
- This patch is by Eamonn McManus, Datacode Communications Ltd <em@dce.ie>.
- It is not copyrighted and may be used freely.
-
- $Id: RNPREJUDICE,v 1.1 90/09/11 23:01:34 em Exp $
-