home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / DOS / Programa / CCDL122.ZIP / SOURCE / THUNKS.NEW < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.6 KB  |  57 lines

  1. /*
  2.  * 68K/386 32-bit C compiler.
  3.  *
  4.  * copyright (c) 1996, David Lindauer
  5.  * 
  6.  * This compiler is intended for educational use.  It may not be used
  7.  * for profit without the express written consent of the author.
  8.  *
  9.  * It may be freely redistributed, as long as this notice remains intact
  10.  * and sources are distributed along with any executables derived from them.
  11.  *
  12.  * The author is not responsible for damages, either direct or consequential,
  13.  * that may arise from use of this software.
  14.  *
  15.  * v1.5 August 1996
  16.  * David Lindauer, gclind01@starbase.spd.louisville.edu
  17.  *
  18.  * Credits to Mathew Brandt for original K&R C compiler
  19.  *
  20.  */
  21. #include        <stdio.h>
  22. #include        "expr.h"
  23. #include        "c.h"
  24. #include        "gen.h"
  25. #include        "cglbdec.h"
  26. #include                "list.h"
  27.  
  28. ENODE *callctr(ENODE *name,char *func,ENODE *pnode,int elms,int size);
  29. {
  30.     ENODE *pnode,**qnode,*snode,*anode;
  31.     qnode = &pnode;
  32.     while ((*qnode)->nodetype == en_void)
  33.         qnode =&(*qnode)->v.ep2;
  34.     *qnode = makenode(en_void,*qnode,name);
  35.     pnode =makenode(en_cp,pnode,0);
  36.     snode = makenode(en_napccon,func,0);
  37.     pnode = makenode(en_fcall,snode,pnode);
  38.     if (elms > 1) {
  39.         anode = makenode(en_void,makenode(en_icon,(char *)elms,0),makenode(en_icon,(char *)size,0));
  40.         pnode = makenode(en_repeat,anode,pnode);
  41.     }
  42.     return pnode;
  43. }
  44. ENODE *calldtr(ENODE *name, char *func)
  45. {
  46.     ENODE *pnode,*qnode;
  47.     pnode = makenode(en_cp,0,0);
  48.     qnode = makenode(en_napccon,func,0);
  49.     pnode = makenode(en_fcall,qnode,pnode);
  50.     return pnode;
  51. }
  52. ENODE *ctrhead(SYM *sp)
  53. {
  54. }
  55. ENODE *dtrtail(SYM *sp)
  56. {
  57. }