[comp.unix.wizards] curses - problem... NO

AGRISCS@umcvmb.missouri.edu (Don Ingli) (12/10/89)

the reason curses wont write to the bottom right character is that most
line-by-line terminals automaticly pushes everything up one line when the
last possible character on the screen is written.

I programm in curses all the time.  Our terminals all have 25 lines, so
what you need to do is write all of your windows for a max of 24...

Vt100 emulators generally use 24 lines as the max... check your
termcap.

Oh, try not to use LINES and COLUMNS in your programming... just assume
an 80 X 24 screen.....  Remember, you want your programs written so that
they can be used with all emulators/terminals.....

If you need any pointers, just mail me....


+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
|  DON INGLI                                                           |
|  UNITED STATES DEPARTMENT OF AGRICULTURE - SOIL CONSERVATION SERVICE |
|  WORK: (314) 875-5344      FAX: (314) 875-5335                       |
|                                                                      |
| bitnet: agriscs@umcvmb.bitnet  internet: agriscs@umcvmb.missouri.edu |
| attmail: attmail!attbl!arpa!umcvmb.missouri.edu!agriscs              |
|                                                                      |
| ALL OPINIONS IN THIS NOTE ARE OF MY OWN AND DO NOT REPRESENT THE     |
| FEDERAL GOVERNMENT OR THE UNIVERSITY OF MISSOURI-COLUMBIA            |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+

tale@cs.rpi.edu (David C Lawrence) (12/10/89)

In article <21708@adm.BRL.MIL> AGRISCS@umcvmb.missouri.edu (Don Ingli) writes:

> Oh, try not to use LINES and COLUMNS in your programming... just assume
> an 80 X 24 screen.....  Remember, you want your programs written so that
> they can be used with all emulators/terminals.....

Right.  And if the programme can take advantage of the fact that my
xterm is 60 lines long by 132 characters wide, why should I be
constrained to 80 by 24?  Why is it that you say don't use LINES and
COLUMNS?  The flexibility of it is certainly much greater than
constraining yourself to assumptions about someone else's hardware.

> If you need any pointers, just mail me....

Do you have structs, unions and enums too?

> [11 lines of bordered signature and obnoxious capital letters deleted.]

Could you please do something about trimming and toning down your
signature?  I'm quite sure that many, many people on the net would
appreciate it.

(Oh, one last thing.  What's with all of the periods?)

Dave
-- 
   (setq mail '("tale@cs.rpi.edu" "tale@ai.mit.edu" "tale@rpitsmts.bitnet"))

spolsky-joel@CS.YALE.EDU (Joel Spolsky) (12/11/89)

In article <21708@adm.BRL.MIL> AGRISCS@umcvmb.missouri.edu (Don Ingli) writes:
>Oh, try not to use LINES and COLUMNS in your programming... just assume
>an 80 X 24 screen.....  Remember, you want your programs written so that
>they can be used with all emulators/terminals.....

WHAT!!!!

These statements are mutually contradictory. You had BETTER not assume
80 x 24 if you want your program to run on anything but old plain
vanilla terminals. I won't even begin to enumerate the number of
terminals that aren't this size. 

+----------------+----------------------------------------------------------+
|  Joel Spolsky  | bitnet: spolsky@yalecs.bitnet     uucp: ...!yale!spolsky |
|                | internet: spolsky@cs.yale.edu     voicenet: 203-436-1538 |
+----------------+----------------------------------------------------------+
                                                      #include <disclaimer.h>

thurlow@convex.com (Robert Thurlow) (12/11/89)

AGRISCS@umcvmb.missouri.edu (Don Ingli) writes:
>Oh, try not to use LINES and COLUMNS in your programming... just assume
>an 80 X 24 screen.....  Remember, you want your programs written so that
>they can be used with all emulators/terminals.....

Bullshit.  I have xterms come up on my Sun workstation with 80 columns
and 60 lines, and any program that can sensibly use that much screen
space should do so.  (Obviously, caveats exist - 'nn' can only show
a certain number of entries on the index page because of the selection
scheme; that's fine.)  If any program is written to assume it has that
more than 80x24, it's broken, but it's almost as bad to assume it has
only a small space to use.  A program just doesn't need to be written
with a lot of constants for stuff like this.

Rob T
--
Rob Thurlow, thurlow@convex.com
"If you're not part of the solution, you're part of the precipitate."

davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) (12/12/89)

In article <8074@cs.yale.edu> spolsky-joel@CS.YALE.EDU (Joel Spolsky) writes:

| These statements are mutually contradictory. You had BETTER not assume
| 80 x 24 if you want your program to run on anything but old plain
| vanilla terminals. I won't even begin to enumerate the number of
| terminals that aren't this size. 

  You're right, but I think the original poster was saying "don't use
more than 80x24" rather than "don't bother to check for less." That's
open to interpretation, or course. I try to insure that anything I write
will run in 80x24, although some applications might take advantage of a
longer screen.
-- 
bill davidsen	(davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon

dce@smsc.sony.com (David Elliott) (12/12/89)

In article <1899@crdos1.crd.ge.COM> davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) writes:
>  You're right, but I think the original poster was saying "don't use
>more than 80x24" rather than "don't bother to check for less." That's
>open to interpretation, or course. I try to insure that anything I write
>will run in 80x24, although some applications might take advantage of a
>longer screen.

In projects I've worked on with curses, I've learned to assume 22x79,
not 24x80.

The "typical" size for a terminal is 24x80.

If the terminal is compatible with a VT52 or otherwise has problems
with the right margin, you're better off never hitting column 80, so
that takes it down to 24x79.

A number of people like to use a status line, so that drops it down to
23x79.

A smaller number of people use a second status line, either by using
something like BSD's 'window', or for displaying the current
directory.  That drops it to 22x79.

I've known enough people with only a 22x79 useable area on their
screens that I consider it useful to program with that in mind as a
minimum.

Remember, in a terminal environment, you can't just resize the window
if it's too small.  Someone who can't use your software is not
going to be too amenable to giving up something just so you can write
your code quicker.

-- 
David Elliott
dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
"It's bigger than a breadbox, and smaller than the planet Jupiter."