Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!rice!sun-spots-request From: paisley@cme.nist.gov (Scott Paisley) Newsgroups: comp.sys.sun Subject: Need help with Suncore under 4.1 Keywords: Windows Message-ID: <8760@brazos.Rice.edu> Date: 12 Jun 90 14:05:59 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 80 Approved: Sun-Spots@rice.edu X-Sun-Spots-Digest: Volume 9, Issue 204, message 11 I know that core is no longer supported under 4.1, however I have a program that needs to run, and prevents us to upgrade some of our systems to 4.1 :-( (at least until we switch to a different graphics package) Anyway I have compiled the following program under 4.1 (with -Bstatic) and the 4.1 binary runs under 4.0.3. This tells me that something in the OS has changed out from under core. BTW, I'm using the core libraries in 4.1 which can be found in /usr/old. Has anyone found a fix to this? The error message I get under 4.1 is: initialize_view_surface: No physical surface is associated with the specified logical surface. select_view_surface: The specified surface has not been initialized. create_retained_segment: No view surface is currently selected. polyline_rel_2: No segment is open. line_rel_2: No segment is open. close_retained_segment: Invocation when no open segment. deselect_view_surface: The specified surface has not been initialized. It's as if a pseudo device is missing or something. If the program is modified NOT to create a new window (see comments in the program), then the program works under 4.1. ANY ideas would be greatly appreciated... /* to compile use cc -Bstatic testcore.c -lsuntool -lcore -lsunwindow -lpixrect -lm we use -Bstatic so that the 4.1 binary won't complain about missing libs under 4.0.3 this program runs fine under 4.0.3 but barfs in 4.1 */ #include static float glassdx[]={-10.0,9.0, 0.0,-14.0,30.0,-14.0, 0.0, 9.0,-10.0}; static float glassdy[]={ 0.0,1.0,19.0, 15.0, 0.0,-15.0,-19.0,-1.0, 0.0}; int pixwindd() ; /* the following line will work under 4.1 (does not create a new window */ /*struct vwsurf vwsurf = DEFAULT_VWSURF( pixwindd ); */ /* this does not work under 4.1. Creates a new window.. */ #define NEW_VWSURF(ddname) {"", "", 0, ddname, 0, 0, "", 1, 0} struct vwsurf vwsurf = NEW_VWSURF( pixwindd ); main(argc,argv) int argc; char **argv; { initialize_core(BASIC,NOINPUT,TWOD) ; initialize_view_surface(&vwsurf,FALSE) ; select_view_surface(&vwsurf) ; set_viewport_2 (0.125, 0.875, 0.125, 0.75); set_window (-50.0, 50.0, -10.0, 80.0); create_retained_segment(1); move_abs_2(0.0,0.0); /* move to origin */ polyline_rel_2(glassdx,glassdy,9); /* draw glass outline */ move_rel_2(-12.0,33.0); /* move to liquid surface */ line_rel_2(24.0,0.0); /* draw liquid surface */ close_retained_segment(); sleep(10) ; deselect_view_surface(&vwsurf); terminate_core(); } Scott Paisley paisley@cme.nist.gov ..!uunet!cme-durer!paisley