ftp.nice.ch/pub/next/developer/objc/dps/AdobeExamples.N.bs.tar.gz#/AdobeExamples/NX_CtlPoints/ControlViewWraps.c

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

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

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

#line 1 "ControlViewWraps.psw"

/*
 * (a)  (C) 1990 by Adobe Systems Incorporated. All rights reserved.
 *
 * (b)  If this Sample Code is distributed as part of the Display PostScript
 *	System Software Development Kit from Adobe Systems Incorporated,
 *	then this copy is designated as Development Software and its use is
 *	subject to the terms of the License Agreement attached to such Kit.
 *
 * (c)  If this Sample Code is distributed independently, then the following
 *	terms apply:
 *
 * (d)  This file may be freely copied and redistributed as long as:
 *	1) Parts (a), (d), (e) and (f) continue to be included in the file,
 *	2) If the file has been modified in any way, a notice of such
 *      modification is conspicuously indicated.
 *
 * (e)  PostScript, Display PostScript, and Adobe are registered trademarks of
 *	Adobe Systems Incorporated.
 * 
 * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO
 *	CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED
 *	AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED.
 *	ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY
 *	OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO
 *	WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY)
 *	WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY
 *	DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, 
 *	FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT
 *	OF THIRD PARTY RIGHTS.
 */

/*
 *	ControlViewWraps.psw
 *
 *	Version:	2.0
 *	Author:	Ken Fromm
 *	History:
 *			03-07-91		Added this comment.
 */

/* StartTime is stored in the interpreter and contains the initial real time	*/											
#line 52 "ControlViewWraps.c"
void PSWMarkTime( void )
{
  typedef struct {
    unsigned char tokenType;
    unsigned char topLevelCount;
    unsigned short nBytes;

    DPSBinObjGeneric obj0;
    DPSBinObjGeneric obj1;
    DPSBinObjGeneric obj2;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 3, 28,
    {DPS_LITERAL|DPS_NAME, 0, 0, 0},	/* StartTime */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},	/* realtime */
    {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[] = {
	"StartTime"};
    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,28);
}
#line 45 "ControlViewWraps.psw"


/* The difference between the current real time and the initial time stored                */
/* in StartTime is returned to the calling procedure in the output arg ElapsedTime. */
#line 95 "ControlViewWraps.c"
void PSWReturnTime(int *ElapsedTime)
{
  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;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 9, 76,
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 328},	/* realtime */
    {DPS_EXEC|DPS_NAME, 0, 0, 0},	/* StartTime */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 169},	/* sub */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},	/* printobject */
    {DPS_LITERAL|DPS_INT, 0, 0, 0},
    {DPS_LITERAL|DPS_INT, 0, 0, 1},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 119},	/* printobject */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 70},	/* flush */
    }; /* _dpsQ */
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  static long int _dpsCodes[1] = {-1};
  DPSResultsRec _dpsR[1];
  static const DPSResultsRec _dpsRstat[] = {
    { dps_tInt, -1 },
    };
    _dpsR[0] = _dpsRstat[0];
    _dpsR[0].value = (char *)ElapsedTime;

  {
if (_dpsCodes[0] < 0) {
    static const char * const _dps_names[] = {
	"StartTime"};
    long int *_dps_nameVals[1];
    _dps_nameVals[0] = &_dpsCodes[0];

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

  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[1].val.nameVal = _dpsCodes[0];
  DPSSetResultTable(_dpsCurCtxt, _dpsR, 1);
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,76);
  DPSAwaitReturnValues(_dpsCurCtxt);
}
#line 52 "ControlViewWraps.psw"


