home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / historic / v92.tgz / v92.tar / v92 / src / h / rproto.h < prev    next >
C/C++ Source or Header  |  1996-03-22  |  26KB  |  631 lines

  1. /*
  2.  * Prototypes for run-time functions.
  3.  */
  4.  
  5. /*
  6.  * Prototypes common to the compiler and interpreter.
  7.  */
  8.  
  9. int    interp    Params((int fsig,dptr cargp));
  10. novalue    EVInit    Params((noargs));
  11. word    add    Params((word a,word b));
  12. word    mul    Params((word a,word b));
  13. word    sub    Params((word a,word b));
  14. int    dp_pnmcmp    Params((struct pstrnm *pne,dptr dp));
  15. int    getvar    Params((char *s,dptr vp));
  16. word    neg    Params((word a));
  17. int    pstrnmcmp    Params((struct pstrnm *a,struct pstrnm *b));
  18. novalue    xmfree    Params((noargs));
  19. novalue    icon_init    Params((char *name, int *argcp, char *argv[]));
  20. novalue    inttrap    Params((noargs));
  21. char    *alcstr            Params((char *s,word slen));
  22. char    *findfile        Params((word *ipc));
  23. char    *reserve        Params((int region, word nbytes));
  24. int    activate    Params((dptr val, struct b_coexpr *ncp, dptr result));
  25. int    anycmp            Params((dptr dp1,dptr dp2));
  26. int    bfunc            Params((noargs));
  27. int    co_chng    Params((struct b_coexpr *ncp, struct descrip *valloc, struct descrip *rsltloc, int swtch_typ, int first));
  28. int    cnv_c_dbl        Params((dptr s, double *d));
  29. int    cnv_c_int        Params((dptr s, C_integer *d));
  30. int    cnv_c_str        Params((dptr s, dptr d));
  31. int    cnv_cset        Params((dptr s, dptr d));
  32. int    cnv_ec_int        Params((dptr s, C_integer *d));
  33. int    cnv_eint        Params((dptr s, dptr d));
  34. int    cnv_int            Params((dptr s, dptr d));
  35. int    cnv_real        Params((dptr s, dptr d));
  36. int    cnv_str            Params((dptr s, dptr d));
  37. int    cnv_tcset        Params((struct b_cset *cbuf, dptr s, dptr d));
  38. int    cnv_tstr        Params((char *sbuf, dptr s, dptr d));
  39. int    coswitch        Params((word *old, word *new, int first));
  40. int    cplist            Params((dptr dp1,dptr dp2,word i,word j));
  41. novalue    cpslots            Params((dptr dp1,dptr slotptr,word i, word j));
  42. int    cpset            Params((dptr dp1,dptr dp2,word size));
  43. int    csetcmp            Params((unsigned int *cs1,unsigned int *cs2));
  44. int    cssize            Params((dptr dp));
  45. int    def_c_dbl        Params((dptr s, double df, double * d));
  46. int    def_c_int        Params((dptr s, C_integer df, C_integer * d));
  47. int    def_c_str        Params((dptr s, char * df, dptr d));
  48. int    def_cset        Params((dptr s, struct b_cset * df, dptr d));
  49. int    def_ec_int        Params((dptr s, C_integer df, C_integer * d));
  50. int    def_eint        Params((dptr s, C_integer df, dptr d));
  51. int    def_int            Params((dptr s, C_integer df, dptr d));
  52. int    def_real        Params((dptr s, double df, dptr d));
  53. int    def_str            Params((dptr s, dptr df, dptr d));
  54. int    def_tcset Params((struct b_cset *cbuf,dptr s,struct b_cset *df,dptr d));
  55. int    def_tstr        Params((char *sbuf, dptr s, dptr df, dptr d));
  56. int    doasgn            Params((dptr dp1,dptr dp2));
  57. int    doimage            Params((int c,int q));
  58. int    equiv            Params((dptr dp1,dptr dp2));
  59. int    err            Params((noargs));
  60. int    findcol            Params((word *ipc));
  61. int    findipc            Params((int line));
  62. int    findline        Params((word *ipc));
  63. int    findloc            Params((word *ipc));
  64. int    getstrg            Params((char *buf,int maxi,FILE *fd));
  65. int    idelay            Params((int n)); 
  66. int    lexcmp            Params((dptr dp1,dptr dp2));
  67. int    numcmp            Params((dptr dp1,dptr dp2,dptr dp3));
  68. int    pushact        Params((struct b_coexpr *ce, struct b_coexpr *actvtr));
  69. int    putstr            Params((FILE *f,dptr d));
  70. int    qtos    Params((dptr dp,char *sbuf));
  71. int     radix    Params((int sign, register int r, register char *s,
  72.                        register char *end_s, union numeric *result));
  73. novalue    addmem     Params((struct b_set *ps,struct b_selem *pe, union block **pl));
  74. novalue    c_exit            Params((int i));
  75. novalue    co_init            Params((struct b_coexpr *sblkp));
  76. novalue    coacttrace    Params((struct b_coexpr *ccp,struct b_coexpr *ncp));
  77. novalue    cofailtrace    Params((struct b_coexpr *ccp,struct b_coexpr *ncp));
  78. novalue    corettrace    Params((struct b_coexpr *ccp,struct b_coexpr *ncp));
  79. novalue    datainit        Params((noargs));
  80. novalue    deallocate        Params((union block *bp));
  81. novalue    drunerr            Params((int n, double v));
  82. novalue    dumpact            Params((struct b_coexpr *ce));
  83. novalue    env_int    Params((char *name,word *variable,int non_neg, uword limit));
  84. novalue    error            Params((char *s1, char *s2));
  85. novalue    err_msg            Params((int n, dptr v));
  86. novalue    fatalerr        Params((int n,dptr v));
  87. novalue    fpetrap            Params((noargs));
  88. novalue    iconhost        Params((char *hostname));
  89. novalue    irunerr            Params((int n, C_integer v));
  90. novalue    mksubs    Params((dptr var,dptr val,word i,word j, dptr result));
  91. novalue    outimage        Params((FILE *f,dptr dp,int restrict));
  92. #ifdef MultiThread
  93. novalue    resolve            Params((struct progstate *pstate));
  94. #else                    /* MultiThread */
  95. novalue    resolve            Params((noargs));
  96. #endif                    /* MultiThread */
  97. novalue retderef        Params((dptr valp, word *low, word *high));
  98. novalue    segvtrap        Params((noargs));
  99. novalue    stkdump            Params((int));
  100. novalue    syserr            Params((char *s));
  101. struct    astkblk *alcactiv    Params((noargs));
  102. struct    b_coexpr *popact    Params((struct b_coexpr *ce));
  103. struct    b_coexpr *topact    Params((struct b_coexpr *ce));
  104. struct    b_cset *alccset        Params((noargs));
  105. struct    b_file *alcfile        Params((FILE *fd,int status,dptr name));
  106. struct    b_lelem *alclstb    Params((uword nslots,uword first,uword nused));
  107. struct    b_list *alclist        Params((uword size));
  108. struct    b_real *alcreal        Params((double val));
  109. struct    b_selem *alcselem    Params((dptr mbr,uword hn));
  110. struct    b_slots *alcsegment    Params((word nslots));
  111. struct    b_telem *alctelem    Params((noargs));
  112. struct    b_tvtbl *alctvtbl    Params((dptr tbl,dptr ref,uword hashnum));
  113. struct    b_proc    *bi_strprc    Params((dptr s, C_integer arity));
  114. union block *alchash        Params((int tcode));
  115. union block *hgfirst    Params((union block *bp, struct hgstate *state));
  116. union block *hgnext    Params((union block*b,struct hgstate*s,union block *e));
  117. union block *hmake    Params((int tcode,word nslots,word nelem));
  118. union block **memb    Params((union block *pb,dptr x,uword hn, int *res));
  119. union block **hchain        Params((union block *pb,uword hn));
  120. uword    hash            Params((dptr dp));
  121. word    cvpos            Params((long pos,long len));
  122. word    longread        Params((char *s,int width,long len,FILE *fname));
  123. word    prescan            Params((dptr d));
  124.  
  125. int    c_get        Params((struct b_list *hp, struct descrip *res));
  126. void    c_put        Params((struct descrip *l, struct descrip *val));
  127.  
  128.  
  129. #if !HIGHC_386
  130. int    dup2        Params((int h1, int h2));
  131. #endif                    /* !HIGHC_386 */
  132.  
  133. char *qsearch    Params((char *key,char *base,int nel,int width, int (*cmp)()));
  134.  
  135. /*
  136.  * Temporary fix
  137.  */
  138.  
  139. #if ARM
  140. FILE *popen
  141. #endif                    /* ARM */
  142.  
  143. #if ATARI_ST
  144. char    *sbrk            Params((int incr));
  145. #endif                                  /* ATARI_ST */
  146.  
  147. #if HIGHC_386
  148. int    brk        Params((char *p));
  149. #endif                    /* HIGHC_386 */
  150.  
  151. #if MACINTOSH
  152. #if MPW
  153. char    *brk            Params((char *addr));
  154. char    *sbrk            Params((int incr));
  155. novalue    free            Params((char* addr));
  156. #endif                    /* MPW */
  157. #endif                    /* MACINTOSH */
  158.  
  159. #if MVS || VM
  160. #if SASC
  161. #define brk(x) sbrk(((char *)(x))-sbrk(0))
  162. char    *sbrk                   Params((int incr));
  163. #endif                    /* SASC */
  164. novalue free                    Params((void* addr));
  165. #endif                                  /* MVS || VM */
  166.  
  167. #if UNIX || VMS
  168. /*
  169.  * We use old-style declarations instead of prototypes here to avoid conflicts
  170.  *  with system definitions.  For example, some <stdio.h> files don't declare
  171.  *  popen; some declare it with char * args; and some specify const char *.
  172.  */
  173. int    chdir    ();
  174. FILE    *popen    ();
  175. #ifdef ExecImages
  176. char    *sbrk    ();
  177. #endif                    /* ExecImages */
  178. #endif                                  /* UNIX || VMS */
  179.  
  180. /* the following is just a stub in implementations without Coexpr */
  181. novalue new_context        Params((int fsig, dptr cargp));
  182.  
  183.  
  184. #ifdef Graphics
  185. /*
  186.  * portable graphics routines in rwindow.r and rwinrsc.r
  187.  */
  188. wcp    alc_context        Params((wbp w));
  189. wbp    alc_wbinding        Params((noargs));
  190. wsp    alc_winstate        Params((noargs));
  191. int    atobool            Params((char *s));
  192. int    c_push            Params((dptr l,dptr val));  /* in fstruct.r */
  193. int    docircles        Params((wbp w, int argc, dptr argv, int fill));
  194. novalue    drawCurve        Params((wbp w, XPoint *p, int n));
  195. char    *evquesub        Params((wbp w, int i));
  196. wsp    getactivewindow        Params((void));
  197. novalue    genCurve        Params((wbp w, XPoint *p, int n, void (*h)()));
  198. int    getpattern        Params((wbp w, char *answer));
  199. novalue    mystrncpy        Params((char *dest,char *src,int n));
  200. struct    palentry *palsetup    Params((int p));
  201. int    palnum            Params((dptr d));
  202. int    parsecolor        Params((wbp w, char *s, long *r, long *g, long *b));
  203. int    parsefont        Params((char *s, char *fam, int *sty, int *sz));
  204. int    parsegeometry        Params((char *buf, SHORT *x, SHORT *y, SHORT *width, SHORT *height));
  205. int    parsepattern        Params((char *s, int len, int *width, int *nbits, C_integer *bits));
  206. novalue    qevent            Params((wsp ws, dptr e, int x, int y, uword t, long f));
  207. int    readGIF            Params((char *fname, int p, struct imgdata *d));
  208. int    rectargs        Params((wbp w, int argc, dptr argv, int i,
  209.                    word *px, word *py, word *pw, word *ph));
  210. char    *rgbkey            Params((int p, double r, double g, double b));
  211. int    writeGIF        Params((wbp w, char *filename,
  212.                   int x, int y, int width, int height));
  213. int    setsize            Params((wbp w, char *s));
  214. char    *si_i2s            Params((siptr sip, int i));
  215. int    si_s2i            Params((siptr sip, char *s));
  216. char    *strnchr        Params((char *s, int ci, long len));
  217. int    ulcmp            Params((pointer p1, pointer p2));
  218. int    wattrib            Params((wbp w, char *s, long len, dptr answer, char *abuf));
  219. int    wgetche            Params((wbp w, dptr res));
  220. int    wgetchne        Params((wbp w, dptr res));
  221. int    wgetevent        Params((wbp w, dptr res));
  222. int    wgetstrg        Params((char *s, long maxlen, FILE *f));
  223. novalue    wgoto            Params((wbp w, int row, int col));
  224. int    wlongread        Params((char *s, int elsize, int nelem, FILE *f));
  225. novalue    wputstr            Params((wbp w, char *s, int len));
  226. int    xyrowcol        Params((dptr dx));
  227.  
  228. /*
  229.  * graphics implementation routines supplied for each platform
  230.  * (excluding those defined as macros for X-windows)
  231.  */
  232. int    SetPattern        Params((wbp w, char *name, int len));
  233. int    SetPatternBits        Params((wbp w, int width, C_integer *bits, int nbits));
  234. int    allowresize        Params((wbp w, int on));
  235. int    blimage            Params((wbp w, int x, int y, int width, int hgt,
  236.                   int ch, unsigned char *s, word len));
  237. wcp    clone_context        Params((wbp w));
  238. int    copyArea        Params((wbp w, wbp w2, int x, int y, int width, int height, int x2, int y2));
  239. int    do_config        Params((wbp w, int status));
  240. int    dumpimage        Params((wbp w, char *filename, unsigned int x, unsigned int y, unsigned int width, unsigned int height));
  241. novalue    eraseArea        Params((wbp w, int x, int y, int width, int height));
  242. novalue    fillrectangles        Params((wbp w, XRectangle *recs, int nrecs));
  243. novalue    free_binding        Params((wbp w));
  244. novalue    free_context        Params((wcp wc));
  245. novalue    free_mutable        Params((wbp w, int mute_index));
  246. int    free_window        Params((wsp ws));
  247. novalue    freecolor        Params((wbp w, char *s));
  248. char    *get_mutable_name    Params((wbp w, int mute_index));
  249. novalue    getbg            Params((wbp w, char *answer));
  250. novalue    getcanvas        Params((wbp w, char *s));
  251. int    getdefault        Params((wbp w, char *prog, char *opt, char *answer));
  252. novalue    getdisplay        Params((wbp w, char *answer));
  253. novalue    getdrawop        Params((wbp w, char *answer));
  254. novalue    getfg            Params((wbp w, char *answer));
  255. novalue    getfntnam        Params((wbp w, char *answer));
  256. novalue    geticonic        Params((wbp w, char *answer));
  257. int    geticonpos        Params((wbp w, char *s));
  258. int    getimstr        Params((wbp w, int x, int y, int width, int hgt,
  259.                   struct palentry *ptbl, unsigned char *data));
  260. novalue    getlinestyle        Params((wbp w, char *answer));
  261. int    getpixel_init        Params((wbp w, int x, int y, int width, int height));
  262. int    getpixel        Params((wbp w, int x, int y, long *rv, char *s));
  263. novalue    getpointername        Params((wbp w, char *answer));
  264. int    getpos            Params((wbp w));
  265. int    getvisual        Params((wbp w, char *answer));
  266. int    isetfg            Params((wbp w, int fg));
  267. int    isetbg            Params((wbp w, int bg));
  268. int    lowerWindow        Params((wbp w));
  269. int    mutable_color        Params((wbp w, dptr argv, int ac, int *retval));
  270. int    nativecolor        Params((wbp w, char *s, long *r, long *g, long *b));
  271.  
  272. #ifndef PresentationManager
  273. /* Exclude those functions defined as macros */
  274. int    pollevent        Params((noargs));
  275. novalue wflush            Params((wbp w));
  276. #endif                    /* PresentationManager */
  277.  
  278. int    query_pointer        Params((wbp w, XPoint *pp));
  279. int    query_rootpointer    Params((XPoint *pp));
  280. int    raiseWindow        Params((wbp w));
  281. int    readimage        Params((wbp w, char *filename, int x, int y, int *status));
  282. int    rebind            Params((wbp w, wbp w2));
  283. int    set_mutable        Params((wbp w, int i, char *s));
  284. int    setbg            Params((wbp w, char *s));
  285. int    setcanvas        Params((wbp w, char *s));
  286. novalue    setclip            Params((wbp w));
  287. int    setcursor        Params((wbp w, int on));
  288. int    setdisplay        Params((wbp w, char *s));
  289. int    setdrawop        Params((wbp w, char *val));
  290. int    setfg            Params((wbp w, char *s));
  291. int    setfillstyle        Params((wbp w, char *s));
  292. int    setfont            Params((wbp w, char **s));
  293. int    setgamma        Params((wbp w, double gamma));
  294. int    setgeometry        Params((wbp w, char *geo));
  295. int    setheight        Params((wbp w, SHORT new_height));
  296. int    seticonicstate        Params((wbp w, char *s));
  297. int    seticonlabel        Params((wbp w, char *val));
  298. int    seticonpos        Params((wbp w, char *s));
  299. int    setimage        Params((wbp w, char *val));
  300. int    setleading        Params((wbp w, int i));
  301. int    setlinestyle        Params((wbp w, char *s));
  302. int    setlinewidth        Params((wbp w, LONG linewid));
  303. int    setpointer        Params((wbp w, char *val));
  304. int    setwidth        Params((wbp w, SHORT new_width));
  305. int    setwindowlabel        Params((wbp w, char *val));
  306. int    strimage        Params((wbp w, int x, int y, int width,
  307.                   int height, struct palentry *e,
  308.                   unsigned char *s, word len, int on_icon));
  309. novalue    toggle_fgbg        Params((wbp w));
  310. int    walert            Params((wbp w, int volume));
  311. novalue    warpPointer        Params((wbp w, int x, int y));
  312. int    wclose            Params((wbp w));
  313. novalue    wflush            Params((wbp w));
  314. int    wgetq            Params((wbp w, dptr res));
  315. FILE    *wopen            Params((char *windowname, struct b_list *hp, dptr attr, int n, int *err_index));
  316. int    wputc            Params((int ci, wbp w));
  317. novalue    wsync            Params((wbp w));
  318. novalue    xdis            Params((wbp w, char *s, int n));
  319.  
  320. #ifdef ConsoleWindow
  321. FILE* OpenConsole        Params((void));
  322. int   Consolefprintf        (FILE *file, char *format, ...);
  323. int   Consoleputc        (int c, FILE *file);
  324. int   Consolefflush        (FILE *file);
  325. #endif                    /* ConsoleWindow */
  326.  
  327. #ifdef MacGraph
  328. /*
  329.  * Implementation routines specific to Macintosh
  330.  */
  331. void hidecrsr (wsp ws);
  332. void showcrsr (wsp ws);
  333. void UpdateCursorPos(wsp ws, wcp wc);
  334. void GetEvents (void);
  335. void DoEvent (EventRecord *eventPtr);
  336. void DoMouseUp (EventRecord *eventPtr);
  337. void DoMouseDown (EventRecord *eventPtr);
  338. void DoGrowWindow (EventRecord *eventPtr, WindowPtr whichWindow);
  339. void GetLocUpdateRgn (WindowPtr whichWindow, RgnHandle localRgn);
  340. void DoKey (EventRecord *eventPtr, WindowPtr whichWindow);
  341. void EventLoop(void);
  342. void HandleMenuChoice (long menuChoice);
  343. void HandleAppleChoice (short item);
  344. void HandleFileChoice (short item);
  345. void HandleOptionsChoice (short item);
  346. void DoUpdate (EventRecord *eventPtr);
  347. void DoActivate (WindowPtr whichWindow, Boolean becomingActive);
  348. void RedrawWindow (WindowPtr whichWindow);
  349. const int ParseCmdLineStr (char *s, char *t, char **argv);
  350. pascal OSErr SetDialogDefaultItem (DialogPtr theDialog, short newItem) = { 0x303C, 0x0304, 0xAA68 };
  351. pascal OSErr SetDialogCancelItem (DialogPtr theDialog, short newItem) = { 0x303C, 0x0305, 0xAA68 };
  352. pascal OSErr SetDialogTracksCursor (DialogPtr theDialog, Boolean tracks) = { 0x303C, 0x0306, 0xAA68 };
  353.  
  354. void drawarcs(wbinding *wb, XArc *arcs, int narcs);
  355. void drawlines(wbinding *wb, XPoint *points, int npoints);  
  356. void drawpoints(wbinding *wb, XPoint *points, int npoints);  
  357. void drawrectangles(wbp wb, XRectangle *recs, int nrecs);
  358. void drawsegments(wbinding *wb, XSegment *segs, int nsegs);
  359. void fillarcs(wbp wb, XArc *arcs, int narcs);
  360. void fillpolygon(wbp wb, XPoint *pts, int npts);  
  361. #endif                    /* MacGraph */
  362.  
  363. #ifdef XWindows
  364. /*
  365.  * Implementation routines specific to X-Windows
  366.  */
  367. novalue    unsetclip        Params((wbp w));
  368. novalue    moveWindow        Params((wbp w, int x, int y));
  369. int    moveResizeWindow    Params((wbp w, int x, int y, int width, int height));
  370. int    resetfg            Params((wbp w));
  371. int    setfgrgb        Params((wbp w, int r, int g, int b));
  372. int    setbgrgb        Params((wbp w, int r, int g, int b));
  373.  
  374. XColor    xcolor            Params((wbp w, LinearColor clr));
  375. LinearColor    lcolor        Params((wbp w, XColor color));
  376. int    pixmap_open        Params((wbp w, dptr attribs, int argc));
  377. int    pixmap_init        Params((wbp w));
  378. int    remap            Params((wbp w, int x, int y));
  379. int    seticonimage        Params((wbp w, dptr dp));
  380. novalue    makeIcon        Params((wbp w, int x, int y));
  381. int    translate_key_event    Params((XKeyEvent *k1, char *s, KeySym *k2));
  382. int    handle_misc        Params((wdp display, wbp w));
  383. wdp    alc_display        Params((char *s));
  384. novalue    free_display        Params((wdp wd));
  385. wfp    alc_font        Params((wbp w, char **s));
  386. wfp    tryfont            Params((wbp w, char *s));
  387. wclrp    alc_rgb            Params((wbp w, char *s, unsigned int r, unsigned int g, unsigned int b, int is_iconcolor));
  388. int    alc_centry        Params((wdp wd));
  389. wclrp    alc_color        Params((wbp w, char *s));
  390. novalue    copy_colors        Params((wbp w1, wbp w2));
  391. novalue    free_xcolor        Params((wbp w, unsigned long c));
  392. novalue    free_xcolors        Params((wbp w, int extent));
  393. int    go_virtual        Params((wbp w));
  394. int    resizePixmap        Params((wbp w, int width, int height));
  395. #endif                    /* XWindows */
  396.  
  397. #ifdef MSWindows
  398. /*
  399.  * Implementation routines specific to MS Windows
  400.  */
  401. int mswinsystem        Params((char *s));
  402. void UpdateCursorPos    Params((wsp ws, wcp wc));
  403. LRESULT_CALLBACK WndProc    Params((HWND, UINT, WPARAM, LPARAM));
  404. HDC CreateWinDC        Params((wbp));
  405. HDC CreatePixDC        Params((wbp, HDC));
  406. HBITMAP loadimage    Params((wbp wb, char *filename, unsigned int *width,
  407.             unsigned int *height, int atorigin, int *status));
  408. void wfreersc();
  409. int getdepth(wbp w);
  410. HBITMAP CreateBitmapFromData(char *data);
  411. int resizePixmap(wbp w, int width, int height);
  412. int textWidth(wbp w, char *s, int n);
  413. int    seticonimage        Params((wbp w, dptr dp));
  414. int devicecaps(wbp w, int i);
  415. void fillarcs(wbp wb, XArc *arcs, int narcs);
  416. void drawarcs(wbp wb, XArc *arcs, int narcs);
  417. void drawlines(wbinding *wb, XPoint *points, int npoints);
  418. void drawpoints(wbinding *wb, XPoint *points, int npoints);
  419. void drawrectangles(wbp wb, XRectangle *recs, int nrecs);
  420. void fillpolygon(wbp w, XPoint *pts, int npts);
  421. void drawsegments(wbinding *wb, XSegment *segs, int nsegs);
  422. void drawstrng(wbinding *wb, int x, int y, char *s, int slen);
  423. novalue unsetclip(wbp w);
  424.  
  425. #endif                    /* MSWindows */
  426.  
  427. #ifdef PresentationManager
  428. /*
  429.  * Implementation routines specific to OS/2 Presentation Manager
  430.  */
  431. wsp ObtainEvents(wsp ws, SHORT blockflag, ULONG messg, QMSG *msg);
  432. void InterpThreadStartup(void *args);
  433. void InterpThreadShutdown(void);
  434. void DestroyWindow(wsp ws);
  435. void LoadDefAttrs(wbinding *wb, wsp ws, wcp wc);
  436. void ResizeBackingBitmap(wsp ws, SHORT x, SHORT y);
  437. int  moveResizeWindow(wbp w,int x, int y, int width, int height);
  438. novalue moveWindow(wbp w, int x, int y);
  439. int  resizeWindow(wbp w,int width,int height);
  440. int SetNewBitPattern(wcp wc, PBYTE bits);
  441. int LoadFont(wbp wb, char *family, LONG attr, ULONG fontsize);
  442. void FreeIdTable(void);
  443. void FreeLocalID(LONG id);
  444.  
  445. /* -- not needed because of macro definitions
  446. void SetCharContext(wbp wb, wsp ws, wcp wc);
  447. void SetAreaContext(wbp wb, wsp ws, wcp wc);
  448. void SetLineContext(wbp wb, wsp ws, wcp wc);
  449. void SetImageContext(wbp wb, wsp ws, wcp wc);
  450.    -- */
  451.  
  452. void SetClipContext(wbp wb, wsp ws, wcp wc);
  453. void UnsetContext(wcp wc, void (*f)(wcp, wsp));
  454. void UCharContext(wcp wc, wsp ws);
  455. void ULineContext(wcp wc, wsp ws);
  456. void UAreaContext(wcp wc, wsp ws);
  457. void UImageContext(wcp wc, wsp ws);
  458. void UClipContext(wcp wc, wsp ws);
  459. void UAllContext(wcp wc, wsp ws);
  460. void drawpoints(wbp wb, XPoint *pts, int npts);
  461. void drawsegments(wbp wb, XSegment *segs, int nsegs);
  462. void drawstrng(wbp wb, int x, int y, char *str, int slen);
  463. void drawarcs(wbp w, XArc *arcs, int narcs);
  464. void drawlines(wbp wb, XPoint *pts, int npts);
  465. void drawrectangles(wbp wb, XRectangle *recs, int nrecs);
  466. int dumpimage(wbp wb, char *filename, int x, int y, int width, int height);
  467. void fillpolygon(wbp wb, XPoint *pts, int npts);
  468. HBITMAP loadimage(wbp wb, char *filename, int *width, int *height);
  469. void InitializeIdTable(void);
  470. void InitializeColorTable(void);
  471. void FreeColorTable(void);
  472. LONG GetColorIndex(char *buf, double gamma);
  473. void AddLocalIdToWindow(wsp ws, LONG id);
  474. void ReleaseLocalId(LONG id);
  475. void ReleaseColor(LONG indx);
  476. void ColorInitPS(wbp wb);
  477. void GetColorName(LONG indx, char *buf, int len);
  478. void EnsureColorAvailable(LONG indx);
  479. int GetTextWidth(wbp wb, char *text, int len);
  480. int AddWindowDep(wsp ws, wcp wc);
  481. int AddContextDep(wsp ws, wcp wc);
  482. FILE *PMOpenConsole(void);
  483. void UpdateCursorConfig(wsp ws, wcp wc);
  484. void UpdateCursorPos(wsp ws, wcp wc);
  485.  
  486. #endif                    /* PresentationManager */
  487. #endif                    /* Graphics */
  488.  
  489.  
  490. #if UNIX
  491. #ifdef KeyboardFncs
  492. int getch(), getche(), kbhit();
  493. #endif                    /* KeyboardFncs */
  494. #endif                    /* UNIX */
  495.  
  496. #ifdef LargeInts
  497. struct    b_bignum *alcbignum    Params((word n));
  498. word    bigradix        Params((int sign, int r, char *s, char *x, union numeric *result));
  499. double    bigtoreal        Params((dptr da));
  500. int    realtobig        Params((dptr da, dptr dx));
  501. int    bigtos            Params((dptr da, dptr dx));
  502. novalue    bigprint        Params((FILE *f, dptr da));
  503. int    cpbignum        Params((dptr da, dptr db));
  504. int    bigadd            Params((dptr da, dptr db, dptr dx));
  505. int    bigsub            Params((dptr da, dptr db, dptr dx));
  506. int    bigmul            Params((dptr da, dptr db, dptr dx));
  507. int    bigdiv            Params((dptr da, dptr db, dptr dx));
  508. int    bigmod            Params((dptr da, dptr db, dptr dx));
  509. int    bigneg            Params((dptr da, dptr dx));
  510. int    bigpow            Params((dptr da, dptr db, dptr dx));
  511. int    bigand            Params((dptr da, dptr db, dptr dx));
  512. int    bigor            Params((dptr da, dptr db, dptr dx));
  513. int    bigxor            Params((dptr da, dptr db, dptr dx));
  514. int    bigshift        Params((dptr da, dptr db, dptr dx));
  515. word    bigcmp            Params((dptr da, dptr db));
  516. int    bigrand            Params((dptr da, dptr dx));
  517. #endif                    /* LargeInts */
  518.  
  519.  
  520. /*
  521.  * Prototypes for the run-time system.
  522.  */
  523.  
  524. C_integer    iipow    Params((C_integer n1, C_integer n2));
  525. int    bfunc    Params((noargs));
  526. int    collect    Params((int region));
  527. int    cvcset    Params((dptr dp,int * *cs,int *csbuf));
  528. int    cvnum    Params((dptr dp,union numeric *result));
  529. int    cvreal    Params((dptr dp,double *r));
  530. int    eq    Params((dptr dp1,dptr dp2));
  531. int    fixtrap    Params((noargs));
  532. int    getimage    Params((dptr dp1, dptr dp2));
  533. int    get_name    Params((dptr dp1, dptr dp2));
  534. int    getstrg    Params((char *buf,int maxi,FILE *fd));
  535. int    mkreal    Params((double r,dptr dp));
  536. int    nthcmp    Params((dptr d1,dptr d2));
  537. void    nxttab    Params((C_integer *col, dptr *tablst, dptr endlst, C_integer *last, C_integer *interval));
  538. int    order    Params((dptr dp));
  539. int    printable    Params((int c));
  540. int    ripow    Params((double r, C_integer n, dptr rslt));
  541. int    sig_rsm    Params((noargs));
  542. int    subs_asgn    Params((dptr dest, const dptr src));
  543. int    trcmp3    Params((struct dpair *dp1,struct dpair *dp2));
  544. int    trefcmp    Params((dptr d1,dptr d2));
  545. int    tvalcmp    Params((dptr d1,dptr d2));
  546. int    tvcmp4    Params((struct dpair *dp1,struct dpair *dp2));
  547. long    ckadd    Params((long i, long j));
  548. long    ckmul    Params((long i, long j));
  549. long    cksub    Params((long i, long j));
  550. novalue    cmd_line    Params((int argc, char **argv, dptr rslt));
  551. novalue    cotrace    Params((struct b_coexpr *ccp, struct b_coexpr *ncp, int swtch_typ, dptr valloc));
  552. novalue    deref    Params((dptr dp1, dptr dp2));
  553. novalue    envset    Params((noargs));
  554. novalue    hgrow    Params((union block *bp));
  555. novalue    hshrink    Params((union block *bp));
  556. novalue    init    Params((char *name, int *argcp, char *argv[], int trc_init));
  557. novalue    rtos            Params((double n,dptr dp,char *s));
  558. int    tvtbl_asgn        Params((dptr dest, const dptr src));
  559. novalue    varargs    Params((dptr argp, int nargs, dptr rslt));
  560. #ifdef MultiThread
  561. struct    b_coexpr *alccoexp    Params((long icodesize, long stacksize));
  562. #else                    /* MultiThread */
  563. struct    b_coexpr *alccoexp    Params((noargs));
  564. #endif                    /* MultiThread */
  565. struct    b_coexpr *create   Params((continuation fnc, struct b_proc *p, int ntemps, int wrk_size));
  566. struct    b_external *alcextrnl    Params((int n));
  567. struct    b_record *alcrecd    Params((int nflds,union block *recptr));
  568. struct    b_proc *strprc    Params((dptr s, C_integer arity));
  569. struct    b_tvsubs *alcsubs    Params((word len,word pos,dptr var));
  570.  
  571. #ifdef EventMon
  572. novalue    MMAlc    Params((word len, int type));
  573. novalue    MMStr    Params((word slen));
  574. novalue EVVal    Params((word value, int event));
  575. novalue EVValD    Params((dptr dp, int event));
  576. novalue EVAsgn    Params((dptr dx));
  577. #endif                    /* EventMon */
  578.  
  579. #ifdef MultiThread
  580. struct b_coexpr *loadicode Params((char *name, struct b_file *theInput,
  581.                    struct b_file *theOutput,
  582.                    struct b_file *theError,
  583.                    C_integer bs, C_integer ss, C_integer stk));
  584. novalue actparent Params((int eventcode));
  585. int mt_activate   Params((dptr tvalp, dptr rslt, struct b_coexpr *ncp));
  586. #endif                    /* MultiThread */
  587.  
  588. #if COMPILER
  589. novalue    tracebk    Params((struct p_frame *lcl_pfp,dptr argp));
  590. int    invoke    Params((int nargs,dptr args, dptr rslt, continuation cont));
  591. int    xdisp    Params((struct p_frame *fp,dptr dp,int count, FILE *f));
  592. novalue    atrace    Params((noargs));
  593. novalue    ctrace    Params((noargs));
  594. novalue    failtrace    Params((noargs));
  595. novalue    rtrace    Params((noargs));
  596. novalue    strace    Params((noargs));
  597. novalue    initalloc    Params((noargs));
  598. struct    b_refresh *alcrefresh    Params((int na,int nl, int nt, int wk_sz));
  599. #else                    /* COMPILER */
  600.  
  601. #define Fargs dptr cargp
  602.  
  603. novalue    tracebk    Params((struct pf_marker *lcl_pfp,dptr argp));
  604. int    invoke    Params((int nargs, dptr *cargs, int *n));
  605. int    xdisp    Params((struct pf_marker *fp,dptr dp,int count, FILE *f));
  606.  
  607. int    Obscan            Params((int nargs,Fargs));
  608. int    Ocreate            Params((word *entryp,Fargs));
  609. int    Oescan            Params((int nargs,Fargs));
  610. int    Ofield            Params((int nargs,Fargs));
  611. int    Olimit            Params((int nargs,Fargs));
  612. int    Ollist            Params((int nargs,Fargs));
  613. int    Omkrec            Params((int nargs,Fargs));
  614. novalue    atrace    Params((dptr dp));
  615. novalue    ctrace    Params((dptr dp, int nargs, dptr arg));
  616. novalue    failtrace    Params((dptr dp));
  617. novalue    rtrace    Params((dptr dp, dptr rval));
  618. novalue    strace    Params((dptr dp, dptr rval));
  619. #ifdef MultiThread
  620. novalue    initalloc    Params((word codesize, struct progstate *p));
  621. #else                    /* MultiThread */
  622. novalue    initalloc    Params((word codesize));
  623. #endif                    /* MultiThread */
  624. struct    b_refresh *alcrefresh    Params((word *e, int nl, int nt));
  625.  
  626. #ifdef ExternalFunctions
  627. dptr    extcall            Params((dptr x, int nargs, int *signal));
  628. #endif                    /* ExternalFunctions */
  629.  
  630. #endif                    /* COMPILER */
  631.