[net.sources.d] Bug fixes, improvements to vn

bobm@rtech.UUCP (Bob Mcqueer) (09/08/86)

I would like to thank Andrew Marrinson for the changes he posted.  The mail
enhancements are something I've been contemplating for a while, and I will
integrate.  His final list also seems like a group of useful tweaks that I
will probably pull in.  The SYSV changes I have already received from several
people, as I originally requested, and integrated into the original.  You may
find that you have to make some small changes to "envir_set.c" for SYSV also -
at least that's what folks at ATT denver discovered.  MAXPATHLEN isn't
defined on SYSV, and the getcwd call is slightly different.  It is also up to
you whether you set the Foreground flag on SYSV true, to output newsgroup
names as they are scanned, or false.  What I recieved from people did it both
ways, so I made it a configurable parameter in my set of SYSV ifdef's.

I'm posting an article rather than replying privately to Mr. Marrinson to let
people using the original program know about a few other things I've heard
from users.  I do intend to integrate some changes and rerelease the thing
once enough mod's have accumulated, and I've gotten around to doing the work.
My thanks again to the dozen or so people who have sent me mail,
overwhelmingly positive.

1) the str_store NULL pointer bug.

Was reported by several people, who all seemed to fix it, however.  It
appears that several people, like myself, never spotted it because they
were running on VAXen (address 0 legal), or maybe running on terminals
whose termcap entries contained everything.  I decided that I'd rather
fix it by returning a stored empty string than a NULL pointer.  Either
will actually work, because I check for both NULL and empty string when
I check for undefined termcap entries.  I like ensuring that str_store
returns a legal address.

2) The one article bug.

There is a boundary error that results in my not picking up article number
1 in a newsgroup until article number 2 comes along.  This, and the above
represent the real "bugs", as opposed to enhancements, I had reported when
I first released the thing.

3) The concept terminal (escape to vi hoses up the screen) bug.

When you exit to the editor, some terminals are left in states incompatible
with vn interaction.  To accomodate these, another term_set call needs to
be added to resend the "ti" string after returning from spawning editors
and unix escapes.  Thanks to Karl Williamson in Denver, whose SYSV changes
are the set I incorporated, actually, for helping me track this down.  Anybody
running on an Ann Arbor?

4) How to crash vn.

If you are using SYSV regular expression library, rather than the reg.c
included in the source (for 4.2BSD regular expression library), try
specifying a search string containing a returned subpattern, ie. (....)$n.
I don't expect the returned argument.  Nobody spotted this, or if they did,
the simply chuckled and kept it to themselves.  I don't propose fixing
this - too difficult to fix for too obscure a problem.  It brings to mind
the old vaudeville routine - "Well, don't DO that!".

5) The 100% read bug.

I prompt you for another return on the very last line of an article saying
"100%", then give you the "end" or "next" prompt with no intervening data,
if the article happens to work out to an even number of pages.  It never
annoyed me enough to fix it.  I'll do so.

6) The PS1 bug.

I don't know if anybody else puts lengthy escape strings in their prompt,
but I sometimes get bit by vn thinking that it doesn't need to erase the
top line on UNIX escapes.  I do THAT optimization, by the way, for any
poor soul who's running at a slow rate on a terminal with no clear to
end of line - say an ADM3A at 1200.

7) The Distribution Line on followups bug.

Isn't recognized.  It's embarassing to post a followup to a local article,
and have it circle the globe.  I got informed of this one when it bit
Jeff Lichtman.  If somebody toasted him for it, vn was really to blame.

8) -n net.foo DOESN'T mean net.foo.all

As it does in readnews.  I chose to accept this minor incompatibility to
be more flexible.  Of course, it gets noted by people.  I steer new vn
users to doing what I do - I have no options line in my .newsrc.  I
advise simply subscribing to everything, and unsubscribing as you go along,
or hand editing .newsrc after one execution to put !'s on everything you
don't want.

Incidently, the decision about updating / not updating lines with !'s on
them to reflect current spooling is one I basically flipped a coin over.
The issue is, when you resubscribe to a newsgroup, do you want to get
drowned in all the old articles to pick up what you've been missing, or
simply start seeing it?

9) Enhancements which go in.

I fixed digests so that the breaking up of articles was a tad less error
prone.  I mainly did it to take care of blank lines which actually contained
spaces in mod.comp-soc, then that newsgroup stopped being digested.