/*
* This wrap is called in the +newFrame:(NXRect *) frm method to
* define and bind procedures in the interpreter.  These procedures
* are then called from within other wraps.
*/
#line 162 "ControlViewWraps.c"
void PSWDefsView(float BGColor, float BGColorStr, float BGWidthStr, float BGrect[])
{
  typedef struct {
    unsigned char tokenType;
    unsigned char topLevelCount;
    unsigned short nBytes;

    DPSBinObjGeneric obj0;
    DPSBinObjReal obj1;
    DPSBinObjGeneric obj2;
    DPSBinObjGeneric obj3;
    DPSBinObjReal obj4;
    DPSBinObjGeneric obj5;
    DPSBinObjGeneric obj6;
    DPSBinObjReal 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;
    DPSBinObjGeneric obj24;
    DPSBinObjGeneric obj25;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 16, 244,
    {DPS_LITERAL|DPS_NAME, 0, 0, 0},	/* BGC */
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: BGColor */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},	/* def */
    {DPS_LITERAL|DPS_NAME, 0, 0, 0},	/* BGCS */
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: BGColorStr */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},	/* def */
    {DPS_LITERAL|DPS_NAME, 0, 0, 0},	/* BGWS */
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: BGWidthStr */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},	/* def */
    {DPS_LITERAL|DPS_NAME, 0, 0, 0},	/* BGR */
    {DPS_LITERAL|DPS_ARRAY, 0, 4, 208},	/* param[const]: BGrect */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},	/* def */
    {DPS_LITERAL|DPS_NAME, 0, 0, 0},	/* EV */
    {DPS_EXEC|DPS_ARRAY, 0, 10, 128},
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 14},	/* bind */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51},	/* def */
    {DPS_EXEC|DPS_NAME, 0, 0, 0},	/* BGC */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},	/* setgray */
    {DPS_EXEC|DPS_NAME, 0, 0, 0},	/* BGR */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 56},	/* dup */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128},	/* rectfill */
    {DPS_EXEC|DPS_NAME, 0, 0, 0},	/* BGCS */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},	/* setgray */
    {DPS_EXEC|DPS_NAME, 0, 0, 0},	/* BGWS */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155},	/* setlinewidth */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 129},	/* rectstroke */
    }; /* _dpsQ */
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  static long int _dpsCodes[9] = {-1};
  register int _dps_offset = 208;
  {
if (_dpsCodes[0] < 0) {
    static const char * const _dps_names[] = {
	"BGC",
	(char *) 0 ,
	"BGCS",
	(char *) 0 ,
	"BGWS",
	(char *) 0 ,
	"BGR",
	(char *) 0 ,
	"EV"};
    long int *_dps_nameVals[9];
    _dps_nameVals[0] = &_dpsCodes[0];
    _dps_nameVals[1] = &_dpsCodes[1];
    _dps_nameVals[2] = &_dpsCodes[2];
    _dps_nameVals[3] = &_dpsCodes[3];
    _dps_nameVals[4] = &_dpsCodes[4];
    _dps_nameVals[5] = &_dpsCodes[5];
    _dps_nameVals[6] = &_dpsCodes[6];
    _dps_nameVals[7] = &_dpsCodes[7];
    _dps_nameVals[8] = &_dpsCodes[8];

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

  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[1].val.realVal = BGColor;
  _dpsP[4].val.realVal = BGColorStr;
  _dpsP[7].val.realVal = BGWidthStr;
  _dpsP[0].val.nameVal = _dpsCodes[0];
  _dpsP[16].val.nameVal = _dpsCodes[1];
  _dpsP[3].val.nameVal = _dpsCodes[2];
  _dpsP[21].val.nameVal = _dpsCodes[3];
  _dpsP[6].val.nameVal = _dpsCodes[4];
  _dpsP[23].val.nameVal = _dpsCodes[5];
  _dpsP[9].val.nameVal = _dpsCodes[6];
  _dpsP[18].val.nameVal = _dpsCodes[7];
  _dpsP[12].val.nameVal = _dpsCodes[8];
  _dpsP[10].val.arrayVal = _dps_offset;
  _dps_offset += 4 * sizeof(DPSBinObjGeneric);

  _dpsF.nBytes = _dps_offset+4;
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,212);
  DPSWriteTypedObjectArray(_dpsCurCtxt, dps_tFloat, (char *)BGrect, 4);
}
#line 73 "ControlViewWraps.psw"

#line 281 "ControlViewWraps.c"
void PSWEraseView( void )
{
  typedef struct {
    unsigned char tokenType;
    unsigned char topLevelCount;
    unsigned short nBytes;

    DPSBinObjGeneric obj0;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 1, 12,
    {DPS_EXEC|DPS_NAME, 0, 0, 0},	/* EV */
    }; /* _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[] = {
	"EV"};
    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,12);
}
#line 77 "ControlViewWraps.psw"

#line 317 "ControlViewWraps.c"
void PSWBasic(float X, float Y, char *Figure, char *Op)
{
  typedef struct {
    unsigned char tokenType;
    unsigned char sizeFlag;
    unsigned short topLevelCount;
    unsigned long nBytes;

    DPSBinObjReal obj0;
    DPSBinObjReal obj1;
    DPSBinObjGeneric obj2;
    DPSBinObjGeneric obj3;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 0, 4, 40,
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: X */
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: Y */
    {DPS_EXEC|DPS_NAME, 0, 0, 32},	/* param Figure */
    {DPS_EXEC|DPS_NAME, 0, 0, 32},	/* param Op */
    }; /* _dpsQ */
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  register int _dps_offset = 32;
  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[0].val.realVal = X;
  _dpsP[1].val.realVal = Y;
  _dpsP[2].length = strlen(Figure);
  _dpsP[3].length = strlen(Op);
  _dpsP[3].val.stringVal = _dps_offset;
  _dps_offset += (_dpsP[3].length + 3) & ~3;
  _dpsP[2].val.stringVal = _dps_offset;
  _dps_offset += (_dpsP[2].length + 3) & ~3;

  _dpsF.nBytes = _dps_offset+8;
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,40);
  DPSWriteStringChars(_dpsCurCtxt, (char *)Op, _dpsP[3].length);
  DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[3].length + 3) & 3);
  DPSWriteStringChars(_dpsCurCtxt, (char *)Figure, _dpsP[2].length);
  DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[2].length + 3) & 3);
}
#line 81 "ControlViewWraps.psw"

