home *** CD-ROM | disk | FTP | other *** search
- /* drawRect.c generated from drawRect.psw
- by unix pswrap V1.009 Wed Apr 19 17:50:24 PDT 1989
- */
-
- #include <dpsclient/dpsfriends.h>
- #include <string.h>
-
- #line 1 "drawRect.psw"
- /* load postscript procedures into the current dps context */
- #line 11 "drawRect.c"
- void loadPSProcedures( void )
- {
- 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;
- DPSBinObjReal obj18;
- DPSBinObjReal obj19;
- DPSBinObjGeneric obj20;
- DPSBinObjGeneric obj21;
- DPSBinObjGeneric obj22;
- DPSBinObjGeneric obj23;
- DPSBinObjGeneric obj24;
- DPSBinObjGeneric obj25;
- DPSBinObjGeneric obj26;
- DPSBinObjGeneric obj27;
- DPSBinObjGeneric obj28;
- DPSBinObjGeneric obj29;
- DPSBinObjGeneric obj30;
- DPSBinObjGeneric obj31;
- DPSBinObjGeneric obj32;
- DPSBinObjGeneric obj33;
- DPSBinObjGeneric obj34;
- DPSBinObjGeneric obj35;
- DPSBinObjGeneric obj36;
- DPSBinObjGeneric obj37;
- DPSBinObjGeneric obj38;
- DPSBinObjGeneric obj39;
- DPSBinObjGeneric obj40;
- DPSBinObjGeneric obj41;
- DPSBinObjGeneric obj42;
- DPSBinObjGeneric obj43;
- DPSBinObjGeneric obj44;
- DPSBinObjGeneric obj45;
- DPSBinObjGeneric obj46;
- DPSBinObjGeneric obj47;
- DPSBinObjGeneric obj48;
- DPSBinObjGeneric obj49;
- DPSBinObjGeneric obj50;
- DPSBinObjGeneric obj51;
- DPSBinObjGeneric obj52;
- DPSBinObjGeneric obj53;
- DPSBinObjGeneric obj54;
- DPSBinObjGeneric obj55;
- DPSBinObjGeneric obj56;
- DPSBinObjGeneric obj57;
- DPSBinObjGeneric obj58;
- DPSBinObjGeneric obj59;
- DPSBinObjGeneric obj60;
- DPSBinObjGeneric obj61;
- DPSBinObjGeneric obj62;
- DPSBinObjGeneric obj63;
- DPSBinObjGeneric obj64;
- DPSBinObjGeneric obj65;
- char obj66[4];
- char obj67[2];
- char obj68[2];
- char obj69[2];
- char obj70[2];
- char obj71[8];
- } _dpsQ;
- static const _dpsQ _dpsF = {
- DPS_DEF_TOKENTYPE, 6, 552,
- {DPS_LITERAL|DPS_NAME, 0, 4, 528}, /* inch */
- {DPS_EXEC|DPS_ARRAY, 0, 2, 512},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
- {DPS_LITERAL|DPS_NAME, 0, 8, 540}, /* drawGrid */
- {DPS_EXEC|DPS_ARRAY, 0, 28, 48},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
- {DPS_LITERAL|DPS_NAME, 0, 2, 532}, /* yc */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62}, /* exch */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
- {DPS_LITERAL|DPS_NAME, 0, 2, 538}, /* xc */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 62}, /* exch */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
- {DPS_LITERAL|DPS_NAME, 0, 2, 536}, /* yt */
- {DPS_EXEC|DPS_NAME, 0, 2, 532}, /* yc */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
- {DPS_LITERAL|DPS_NAME, 0, 2, 534}, /* xt */
- {DPS_EXEC|DPS_NAME, 0, 2, 538}, /* xc */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
- {DPS_LITERAL|DPS_REAL, 0, 0, .4},
- {DPS_LITERAL|DPS_REAL, 0, 0, .4},
- {DPS_LITERAL|DPS_INT, 0, 0, 1},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 157}, /* setrgbcolor */
- {DPS_LITERAL|DPS_INT, 0, 0, 2},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 155}, /* setlinewidth */
- {DPS_LITERAL|DPS_INT, 0, 0, 1},
- {DPS_LITERAL|DPS_INT, 0, 0, 1},
- {DPS_LITERAL|DPS_INT, 0, 0, 7},
- {DPS_EXEC|DPS_ARRAY, 0, 15, 392},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 72}, /* for */
- {DPS_LITERAL|DPS_INT, 0, 0, 1},
- {DPS_LITERAL|DPS_INT, 0, 0, 1},
- {DPS_LITERAL|DPS_INT, 0, 0, 9},
- {DPS_EXEC|DPS_ARRAY, 0, 15, 272},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 72}, /* for */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117}, /* pop */
- {DPS_LITERAL|DPS_NAME, 0, 2, 536}, /* yt */
- {DPS_EXEC|DPS_NAME, 0, 2, 536}, /* yt */
- {DPS_LITERAL|DPS_INT, 0, 0, 1},
- {DPS_EXEC|DPS_NAME, 0, 4, 528}, /* inch */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1}, /* add */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
- {DPS_EXEC|DPS_NAME, 0, 2, 538}, /* xc */
- {DPS_EXEC|DPS_NAME, 0, 2, 536}, /* yt */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107}, /* moveto */
- {DPS_LITERAL|DPS_INT, 0, 0, 8},
- {DPS_EXEC|DPS_NAME, 0, 4, 528}, /* inch */
- {DPS_LITERAL|DPS_INT, 0, 0, 0},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 133}, /* rlineto */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167}, /* stroke */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 117}, /* pop */
- {DPS_LITERAL|DPS_NAME, 0, 2, 534}, /* xt */
- {DPS_EXEC|DPS_NAME, 0, 2, 534}, /* xt */
- {DPS_LITERAL|DPS_INT, 0, 0, 1},
- {DPS_EXEC|DPS_NAME, 0, 4, 528}, /* inch */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1}, /* add */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 51}, /* def */
- {DPS_EXEC|DPS_NAME, 0, 2, 534}, /* xt */
- {DPS_EXEC|DPS_NAME, 0, 2, 532}, /* yc */
- {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, 4, 528}, /* inch */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 133}, /* rlineto */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167}, /* stroke */
- {DPS_LITERAL|DPS_INT, 0, 0, 72},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 108}, /* mul */
- {'i','n','c','h'},
- {'y','c'},
- {'x','t'},
- {'y','t'},
- {'x','c'},
- {'d','r','a','w','G','r','i','d'},
- }; /* _dpsQ */
- register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
- char pad[3];
- DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,552);
- if (0) *pad = 0; /* quiets compiler warnings */
- }
- #line 29 "drawRect.psw"
-
- #line 174 "drawRect.c"
- void drawRect(float x, float y, const char *str, const char *num, int darkFlag)
- {
- typedef struct {
- unsigned char tokenType;
- unsigned char sizeFlag;
- unsigned short topLevelCount;
- unsigned long nBytes;
-
- DPSBinObjGeneric obj0;
- DPSBinObjGeneric obj1;
- DPSBinObjGeneric obj2;
- DPSBinObjGeneric obj3;
- DPSBinObjReal obj4;
- DPSBinObjReal obj5;
- DPSBinObjGeneric obj6;
- DPSBinObjGeneric obj7;
- DPSBinObjGeneric obj8;
- DPSBinObjGeneric obj9;
- DPSBinObjGeneric obj10;
- DPSBinObjGeneric obj11;
- DPSBinObjGeneric obj12;
- DPSBinObjReal obj13;
- DPSBinObjGeneric obj14;
- DPSBinObjReal obj15;
- DPSBinObjGeneric obj16;
- DPSBinObjGeneric obj17;
- DPSBinObjReal obj18;
- DPSBinObjGeneric obj19;
- DPSBinObjGeneric obj20;
- DPSBinObjGeneric obj21;
- DPSBinObjGeneric obj22;
- DPSBinObjGeneric obj23;
- DPSBinObjGeneric obj24;
- DPSBinObjGeneric obj25;
- DPSBinObjReal obj26;
- DPSBinObjReal obj27;
- DPSBinObjGeneric obj28;
- DPSBinObjGeneric obj29;
- DPSBinObjGeneric obj30;
- DPSBinObjGeneric obj31;
- DPSBinObjGeneric obj32;
- DPSBinObjGeneric obj33;
- DPSBinObjReal obj34;
- DPSBinObjGeneric obj35;
- DPSBinObjGeneric obj36;
- DPSBinObjGeneric obj37;
- DPSBinObjReal obj38;
- DPSBinObjReal obj39;
- DPSBinObjGeneric obj40;
- DPSBinObjGeneric obj41;
- DPSBinObjGeneric obj42;
- DPSBinObjGeneric obj43;
- DPSBinObjGeneric obj44;
- DPSBinObjReal obj45;
- DPSBinObjGeneric obj46;
- DPSBinObjGeneric obj47;
- DPSBinObjGeneric obj48;
- DPSBinObjGeneric obj49;
- DPSBinObjGeneric obj50;
- DPSBinObjGeneric obj51;
- DPSBinObjGeneric obj52;
- DPSBinObjGeneric obj53;
- DPSBinObjReal obj54;
- DPSBinObjGeneric obj55;
- DPSBinObjGeneric obj56;
- DPSBinObjGeneric obj57;
- DPSBinObjReal obj58;
- DPSBinObjReal obj59;
- DPSBinObjGeneric obj60;
- DPSBinObjGeneric obj61;
- DPSBinObjGeneric obj62;
- DPSBinObjGeneric obj63;
- DPSBinObjGeneric obj64;
- DPSBinObjGeneric obj65;
- DPSBinObjReal obj66;
- DPSBinObjReal obj67;
- DPSBinObjGeneric obj68;
- DPSBinObjGeneric obj69;
- DPSBinObjGeneric obj70;
- DPSBinObjGeneric obj71;
- DPSBinObjGeneric obj72;
- DPSBinObjGeneric obj73;
- DPSBinObjReal obj74;
- DPSBinObjGeneric obj75;
- DPSBinObjGeneric obj76;
- DPSBinObjReal obj77;
- DPSBinObjGeneric obj78;
- DPSBinObjGeneric obj79;
- DPSBinObjGeneric obj80;
- char obj81[4];
- char obj82[8];
- } _dpsQ;
- static const _dpsQ _dpsStat = {
- DPS_DEF_TOKENTYPE, 0, 73, 668,
- {DPS_LITERAL|DPS_BOOL, 0, 0, 0}, /* param: darkFlag */
- {DPS_EXEC|DPS_ARRAY, 0, 4, 616},
- {DPS_EXEC|DPS_ARRAY, 0, 4, 584},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 85}, /* ifelse */
- {DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: x */
- {DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: y */
- {DPS_LITERAL|DPS_INT, 0, 0, 8},
- {DPS_EXEC|DPS_NAME, 0, 4, 648}, /* inch */
- {DPS_LITERAL|DPS_INT, 0, 0, 10},
- {DPS_EXEC|DPS_NAME, 0, 4, 648}, /* inch */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128}, /* rectfill */
- {DPS_LITERAL|DPS_INT, 0, 0, 1},
- {DPS_LITERAL|DPS_INT, 0, 0, 1},
- {DPS_LITERAL|DPS_REAL, 0, 0, .6},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 157}, /* setrgbcolor */
- {DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: x */
- {DPS_LITERAL|DPS_INT, 0, 0, 36},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1}, /* add */
- {DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: y */
- {DPS_LITERAL|DPS_INT, 0, 0, 36},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1}, /* add */
- {DPS_LITERAL|DPS_INT, 0, 0, 7},
- {DPS_EXEC|DPS_NAME, 0, 4, 648}, /* inch */
- {DPS_LITERAL|DPS_INT, 0, 0, 9},
- {DPS_EXEC|DPS_NAME, 0, 4, 648}, /* inch */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 128}, /* rectfill */
- {DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: x */
- {DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: y */
- {DPS_EXEC|DPS_NAME, 0, 8, 652}, /* drawGrid */
- {DPS_LITERAL|DPS_NAME, 0, DPSSYSNAME, 208}, /* Times-Bold */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 67}, /* findfont */
- {DPS_LITERAL|DPS_INT, 0, 0, 600},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 140}, /* scalefont */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 149}, /* setfont */
- {DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: x */
- {DPS_LITERAL|DPS_INT, 0, 0, 2},
- {DPS_EXEC|DPS_NAME, 0, 4, 648}, /* inch */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1}, /* add */
- {DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: y */
- {DPS_LITERAL|DPS_REAL, 0, 0, 2.25},
- {DPS_EXEC|DPS_NAME, 0, 4, 648}, /* inch */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1}, /* add */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107}, /* moveto */
- {DPS_LITERAL|DPS_INT, 0, 0, 0},
- {DPS_LITERAL|DPS_INT, 0, 0, 0},
- {DPS_LITERAL|DPS_REAL, 0, 0, .2},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 157}, /* setrgbcolor */
- {DPS_LITERAL|DPS_STRING, 0, 0, 660}, /* param num */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 160}, /* show */
- {DPS_LITERAL|DPS_NAME, 0, DPSSYSNAME, 208}, /* Times-Bold */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 67}, /* findfont */
- {DPS_LITERAL|DPS_INT, 0, 0, 200},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 140}, /* scalefont */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 149}, /* setfont */
- {DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: x */
- {DPS_LITERAL|DPS_INT, 0, 0, 2},
- {DPS_EXEC|DPS_NAME, 0, 4, 648}, /* inch */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1}, /* add */
- {DPS_LITERAL|DPS_REAL, 0, 0, 0}, /* param: y */
- {DPS_LITERAL|DPS_REAL, 0, 0, 3.25},
- {DPS_EXEC|DPS_NAME, 0, 4, 648}, /* inch */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 1}, /* add */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107}, /* moveto */
- {DPS_LITERAL|DPS_INT, 0, 0, 30},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 136}, /* rotate */
- {DPS_LITERAL|DPS_INT, 0, 0, 1},
- {DPS_LITERAL|DPS_REAL, 0, 0, .4},
- {DPS_LITERAL|DPS_REAL, 0, 0, .4},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 157}, /* setrgbcolor */
- {DPS_LITERAL|DPS_STRING, 0, 0, 660}, /* param str */
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 160}, /* show */
- {DPS_LITERAL|DPS_INT, 0, 0, -30},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 136}, /* rotate */
- {DPS_LITERAL|DPS_INT, 0, 0, 0},
- {DPS_LITERAL|DPS_REAL, 0, 0, .7},
- {DPS_LITERAL|DPS_INT, 0, 0, 0},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 157}, /* setrgbcolor */
- {DPS_LITERAL|DPS_REAL, 0, 0, .4},
- {DPS_LITERAL|DPS_INT, 0, 0, 0},
- {DPS_LITERAL|DPS_INT, 0, 0, 0},
- {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 157}, /* setrgbcolor */
- {'i','n','c','h'},
- {'d','r','a','w','G','r','i','d'},
- }; /* _dpsQ */
- _dpsQ _dpsF; /* local copy */
- register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
- char pad[3];
- register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
- register int _dps_offset = 660;
- _dpsF = _dpsStat; /* assign automatic variable */
-
- _dpsP[4].val.realVal =
- _dpsP[15].val.realVal =
- _dpsP[26].val.realVal =
- _dpsP[34].val.realVal =
- _dpsP[54].val.realVal = x;
- _dpsP[5].val.realVal =
- _dpsP[18].val.realVal =
- _dpsP[27].val.realVal =
- _dpsP[38].val.realVal =
- _dpsP[58].val.realVal = y;
- _dpsP[69].length = strlen(str);
- _dpsP[47].length = strlen(num);
- _dpsP[0].val.booleanVal = (long) (0 != darkFlag);
- _dpsP[69].val.stringVal = _dps_offset;
- _dps_offset += (_dpsP[69].length + 3) & ~3;
- _dpsP[47].val.stringVal = _dps_offset;
- _dps_offset += (_dpsP[47].length + 3) & ~3;
-
- _dpsF.nBytes = _dps_offset+8;
- DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,668);
- DPSWriteStringChars(_dpsCurCtxt, (char *)str, _dpsP[69].length);
- DPSWriteStringChars(_dpsCurCtxt, (char *)pad, ~(_dpsP[69].length + 3) & 3);
- DPSWriteStringChars(_dpsCurCtxt, (char *)num, _dpsP[47].length);
- DPSWriteStringChars(_dpsCurCtxt, (char *)pad, ~(_dpsP[47].length + 3) & 3);
- if (0) *pad = 0; /* quiets compiler warnings */
- }
- #line 57 "drawRect.psw"
-
-
-
-
-
-