Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.unix.questions Subject: Re: Curses question Keywords: curses scrolling Message-ID: <535@philmds.UUCP> Date: 28 Jun 88 19:56:34 GMT References: <376@dlscg1.UUCP> Reply-To: leo@philmds.UUCP (L.J.M. de Wit) Organization: Philips I&E DTS Eindhoven Lines: 28 In article <376@dlscg1.UUCP> dlsc1032@dlscg1.UUCP (Alan Beal) writes: |I am looking for an example curses program that forks/execs a process, reads |the output(both stdout and stderr) from the process, and displays the output |in a small window by scrolling. The output window will be a small part of |the original screen and I would like the process's output to only scroll |within the output window. In an attempt to learn how to do this, I have |found that using mvwaddstr() will not cause scrolling if you move text |beyond the limits(x-axis) of the defined window. If I just keep using |addstr(), the text will go beyond the x and y limits of the window and |logical scrolling will occur. Is there a proper way to do all of this? |I am using the Nutshell Curses book as a reference but as usual there are |too few examples and only short explanations. Are there any more fuller |discussons or examples of how to use curses in this manner out there? From the article Screen Updating and Cursor Movement Optimization: A Library Package (by Kenneth C.R.C. Arnold): scrollok(win,boolf) WINDOW win; bool boolf; Sets the scroll flag for the given window. If boolf is FALSE, scrolling is not allowed. This is its default setting. Perhaps using scrollok() on your window with boolf == TRUE solves your problem. Leo.