#line 362 "ControlViewWraps.c"
void PSWUserPath(float Pts[], int Tot_Pts, char Ops[], int Tot_Ops, char *Op)
{
  typedef struct {
    unsigned char tokenType;
    unsigned char sizeFlag;
    unsigned short topLevelCount;
    unsigned long nBytes;

    DPSBinObjGeneric obj0;
    DPSBinObjGeneric obj1;
    DPSBinObjGeneric obj2;
    DPSBinObjGeneric obj3;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 0, 2, 40,
    {DPS_LITERAL|DPS_ARRAY, 0, 2, 16},
    {DPS_EXEC|DPS_NAME, 0, 0, 32},	/* param Op */
    {DPS_LITERAL|DPS_STRING, 0, 0, 32},	/* param[var]: Pts */
    {DPS_LITERAL|DPS_STRING, 0, 0, 32},	/* param Ops */
    }; /* _dpsQ */
  unsigned char HNumHeader[4];
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  register int _dps_offset = 32;
  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[2].length = (Tot_Pts * sizeof(float)) + 4;
  _dpsP[3].length = Tot_Ops;
  _dpsP[1].length = strlen(Op);
  _dpsP[3].val.stringVal = _dps_offset;
  _dps_offset += (Tot_Ops + 3) & ~3;
  _dpsP[2].val.stringVal = _dps_offset;
  _dps_offset += (Tot_Pts * sizeof(float)) + 4;
  _dpsP[1].val.stringVal = _dps_offset;
  _dps_offset += (_dpsP[1].length + 3) & ~3;

  _dpsF.nBytes = _dps_offset+8;
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,40);
  DPSWriteStringChars(_dpsCurCtxt, (char *)Ops, Tot_Ops);
  DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(Tot_Ops + 3) & 3);
  HNumHeader[0] = 149;
  HNumHeader[1] = 48 + ((DPS_DEF_TOKENTYPE % 2) * 128)
                + ((DPS_DEF_TOKENTYPE >= 130) ? 1 : 0);
  HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 2 : 3] = (unsigned char) Tot_Pts;
  HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 3 : 2] = (unsigned char) (Tot_Pts >> 8);
  DPSWriteStringChars(_dpsCurCtxt, (char *)HNumHeader, 4);
  DPSWriteStringChars(_dpsCurCtxt, (char *)Pts, Tot_Pts * sizeof(float));
  DPSWriteStringChars(_dpsCurCtxt, (char *)Op, _dpsP[1].length);
  DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[1].length + 3) & 3);
}
#line 85 "ControlViewWraps.psw"

#line 416 "ControlViewWraps.c"
void PSWRectDraw(float XYScratch[], int j, char *rectOp)
{
  typedef struct {
    unsigned char tokenType;
    unsigned char sizeFlag;
    unsigned short topLevelCount;
    unsigned long nBytes;

    DPSBinObjGeneric obj0;
    DPSBinObjGeneric obj1;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 0, 2, 24,
    {DPS_LITERAL|DPS_STRING, 0, 0, 16},	/* param[var]: XYScratch */
    {DPS_EXEC|DPS_NAME, 0, 0, 16},	/* param rectOp */
    }; /* _dpsQ */
  unsigned char HNumHeader[4];
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  register int _dps_offset = 16;
  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[0].length = (j * sizeof(float)) + 4;
  _dpsP[1].length = strlen(rectOp);
  _dpsP[1].val.stringVal = _dps_offset;
  _dps_offset += (_dpsP[1].length + 3) & ~3;
  _dpsP[0].val.stringVal = _dps_offset;
  _dps_offset += (j * sizeof(float)) + 4;

  _dpsF.nBytes = _dps_offset+8;
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,24);
  DPSWriteStringChars(_dpsCurCtxt, (char *)rectOp, _dpsP[1].length);
  DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[1].length + 3) & 3);
  HNumHeader[0] = 149;
  HNumHeader[1] = 48 + ((DPS_DEF_TOKENTYPE % 2) * 128)
                + ((DPS_DEF_TOKENTYPE >= 130) ? 1 : 0);
  HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 2 : 3] = (unsigned char) j;
  HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 3 : 2] = (unsigned char) (j >> 8);
  DPSWriteStringChars(_dpsCurCtxt, (char *)HNumHeader, 4);
  DPSWriteStringChars(_dpsCurCtxt, (char *)XYScratch, j * sizeof(float));
}
#line 89 "ControlViewWraps.psw"

