🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.terminals
Article #1025

How do I tell curses/terminfo that LF forces a CR/LF??

#1025
From: Jan B.Andersen
Date: Wed, 23 Jan 1991 13:17
53 lines
1981 bytes
The terminal (a Data General D211) emulates a limited ANSI-terminal,
but unfortunately the designers have decided to 'set' the Line Feed
New Line mode.

When redrawing the screen in vi, a small text like:

	main() {
		int a;
	}

curses assumes it is save just to output the sequence

	"<CLEAR> main() { <LF> int a; <CR> <LF> }",

which unfortunately shows up as:

	main() {
	int a
	}

Is there anyway I can tell curses not to thrust LF only doing a LINEFEED
on this terminal?

I have also noticed some incorrect behavior in curses. When scrolling, it
don't move the cursor to the bottom-left corner before emitting the 'ind'
string, it will usually just go to the bottom line before using 'ind',
again assumming the cursor to be in the same column. Disabling 'cub', 'cud',
'cuf' and 'cuu' somehow prevents this from happening.

This is on a Sun4 running SunOS 4.1 with the following terminfo:

d200-ansi|dasher-ansi|Data General DASHER 200 in limited ANSI mode,
	am, xon,
	cols#80, lines#24,
	bel=^G,
	cr=\r, nel=\l,
	ind=\l,
	.cub=\E[%p1%dD, .cub1=\b,
	.cud=\E[%p1%dB, .cud1=\n, .cuf=\E[%p1%dC, .cuf1=\E[C,
	.cuu=\E[%p1%dA, .cuu1=\E[A,
	cup=\E[%i%p1%d;%p2%dH,
	home=\E[H,
	clear=\E[H\E[J,
	ed=\E[J, el=\E[K,
	kcub1=\E[D, kcud1=\E[B,
	kcuf1=\E[C, kcuu1=\E[A,
	khome=\E[H, kbs=\b,
	blink=\E[5m,
	sgr=\E[%?%p1%t7;%;%?%p2%t4;%;%?%p3%t7;%;%?%p4%t5;%;%?%p6%t1;%;m,
	sgr0=\E[0m, smso=\E[7m, smul=\E[4m, rev=\E[7m,
	rmso=\E[m, rmul=\E[m,
	is2=\036F@,
	.rs2=\E[<3l,
Technical Details
Message-ID: <1991Jan23.131741.23026@gorm.ruc.dk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!rpi!uupsi!sunic!dkuug!ruc.dk!jba

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!rpi!uupsi!sunic!dkuug!ruc.dk!jba
From: jba@gorm.ruc.dk (Jan B.Andersen)
Newsgroups: comp.terminals
Subject: How do I tell curses/terminfo that LF forces a CR/LF??
Summary: Help wanted with terminfo/curses
Keywords: Curses, terminfo, Dasher DG
Message-ID: <1991Jan23.131741.23026@gorm.ruc.dk>
Date: 23 Jan 91 13:17:41 GMT
Organization: Roskilde University, Denmark
Lines: 53