ftp.nice.ch/pub/next/audio/apps/LPCView.NIHS.bs.tar.gz#/LPCView/Source/PWfft.c

This is PWfft.c in view mode; [Download] [Up]

/* PWfft.c generated from PWfft.psw
   by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
 */

#include <dpsclient/dpsfriends.h>
#include <string.h>

#line 1 "PWfft.psw"
/* PWfft -- pswrap-able code for FFTView
 * jwp@silvertone.Princeton.edu
 * 02/21/90:  Removed plotdata() function (now done via user paths)
 */

/* PWinit() -- Initialize stuff
 */
#line 17 "PWfft.c"
void PWinit( void )
{
  typedef struct {
    unsigned char tokenType;
    unsigned char topLevelCount;
    unsigned short nBytes;

    DPSBinObjGeneric obj0;
    DPSBinObjGeneric obj1;
    DPSBinObjGeneric obj2;
    DPSBinObjGeneric obj3;
    DPSBinObjGeneric obj4;
    DPSBinObjGeneric obj5;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 6, 52,
    {DPS_LITERAL|DPS_NAME, 0, 0, 0},	/* rulerfont */
    {DPS_LITERAL|DPS_NAME, 0, DPSSYSNAME, 203},	/* Helvetica */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 67},	/* findfont */
    {DPS_LITERAL|DPS_INT, 0, 0, 8},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 140},	/* scalefont */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},	/* def */
    }; /* _dpsQ */
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  static long int _dpsCodes[1] = {-1};
  {
if (_dpsCodes[0] < 0) {
    static const char * const _dps_names[] = {
	"rulerfont"};
    long int *_dps_nameVals[1];
    _dps_nameVals[0] = &_dpsCodes[0];

    DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
    }
  }

  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[0].val.nameVal = _dpsCodes[0];
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,52);
}
#line 10 "PWfft.psw"


/* PWdrawruler -- draws the hashmarks and KHz numbers
 * Arguments:  nmin, nmax, dn = controls for loop (these are KHz vals)
 * 	       dx             = distance between hashmarks
 * Display is always 20 pixels high.
 * BUG: last # tends to get clipped.
 */
#line 70 "PWfft.c"
void PWdrawruler(int nmin, int nmax, int dn, float dx)
{
  typedef struct {
    unsigned char tokenType;
    unsigned char topLevelCount;
    unsigned short nBytes;

    DPSBinObjGeneric obj0;
    DPSBinObjGeneric obj1;
    DPSBinObjGeneric obj2;
    DPSBinObjGeneric obj3;
    DPSBinObjGeneric obj4;
    DPSBinObjGeneric obj5;
    DPSBinObjGeneric obj6;
    DPSBinObjGeneric obj7;
    DPSBinObjGeneric obj8;
    DPSBinObjGeneric obj9;
    DPSBinObjGeneric obj10;
    DPSBinObjGeneric obj11;
    DPSBinObjGeneric obj12;
    DPSBinObjGeneric obj13;
    DPSBinObjGeneric obj14;
    DPSBinObjGeneric obj15;
    DPSBinObjGeneric obj16;
    DPSBinObjGeneric obj17;
    DPSBinObjGeneric obj18;
    DPSBinObjGeneric obj19;
    DPSBinObjGeneric obj20;
    DPSBinObjGeneric obj21;
    DPSBinObjGeneric obj22;
    DPSBinObjGeneric obj23;
    DPSBinObjReal obj24;
    DPSBinObjGeneric obj25;
    DPSBinObjGeneric obj26;
    char obj27[4];
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 11, 224,
    {DPS_EXEC|DPS_NAME, 0, 0, 0},	/* rulerfont */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 149},	/* setfont */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},	/* setgray */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 78},	/* gsave */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},	/* param: nmin */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},	/* param: dn */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},	/* param: nmax */
    {DPS_EXEC|DPS_ARRAY, 0, 16, 88},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 72},	/* for */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 77},	/* grestore */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},	/* moveto */
    {DPS_LITERAL|DPS_STRING, 0, 4, 216},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 49},	/* cvs */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 160},	/* show */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_LITERAL|DPS_INT, 0, 0, 10},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},	/* moveto */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_LITERAL|DPS_INT, 0, 0, 10},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 133},	/* rlineto */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},	/* stroke */
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: dx */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 173},	/* translate */
    {' ',' ',' ',' '},
    }; /* _dpsQ */
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  static long int _dpsCodes[1] = {-1};
  {
if (_dpsCodes[0] < 0) {
    static const char * const _dps_names[] = {
	"rulerfont"};
    long int *_dps_nameVals[1];
    _dps_nameVals[0] = &_dpsCodes[0];

    DPSMapNames(_dpsCurCtxt, 1, _dps_names, _dps_nameVals);
    }
  }

  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[5].val.integerVal = nmin;
  _dpsP[7].val.integerVal = nmax;
  _dpsP[6].val.integerVal = dn;
  _dpsP[24].val.realVal = dx;
  _dpsP[0].val.nameVal = _dpsCodes[0];
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,224);
}
#line 32 "PWfft.psw"



These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.