Path: utzoo!utgpu!news-server.csri.toronto.edu!eecg.toronto.edu!drb Newsgroups: comp.sys.sgi From: drb@eecg.toronto.edu (David R. Blythe) Subject: Re: more featureful pup - patch Message-ID: <1991Feb26.013619.9813@jarvis.csri.toronto.edu> Keywords: blunders Organization: OCLSC, University of Toronto Date: 26 Feb 91 06:36:19 GMT Lines: 67 I fixed up/tested the FORTRAN bindings as one or two people noted that they would find them useful. Randy Frank pointed out that my dopup() failed to return -1 if you selected an entry corresponding to a submenu without making the submenu open. I noticed that I didn't have the same item number assigment semantics as the sgi version in the absence of a %x specifier (I counted from 0 when it should have been 1). And I forgot to disable the z-buffer which can have surprising results in some programs (possibly only on GT/GTX machines). patches follow or the new version is available from pub/clsc/pup.tar.Z on bessel.clsc.utoronto.ca. additional comments/bug reports are welcome. david blythe ontario centre for large scale computation drb@clsc.utoronto.ca RCS file: RCS/pup.c,v retrieving revision 1.2 diff -r1.2 pup.c 136c136 < retval = menu->nel; --- > retval = el-menu->elements+1; 187a188,189 > if (pup == 0 || pup == -1 || str == 0) return; > 272c274 < retval = menu->nel; --- > retval = el-menu->elements+1; 328c330 < if (pup == 0 || pup == -1) return; --- > if (pup == 0 || pup == -1 || str == 0) return; 433c435 < retval = menu->nel; --- > retval = el-menu->elements+1; 478c480 < Boolean vis; --- > Boolean vis, zmode; 489a492 > zmode = getzbuffer(); zbuffer(FALSE); 495a499 > zbuffer(zmode); 627c631 < if (el->flags&F_DISBLE) return -1; --- > if (el->flags&(F_DISBLE|F_SUBMEN)) return -1; 731,732c735,738 < cmov2i(menu->ox, menu->cy+EL_SLOP - i*EL_HEIGHT-HILIGHT_FUDGE); < draw2i(menu->cx, menu->cy+EL_SLOP - i*EL_HEIGHT-HILIGHT_FUDGE); --- > int v[2]; > v[0] = menu->ox; > v[1] = menu->cy+EL_SLOP - i*EL_HEIGHT-HILIGHT_FUDGE; > bgnline(); v2i(v); v[0] = menu->cx; v2i(v); endline(); 940a947 > /*#define FORTRAN*/ 943c950 < * fortran bindings (broken) --- > * fortran bindings 968a976 > if (s) free(s); 981a990 > if (s) free(s); Brought to you by Super Global Mega Corp .com