Problems with CURSES on Vax11/780

Steve Dussinger sdussin at dgis.dtic.dla.mil
Thu Nov 30 08:57:34 AEST 1989


I am having some difficulty using CURSES on a VAX 11/780, and was
wondering if someone out there could give me some help.

The problem is, I have created a window (usnig newwin), that is
10 rows by 60 columns on a Vt100.  Into this window I attempt
to print a string of _exactly_ 600 characters, using:

	wprintw(window,"%s",buffer);

where window is of type WINDOW *, and buffer is of type char *.

When I attempt to print this 600-char string, I get a Segmentation
Violation.

The strange thing about this is, if I try to print the buffer 
above, one char at a time, using:

	wprintw(window,"%c",*buffer++);

The program works fine.

The other interesting thing is, when I initially built the program,
I used a smaller window.  In the smaller version printing the string
all at once worked fine, but when I increased the size of the window
and buffer, it all fell apart.

Does anyone out there have any idea what I'm doing wrong?? I can't
find anything wrong with the code, all my pointers are correct, and
the string I'm tryin to print is null-terminated and exactly 600
chars.  I'm starting to lose my mind, here. Somebody please help....


				Thanx in advance,

				   Steve Dussinger

sdussin at dgis.dtic.dla.mil
sdussin at dev.dtic.dla.mil



More information about the Comp.unix.questions mailing list