[comp.sys.sun] problem with SunCore on Sparcstation 1+

MONGER@sscvax.cis.mcmaster.ca (11/02/90)

I have run into a problem with the (now unsupported) SunCore library on a
Sparcstation 1+ running SunOS4.1.  It seems that if I do not want to
create the view surface in the window running the program, I am unable to
move, resize or close the window containing the view surface.  If I try to
do so, the console hangs and can only be recovered by killing suntools.
The following program demonstrates the problem.  It is exactly like the
"Getting started" test program in the SunCore reference manual for
SunOS4.0.3 (p. 7), except that it includes the statements

    get_view_surface (&Core_vwsurf, argv);
    Core_vwsurf.flags = VWSURF_NEWFLG;

to make the view surface appear in its own window.  So if you don't mind
hanging your console, compile and run this (the library is now
/usr/old/libcore.a) and while the window is up, try to e.g. resize it.
This works fine on a Sparcstation 1 running SunOS4.0.3, and also on a Sun
3 running SunOS4.1.  If someone else can give me an idea as to what is
wrong here, I would be grateful.  We DO want to port our SunCore software,
so we promise not to keep bothering you, but these are programs that are
in heavy use, on a poor Sun 3/160 who is completely unable to handle the
load, so we would like to first get them working on the Sparcstations, and
then redesign the program.

Thank you,
Patricia Monger
monger@mcmaster.ca

#include "/usr/old/usercore.h"

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();
static struct vwsurf Core_vwsurf= DEFAULT_VWSURF(pixwindd);

main(argc, argv)
int argc;
char **argv;
{
    int color_monitor;
    char string[80], *sstring;

    initialize_core (BASIC, NOINPUT, TWOD);
    get_view_surface (&Core_vwsurf, argv);
    Core_vwsurf.flags = VWSURF_NEWFLG;
    initialize_view_surface (&Core_vwsurf, FALSE);

    select_view_surface(&Core_vwsurf);
    set_viewport_2(0.125,0.875,0.125,0.75);
    set_window(-50.0,50.0,-10.0,80.0);

    create_temporary_segment();
    move_abs_2(0.0,0.0);
    polyline_rel_2(glassdx,glassdy,9);
    move_rel_2(-12.0,33.0);
    line_rel_2(24.0,0.0);
    close_temporary_segment();
    sleep(20);
    deselect_view_surface(&Core_vwsurf);
    terminate_core();
}