"Fossies" - the Fresh Open Source Software Archive

Member "Ygl-4.2/fortran.c" (18 Sep 2009, 21601 Bytes) of package /linux/misc/Ygl-4.2g.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "fortran.c" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 4.2f_vs_4.2g.

    1 /*
    2  *    Ygl: Run GL programs with standard X11 and/or OpenGL routines.
    3  *    (C) Fred Hucht 1993-2009
    4  *    EMail: fred<at>thp.Uni-DuE.de
    5  */
    6 
    7 static const char vcid[] = "$Id: fortran.c,v 4.3 2009-09-18 12:00:54+02 fred Exp $";
    8 
    9 #include "header.h" /* for COVERSLEEP & string.h */
   10 
   11 #ifndef YGL_PRE
   12 # define YGL_PRE(x) x
   13 #endif
   14 
   15 /* Fortran types */
   16 #define REAL    Float32
   17 #define REAL8   Float64
   18 #define INT2    Int16
   19 #define INT4    Int32
   20 #define LOGICAL Int32
   21 #define CHAR    char
   22 
   23 /* Append '\0' to FORTRAN string.
   24  * Thx to Frank Scott <fscott@frasco.demon.co.uk> for reporting bug and fix */
   25 #define L_TBUF 255
   26 static char Tbuf[L_TBUF+1];
   27 static char *apnd_0(CHAR * str, INT4 * len) {
   28   int l = *len > L_TBUF ? L_TBUF : *len;
   29   strncpy(Tbuf, str, l);
   30   Tbuf[l] = '\0';
   31   return Tbuf;
   32 }
   33 
   34 void setval_(INT4*x1, INT4*x2, INT4*x3, INT4*x4) {}
   35 void curson_(void) {}
   36 void cursof_(void) {}
   37 void chunks_(void) {}
   38 void greset_(void) {}
   39 
   40 /********************* draw.c */
   41 void YGL_PRE(clear_) (void) { clear();}
   42 
   43 /* Points */
   44 void YGL_PRE(pnt2_)  (REAL*x1, REAL*x2) { pnt2 (*x1, *x2);}
   45 void YGL_PRE(pnt2i_) (INT4*x1, INT4*x2) { pnt2i(*x1, *x2);}
   46 void YGL_PRE(pnt2s_) (INT2*x1, INT2*x2) { pnt2s(*x1, *x2);}
   47 
   48 /* Lines */
   49 void YGL_PRE(move2_) (REAL*x1, REAL*x2) { move2 (*x1, *x2);}
   50 void YGL_PRE(move2i_)(INT4*x1, INT4*x2) { move2i(*x1, *x2);}
   51 void YGL_PRE(move2s_)(INT2*x1, INT2*x2) { move2s(*x1, *x2);}
   52 
   53 void YGL_PRE(rmv2_)  (REAL*x1, REAL*x2) { rmv2 (*x1, *x2);}
   54 void YGL_PRE(rmv2i_) (INT4*x1, INT4*x2) { rmv2i(*x1, *x2);}
   55 void YGL_PRE(rmv2s_) (INT2*x1, INT2*x2) { rmv2s(*x1, *x2);}
   56 
   57 void YGL_PRE(draw2_) (REAL*x1, REAL*x2) { draw2 (*x1, *x2);}
   58 void YGL_PRE(draw2i_)(INT4*x1, INT4*x2) { draw2i(*x1, *x2);}
   59 void YGL_PRE(draw2s_)(INT2*x1, INT2*x2) { draw2s(*x1, *x2);}
   60 
   61 void YGL_PRE(rdr2_)  (REAL*x1, REAL*x2) { rdr2 (*x1, *x2);}
   62 void YGL_PRE(rdr2i_) (INT4*x1, INT4*x2) { rdr2i(*x1, *x2);}
   63 void YGL_PRE(rdr2s_) (INT2*x1, INT2*x2) { rdr2s(*x1, *x2);}
   64 
   65 /* Arcs & Circles */
   66 void YGL_PRE(arc_)   (REAL*x1, REAL*x2, REAL*x3, INT4*x4, INT4*x5) { arc  (*x1, *x2, *x3, *x4, *x5);}
   67 void YGL_PRE(arci_)  (INT4*x1, INT4*x2, INT4*x3, INT4*x4, INT4*x5) { arci (*x1, *x2, *x3, *x4, *x5);}
   68 void YGL_PRE(arcs_)  (INT2*x1, INT2*x2, INT2*x3, INT4*x4, INT4*x5) { arcs (*x1, *x2, *x3, *x4, *x5);}
   69 
   70 void YGL_PRE(arcf_)  (REAL*x1, REAL*x2, REAL*x3, INT4*x4, INT4*x5) { arcf (*x1, *x2, *x3, *x4, *x5);}
   71 void YGL_PRE(arcfi_) (INT4*x1, INT4*x2, INT4*x3, INT4*x4, INT4*x5) { arcfi(*x1, *x2, *x3, *x4, *x5);}
   72 void YGL_PRE(arcfs_) (INT2*x1, INT2*x2, INT2*x3, INT4*x4, INT4*x5) { arcfs(*x1, *x2, *x3, *x4, *x5);}
   73 
   74 void YGL_PRE(circ_)  (REAL*x1, REAL*x2, REAL*x3) { circ  (*x1, *x2, *x3);}
   75 void YGL_PRE(circi_) (INT4*x1, INT4*x2, INT4*x3) { circi (*x1, *x2, *x3);}
   76 void YGL_PRE(circs_) (INT2*x1, INT2*x2, INT2*x3) { circs (*x1, *x2, *x3);}
   77 
   78 void YGL_PRE(circf_) (REAL*x1, REAL*x2, REAL*x3) { circf (*x1, *x2, *x3);}
   79 void YGL_PRE(circfi_)(INT4*x1, INT4*x2, INT4*x3) { circfi(*x1, *x2, *x3);}
   80 void YGL_PRE(circfs_)(INT2*x1, INT2*x2, INT2*x3) { circfs(*x1, *x2, *x3);}
   81 
   82 /* Rects & Boxes */
   83 void YGL_PRE(rect_)  (REAL*x1, REAL*x2, REAL*x3, REAL*x4) { rect  (*x1, *x2, *x3, *x4);}
   84 void YGL_PRE(recti_) (INT4*x1, INT4*x2, INT4*x3, INT4*x4) { recti (*x1, *x2, *x3, *x4);}
   85 void YGL_PRE(rects_) (INT2*x1, INT2*x2, INT2*x3, INT2*x4) { rects (*x1, *x2, *x3, *x4);}
   86 
   87 void YGL_PRE(rectf_) (REAL*x1, REAL*x2, REAL*x3, REAL*x4) { rectf (*x1, *x2, *x3, *x4);}
   88 void YGL_PRE(rectfi_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4) { rectfi(*x1, *x2, *x3, *x4);}
   89 void YGL_PRE(rectfs_)(INT2*x1, INT2*x2, INT2*x3, INT2*x4) { rectfs(*x1, *x2, *x3, *x4);}
   90 
   91 void YGL_PRE(sbox_)  (REAL*x1, REAL*x2, REAL*x3, REAL*x4) { sbox  (*x1, *x2, *x3, *x4);}
   92 void YGL_PRE(sboxi_) (INT4*x1, INT4*x2, INT4*x3, INT4*x4) { sboxi (*x1, *x2, *x3, *x4);}
   93 void YGL_PRE(sboxs_) (INT2*x1, INT2*x2, INT2*x3, INT2*x4) { sboxs (*x1, *x2, *x3, *x4);}
   94 
   95 void YGL_PRE(sboxf_) (REAL*x1, REAL*x2, REAL*x3, REAL*x4) { sboxf (*x1, *x2, *x3, *x4);}
   96 void YGL_PRE(sboxfi_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4) { sboxfi(*x1, *x2, *x3, *x4);}
   97 void YGL_PRE(sboxfs_)(INT2*x1, INT2*x2, INT2*x3, INT2*x4) { sboxfs(*x1, *x2, *x3, *x4);}
   98 
   99 /* Filled Polygons */
  100 void YGL_PRE(concav_)(LOGICAL*x1) { concave(*x1);}
  101 
  102 void YGL_PRE(pmv2_)  (REAL*x1, REAL*x2) { pmv2 (*x1, *x2);}
  103 void YGL_PRE(pmv2i_) (INT4*x1, INT4*x2) { pmv2i(*x1, *x2);}
  104 void YGL_PRE(pmv2s_) (INT2*x1, INT2*x2) { pmv2s(*x1, *x2);}
  105 
  106 void YGL_PRE(rpmv2_) (REAL*x1, REAL*x2) { rpmv2 (*x1, *x2);}
  107 void YGL_PRE(rpmv2i_)(INT4*x1, INT4*x2) { rpmv2i(*x1, *x2);}
  108 void YGL_PRE(rpmv2s_)(INT2*x1, INT2*x2) { rpmv2s(*x1, *x2);}
  109 
  110 void YGL_PRE(pdr2_)  (REAL*x1, REAL*x2) { pdr2 (*x1, *x2);}
  111 void YGL_PRE(pdr2i_) (INT4*x1, INT4*x2) { pdr2i(*x1, *x2);}
  112 void YGL_PRE(pdr2s_) (INT2*x1, INT2*x2) { pdr2s(*x1, *x2);}
  113 
  114 void YGL_PRE(rpdr2_) (REAL*x1, REAL*x2) { rpdr2 (*x1, *x2);}
  115 void YGL_PRE(rpdr2i_)(INT4*x1, INT4*x2) { rpdr2i(*x1, *x2);}
  116 void YGL_PRE(rpdr2s_)(INT2*x1, INT2*x2) { rpdr2s(*x1, *x2);}
  117 
  118 void YGL_PRE(pclos_) (void) { pclos();}
  119 
  120 void YGL_PRE(poly2_) (INT4*x1, REAL x2[][2]) { polf2 (*x1, x2); }
  121 void YGL_PRE(poly2i_)(INT4*x1, INT4 x2[][2]) { polf2i(*x1, x2); }
  122 void YGL_PRE(poly2s_)(INT4*x1, INT2 x2[][2]) { polf2s(*x1, x2); }
  123 
  124 void YGL_PRE(polf2_) (INT4*x1, REAL x2[][2]) { polf2 (*x1, x2); }
  125 void YGL_PRE(polf2i_)(INT4*x1, INT4 x2[][2]) { polf2i(*x1, x2); }
  126 void YGL_PRE(polf2s_)(INT4*x1, INT2 x2[][2]) { polf2s(*x1, x2); }
  127 
  128 /* Vertex graphics */
  129 void YGL_PRE(bgnpoi_)(void) { bgnpoint     ();}
  130 void YGL_PRE(bgnlin_)(void) { bgnline      ();}
  131 void YGL_PRE(bgnclo_)(void) { bgnclosedline();}
  132 void YGL_PRE(bgnpol_)(void) { bgnpolygon   ();}
  133 void YGL_PRE(bgntme_)(void) { bgntmesh     ();}
  134 
  135 void YGL_PRE(endpoi_)(void) { endpoint     ();}
  136 void YGL_PRE(endlin_)(void) { endline      ();}
  137 void YGL_PRE(endclo_)(void) { endclosedline();}
  138 void YGL_PRE(endpol_)(void) { endpolygon   ();}
  139 void YGL_PRE(endtme_)(void) { endtmesh     ();}
  140 
  141 void YGL_PRE(v2s_)   (INT2  x1[2]) { v2s(x1);}
  142 void YGL_PRE(v2i_)   (INT4  x1[2]) { v2i(x1);}
  143 void YGL_PRE(v2f_)   (REAL  x1[2]) { v2f(x1);}
  144 void YGL_PRE(v2d_)   (REAL8 x1[2]) { v2d(x1);}
  145 
  146 /* Text */
  147 void YGL_PRE(cmov2_) (REAL*x1, REAL*x2) { cmov2 (*x1, *x2);}
  148 void YGL_PRE(cmov2i_)(INT4*x1, INT4*x2) { cmov2i(*x1, *x2);}
  149 void YGL_PRE(cmov2s_)(INT2*x1, INT2*x2) { cmov2s(*x1, *x2);}
  150 
  151 void YGL_PRE(getcpo_)(INT2*x1, INT2*x2) { getcpos(x1, x2);}
  152 
  153 /* Extensions: Routines not in gl by MiSt (michael@hal6000.thp.Uni-Duisburg.DE) */
  154 #ifdef X11
  155 void YGL_PRE(arcx_)  (REAL*x1, REAL*x2, REAL*x3, REAL*x4, INT4*x5, INT4*x6) { arcx  (*x1,*x2,*x3,*x4,*x5,*x6); }
  156 void YGL_PRE(arcxi_) (INT4*x1, INT4*x2, INT4*x3, INT4*x4, INT4*x5, INT4*x6) { arcxi (*x1,*x2,*x3,*x4,*x5,*x6); }
  157 void YGL_PRE(arcxs_) (INT2*x1, INT2*x2, INT2*x3, INT2*x4, INT4*x5, INT4*x6) { arcxs (*x1,*x2,*x3,*x4,*x5,*x6); }
  158 
  159 void YGL_PRE(arcxf_) (REAL*x1, REAL*x2, REAL*x3, REAL*x4, INT4*x5, INT4*x6) { arcxf (*x1,*x2,*x3,*x4,*x5,*x6); }
  160 void YGL_PRE(arcxfi_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4, INT4*x5, INT4*x6) { arcxfi(*x1,*x2,*x3,*x4,*x5,*x6); }
  161 void YGL_PRE(arcxfs_)(INT2*x1, INT2*x2, INT2*x3, INT2*x4, INT4*x5, INT4*x6) { arcxfs(*x1,*x2,*x3,*x4,*x5,*x6); }
  162 #endif
  163 
  164 /********************* queue.c */
  165 void YGL_PRE(tie_)   (INT4*x1, INT4*x2, INT4*x3) { tie(*x1, *x2, *x3); }
  166 void YGL_PRE(noise_) (INT4*x1, INT4*x2) { noise(*x1, *x2); }
  167 INT4 YGL_PRE(isqueu_)(INT4*x1) { return isqueued(*x1); }
  168 void YGL_PRE(qdevic_)(INT4*x1) { qdevice(*x1); }
  169 void YGL_PRE(unqdev_)(INT4*x1) { unqdevice(*x1); }
  170 void YGL_PRE(qreset_)(void)    { qreset(); }
  171 INT4 YGL_PRE(qtest_) (void)    { return qtest(); }
  172 INT4 YGL_PRE(qread_) (INT2*x1) { return qread(x1); }
  173 void YGL_PRE(qenter_)(INT4*x1, INT4*x2) { qenter(*x1, *x2); }
  174 #ifdef OGL
  175 void YGL_PRE(pick_)  (INT2*x1, INT4*x2) { pick(x1, *x2); }
  176 INT4 YGL_PRE(endpic_)(INT2*x1) { return (INT4)endpick(x1); }
  177 void YGL_PRE(picksi_)(INT4*x1, INT4*x2) { picksize(*x1, *x2); }
  178 
  179 void YGL_PRE(initna_)(void)    { initnames(); }
  180 void YGL_PRE(loadna_)(INT4*x1) { loadname(*x1); }
  181 void YGL_PRE(pushna_)(INT4*x1) { pushname(*x1); }
  182 void YGL_PRE(popnam_)(void)    { popname(); }
  183 #endif /* OGL */
  184 /********************* misc.c */
  185 void YGL_PRE(single_)(void)       { singlebuffer(); }
  186 void YGL_PRE(doublebuffer_)(void) { doublebuffer(); } /* > 6 */
  187 void YGL_PRE(double_)(void)       { doublebuffer(); }
  188 void YGL_PRE(swapbu_)(void)       { swapbuffers(); }
  189 void YGL_PRE(frontb_)(LOGICAL*x1) { frontbuffer(*x1); }
  190 void YGL_PRE(backbu_)(LOGICAL*x1) { backbuffer (*x1); }
  191 void YGL_PRE(gflush_)(void) { gflush(); }
  192 void YGL_PRE(gsync_) (void) { gsync(); }
  193 
  194 Display*
  195 /**/ YGL_PRE(getxdpy_)(void) { return getXdpy(); } /* > 6 */
  196 INT4 YGL_PRE(getxwid_)(void) { return (INT4)getXwid(); } /* > 6 */
  197 #ifdef X11
  198 INT4 YGL_PRE(getxdid_)(void) { return (INT4)getXdid(); } /* > 6 */
  199 GC   YGL_PRE(getxgc_) (void) { return getXgc (); }
  200 #endif
  201 
  202 
  203 void YGL_PRE(wintit_)(CHAR*x1, INT4*len) { wintitle(apnd_0(x1,len));}
  204 void YGL_PRE(winset_)(INT4*x1) { winset(*x1);}
  205 INT4 YGL_PRE(winget_)(void)    { return winget();}
  206 INT4 YGL_PRE(getpla_)(void)    { return getplanes();}
  207 INT4 YGL_PRE(getval_)(INT4*x1) { return getvaluator(*x1);}
  208 INT4 YGL_PRE(getbut_)(INT4*x1) { return getbutton(*x1);}
  209 INT4 YGL_PRE(gversi_)(CHAR*x1, INT4*len) { INT4 r = gversion(x1);if(len) *len = strlen(x1);return r;}
  210 
  211 void YGL_PRE(ortho2_)(REAL*x1, REAL*x2, REAL*x3, REAL*x4) { ortho2(*x1, *x2, *x3, *x4);}
  212 void YGL_PRE(viewpo_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4) { viewport(*x1, *x2, *x3, *x4);}
  213 void YGL_PRE(getvie_)(INT2*x1, INT2*x2, INT2*x3, INT2*x4) { getviewport(x1, x2, x3, x4);}
  214 void YGL_PRE(reshap_)(void)    { reshapeviewport();}
  215 void YGL_PRE(pushvi_)(void)    { pushviewport();}
  216 void YGL_PRE(popvie_)(void)    { popviewport();}
  217 
  218 void YGL_PRE(winpop_)(void)    { winpop();}
  219 void YGL_PRE(winpus_)(void)    { winpush();}
  220 INT4 YGL_PRE(windep_)(INT4*x1) { return windepth(*x1);}
  221 
  222 void YGL_PRE(linewi_)(INT4*x1) { linewidth(*x1);}
  223 INT4 YGL_PRE(getlwi_)(void)    { return getlwidth();}
  224 void YGL_PRE(deflin_)(INT4*x1, INT4*x2) { deflinestyle(*x1, *x2);}
  225 void YGL_PRE(setlin_)(INT4*x1) { setlinestyle(*x1);}
  226 INT4 YGL_PRE(getlst_)(void)    { return getlstyle();}
  227 void YGL_PRE(lsrepe_)(INT4*x1) { lsrepeat(*x1);}
  228 INT4 YGL_PRE(getlsr_)(void)    { return getlsrepeat();}
  229 INT4 YGL_PRE(getdis_)(void)    { return getdisplaymode();}
  230 
  231 void YGL_PRE(setbel_)(CHAR*x1) { setbell(*x1);}
  232 void YGL_PRE(ringbe_)(void)    { ringbell();}
  233 
  234 INT4 YGL_PRE(getgde_)(INT4*x1) { return getgdesc(*x1);}
  235 
  236 void YGL_PRE(foregr_)(void)    { }
  237 
  238 void YGL_PRE(logico_)(INT4*x1) { logicop(*x1);}
  239 
  240 void YGL_PRE(getmat_)(Matrix x1) { getmatrix(x1);}
  241 
  242 /* for fsscale et al. */
  243 void YGL_PRE(pntsiz_)(INT4*x1) { pntsize(*x1); }
  244 /* pntsizef not implemented */  
  245 
  246 /********************* font.c */
  247 void YGL_PRE(loadxf_)(INT4*x1, CHAR*x2, INT4*len) { loadXfont(*x1, apnd_0(x2,len)); }
  248 void YGL_PRE(font_)  (INT4*x1) { font(*x1);}
  249 INT4 YGL_PRE(getfon_)(void) { return getfont();}
  250 void YGL_PRE(getfontencoding_)(CHAR*x1, INT4*len) { getfontencoding(x1);if(len) *len = strlen(x1);} /* > 6 */
  251 INT4 YGL_PRE(gethei_)(void) { return getheight();}
  252 INT4 YGL_PRE(getdes_)(void) { return getdescender();}
  253 INT4 YGL_PRE(strwid_)(CHAR*x1, INT4*len) { return strwidth(apnd_0(x1,len));}
  254 void YGL_PRE(charst_)(CHAR*x1, INT4*len) { charstr(apnd_0(x1,len));}
  255 
  256 /********************* color.c */
  257 void YGL_PRE(mapcol_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4) { mapcolor(*x1, *x2, *x3, *x4);}
  258 void YGL_PRE(rgbcol_)(INT4*x1, INT4*x2, INT4*x3) { RGBcolor(*x1, *x2, *x3);}
  259 void YGL_PRE(cpack_) (INT4*x1) { cpack(*x1);}
  260 
  261 void YGL_PRE(c3s_)   (INT2 x1[3]) { c3s(x1);}
  262 void YGL_PRE(c3i_)   (INT4 x1[3]) { c3i(x1);}
  263 void YGL_PRE(c3f_)   (REAL x1[3]) { c3f(x1);}
  264 
  265 INT4 YGL_PRE(getcol_)(void) { return getcolor();}
  266 void YGL_PRE(getmco_)(INT4*x1, INT2*x2, INT2*x3, INT2*x4) { getmcolor (*x1, x2, x3, x4); }
  267 void YGL_PRE(getmcolors_)(INT4*x1, INT4*x2, INT2*x3, INT2*x4, INT2*x5) { getmcolors(*x1, *x2, x3, x4, x5); }
  268 void YGL_PRE(grgbco_)(INT2*x1, INT2*x2, INT2*x3) { gRGBcolor(x1, x2, x3);}
  269 
  270 void YGL_PRE(color_) (INT4*x1) { color(*x1);}
  271 void YGL_PRE(readso_)(INT4*x1) { readsource(*x1);}
  272 
  273 void YGL_PRE(rectzo_)(REAL*x1, REAL*x2) { rectzoom(*x1, *x2);}
  274 
  275 INT4 YGL_PRE(crectr_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4,Uint8*x5) { return crectread(*x1,*x2,*x3,*x4,x5); }
  276 INT4 YGL_PRE(rectre_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4, INT2*x5) { return  rectread(*x1,*x2,*x3,*x4,x5); }
  277 INT4 YGL_PRE(lrectr_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4, INT4*x5) { return lrectread(*x1,*x2,*x3,*x4,x5); }
  278 
  279 void YGL_PRE(crectw_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4,Uint8*x5) { crectwrite(*x1,*x2,*x3,*x4,x5); }
  280 void YGL_PRE(rectwr_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4, INT2*x5) {  rectwrite(*x1,*x2,*x3,*x4,x5); }
  281 void YGL_PRE(lrectw_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4, INT4*x5) { lrectwrite(*x1,*x2,*x3,*x4,x5); }
  282 
  283 void YGL_PRE(rectco_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4, INT4*x5, INT4*x6) { rectcopy(*x1,*x2,*x3,*x4,*x5,*x6); }
  284 
  285 INT4 YGL_PRE(readpi_)(INT4*x1, INT2 x2[]) { return readpixels(*x1, (Colorindex*)x2); }
  286 void YGL_PRE(writep_)(INT4*x1, INT2 x2[]) {       writepixels(*x1, (Colorindex*)x2); }
  287 INT4 YGL_PRE(readrg_)(INT4*x1, CHAR*x2, CHAR*x3, CHAR*x4) { return readRGB(*x1,(RGBvalue*)x2,(RGBvalue*)x3,(RGBvalue*)x4); }
  288 void YGL_PRE(writer_)(INT4*x1, CHAR*x2, CHAR*x3, CHAR*x4) {       writeRGB(*x1,(RGBvalue*)x2,(RGBvalue*)x3,(RGBvalue*)x4); }
  289 
  290 
  291 void YGL_PRE(blendf_)(INT4*x1, INT4*x2) { blendfunction(*x1,*x2); }
  292 
  293 /********************* menu.c */
  294 void YGL_PRE(addtop_)(INT4*x1, CHAR*x2, INT4*len, INT4*x3) { addtopup(*x1, apnd_0(x2,len), *x3);}
  295 /* defpup() not available in FORTRAN */
  296 INT4 YGL_PRE(dopup_) (INT4*x1) { return dopup(*x1);}
  297 void YGL_PRE(freepu_)(INT4*x1) { freepup(*x1);}
  298 INT4 YGL_PRE(newpup_)(void)    { return newpup();}
  299 void YGL_PRE(setpup_)(INT4*x1, INT4*x2, INT4*x3) { setpup(*x1, *x2, *x3);}
  300 
  301 /********************* ygl.c */
  302 /* Contraints */
  303 void YGL_PRE(minsiz_)(INT4*x1, INT4*x2) { minsize(*x1, *x2);}
  304 void YGL_PRE(maxsiz_)(INT4*x1, INT4*x2) { maxsize(*x1, *x2);}
  305 void YGL_PRE(prefsi_)(INT4*x1, INT4*x2) { prefsize(*x1, *x2);}
  306 void YGL_PRE(prefpo_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4) { prefposition(*x1, *x2, *x3, *x4);}
  307 void YGL_PRE(stepun_)(INT4*x1, INT4*x2) { stepunit(*x1, *x2);}
  308 void YGL_PRE(keepas_)(INT4*x1, INT4*x2) { keepaspect(*x1, *x2);}
  309 void YGL_PRE(noport_)(void) { noport();}
  310 void YGL_PRE(nobord_)(void) { noborder();}
  311 
  312 void YGL_PRE(ginit_) (void) { ginit();}
  313 void YGL_PRE(wincon_)(void) { winconstraints();}
  314 INT4 YGL_PRE(winope_)(CHAR*x1, INT4*len) { return winopen(apnd_0(x1,len));}
  315 INT4 YGL_PRE(swinop_)(INT4*x1) { return swinopen(*x1);}
  316 
  317 void YGL_PRE(winpos_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4) { winposition(*x1, *x2, *x3, *x4);}
  318 void YGL_PRE(winmov_)(INT4*x1, INT4*x2) { winmove(*x1, *x2);}
  319 
  320 void YGL_PRE(getsiz_)(INT4*x1, INT4*x2) { getsize  (x1,  x2);}
  321 void YGL_PRE(getori_)(INT4*x1, INT4*x2) { getorigin(x1,  x2);}
  322 
  323 void YGL_PRE(rgbmod_)(void) { RGBmode();}
  324 void YGL_PRE(cmode_) (void) { cmode();}
  325 
  326 void YGL_PRE(gconfi_)(void) { gconfig();}
  327 void YGL_PRE(winclo_)(INT4*x1) { winclose(*x1);}
  328 void YGL_PRE(gexit_) (void) { gexit();}
  329 
  330 
  331 INT4 YGL_PRE(winx_)  (INT4*dpy, INT4*win) { return winX((Display*)dpy, (Window)*win);}
  332 
  333 
  334 /* gl2ppm.c */
  335 INT4 YGL_PRE(gl2ppm_)(CHAR*x1, INT4*len) { return gl2ppm(apnd_0(x1,len)); }
  336 
  337 /* 3d.c */
  338 #ifdef OGL
  339 void YGL_PRE(cmov_)  (REAL*x1, REAL*x2, REAL*x3) { cmov (*x1, *x2, *x3);}
  340 void YGL_PRE(cmovi_) (INT4*x1, INT4*x2, INT4*x3) { cmovi(*x1, *x2, *x3);}
  341 void YGL_PRE(cmovs_) (INT2*x1, INT2*x2, INT2*x3) { cmovs(*x1, *x2, *x3);}
  342 
  343 void YGL_PRE(pnt_)   (REAL*x1, REAL*x2, REAL*x3) { pnt (*x1, *x2, *x3);}
  344 void YGL_PRE(pnti_)  (INT4*x1, INT4*x2, INT4*x3) { pnti(*x1, *x2, *x3);}
  345 void YGL_PRE(pnts_)  (INT2*x1, INT2*x2, INT2*x3) { pnts(*x1, *x2, *x3);}
  346 
  347 void YGL_PRE(move_)  (REAL*x1, REAL*x2, REAL*x3) { move (*x1, *x2, *x3);}
  348 void YGL_PRE(movei_) (INT4*x1, INT4*x2, INT4*x3) { movei(*x1, *x2, *x3);}
  349 void YGL_PRE(moves_) (INT2*x1, INT2*x2, INT2*x3) { moves(*x1, *x2, *x3);}
  350 
  351 void YGL_PRE(rmv_)   (REAL*x1, REAL*x2, REAL*x3) { rmv (*x1, *x2, *x3);}
  352 void YGL_PRE(rmvi_)  (INT4*x1, INT4*x2, INT4*x3) { rmvi(*x1, *x2, *x3);}
  353 void YGL_PRE(rmvs_)  (INT2*x1, INT2*x2, INT2*x3) { rmvs(*x1, *x2, *x3);}
  354 
  355 void YGL_PRE(draw_)  (REAL*x1, REAL*x2, REAL*x3) { draw (*x1, *x2, *x3);}
  356 void YGL_PRE(drawi_) (INT4*x1, INT4*x2, INT4*x3) { drawi(*x1, *x2, *x3);}
  357 void YGL_PRE(draws_) (INT2*x1, INT2*x2, INT2*x3) { draws(*x1, *x2, *x3);}
  358 
  359 void YGL_PRE(rdr_)   (REAL*x1, REAL*x2, REAL*x3) { rdr (*x1, *x2, *x3);}
  360 void YGL_PRE(rdri_)  (INT4*x1, INT4*x2, INT4*x3) { rdri(*x1, *x2, *x3);}
  361 void YGL_PRE(rdrs_)  (INT2*x1, INT2*x2, INT2*x3) { rdrs(*x1, *x2, *x3);}
  362 
  363 void YGL_PRE(pmv_)   (REAL*x1, REAL*x2, REAL*x3) { pmv (*x1, *x2, *x3);}
  364 void YGL_PRE(pmvi_)  (INT4*x1, INT4*x2, INT4*x3) { pmvi(*x1, *x2, *x3);}
  365 void YGL_PRE(pmvs_)  (INT2*x1, INT2*x2, INT2*x3) { pmvs(*x1, *x2, *x3);}
  366 
  367 void YGL_PRE(rpmv_)  (REAL*x1, REAL*x2, REAL*x3) { rpmv (*x1, *x2, *x3);}
  368 void YGL_PRE(rpmvi_) (INT4*x1, INT4*x2, INT4*x3) { rpmvi(*x1, *x2, *x3);}
  369 void YGL_PRE(rpmvs_) (INT2*x1, INT2*x2, INT2*x3) { rpmvs(*x1, *x2, *x3);}
  370 
  371 void YGL_PRE(pdr_)   (REAL*x1, REAL*x2, REAL*x3) { pdr (*x1, *x2, *x3);}
  372 void YGL_PRE(pdri_)  (INT4*x1, INT4*x2, INT4*x3) { pdri(*x1, *x2, *x3);}
  373 void YGL_PRE(pdrs_)  (INT2*x1, INT2*x2, INT2*x3) { pdrs(*x1, *x2, *x3);}
  374 
  375 void YGL_PRE(rpdr_)  (REAL*x1, REAL*x2, REAL*x3) { rpdr (*x1, *x2, *x3);}
  376 void YGL_PRE(rpdri_) (INT4*x1, INT4*x2, INT4*x3) { rpdri(*x1, *x2, *x3);}
  377 void YGL_PRE(rpdrs_) (INT2*x1, INT2*x2, INT2*x3) { rpdrs(*x1, *x2, *x3);}
  378 
  379 void YGL_PRE(poly_)  (INT4*x1, REAL x2[][3]) { polf (*x1, x2); }
  380 void YGL_PRE(polyi_) (INT4*x1, INT4 x2[][3]) { polfi(*x1, x2); }
  381 void YGL_PRE(polys_) (INT4*x1, INT2 x2[][3]) { polfs(*x1, x2); }
  382 
  383 void YGL_PRE(polf_)  (INT4*x1, REAL x2[][3]) { polf (*x1, x2); }
  384 void YGL_PRE(polfi_) (INT4*x1, INT4 x2[][3]) { polfi(*x1, x2); }
  385 void YGL_PRE(polfs_) (INT4*x1, INT2 x2[][3]) { polfs(*x1, x2); }
  386 
  387 void YGL_PRE(v3s_)   (INT2  x1[3]) { v3s(x1);}
  388 void YGL_PRE(v3i_)   (INT4  x1[3]) { v3i(x1);}
  389 void YGL_PRE(v3f_)   (REAL  x1[3]) { v3f(x1);}
  390 void YGL_PRE(v3d_)   (REAL8 x1[3]) { v3d(x1);}
  391 
  392 void YGL_PRE(v4s_)   (INT2  x1[4]) { v4s(x1);}
  393 void YGL_PRE(v4i_)   (INT4  x1[4]) { v4i(x1);}
  394 void YGL_PRE(v4f_)   (REAL  x1[4]) { v4f(x1);}
  395 void YGL_PRE(v4d_)   (REAL8 x1[4]) { v4d(x1);}
  396 
  397 void YGL_PRE(swaptm_)(void) { swaptmesh();}
  398 
  399 void YGL_PRE(ortho_) (REAL*x1, REAL*x2, REAL*x3, REAL*x4, REAL*x5, REAL*x6) { ortho(*x1, *x2, *x3, *x4, *x5, *x6);}
  400 void YGL_PRE(lookat_)(REAL*x1, REAL*x2, REAL*x3, REAL*x4, REAL*x5, REAL*x6, INT4*x7) { lookat(*x1, *x2, *x3, *x4, *x5, *x6, *x7);}
  401 void YGL_PRE(window_)(REAL*x1, REAL*x2, REAL*x3, REAL*x4, REAL*x5, REAL*x6) { window(*x1, *x2, *x3, *x4, *x5, *x6);}
  402 void YGL_PRE(perspe_)(INT4*x1, REAL*x2, REAL*x3, REAL*x4) { perspective(*x1, *x2, *x3, *x4);}
  403 void YGL_PRE(polarv_)(REAL*x1, INT4*x2, INT4*x3, INT4*x4) { polarview(*x1, *x2, *x3, *x4);}
  404 void YGL_PRE(rot_)   (REAL*x1, CHAR*x2) { rot(*x1, *x2);}
  405 void YGL_PRE(rotate_)(INT4*x1, CHAR*x2) { rotate(*x1, *x2);}
  406 void YGL_PRE(scale_) (REAL*x1, REAL*x2, REAL*x3) { scale(*x1, *x2, *x3);}
  407 void YGL_PRE(transl_)(REAL*x1, REAL*x2, REAL*x3) { translate(*x1, *x2, *x3);}
  408 
  409 void YGL_PRE(loadma_)(Matrix x1) { loadmatrix(x1);}
  410 void YGL_PRE(multma_)(Matrix x1) { multmatrix(x1);}
  411 void YGL_PRE(pushma_)(void) { pushmatrix();}
  412 void YGL_PRE(popmat_)(void) { popmatrix();}
  413 
  414 void YGL_PRE(shadem_)(INT4*x1) { shademodel(*x1);}
  415   
  416 void YGL_PRE(c4s_)   (INT2 x1[4]) { c4s(x1);}
  417 void YGL_PRE(c4i_)   (INT4 x1[4]) { c4i(x1);}
  418 void YGL_PRE(c4f_)   (REAL x1[4]) { c4f(x1);}
  419 
  420 void YGL_PRE(n3f_)   (REAL x1[3]) { n3f(x1);}
  421 void YGL_PRE(normal_)(REAL x1[3]) { normal(x1);}
  422 
  423 void YGL_PRE(backfa_)(LOGICAL*x1) { backface(*x1);}
  424 void YGL_PRE(frontf_)(LOGICAL*x1) { frontface(*x1);}
  425 
  426 INT4 YGL_PRE(getmmo_)(void) { return getmmode();}
  427 void YGL_PRE(mmode_) (INT4*x1) { mmode(*x1);}
  428 
  429 void YGL_PRE(zbuffe_)(LOGICAL*x1) { zbuffer(*x1);}
  430 void YGL_PRE(zclear_)(void)    { zclear();}
  431 void YGL_PRE(zdraw_) (INT4*x1) { zdraw(*x1);}
  432 void YGL_PRE(zfunct_)(INT4*x1) { zfunction(*x1);}
  433 void YGL_PRE(czclea_)(INT4*x1, INT4*x2) { czclear(*x1, *x2);}
  434 void YGL_PRE(depthc_)(INT4*x1) { depthcue(*x1);}
  435 void YGL_PRE(lrgbra_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4, INT4*x5, INT4*x6, INT4*x7, INT4*x8) { lRGBrange(*x1, *x2, *x3, *x4, *x5, *x6, *x7, *x8);}
  436 void YGL_PRE(lsetde_)(INT4*x1, INT4*x2) { lsetdepth(*x1, *x2);}
  437 void YGL_PRE(lshade_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4) { lshaderange(*x1, *x2, *x3, *x4);}
  438 
  439 /* Display lists */
  440 INT4 YGL_PRE(genobj_)(void) { return genobj();}
  441 INT4 YGL_PRE(isobj_) (INT4*x1) { return isobj(*x1);}
  442 void YGL_PRE(makeob_)(INT4*x1) { makeobj(*x1);}
  443 INT4 YGL_PRE(getope_)(void) { return getopenobj();}
  444 void YGL_PRE(closeo_)(void) { closeobj();}
  445 void YGL_PRE(callob_)(INT4*x1) { callobj(*x1);}
  446 void YGL_PRE(delobj_)(INT4*x1) { delobj(*x1);}
  447 
  448 /* Lighting */
  449 void YGL_PRE(lmbind_)(INT4*x1, INT4*x2) { lmbind(*x1, *x2);}
  450 void YGL_PRE(lmcolo_)(INT4*x1) { lmcolor(*x1);}
  451 void YGL_PRE(lmdef_) (INT4*x1, INT4*x2, INT4*x3, REAL x4[]) { lmdef(*x1, *x2, *x3, x4);}
  452 
  453 void YGL_PRE(rgbwri_)(INT4*x1, INT4*x2, INT4*x3) { RGBwritemask(*x1, *x2, *x3);}
  454 
  455 /* for Pete Riley */
  456 void YGL_PRE(drawmo_)(INT4*x1) { drawmode(*x1);}
  457 void YGL_PRE(iconsi_)(INT4*x1, INT4*x2) { iconsize(*x1, *x2);}
  458 void YGL_PRE(overla_)(INT4*x1) { overlay(*x1);}
  459 void YGL_PRE(pushat_)(void)    { pushattributes();}
  460 void YGL_PRE(popatt_)(void)    { popattributes();}
  461 void YGL_PRE(fullsc_)(void)    { fullscrn();}
  462 void YGL_PRE(endful_)(void)    { endfullscrn();}
  463 void YGL_PRE(scrmas_)(INT4*x1, INT4*x2, INT4*x3, INT4*x4) { scrmask(*x1,*x2,*x3,*x4);}
  464 
  465 #endif /* OGL */
  466 
  467 #ifdef COVERSLEEP
  468 void YGL_PRE(usleep_)(INT4*x1) {usleep(*x1);}
  469 void YGL_PRE(sleep_) (INT4*x1) { sleep(*x1);}
  470 #endif /* COVERSLEEP */