#line 461 "ControlViewWraps.c"
void PSWShow(float X, float Y, char *Char)
{
  typedef struct {
    unsigned char tokenType;
    unsigned char sizeFlag;
    unsigned short topLevelCount;
    unsigned long nBytes;

    DPSBinObjReal obj0;
    DPSBinObjReal obj1;
    DPSBinObjGeneric obj2;
    DPSBinObjGeneric obj3;
    DPSBinObjGeneric obj4;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 0, 5, 48,
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: X */
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: Y */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},	/* moveto */
    {DPS_LITERAL|DPS_STRING, 0, 0, 40},	/* param Char */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 160},	/* show */
    }; /* _dpsQ */
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  register int _dps_offset = 40;
  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[0].val.realVal = X;
  _dpsP[1].val.realVal = Y;
  _dpsP[3].length = strlen(Char);
  _dpsP[3].val.stringVal = _dps_offset;
  _dps_offset += (_dpsP[3].length + 3) & ~3;

  _dpsF.nBytes = _dps_offset+8;
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,48);
  DPSWriteStringChars(_dpsCurCtxt, (char *)Char, _dpsP[3].length);
  DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[3].length + 3) & 3);
}
#line 93 "ControlViewWraps.psw"

#line 503 "ControlViewWraps.c"
void PSWXYShow(float X, float Y, char *CharString, float XYCoords[], int j)
{
  typedef struct {
    unsigned char tokenType;
    unsigned char sizeFlag;
    unsigned short topLevelCount;
    unsigned long nBytes;

    DPSBinObjReal obj0;
    DPSBinObjReal obj1;
    DPSBinObjGeneric obj2;
    DPSBinObjGeneric obj3;
    DPSBinObjGeneric obj4;
    DPSBinObjGeneric obj5;
    } _dpsQ;
  static const _dpsQ _dpsStat = {
    DPS_DEF_TOKENTYPE, 0, 6, 56,
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: X */
    {DPS_LITERAL|DPS_REAL, 0, 0, 0},	/* param: Y */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},	/* moveto */
    {DPS_LITERAL|DPS_STRING, 0, 0, 48},	/* param CharString */
    {DPS_LITERAL|DPS_STRING, 0, 0, 48},	/* param[var]: XYCoords */
    {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 195},	/* xyshow */
    }; /* _dpsQ */
  unsigned char HNumHeader[4];
  _dpsQ _dpsF;	/* local copy  */
  register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  register int _dps_offset = 48;
  _dpsF = _dpsStat;	/* assign automatic variable */

  _dpsP[0].val.realVal = X;
  _dpsP[1].val.realVal = Y;
  _dpsP[3].length = strlen(CharString);
  _dpsP[4].length = (j * sizeof(float)) + 4;
  _dpsP[4].val.stringVal = _dps_offset;
  _dps_offset += (j * sizeof(float)) + 4;
  _dpsP[3].val.stringVal = _dps_offset;
  _dps_offset += (_dpsP[3].length + 3) & ~3;

  _dpsF.nBytes = _dps_offset+8;
  DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,56);
  HNumHeader[0] = 149;
  HNumHeader[1] = 48 + ((DPS_DEF_TOKENTYPE % 2) * 128)
                + ((DPS_DEF_TOKENTYPE >= 130) ? 1 : 0);
  HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 2 : 3] = (unsigned char) j;
  HNumHeader[(DPS_DEF_TOKENTYPE % 2) ? 3 : 2] = (unsigned char) (j >> 8);
  DPSWriteStringChars(_dpsCurCtxt, (char *)HNumHeader, 4);
  DPSWriteStringChars(_dpsCurCtxt, (char *)XYCoords, j * sizeof(float));
  DPSWriteStringChars(_dpsCurCtxt, (char *)CharString, _dpsP[3].length);
  DPSWriteStringChars(_dpsCurCtxt, (char *)_dpsCurCtxt, ~(_dpsP[3].length + 3) & 3);
}
#line 97 "ControlViewWraps.psw"


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