The folks in Australia made some major mod's to make the thing work on
the OZ net.  This is sufficiently strange that I may not incorporate
those changes into any reissues I might make (sorry), but they did a couple
of the things never got around to - search string ability in the "more" clone
used to read the article, and ability to use the arrow keys.

A gentleman at Livermore suggested that I modify the prompt for the name
of a file to save an article in to allow you edit it rather than entering
new ones - he likes to save things with sequential suffixes.

Karl Williamson also sent me changes to allow sending an article to the
printer from the "reader" phase as well as the newsgroup page, and added
commands for "jump to top / bottom / middle" of page (gee, I always just
type 99j :-))

Other movement keys, which are actually covered by using numbers: first
page, last page, first page of next newsgroup.  I admit that having an
explicit key is more obvious than 9<ret> to jump by the 9 pages of
net.singles if I don't feel like scanning it right now.

Some enhancement to the ability to use "not" on author and subject option
specifications.  Enough to allow specifying "not" a list of subjects or
authors.

Andy's enhancemencts, as alluded to earlier.

10) More major enhancements, ie. food for thought.

Non-consecutive article lists in .newsrc.  When I first did this program,
I looked over a lot of .newsrc's and decided very few people made use of
the feature, and it greatly simplified my internal data structure.  The
thing a lot of people WOULD like that is intertwined with this is the
ability not to see an article listed in a second newsgroup after it has
shown up in the first.  It's NOT clear that this is really desirable - I
find myself reading articles in the context of some newsgroup after having
skipped by them in an earlier one.  Would probably have to be a user settable
option.  I concede that some sophisticated users of other readers who DO
get in the habit of marking individual articles for reading at a later time
have to change their habits.  I simply save the darned things if I don't
want to read them right away.  That also has the advantage that "expire"
won't take it away from you before you've had a chance to read it.

Ability to begin viewing newsgroup pages while still scanning the others.
Rather than this, I've toyed with the idea of having a daemon build up a
single file containing the pertinent subject / author, etc information.
vn would then access this file rather than munging through all the articles.
I will be taking a serious look at this if I ever do put USENET on a
database system, as I've alluded to elsewhere.

I might incorporate the rn "kill-file" idea, rather than trying to keep
tweaking up the command line arguments.

Since everybody has different ideas what the keystroke mapping ought to
be for commands (I've gotten several mutually contradictory suggestions),
the only real solution is allow user-defined mappings.

The same for the set of header lines to display in the reader.  Everybody
wants to see a different set, without having to look at all of them.
Internally, this means a less ad-hoc method for extracting header lines.

A choose by menu on the 'n' command might be nice, or maybe I'll only
insist on enough characters for uniqueness.  The workaround now, if you
can't remember newsgroup names is to use '%' to note the spelling.

Bob McQueer
-- 
{amdahl, sun, mtxinu, hoptoad, cpsc6a}!rtech!bobm

bobm@rtech.UUCP (Bob Mcqueer) (09/08/86)

Oh, and another "food for thought" enhancement is allowing you to chase
references.  My thought on that at this time is to allow you to get a
"sub-page" like you do for digests, of the articles liked by references.
On this subject, I have an excuse much like the non-consecutive article
statement.  I looked at a lot of articles, and saw a lot of "followups"
being posted simply as new articles with "Re: ..." in the subject.  Since
reference chasing would miss these anyway, I choose again to accept not
mucking about with an article bitmap.

Bob McQueer
-- 
{amdahl, sun, mtxinu, hoptoad, cpsc6a}!rtech!bobm

bobm@rtech.UUCP (Bob Mcqueer) (09/09/86)

Sorry, my brain must have been semi - out of gear when I posted that
article.  The "One Article" bug IS a bit more extensive than I indicated,
as I've been reminded via mail.  The fix is simple, though.  The problem
is that first articles in spooling lists aren't getting picked up, period.
That IS reasonably serious.  Here's what I did about it.

in newsrc you'll find:

		if (nread != NULL)
			lownum = atoi(nread);
		else
			lownum = 0;

After this statement, simply put:

		if (lownum > 0)
			--lownum;

I COULD simply say lownum = atoi(nread) - 1; if I trusted the active list
to always have positive numbers.  Actually, the logic for reading articles
should work with lownum negative, but I don't want to allow it anyway.

Bob McQueer
-- 
{amdahl, sun, mtxinu, hoptoad, cpsc6a}!rtech!bobm