home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 31
/
CDASC_31_1996_juillet_aout.iso
/
internet
/
rnr214.zip
/
RNR.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-04-09
|
6KB
|
204 lines
program rnr; {russell's news reader/poster, rest and relaxation}
{formerly `rusnews'}
{
Russell_Schulz@locutus.ofB.ORG (960409)
}
{
KNOWN SHORTCOMINGS (but don't let them scare you away - they're pessimistic)
(see also rnr.fut for future considerations)
does not use the b-tree index for Waffle 1.65's password file for higher speed
will use the first rnews.exe and rmail.exe (or whatever commands are
configured) found in the current directory+path - be careful with the
directory from which you run this -- for sure not the user's home dir!
crossposts detected/filtered using at most 200 groups in join file
smaller-memory version: 120 groups used in detection
very limited kill/antikill files
no regular expression searches
at most 150 killed/antikilled items/group
smaller-memory version: 50 killed/antikilled items/group
threading doesn't use References: data as much as it could - but
it hashes them for much smaller space requirements now, so it should
be fine except in the case of hash collisions - perfect detection of
references sacrificed for space savings
doesn't log outgoing mail in ~waffle/admin/mail
doesn't guess when daylight savings hits
(you have to change the clock on your pc anyway, and the policy about
when to switch is different around the world)
has no simple built-in editor
does not use waffle's editor information from STATUS command or _editors file
has no good way to send time limit information to editor program
only understands %A, %W, %n, %u, %F, %i, %_ waffle parameters (and fake %f)
(for static netmail:/netnews:/replyto: entries)
to get around waffle's rnews.exe continuation line noncompliance it doesn't
keep lines to 80 columns (in the References: line)
any outgoing line more than 255 chars will be truncated somewhere still
(but it won't try to send them, since it warns you)
KNOWN WEIRDNESS
'r'eply and 'f'ollow make you be careful with sig
(but it works)
(except with very long posts if you have a lousy editor)
(this helps prevent double sig enclosure, for sure!)
'P'revious group sometimes does nothing (in case where all articles
in the previous group are already read)
leaves files laying around in temporary directory - could be handy, since
sometimes rnews fails without an errorlevel, but could also get in your
way - you may want to delete them periodically (although they'll be
overwritten with the next mail or followup)
ENVIRONMENT VARIABLES
WAFFLE - same as waffle requires it - full pathname of static file
if not there, uses `static' in current directory
NET_NAME or USER or LOGNAME - user's waffle user id
also -u/--user
EDITOR - editor (default: vi)
also -e/--editor - see also -o/--editor-options
full path and extension are optional
TZ - time zone; default: `-0700' (if not found in static file)
FULLNAME - full real-world name of user
also -f/--fullname (underscores changed to spaces)
should not be necessary for Waffle 1.64 and 1.65 or uupc or uufree
WAFFLEVERSION - version of waffle; default: `1.64'
also static entry: version; also -v/--interface-version
CREDITS
Kim Storm, for the `nn' newsreader (a much more powerful newsreader
for Unix, some of whose keystrokes were used here (not Unix, nn))
Bill Fenner, author of PWPL165.ZIP from simtel20, who allowed me
to know what was where in the 1.65 password file with no guessing
Rhys Weatherley, who suggested hashing the Message-ID: and References:
lines for better threading accuracy without taking much space
Henrik Storner, who did all of the UUPC work and found various errors
}
{create a .TPM file for tp4}
{$ifdef VER40}
{$T+}
{$endif}
{$I rnr-def.pas}
{ the last number (max-heap) being 640k means that you MUST swap! }
{ (unless you recompile with a lower value, of course) }
{$ifdef tiny}
{$M 24576,0,655360}
{$else}
{$M 47104,0,655360}
{$endif}
uses rnrglob,rnrconf,rnrio,rnrfunc,rnrproc,rnrinit,rnrmain,rnrselb
{$ifdef timeout}
,rnrtime
{$endif}
;
begin
initialize;
{$ifdef debug}
execp('c:\usr\bin\freem.exe','');
xwrites(newsreadername);
xwrites(': freem: execresult=');
xwritei(execresult);
xwriteln;
{$endif}
repeat
if not needtofindnextgroup then
needtofindnextgroup := true
else
begin
currsource := getnextgroup;
currsourcekind := sourcegroup;
end;
if currsource<>'' then
begin
if clearscreenbetweengroups then
xclrscr;
xwritelnss('source: ',currsource);
groupinit;
if currdir<>'' then
begin
alreadyread := highestreadin(currsource,currsourcekind);
{make life easier for mouse users}
xwritelns('Reading... (or use ! Q N O)');
readinarts;
if not nextwhilereading then
begin
{all these routines handle numarts=0 just fine - but it cuts down on output}
if numarts>0 then
begin
if numarts>1 then
begin
xwrites('Sorting ');
xwritei(numarts);
xwrites(' articles...');
end;
sortitall;
if unscannedarts then
warn('not all articles read in!');
{$ifdef testsort}
{$ifdef pauseintestsort}
if showdebug('sort') then
begin
xwrites('pausing...');
xwritelns(xreadkey);
end;
{$endif}
{$endif}
{
for i := 1 to numarts do
writeln(articles[i]^.filename:14,' ',
articles[i]^.date div 16384:4,' ',
(articles[i]^.date mod 16384) div 1024:2,' ',
(articles[i]^.date mod 1024) div 32:2,' ',
articles[i]^.date mod 32:2,' ',
articles[i]^.indents:3,' ',
copy(articles[i]^.basesubject,1,50));
}
selectandbrowse;
updatejoin(highestread);
end;
end;
end;
end;
until currsource='';
shutdown(0);
end.