Strange curses problem
Pyung-Chul Kim
pckim at unisql.UUCP
Fri Jun 28 01:45:02 AEST 1991
In article <883 at spam.ua.oz> dcook at spam.ua.oz (David Cook) writes:
> [some stuffs deleted ]
>The problem is, I am trying to display the array 'abroll' on the
>screen, in a 6 row by 12 column format, evenly spaced.
>The current behaviour is to print the first number in each column
>in the correct place, and the other 5 appear around column 78 of the
>same line as the first number . If I remove the commented out section
>of code, below, the program works.
> [some stuffs deleted]
I cannot figure out the problem exactly, However,
it seems that crmode() (actually, replaced by cbreak()) followed by nl()
causes output as if the terminal doesn't map NEWLINE into NL/CR,
meanwhile, the terminal actually maps NL to NL/CR.
To see this, try following:
% a.out > scriptsfile; stty -onlcr; cat scriptfile; stty onlcr
If you remove crmode() or nl(), or even change the position, i.e.,
nl() followed by crmode(), the program will work.
If you got what the exact solution is, please let me know.
--
Pyung-Chul Kim
UniSQL, Inc.
9390 Research Blvd., Kaleido II, Suite 220, Austin, TX 78759
Internet: execu!sequoia!unisql!pckim at cs.utexas.edu
UUCP: {uunet, cs.utexas.edu!execu}!sequoia!unisql!pckim
TEL: (512)343-7297 Ext. 332
FAX: (512)343-7383
More information about the Comp.unix.programmer
mailing list