home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / SourceCode / Cookbook / 12.fractTree / sym / tree.c next >
Encoding:
C/C++ Source or Header  |  1993-06-24  |  6.8 KB  |  190 lines

  1. /* ./sym/tree.c generated from tree.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "tree.psw"
  9. #line 10 "./sym/tree.c"
  10. void doTree(float maxdepth, float leftBranch, float rightBranch, float branchLength, float moveRight, float scaleX, float scaleY, float lineWidth, float branchChange, float widthChange)
  11. {
  12.   typedef struct {
  13.     unsigned char tokenType;
  14.     unsigned char topLevelCount;
  15.     unsigned short nBytes;
  16.  
  17.     DPSBinObjGeneric obj0;
  18.     DPSBinObjGeneric obj1;
  19.     DPSBinObjGeneric obj2;
  20.     DPSBinObjGeneric obj3;
  21.     DPSBinObjGeneric obj4;
  22.     DPSBinObjGeneric obj5;
  23.     DPSBinObjGeneric obj6;
  24.     DPSBinObjGeneric obj7;
  25.     DPSBinObjGeneric obj8;
  26.     DPSBinObjGeneric obj9;
  27.     DPSBinObjGeneric obj10;
  28.     DPSBinObjGeneric obj11;
  29.     DPSBinObjGeneric obj12;
  30.     DPSBinObjGeneric obj13;
  31.     DPSBinObjGeneric obj14;
  32.     DPSBinObjReal obj15;
  33.     DPSBinObjGeneric obj16;
  34.     DPSBinObjGeneric obj17;
  35.     DPSBinObjReal obj18;
  36.     DPSBinObjReal obj19;
  37.     DPSBinObjGeneric obj20;
  38.     DPSBinObjGeneric obj21;
  39.     DPSBinObjReal obj22;
  40.     DPSBinObjGeneric obj23;
  41.     DPSBinObjGeneric obj24;
  42.     DPSBinObjGeneric obj25;
  43.     DPSBinObjGeneric obj26;
  44.     DPSBinObjReal obj27;
  45.     DPSBinObjReal obj28;
  46.     DPSBinObjGeneric obj29;
  47.     DPSBinObjReal obj30;
  48.     DPSBinObjGeneric obj31;
  49.     DPSBinObjGeneric obj32;
  50.     DPSBinObjGeneric obj33;
  51.     DPSBinObjGeneric obj34;
  52.     DPSBinObjReal obj35;
  53.     DPSBinObjGeneric obj36;
  54.     DPSBinObjGeneric obj37;
  55.     DPSBinObjGeneric obj38;
  56.     DPSBinObjGeneric obj39;
  57.     DPSBinObjGeneric obj40;
  58.     DPSBinObjReal obj41;
  59.     DPSBinObjGeneric obj42;
  60.     DPSBinObjGeneric obj43;
  61.     DPSBinObjGeneric obj44;
  62.     DPSBinObjReal obj45;
  63.     DPSBinObjGeneric obj46;
  64.     DPSBinObjGeneric obj47;
  65.     DPSBinObjGeneric obj48;
  66.     DPSBinObjGeneric obj49;
  67.     DPSBinObjReal obj50;
  68.     DPSBinObjGeneric obj51;
  69.     DPSBinObjGeneric obj52;
  70.     DPSBinObjGeneric obj53;
  71.     DPSBinObjGeneric obj54;
  72.     DPSBinObjGeneric obj55;
  73.     DPSBinObjGeneric obj56;
  74.     DPSBinObjGeneric obj57;
  75.     DPSBinObjGeneric obj58;
  76.     DPSBinObjGeneric obj59;
  77.     DPSBinObjGeneric obj60;
  78.     DPSBinObjGeneric obj61;
  79.     DPSBinObjGeneric obj62;
  80.     DPSBinObjGeneric obj63;
  81.     DPSBinObjGeneric obj64;
  82.     DPSBinObjGeneric obj65;
  83.     DPSBinObjGeneric obj66;
  84.     DPSBinObjGeneric obj67;
  85.     char obj68[5];
  86.     char obj69[10];
  87.     char obj70[2];
  88.     char obj71[6];
  89.     char obj72[4];
  90.     } _dpsQ;
  91.   static const _dpsQ _dpsStat = {
  92.     DPS_DEF_TOKENTYPE, 26, 575,
  93.     {DPS_LITERAL|DPS_NAME, 0, 5, 544},    /* depth */
  94.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  95.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  96.     {DPS_LITERAL|DPS_NAME, 0, 4, 567},    /* down */
  97.     {DPS_EXEC|DPS_ARRAY, 0, 5, 504},
  98.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  99.     {DPS_LITERAL|DPS_NAME, 0, 2, 559},    /* up */
  100.     {DPS_EXEC|DPS_ARRAY, 0, 5, 464},
  101.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  102.     {DPS_LITERAL|DPS_NAME, 0, 6, 561},    /* doLine */
  103.     {DPS_EXEC|DPS_ARRAY, 0, 9, 392},
  104.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  105.     {DPS_LITERAL|DPS_NAME, 0, 10, 549},    /* fractArrow */
  106.     {DPS_EXEC|DPS_ARRAY, 0, 15, 208},
  107.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  108.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: moveRight */
  109.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  110.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  111.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: scaleX */
  112.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: scaleY */
  113.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 139},    /* scale */
  114.     {DPS_EXEC|DPS_NAME, 0, 10, 549},    /* fractArrow */
  115.     {DPS_LITERAL|DPS_REAL, 0, 0, 0.5},
  116.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  117.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  118.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 161},    /* showpage */
  119.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 78},    /* gsave */
  120.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: branchChange */
  121.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: widthChange */
  122.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 139},    /* scale */
  123.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: lineWidth */
  124.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},    /* setlinewidth */
  125.     {DPS_EXEC|DPS_NAME, 0, 4, 567},    /* down */
  126.     {DPS_EXEC|DPS_NAME, 0, 6, 561},    /* doLine */
  127.     {DPS_EXEC|DPS_NAME, 0, 5, 544},    /* depth */
  128.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: maxdepth */
  129.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 97},    /* le */
  130.     {DPS_EXEC|DPS_ARRAY, 0, 8, 328},
  131.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 84},    /* if */
  132.     {DPS_EXEC|DPS_NAME, 0, 2, 559},    /* up */
  133.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 77},    /* grestore */
  134.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: leftBranch */
  135.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 110},    /* neg */
  136.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 136},    /* rotate */
  137.     {DPS_EXEC|DPS_NAME, 0, 10, 549},    /* fractArrow */
  138.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: rightBranch */
  139.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 110},    /* neg */
  140.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 136},    /* rotate */
  141.     {DPS_EXEC|DPS_NAME, 0, 10, 549},    /* fractArrow */
  142.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  143.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: branchLength */
  144.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 133},    /* rlineto */
  145.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 40},    /* currentpoint */
  146.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  147.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 173},    /* translate */
  148.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  149.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  150.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  151.     {DPS_LITERAL|DPS_NAME, 0, 5, 544},    /* depth */
  152.     {DPS_EXEC|DPS_NAME, 0, 5, 544},    /* depth */
  153.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  154.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},    /* sub */
  155.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  156.     {DPS_LITERAL|DPS_NAME, 0, 5, 544},    /* depth */
  157.     {DPS_EXEC|DPS_NAME, 0, 5, 544},    /* depth */
  158.     {DPS_LITERAL|DPS_INT, 0, 0, 1},
  159.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1},    /* add */
  160.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  161.     {'d','e','p','t','h'},
  162.     {'f','r','a','c','t','A','r','r','o','w'},
  163.     {'u','p'},
  164.     {'d','o','L','i','n','e'},
  165.     {'d','o','w','n'},
  166.     }; /* _dpsQ */
  167.   _dpsQ _dpsF;    /* local copy  */
  168.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  169.   char pad[3];
  170.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  171.   _dpsF = _dpsStat;    /* assign automatic variable */
  172.  
  173.   _dpsP[35].val.realVal = maxdepth;
  174.   _dpsP[41].val.realVal = leftBranch;
  175.   _dpsP[45].val.realVal = rightBranch;
  176.   _dpsP[50].val.realVal = branchLength;
  177.   _dpsP[15].val.realVal = moveRight;
  178.   _dpsP[18].val.realVal = scaleX;
  179.   _dpsP[19].val.realVal = scaleY;
  180.   _dpsP[30].val.realVal = lineWidth;
  181.   _dpsP[27].val.realVal = branchChange;
  182.   _dpsP[28].val.realVal = widthChange;
  183.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,575);
  184.   if (0) *pad = 0;    /* quiets compiler warnings */
  185. }
  186. #line 25 "tree.psw"
  187.  
  188.  
  189.  
  190.