/*
* psw.c
*
* (c) Copyright 1988-1994 Adobe Systems Incorporated.
* All rights reserved.
*
* Permission to use, copy, modify, distribute, and sublicense this software
* and its documentation for any purpose and without fee is hereby granted,
* provided that the above copyright notices appear in all copies and that
* both those copyright notices and this permission notice appear in
* supporting documentation and that the name of Adobe Systems Incorporated
* not be used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission. No trademark license
* to use the Adobe trademarks is hereby granted. If the Adobe trademark
* "Display PostScript"(tm) is used to describe this software, its
* functionality or for any other purpose, such use shall be limited to a
* statement that this software works in conjunction with the Display
* PostScript system. Proper trademark attribution to reflect Adobe's
* ownership of the trademark shall be given whenever any such reference to
* the Display PostScript system is made.
*
* ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
* ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
* ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
* TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
* DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
* NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
* PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
*
* Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
* Incorporated which may be registered in certain jurisdictions
*
* Author: Adobe Systems Incorporated
*/
/***********/
/* Imports */
/***********/
#include <stdio.h>
#include <stdlib.h>
#ifdef XENVIRONMENT
#else
#include <string.h>
#endif
#include "pswdict.h"
#include "pswpriv.h"
#include "pswsemantics.h"
/********************/
/* Global Variables */
/********************/
/* Wrap-specific globals */
static char *ctxName;
static int nNames;
static int dpsHeaderSize;
static int stringBytes;
/**************************/
/* Procedure Declarations */
/**************************/
/**********************/
/* Utility procedures */
{
register long n = 0;
n++;
return n;
}
{
register int n = 0;
return n;
}
{
return tt;
}
{
return (tt);
return (ll);
}
{
}
{
return (t == T_NUMSTR
|| t == T_FLOATNUMSTR
|| t == T_LONGNUMSTR
|| t == T_SHORTNUMSTR);
}
{
return (t == T_NUMSTR || t == T_SHORTNUMSTR);
}
/*************************/
/* Type-code conversions */
{
switch ((int) type) {
case T_CONTEXT:
return "DPSContext";
case T_BOOLEAN:
return "int";
case T_FLOAT:
return "float";
case T_DOUBLE:
return "double";
case T_CHAR:
return "char";
case T_UCHAR:
return "unsigned char";
case T_USEROBJECT:
case T_INT:
return "int";
case T_LONGINT:
return "long int";
case T_SHORTINT:
return "short int";
case T_ULONGINT:
return "unsigned long int";
case T_USHORTINT:
return "unsigned short int";
case T_UINT:
return "unsigned int";
case T_NUMSTR:
return "int";
case T_FLOATNUMSTR:
return "float";
case T_LONGNUMSTR:
return "long int";
case T_SHORTNUMSTR:
return "short int";
default:
CantHappen();
}
/*NOTREACHED*/
}
{
switch (type) {
case T_BOOLEAN:
return("DPS_BOOL");
case T_INT:
case T_LONGINT:
case T_SHORTINT:
case T_UINT:
case T_ULONGINT:
case T_USHORTINT:
case T_USEROBJECT:
return("DPS_INT");
case T_FLOAT:
case T_DOUBLE:
return("DPS_REAL");
case T_CHAR:
case T_UCHAR:
return("DPS_STRING");
default: CantHappen();
}
/*NOTREACHED*/
}
{
switch (type) {
case T_BOOLEAN:
return("dps_tBoolean");
case T_USEROBJECT:
case T_INT:
return("dps_tInt");
case T_LONGINT:
return("dps_tLong");
case T_SHORTINT:
return("dps_tShort");
case T_UINT:
return("dps_tUInt");
case T_ULONGINT:
return("dps_tULong");
case T_USHORTINT:
return("dps_tUShort");
case T_FLOAT:
return("dps_tFloat");
case T_DOUBLE:
return("dps_tDouble");
case T_CHAR:
return("dps_tChar");
case T_UCHAR:
return("dps_tUChar");
case T_NUMSTR:
return("dps_tInt");
case T_FLOATNUMSTR:
return("dps_tFloat");
case T_LONGNUMSTR:
return("dps_tLong");
case T_SHORTNUMSTR:
return("dps_tShort");
default: CantHappen();
}
/*NOTREACHED*/
}
{
if (bigFile)
while (tokenList) {
}
}
/********************************************/
/* Support procedures that generate no code */
{
if (noUserNames)
t->wellKnownName = false;
else {
nNames++;
}
}
else { /* a well-known (system) name */
t->wellKnownName = true;
}
}
/* If the wrap has result parameters, DPSAwaitReturnValues
must be told when execution if the body is complete. The
following boilerplate is tacked on to the end of the body
for this purpose by AppendResultFlush:
0 doneTag printobject flush
where doneTag = (last result parameter tag + 1).
*/
{
char *ss;
return body;
}
/*****************************************/
/* Support procedures that generate code */
{
}
}
}
}
}
{
switch (type) {
}
return result;
}
{
register char *type;
}
}
}
}
}
}
/* Procedures for generating type declarations in the body */
static void StartBinObjSeqDef(void)
{
/* start type defn of binobjseq */
printf(" typedef struct {\n");
printf(" unsigned char tokenType;\n");
if(large) {
printf(" unsigned char sizeFlag;\n");
printf(" unsigned short topLevelCount;\n");
printf(" unsigned int nBytes;\n\n");
outlineno++;
} else {
printf(" unsigned char topLevelCount;\n");
printf(" unsigned short nBytes;\n\n");
}
outlineno += 5;
}
{
&& (!t->namedFormal->subscripted)
{
printf(" DPSBinObjReal");
} else {
printf(" DPSBinObjGeneric");
}
}
{
int strCount = 0;
while (bodies) {
register Token t;
else {
}
/* foreach token in this body */
switch (t->type) {
case T_STRING: /* token is a string literal */
case T_HEXSTRING: /* token is a hexstring literal */
if (t->namedFormal == NULL) {
: PSWHexStringLength(t->val))
}
else {
}
break;
case T_NAME:
if (t->namedFormal != NULL) {
else
if (t->namedFormal->subscripted)
} else {
if (noUserNames) {
SetNameTag(t);
if (!t->wellKnownName)
}
}
break;
case T_LITNAME:
if (t->namedFormal != NULL) {
writable = true;
} else {
if (noUserNames) {
SetNameTag(t);
if (!t->wellKnownName)
}
}
break;
case T_SUBSCRIPTED:
case T_FLOAT:
case T_INT:
case T_BOOLEAN:
break;
case T_ARRAY:
break;
case T_PROC:
break;
default:
CantHappen();
} /* switch */
} /* for */
free(c);
} /* while */
}
int ln;
if (strCount <= MAXSTRINGS) {
strCount++;
}
else
}
}
/* process name and litname tokens that reference formal string arguments */
else
if(pad) {
int length;
length &= ~WORD_ALIGN;
} else
}
}
return(1);
else
return(0);
} /* CheckSize */
static void BuildTypesAndAssignAddresses(
{
long int objN = 0;
int strCount = 0;
writable = false;
stringBytes = 0;
/* emit boilerplate for the binobjseq record type */
while (bodies) {
register Token t;
else {
}
/* foreach token in this body */
t->tokenIndex = objN++;
/* emit the token type as the next record field */
EmitFieldType(t);
switch (t->type) {
case T_STRING: /* token is a string literal */
case T_HEXSTRING: /* token is a hexstring literal */
if (t->namedFormal == NULL) {
: PSWHexStringLength(t->val))
}
else {
writable = true;
}
break;
case T_NAME:
if (t->namedFormal == NULL) {
SetNameTag(t);
if(noUserNames) {
if (!t->wellKnownName)
}
} else
if (!(t->namedFormal->subscripted
writable = true;
} else
if (t->namedFormal->subscripted) {
writable = true;
} else
writable = true;
break;
case T_LITNAME:
if (t->namedFormal == NULL) {
SetNameTag(t);
if (noUserNames) {
if (!t->wellKnownName)
}
} else {
writable = true;
}
break;
case T_SUBSCRIPTED:
writable = true;
break;
case T_FLOAT:
case T_INT:
case T_BOOLEAN:
break;
case T_ARRAY:
break;
case T_PROC:
break;
default:
CantHappen();
} /* switch */
} /* for */
free(c);
} /* while */
if(nNames)
writable = true; /* SetNameTag couldn't find the name */
if (namedInputArrays && literalStrings) {
twoStatics = true;
printf(" } _dpsQ;\n\n");
printf(" typedef struct {\n");
outlineno += 3;
}
else twoStatics = false;
/* this input array token requires its own write binobjs call */
}
int ln;
if (loc == -1) {
if (strCount <= MAXSTRINGS) {
strCount++;
}
else
stringBytes += ln;
/* emit the string type as the next record field */
} else {
}
}
/* process name and litname tokens that reference formal string arguments */
writable = true;
} else
if(pad) {
int length;
length &= ~WORD_ALIGN;
} else
}
}
/* emit boilerplate to end the last record type */
else printf(" } _dpsQ;\n");
outlineno++;
/* total number of objects plus string bodies in objrecs */
} /* BuildTypesAndAssignAddresses */
/* Procedures for generating static declarations for local types */
{
/* start static def for bin obj seq or for array data (aux) */
if (first) {
if(doANSI)
printf(" static const _dpsQ _dpsStat = {\n");
else
printf(" static _dpsQ _dpsStat = {\n");
} else {
if (doANSI)
printf(" static const _dpsQ _dpsF = {\n");
else
printf(" static _dpsQ _dpsF = {\n");
}
} else {
if(doANSI)
printf(" static const _dpsQ1 _dpsF1 = {\n");
else
printf(" static _dpsQ1 _dpsF1 = {\n");
}
outlineno++;
}
{
outlineno++;
if(large) {
} else {
}
}
{
/* end static template defn */
if (first)
printf(" }; /* _dpsQ */\n");
else
printf(" }; /* _dpsQ1 */\n");
outlineno++;
}
/* char that separates object attributes */
{
switch (t->type) {
case T_BOOLEAN:
break;
case T_INT:
break;
case T_FLOAT:
break;
case T_ARRAY:
break;
case T_PROC:
break;
case T_STRING:
case T_HEXSTRING:
if (t->namedFormal == NULL) {
int ln;
} else {
comment = "param[const]: ";
} else {
comment = "param ";
}
commentName = (char *)t->val;
}
break;
case T_LITNAME:
commentName = (char *)t->val;
if (t->wellKnownName) {
}
else if (t->namedFormal == NULL) {
int ln;
if (noUserNames) {
} else
}
else {
comment = "param ";
}
break;
case T_NAME:
commentName = (char *)t->val;
if (t->wellKnownName) {
}
else if (t->namedFormal == NULL) {
int ln;
if (noUserNames) {
} else
}
else {
comment = "param[const]: ";
}
else {
comment = "param ";
}
}
else {
if (item->subscripted) {
else
comment = "param[const]: ";
} else {
else
comment = "param[var]: ";
}
}
else {
comment = "param: ";
}
}
}
break;
case T_SUBSCRIPTED: {
/* Assert(t->namedFormal) */
comment = "indexed param: ";
commentName = (char *)t->val;
}
break;
default:
CantHappen();
} /* switch */
}
else {
}
outlineno++;
} /* EmitFieldConstructor */
{
int objN = 0;
int strCount = 0;
/* emit boilerplate for the binobjseq static */
StartStatic(true);
while (bodies) {
register Token t;
/* foreach token in this body */
/* emit the next record field constructor */
objN++;
switch (t->type) {
case T_STRING: /* token is a string literal */
break;
case T_HEXSTRING: /* token is a hexstring literal */
break;
case T_NAME:
if (t->namedFormal == NULL) {
if (noUserNames) {
if (!t->wellKnownName)
}
} else
if ((t->namedFormal->subscripted)
)
isNamedInputArrays = true;
break;
case T_LITNAME:
if (noUserNames) {
if (!t->namedFormal && !t->wellKnownName)
break;
}
case T_FLOAT:
case T_INT:
case T_BOOLEAN:
case T_SUBSCRIPTED:
break;
case T_ARRAY:
case T_PROC:
break;
default:
CantHappen();
} /* switch */
} /* for */
free(c);
} /* while */
if (strings && isNamedInputArrays) {
EndStatic(true);
StartStatic(false);
}
if (strCount <= MAXSTRINGS) {
strCount++;
}
printf(" {");
PSWOutputStringChars((char *)t->val);
else
PSWOutputHexStringChars((char *)t->val);
objN++;
}
}
} /* ConstructStatics */
/* Procedures for managing the result table */
{
int count = 0;
if(reentrant) {
count++;
count = 0;
if(doANSI)
printf(" static const DPSResultsRec _dpsRstat[] = {\n");
else
printf(" static DPSResultsRec _dpsRstat[] = {\n");
outlineno++;
} else {
}
if (item->subscripted) {
}
else { /* not subscripted */
}
outlineno++;
}
}
if(reentrant) {
outlineno++;
}
if (item->subscripted) {
if (!(s->constant)) {
} else {
}
outlineno++;
} else { /* not subscripted */
outlineno++;
}
}
outlineno++;
}
}
}
{
outlineno++;
}
/* Procedure for acquiring name tags */
static void EmitNameTagAcquisition(void)
{
register TokenList n;
int i;
char *last_str;
printf(" {\n");
if(!doANSI) {
printf(" static int _dpsT = 1;\n\n");
printf(" if (_dpsT) {\n");
outlineno += 4;
} else {
printf("if (_dpsCodes[0] < 0) {\n");
outlineno += 2;
}
if(doANSI)
printf(" static const char * const _dps_names[] = {\n");
else
printf(" static char *_dps_names[] = {\n");
outlineno ++;
} else {
printf("\t(char *) 0 ");
}
}
if (!doANSI) {
if (!writable) {
printf(" register DPSBinObjRec *_dpsP = (DPSBinObjRec *) &_dpsF.obj0;\n");
outlineno++;
} else {
if (reentrant) {
printf(" _dpsP = (DPSBinObjRec *) &_dpsStat.obj0;\n");
outlineno++;
}
}
}
i = 0;
if (doANSI) {
for(i=0; i<nNames; i++) {
printf(" _dps_nameVals[%d] = &_dpsCodes[%d];\n",i,i);
outlineno ++;
}
} else {
printf(" _dps_nameVals[%d] = (int *)&_dpsP[%d].val.nameVal;\n",
i++, n->token->tokenIndex);
outlineno++;
}
}
printf("\n DPSMapNames(%s, %d, (char **) _dps_names, _dps_nameVals);\n",
outlineno += 2;
printf(" _dpsP = (DPSBinObjRec *) &_dpsF.obj0;\n");
outlineno++;
}
if (!doANSI) {
printf(" _dpsT = 0;\n");
outlineno ++;
}
printf(" }\n }\n\n");
outlineno += 3;
} /* EmitNameTagAcquisition */
/* Miscellaneous procedures */
{
printf(" _dpsQ _dpsF; /* local copy */\n");
outlineno++;
}
printf(" register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();\n");
ctxName = "_dpsCurCtxt";
outlineno++;
}
if(pad) {
printf(" char pad[3];\n");
outlineno++;
}
if (writable) {
printf(" register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;\n");
outlineno++;
}
outlineno++;
if (namedInputArrays || namedInputStrings) {
printf(" register int _dps_offset = %d;\n",
outlineno++;
}
}
}
{
Token t;
switch (t->type) {
case T_NAME:
if (t->namedFormal == NULL) return false;
break;
case T_ARRAY:
break;
case T_PROC:
case T_FLOAT:
case T_INT:
case T_BOOLEAN:
case T_LITNAME:
case T_HEXSTRING:
case T_STRING:
case T_SUBSCRIPTED:
break;
default:
CantHappen();
} /* switch */
} /* for */
return true;
} /* AllLiterals */
{
Token t;
switch (t->type) {
case T_ARRAY:
char *s;
SafeStrCpy(s, "[");
SafeStrCpy(s, "]");
*t = *tlsq;
t->next = b;
else {
}
}
break;
case T_PROC:
/* flatten all arrays below here */
break;
case T_NAME:
case T_FLOAT:
case T_INT:
case T_BOOLEAN:
case T_LITNAME:
case T_HEXSTRING:
case T_STRING:
case T_SUBSCRIPTED:
case T_NUMSTR:
case T_FLOATNUMSTR:
case T_LONGNUMSTR:
case T_SHORTNUMSTR:
break;
default:
CantHappen();
} /* switch */
} /* for */
} /* FlattenSomeArrays */
static void FixupOffsets(void)
{
int stringOffset = 0;
int strCount = 0;
printf(" _dps_offset += ");
else
outlineno += 2;
} /* named input arrays */
printf(" _dps_offset += ");
if (item->subscripted) {
printf("((%d * sizeof(%s)) + %d) & ~%d;\n",
else
printf("(%d * sizeof(%s)) + %d;\n",
} else
if(pad) {
val += WORD_ALIGN;
val &= ~WORD_ALIGN;
} else
} else {
printf("((%s * sizeof(%s)) + %d) & ~%d;\n",
else
printf("(%s * sizeof(%s)) + %d;\n",
} else
if(pad)
printf("(%s + %d) & ~%d;\n",
else
}
} else
if(pad)
printf("(_dpsP[%d].length + %d) & ~%d;\n",
else
outlineno += 2;
} /* named input strings */
if (namedInputArrays) {
if (strOffset == -1) {
if (strCount <= MAXSTRINGS) {
strCount++;
}
if (stringOffset == 0)
t->tokenIndex);
else
t->tokenIndex,stringOffset);
outlineno++;
stringOffset +=
? PSWStringLength((char *)t->val)
: PSWHexStringLength((char *)t->val);
} else {
if (strOffset == 0)
t->tokenIndex);
else
t->tokenIndex, (int) strOffset);
outlineno++;
}
} /* literalStrings */
if (stringOffset) {
outlineno++;
}
}
} /* FixupOffsets */
{
register Token t;
int gotit = 0;
switch (t->type) {
case T_STRING:
case T_HEXSTRING:
case T_LITNAME:
outlineno++;
gotit++;
}
break;
case T_NAME:
outlineno++;
gotit++;
}
case T_BOOLEAN:
if (!item->subscripted) {
printf("\n _dpsP[%d].val.booleanVal =",
t->tokenIndex);
}
break;
case T_INT:
case T_LONGINT:
case T_SHORTINT:
case T_UINT:
case T_ULONGINT:
case T_USHORTINT:
case T_USEROBJECT:
if (!item->subscripted) {
printf("\n _dpsP[%d].val.integerVal =",
t->tokenIndex);
}
break;
case T_FLOAT:
case T_DOUBLE:
if (!item->subscripted) {
printf("\n _dpsP[%d].val.realVal =",
t->tokenIndex);
}
break;
case T_CHAR:
case T_UCHAR: /* the executable name is an arg */
case T_NUMSTR:
case T_FLOATNUMSTR:
case T_LONGNUMSTR:
case T_SHORTNUMSTR:
break;
default: CantHappen();
}
}
break;
case T_SUBSCRIPTED:
case T_FLOAT:
case T_INT:
case T_BOOLEAN:
break;
case T_ARRAY:
case T_PROC:
/* recurse */
break;
default:
CantHappen();
} /* switch */
} /* token */
return (gotit);
} /* EmitValueAssignments */
{
register Token t;
if (t->type != T_SUBSCRIPTED) continue;
if (t->namedFormal == item) {
case T_BOOLEAN:
printf("\n _dpsP[%d].val.booleanVal = (int)(0 != %s[%s]);",
outlineno++;
break;
case T_INT:
case T_LONGINT:
case T_SHORTINT:
case T_UINT:
case T_ULONGINT:
case T_USHORTINT:
printf("\n _dpsP[%d].val.integerVal = %s[%s];",
outlineno++;
break;
case T_FLOAT:
case T_DOUBLE:
printf("\n _dpsP[%d].val.realVal = %s[%s];",
outlineno++;
break;
case T_CHAR:
case T_UCHAR:
CantHappen();
break;
default: CantHappen();
}
}
} /* token */
} /* EmitElementValueAssignments */
{
/* for each arg */
/* for each arg item */
if (gotit != 0) {
if (item->subscripted) {
else
} else {
else
}
case T_CHAR:
case T_UCHAR:
break;
case T_INT:
case T_LONGINT:
case T_SHORTINT:
case T_UINT:
case T_ULONGINT:
case T_USHORTINT:
case T_FLOAT:
case T_DOUBLE:
case T_USEROBJECT:
break;
case T_BOOLEAN:
break;
default: CantHappen();
} /* switch */
} /* gotit */
if (item->subscripted) {
}
} /* item */
} /* arg */
}
static void EmitMappedNames(void)
{
register TokenList n;
int i=0;
printf(" _dpsP[%d].val.nameVal = _dpsCodes[%d];\n",
n->token->tokenIndex, i++);
outlineno++;
}
}
{
printf(" DPSBinObjSeqWrite(%s,(char *) &_dpsF,%d);\n",
outlineno++;
printf(" DPSWriteTypedObjectArray(%s, %s, (char *)%s, ",
t->namedFormal->name);
else
outlineno++;
}
else
if (t->namedFormal->scaled) {
else
} else printf("0);\n");
outlineno ++;
} else {
printf(" DPSWriteStringChars(%s, (char *)%s, ",
if (!t->namedFormal->subscripted) {
if(pad) {
printf(" DPSWriteStringChars(%s, (char *)pad, ~(_dpsP[%d].length + %d) & %d);\n",
outlineno ++;
}
} else
if(pad){
if(val) {
printf(" DPSWriteStringChars(%s, (char *)pad, %d);\n",
outlineno ++;
}
}
} else {
if(pad) {
printf(" DPSWriteStringChars(%s, (char *)pad, ~(%s + %d) & %d);\n",
outlineno ++;
}
}
outlineno ++;
}
}
if (twoStatics) {
printf(" DPSWriteStringChars(%s,(char *) &_dpsF1,%d);\n",
outlineno++;
}
} /* WriteObjSeq */
/*************************************************************/
/* Public procedures, called by the semantic action routines */
{
/* emit procedure prototype to the output .h file, if any */
}
}
{
/* emit procedure header */
nameTokens = NULL;
nNames = 0;
if (doANSI) {
printf(")\n");
outlineno++;
}
else { /* not ANSI */
}
} /* inArgs */
}
} /* outArgs */
printf("\n");
outlineno++;
}
}
} /* EmitBodyHeader */
{
long int nObjs;
unsigned structSize;
/* total number of objects plus string bodies in objrecs.
Not including array arg expansions */
return; /* empty wrap */
FlattenSomeArrays(body, false);
else
/* check for char * input args */
/* if arg is char * then need to use large format since
size of arg is unknown */
large = true;
}
}
}
/* also constructs namedInputArrays, namedInputStrings and literalStrings */
if (nameTokens) {
}
printf(" _dpsF = _dpsStat; /* assign automatic variable */\n");
outlineno++;
}
if(writable) {
}
if(doANSI && nameTokens) {
nameTokens = NULL;
}
/* Fixup offsets and the total size */
FixupOffsets();
outlineno += 2;
}
if (outArgs)
else
outlineno++;
#ifdef NeXT
if (pad) {
printf(" if (0) *pad = 0; /* quiets compiler warnings */\n"); /* gets rid of "unused variable" warnings */
outlineno++;
}
#endif
} /* EmitBody */
static void AllocFailure(void)
{
if (bigFile)
else
exit(1);
}
char *psw_malloc(s) int s; {
char *temp;
AllocFailure();
return(temp);
}
char *psw_calloc(n,s) int n,s; {
char *temp;
AllocFailure();
return(temp);
}
void
switch (t->type) {
case T_STRING:
case T_NAME:
case T_LITNAME:
case T_HEXSTRING:
break;
case T_FLOAT:
case T_INT:
case T_BOOLEAN:
break;
case T_SUBSCRIPTED:
break;
case T_ARRAY:
case T_PROC:
break;
default:
CantHappen();
}
free (t);
}
}