home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Audio / LPCView / Source / PWfft.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-07  |  4.9 KB  |  165 lines

  1. /* PWfft.c generated from PWfft.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 "PWfft.psw"
  9. /* PWfft -- pswrap-able code for FFTView
  10.  * jwp@silvertone.Princeton.edu
  11.  * 02/21/90:  Removed plotdata() function (now done via user paths)
  12.  */
  13.  
  14. /* PWinit() -- Initialize stuff
  15.  */
  16. #line 17 "PWfft.c"
  17. void PWinit( void )
  18. {
  19.   typedef struct {
  20.     unsigned char tokenType;
  21.     unsigned char topLevelCount;
  22.     unsigned short nBytes;
  23.  
  24.     DPSBinObjGeneric obj0;
  25.     DPSBinObjGeneric obj1;
  26.     DPSBinObjGeneric obj2;
  27.     DPSBinObjGeneric obj3;
  28.     DPSBinObjGeneric obj4;
  29.     DPSBinObjGeneric obj5;
  30.     } _dpsQ;
  31.   static const _dpsQ _dpsStat = {
  32.     DPS_DEF_TOKENTYPE, 6, 52,
  33.     {DPS_LITERAL|DPS_NAME, 0, 0, 0},    /* rulerfont */
  34.     {DPS_LITERAL|DPS_NAME, 0, DPSSYSNAME, 203},    /* Helvetica */
  35.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 67},    /* findfont */
  36.     {DPS_LITERAL|DPS_INT, 0, 0, 8},
  37.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 140},    /* scalefont */
  38.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},    /* def */
  39.     }; /* _dpsQ */
  40.   _dpsQ _dpsF;    /* local copy  */
  41.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  42.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  43.   static long int _dpsCodes[1] = {-1};
  44.   {
  45. if (_dpsCodes[0] < 0) {
  46.     static const char * const _dps_names[] = {
  47.     "rulerfont"};
  48.     long int *_dps_nameVals[1];
  49.     _dps_nameVals[0] = &_dpsCodes[0];
  50.  
  51.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  52.     }
  53.   }
  54.  
  55.   _dpsF = _dpsStat;    /* assign automatic variable */
  56.  
  57.   _dpsP[0].val.nameVal = _dpsCodes[0];
  58.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,52);
  59. }
  60. #line 10 "PWfft.psw"
  61.  
  62.  
  63. /* PWdrawruler -- draws the hashmarks and KHz numbers
  64.  * Arguments:  nmin, nmax, dn = controls for loop (these are KHz vals)
  65.  *            dx             = distance between hashmarks
  66.  * Display is always 20 pixels high.
  67.  * BUG: last # tends to get clipped.
  68.  */
  69. #line 70 "PWfft.c"
  70. void PWdrawruler(int nmin, int nmax, int dn, float dx)
  71. {
  72.   typedef struct {
  73.     unsigned char tokenType;
  74.     unsigned char topLevelCount;
  75.     unsigned short nBytes;
  76.  
  77.     DPSBinObjGeneric obj0;
  78.     DPSBinObjGeneric obj1;
  79.     DPSBinObjGeneric obj2;
  80.     DPSBinObjGeneric obj3;
  81.     DPSBinObjGeneric obj4;
  82.     DPSBinObjGeneric obj5;
  83.     DPSBinObjGeneric obj6;
  84.     DPSBinObjGeneric obj7;
  85.     DPSBinObjGeneric obj8;
  86.     DPSBinObjGeneric obj9;
  87.     DPSBinObjGeneric obj10;
  88.     DPSBinObjGeneric obj11;
  89.     DPSBinObjGeneric obj12;
  90.     DPSBinObjGeneric obj13;
  91.     DPSBinObjGeneric obj14;
  92.     DPSBinObjGeneric obj15;
  93.     DPSBinObjGeneric obj16;
  94.     DPSBinObjGeneric obj17;
  95.     DPSBinObjGeneric obj18;
  96.     DPSBinObjGeneric obj19;
  97.     DPSBinObjGeneric obj20;
  98.     DPSBinObjGeneric obj21;
  99.     DPSBinObjGeneric obj22;
  100.     DPSBinObjGeneric obj23;
  101.     DPSBinObjReal obj24;
  102.     DPSBinObjGeneric obj25;
  103.     DPSBinObjGeneric obj26;
  104.     char obj27[4];
  105.     } _dpsQ;
  106.   static const _dpsQ _dpsStat = {
  107.     DPS_DEF_TOKENTYPE, 11, 224,
  108.     {DPS_EXEC|DPS_NAME, 0, 0, 0},    /* rulerfont */
  109.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 149},    /* setfont */
  110.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  111.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  112.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 78},    /* gsave */
  113.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: nmin */
  114.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: dn */
  115.     {DPS_LITERAL|DPS_INT, 0, 0, 0},    /* param: nmax */
  116.     {DPS_EXEC|DPS_ARRAY, 0, 16, 88},
  117.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 72},    /* for */
  118.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 77},    /* grestore */
  119.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  120.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  121.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  122.     {DPS_LITERAL|DPS_STRING, 0, 4, 216},
  123.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 49},    /* cvs */
  124.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 160},    /* show */
  125.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  126.     {DPS_LITERAL|DPS_INT, 0, 0, 10},
  127.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  128.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  129.     {DPS_LITERAL|DPS_INT, 0, 0, 10},
  130.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 133},    /* rlineto */
  131.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  132.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: dx */
  133.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  134.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 173},    /* translate */
  135.     {' ',' ',' ',' '},
  136.     }; /* _dpsQ */
  137.   _dpsQ _dpsF;    /* local copy  */
  138.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  139.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  140.   static long int _dpsCodes[1] = {-1};
  141.   {
  142. if (_dpsCodes[0] < 0) {
  143.     static const char * const _dps_names[] = {
  144.     "rulerfont"};
  145.     long int *_dps_nameVals[1];
  146.     _dps_nameVals[0] = &_dpsCodes[0];
  147.  
  148.     DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
  149.     }
  150.   }
  151.  
  152.   _dpsF = _dpsStat;    /* assign automatic variable */
  153.  
  154.   _dpsP[5].val.integerVal = nmin;
  155.   _dpsP[7].val.integerVal = nmax;
  156.   _dpsP[6].val.integerVal = dn;
  157.   _dpsP[24].val.realVal = dx;
  158.   _dpsP[0].val.nameVal = _dpsCodes[0];
  159.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,224);
  160. }
  161. #line 32 "PWfft.psw"
  162.  
  163.  
  164.  
  165.