Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!eplrx7!mroz From: mroz@eplrx7.uucp (Peter Mroz) Newsgroups: comp.unix.aix Subject: Problem with Curses, AIX 3., RS/6000 Keywords: curses, AIX, RS/6000 Message-ID: <1990Aug21.192901.6523@eplrx7.uucp> Date: 21 Aug 90 19:29:01 GMT Sender: usenet@ee.udel.edu Organization: DuPont Engineering Physics Lab Lines: 71 Nntp-Posting-Host: louie.udel.edu Hello netters, I'm having a weird problem with curses on an IBM 530 RS/6000 running golden code. I've tried to reduce the problem to its essentials in the small test program included below. Basically, the program works when I include curses.h and link to -lcur. However, one is supposed to use -lcurses with curses.h. This is what I'd prefer to do, as -lcurses includes such niceties as box, wattron, and wattroff. The problem I have when I link to -lcurses is that stuff written to the right edge of the screen gets shifted over to the left by one character. Here's sample output from the program that works: $ testc + + 12345 + + This program writes the top line OK, but the rest of the stuff is shifted over to the left by one character: $ testc1 + + 12345 + + Thanks for any help. ------------------------------------------------------------------------ /* testc.c */ #include #include main () { WINDOW *testwin; char *numbers = "12345"; initscr(); testwin = newwin(5, 5, 0, 75); mvwaddch(testwin, 0, 0, '+'); mvwaddch(testwin, 0, 4, '+'); mvwaddch(testwin, 4, 0, '+'); mvwaddch(testwin, 4, 4, '+'); mvwaddstr(testwin, 2, 0, numbers); wrefresh(testwin); sleep(5); endwin(); exit(0); } ------------------------------------------------------------------------ # Makefile for testc and testc1 CFLAGS= -g all: testc testc1 testc: testc.o cc $(CFLAGS) testc.o -o testc -lcur testc1: testc.o cc $(CFLAGS) testc.o -o testc1 -lcurses -- Peter Mroz | E.I. Du Pont de Nemours & Co. eplrx7!mroz@uunet.uu.net | Consultant, Scicon mrozpa%wmvx@dupont.com | DuPont Building, D4078 | Wilmington, DE 19898 -- The UUCP Mailer