Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!zaphod.mps.ohio-state.edu!maverick.ksu.ksu.edu!uafhp!actsn!david From: david@actsn.fay.ar.us (David Summers) Newsgroups: comp.unix.xenix.sco Subject: CURSES! Foiled again! (inch routine HELP!!!) Keywords: Tandy SCO bug cc compiling Message-ID: <579@actsn.fay.ar.us> Date: 9 Sep 90 03:08:25 GMT Organization: All Church Technical Service, Fayetteville, AR Lines: 33 I need help! I have been using the Tandy 286 SYSV compiler for the last several years and I just upgraded to the SCO 386 2.3.2 system with the SDS 2.3.1b + xnx244 SLS. Now, when I try to compile a curses routine that uses the 'inch' macro, I get a segmentation error and the inevitable core dump. This routine worked FINE NO PROBLEM on the Tandy 286 SYSV compiler and it even works fine with the the SCO compiler in 386 mode but it does NOT work for the SCO compiler in 286 mode! What shall I do!???? I traced it down to what looks like an incorrect segment reference while computing the address in a two-dimensional array pointed to by a pointer. Here is the offending code: for ( pos = 0; pos < length; pos++ ) { char c; move( y, x + pos ); c = inch(); /* <----- It bombs here. */ bufp[pos] = c; } The 'inch' routine is actually a macro that references another macro that should use the stdscr structure to point to the actual data that is on the screen. This is part of my input routine, and I am copying a portion of the screen into a buffer. This has worked for 3 years with no problem and now it bombs! If anyone can help then I would greatly appreciate it. - David Summers (david@actsn.fay.ar.us) -- I'm sick and tired of this machine, I wish that I could sell it. It never does just what I want, but only what I tell it! - David Summers (david@actsn.fay.ar.us)