Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!decwrl!labrea!denali!karish From: karish@denali.stanford.edu (Chuck Karish) Newsgroups: comp.unix.wizards Subject: Re: How to force wraparound at col. 80 Summary: If termcap doesn't help, heroic measures are called for Message-ID: <23322@labrea.Stanford.EDU> Date: 19 Aug 88 00:00:48 GMT References: <4814@netnews.upenn.edu> Sender: news@labrea.Stanford.EDU Reply-To: karish@denali.stanford.edu (Chuck Karish) Organization: Mindcraft, Inc. Lines: 30 In article <4814@netnews.upenn.edu> spolsky@eniac.seas.upenn.edu (Joel Spolsky) writes: >Does anybody know how to convince Unix (Sun 3/260) how to >automatically send a carriage return after 80 columns of output? >We're using the Symbolics terminal emulator which SHOULD be emulating >a VT-100, unfortunately, the emulation is flawed because it allows >lines longer than 80 columns without wrapping. This behavior is configurable on many terminals. The capability is usually called 'autowrap' or 'automatic margin'. For many UNIX utilities, choosing a termcap entry that lacks the 'am' boolean fixes things. I think there's one called 'vt100-nam'. Terminfo files also have the 'am' attribute. >The program we're using on the Sun (Sunlink 3270) assumes that the >terminal will wrap at column 80, which it doesn't, so nothing comes >out formatted correctly. If the program doesn't use termcap or terminfo, things are more complicated. You'll have to write a program that will intercept the standard streams, process stdout and stderr, and interact with the application as if the user were doing it directly. The terminal I/O can be faked either by using a couple of extra pty's or by using ioctl() calls with the TIOCSTI parameter, to convince the application that piped input is actually coming from the keyboard. Chuck Karish ARPA: karish@denali.stanford.edu BITNET: karish%denali@forsythe.stanford.edu UUCP: {decvax,hplabs!hpda}!mindcrf!karish USPS: 1825 California St. #5 Mountain View, CA 94041