How does man know?

Bruce Barnett barnett at crdgw1.crd.ge.com
Tue Oct 3 00:35:06 AEST 1989


I wrote:
>>IMHO the BSD solution was right.
Good thing I put the 'H' in there. Doug does make some good points. :-)

I must apologize for not really understanding Doug's initial argument.
I know he has a programmable bit-mapped terminal, so of course
his terminal driver can do paging.

But if Doug says that the pager should be a part of the generic
terminal driver, so that every terminal connected to a Unix system
can have paging built in the driver....

Yes I agree. That is the right way. I was not aware of any UNIX that
had this feature.

I still think BSD made the right choice at the time.
But I am a practical type, and would rather have a partial solution
instead of waiting 5 years for the correct solution.

I am ignorant of a generic tty driver (gad! that word is over-used a lot)
that supports the concept of paging for any terminal.

Richard O'Keefe mentions one (<2258 at munnari.oz.au>) that is
enabled by typing "stty rows 0".

I consider that solution to be just as bad the the BSD solution,
because neither one is right.

Paging has nothing to do with the number of rows a terminal has.

For instance, I have on my frame buffer three virtual terminals (i.e. windows).
The first one has a scrollbar and the maximum number of lines saved
is 1000. The second is another one that I want an automatic pager.
The third one I do not want any paging.

The number of rows and columns for each terminal can be modified at
any time. I still want the pager and editor to react when I change
the window size. And this should work when the programs I am running
are on other machines on the network. If I executed man(1) on another
machine, and then changed the size of my window - man should
update the view of the manual page.

It seems to me there should be another flag in the iocty of the tty that
determines if paging should be done or not. Rows and columns
aren't the right choice.

I also don't understand how the paging should be handled.
I assume you are talking about a user down-loading into the STREAMS
tty driver the pager characteristics that the user wants.

You can't just download pg(1), more(1) or less(1) into the tty driver.

I am having trouble visualizing this pager in operation.

I log onto the system from home, and I am using an old VT100
terminal that I got for a very good price.

I type

	man whatever

and the built-in pager comes in. What does it do? Does it give me
any feedback when it pauses? Does it beep? Or just hang?

Suppose I run a program that generates thousands of lines of data.
I read the first 30 lines and then want to quit. Does the terminal driver
tell the program it cannot write any more? I don't want it to crunch away
for another 15 minutes. But I want the shell to know it can write to the
terminal.

Suppose I typed
	cat /etc/termcap
and while looking at the file, I wanted to examine another file,
or perhaps do a shell escape. Which process would spawn off a shell?

I cannot conceive of a single pager model that will work in all cases.

Maybe I still don't understand Doug's point. I apologize.

If Doug's pager won't work with an ANSII terminal,
then I DO NOT agree with Doug's model.

Sure, everyone should have a workstation on their desk.
But that's not the real world. If Unix is going to be successful,
it has to support the commercial market.

--
Bruce G. Barnett	<barnett at crd.ge.com>   uunet!crdgw1!barnett



More information about the Comp.unix.questions mailing list