fprintf(stderr," do anything, but you can switch them on or off\n");
fprintf(stderr," if you like anyway. Isn't this helpful?\n\n");
(void) fflush(stderr);
- ick_lose(IE778, 0, (char *)NULL);
+ ick_lose(IE778, 0, (const char *)NULL);
}
if(ick_wimp_mode) {
fprintf(stderr,"How sad... you have selected to run an INTERCAL\n");
if (ick_nextindex < ick_MAXNEXT)
ick_next[ick_nextindex++] = n;
else
- ick_lose(IE123, ick_lineno, (char *)NULL);
+ ick_lose(IE123, ick_lineno, (const char *)NULL);
}
unsigned int ick_popnext(unsigned int n)
{
if (n == 0)
{
- ick_lose(IE621, ick_lineno, (char *)NULL);
+ ick_lose(IE621, ick_lineno, (const char *)NULL);
/*@-unreachable@*/ return 0; /*@=unreachable@*/
}
else if ((n = ick_popnext(n)) == (unsigned int)-1)
{
- ick_lose(IE632, ick_lineno, (char *)NULL);
+ ick_lose(IE632, ick_lineno, (const char *)NULL);
/*@-unreachable@*/ return 0; /*@=unreachable@*/
}
return(n);
if(!ick_cesspoolin) ick_cesspoolin=stdin; /* AIS */
if (fgets(buf, INTBUFSIZ, ick_cesspoolin) == (char *)NULL)
- ick_lose(IE562, ick_lineno, (char *)NULL);
+ ick_lose(IE562, ick_lineno, (const char *)NULL);
n = strlen(buf) - 1;
if (n > 0 && buf[n-1] == '\r')
--n;
if (result < 429496729 || (result == 429496729 && digit < 6))
result = result * 10 + digit;
else
- ick_lose(IE533, ick_lineno, (char *)NULL);
+ ick_lose(IE533, ick_lineno, (const char *)NULL);
}
}
if (!n)
- ick_lose(IE562, ick_lineno, (char *)NULL);
+ ick_lose(IE562, ick_lineno, (const char *)NULL);
if (result > (unsigned int)ick_Max_large)
- ick_lose(IE533, ick_lineno, (char *)NULL);
+ ick_lose(IE533, ick_lineno, (const char *)NULL);
return(result);
}
* at INT_MAX and hope that's enough. */
i=a->dims[0]; /* we already know that there's 1 dim only */
if(SIZE_MAX/6-2<=a->dims[0])
- ick_lose(IE252, ick_lineno, (char*)NULL); /* size is too large */
+ ick_lose(IE252, ick_lineno, (const char*)NULL); /* size is too large */
if(!i) i=1;
buf=malloc(i+1);
- if(!buf) ick_lose(IE252, ick_lineno, (char*)NULL);
+ if(!buf) ick_lose(IE252, ick_lineno, (const char*)NULL);
if(!ick_cesspoolin) ick_cesspoolin=stdin;
if(!fgets(buf,(int)(min(a->dims[0],(size_t)INT_MAX)),ick_cesspoolin))
strcpy(buf,"\n"); /* EOF inputs the null string in CLC-INTERCAL */
if(!tempcp) /* input too long for the ick_array is an error */
{
free(buf);
- ick_lose(IE241, ick_lineno, (char*)NULL);
+ ick_lose(IE241, ick_lineno, (const char*)NULL);
}
*tempcp='\0'; /* chomp the final newline */
tempcp=malloc(6*i+12); /* to be on the safe side, even though
* Baudot doesn't use 16-byte chars */
- if(!tempcp) ick_lose(IE252, ick_lineno, (char*)NULL);
+ if(!tempcp) ick_lose(IE252, ick_lineno, (const char*)NULL);
/* Zero the ick_array now. */
i=a->dims[0];
if(!forget) while(i--)
ti=ick_clc_cset_convert(buf,tempcp,"latin1","baudot",2,6*a->dims[0]+12,(FILE*)0);
/* Negative ti ought to be impossible here; check anyway, and cause
* an internal error if it has happened. */
- if(ti<0) ick_lose(IE778, ick_lineno, (char*)NULL);
+ if(ti<0) ick_lose(IE778, ick_lineno, (const char*)NULL);
i=(size_t)ti;
- if(i>a->dims[0]) ick_lose(IE241, ick_lineno, (char*)0);
+ if(i>a->dims[0]) ick_lose(IE241, ick_lineno, (const char*)0);
if(!forget) while(i--)
if(type==ick_TAIL)
a->data.tail[i]=(ick_type16)tempcp[i]+
int ti;
char* buf, *tempcp;
if(SIZE_MAX/6-2<=a->dims[0])
- ick_lose(IE252, ick_lineno, (char*)NULL); /* size is too large */
+ ick_lose(IE252, ick_lineno, (const char*)NULL); /* size is too large */
buf=malloc(a->dims[0]+1);
- if(!buf) ick_lose(IE252, ick_lineno, (char*) NULL);
+ if(!buf) ick_lose(IE252, ick_lineno, (const char*) NULL);
i=0; tempcp=buf;
while(i<a->dims[0])
{
* obeyed because that way the code is robust against any future
* changes in character sets. */
tempcp=malloc(a->dims[0]*6+12);
- if(!tempcp) ick_lose(IE252, ick_lineno, (char*) NULL);
+ if(!tempcp) ick_lose(IE252, ick_lineno, (const char*) NULL);
ti=ick_clc_cset_convert(buf,tempcp,"baudot","latin1",0,6*a->dims[0]+12,(FILE*)0);
- if(ti<0) ick_lose(IE778, ick_lineno, (char*)NULL);
+ if(ti<0) ick_lose(IE778, ick_lineno, (const char*)NULL);
i=(size_t)ti;
tempcp[i]='\0';
/* CLC-INTERCAL bails out on invalid characters. C-INTERCAL uses
size_t i;
if (a->rank != 1)
- ick_lose(IE241, ick_lineno, (char *)NULL);
+ ick_lose(IE241, ick_lineno, (const char *)NULL);
if(!ick_cesspoolin) ick_cesspoolin=stdin; /* AIS */
size_t i;
if (a->rank != 1)
- ick_lose(IE241, ick_lineno, (char *)NULL);
+ ick_lose(IE241, ick_lineno, (const char *)NULL);
if(!ick_cesspoolout) ick_cesspoolout=stdout; /* AIS */
unsigned int retval = 0;
if (type == ick_ONESPOT || type == ick_TAIL) {
if (value > (unsigned int)ick_Max_small)
- ick_lose(IE275, ick_lineno, (char *)NULL);
+ ick_lose(IE275, ick_lineno, (const char *)NULL);
if (forget)
retval = value;
else {
a = va_arg(ap, ick_array*);
if (va_arg(ap, unsigned int) != a->rank)
- ick_lose(IE241, ick_lineno, (char *)NULL);
+ ick_lose(IE241, ick_lineno, (const char *)NULL);
for (i = 0 ; i < a->rank ; i++) {
v = va_arg(ap, unsigned int);
if (v == 0 || (size_t)v > a->dims[i])
- ick_lose(IE241, ick_lineno, (char *)NULL);
+ ick_lose(IE241, ick_lineno, (const char *)NULL);
address = address * a->dims[i] + v - 1;
}
free((char*)a->dims);
a->dims = malloc(a->rank * sizeof(*(a->dims)));
if (a->dims == NULL)
- ick_lose(IE241, ick_lineno, (char *)NULL);
+ ick_lose(IE241, ick_lineno, (const char *)NULL);
}
for (i = 0 ; i < r ; i++) {
v = va_arg(ap, size_t);
if (v == 0)
- ick_lose(IE240, ick_lineno, (char *)NULL);
+ ick_lose(IE240, ick_lineno, (const char *)NULL);
if (!forget) {
assert(a->dims != NULL); /* AIS: it isn't, because !forget, but
splint doesn't know that */
free((char *)a->data.tail);
a->data.tail = (ick_type16*)malloc(prod * sizeof(ick_type16));
if (a->data.tail == NULL)
- ick_lose(IE241, ick_lineno, (char *)NULL);
+ ick_lose(IE241, ick_lineno, (const char *)NULL);
}
else {
if (a->data.hybrid)
free((char *)a->data.hybrid);
a->data.hybrid = (ick_type32*)malloc(prod * sizeof(ick_type32));
if (a->data.hybrid == NULL)
- ick_lose(IE241, ick_lineno, (char *)NULL);
+ ick_lose(IE241, ick_lineno, (const char *)NULL);
}
}
/*@=nullassign@*/
/* create a new ick_stashbox and push it onto the stack */
ick_stashbox *sp = (ick_stashbox*)malloc(sizeof(ick_stashbox));
- if (sp == NULL) ick_lose(IE222, ick_lineno, (char *)NULL);
+ if (sp == NULL) ick_lose(IE222, ick_lineno, (const char *)NULL);
sp->ick_next = ick_first;
ick_first = sp;
int prod;
unsigned int i;
ick_first->save.a = (ick_array*)malloc(sizeof(ick_array));
- if (ick_first->save.a == NULL) ick_lose(IE222, ick_lineno, (char *)NULL);
+ if (ick_first->save.a == NULL) ick_lose(IE222, ick_lineno, (const char *)NULL);
ick_first->save.a->rank = a->rank;
ick_first->save.a->dims = malloc(a->rank * sizeof(*(ick_first->save.a->dims)));
- if (ick_first->save.a->dims == NULL) ick_lose(IE222, ick_lineno, (char *)NULL);
+ if (ick_first->save.a->dims == NULL) ick_lose(IE222, ick_lineno, (const char *)NULL);
memcpy(ick_first->save.a->dims, a->dims,
a->rank * sizeof(*(a->dims)));
prod = a->rank ? 1 : 0;
if (type == ick_TAIL) {
ick_first->save.a->data.tail =
(ick_type16*)malloc(prod * sizeof(ick_type16));
- if (ick_first->save.a->data.tail == NULL) ick_lose(IE222, ick_lineno, (char *)NULL);
+ if (ick_first->save.a->data.tail == NULL) ick_lose(IE222, ick_lineno, (const char *)NULL);
memcpy(ick_first->save.a->data.tail,
a->data.tail, prod * sizeof(ick_type16));
}
else {
ick_first->save.a->data.hybrid =
(ick_type32*)malloc(prod * sizeof(ick_type32));
- if (ick_first->save.a->data.hybrid == NULL) ick_lose(IE222, ick_lineno, (char *)NULL);
+ if (ick_first->save.a->data.hybrid == NULL) ick_lose(IE222, ick_lineno, (const char *)NULL);
memcpy(ick_first->save.a->data.hybrid,
a->data.hybrid, prod * sizeof(ick_type32));
}
ick_stashbox *sp;
if ((sp = fetch(type, index)) == (ick_stashbox *)NULL)
- ick_lose(IE436, ick_lineno, (char *)NULL);
+ ick_lose(IE436, ick_lineno, (const char *)NULL);
else if (!forget) {
if(oo) oo[index]=sp->overloadinfo; /* AIS */
if (type == ick_ONESPOT)
/*@-noeffect@*/
(void) pc; /* it's ignored by this function */
/*@=noeffect@*/
- ick_lose(IE555, errlineno, (char *) NULL);
+ ick_lose(IE555, errlineno, (const char *) NULL);
/* this line number is quite possibly going to be wildly inaccurate */
/*@-unreachable@*/
return 0;
/*@-noeffect@*/
(void) ignored;
/*@=noeffect@*/
- ick_lose(IE277, ick_lineno, (char*) NULL);
+ ick_lose(IE277, ick_lineno, (const char*) NULL);
}
void ick_ies277(ick_type32 ignored, void(*ignored2)())
(void) ignored;
(void) ignored2;
/*@=noeffect@*/
- ick_lose(IE277, ick_lineno, (char*) NULL);
+ ick_lose(IE277, ick_lineno, (const char*) NULL);
}
/* cesspool.c ends here */
tuple* tp, *tpa, *tpb;
atom* op;
node* np;
- if(!flowoptimize) ick_lose(IE778, iyylineno, (char *) NULL);
+ if(!flowoptimize) ick_lose(IE778, iyylineno, (const char *) NULL);
for (tp = tuples; tp < tuples + ick_lineno; tp++) tp->abstainable = 0;
/* abstainable holds whether a line's abstention status can change */
for (op = oblist; op != NULL && op < obdex; op++) op->ignorable = 0;
case WHIRL3:
case WHIRL4:
case WHIRL5: /* We must be in binary to reach this point, so: */
- ick_lose(IE997, emitlineno, (char*) NULL);
+ ick_lose(IE997, emitlineno, (const char*) NULL);
/*@-unreachable@*/
break;
/*@=unreachable@*/
{
node* temp;
temp=calloc(sizeof(node), 1);
- if(!temp) ick_lose(IE345, 0, (char*) NULL);
+ if(!temp) ick_lose(IE345, 0, (const char*) NULL);
return temp;
}
/* AIS: Allow use of a modifiable constant 0 or >65535. */
if ((index < 1LU || index > 65535LU) && type!=MESH)
- ick_lose(IE200, iyylineno, (char *)NULL);
+ ick_lose(IE200, iyylineno, (const char *)NULL);
/*@-branchstate@*/
if (!oblist)
/* initialize oblist and obdex */
oblist = malloc(ALLOC_CHUNK * sizeof(atom));
if (!oblist)
- ick_lose(IE345, iyylineno, (char *)NULL);
+ ick_lose(IE345, iyylineno, (const char *)NULL);
obdex = oblist;
obcount = ALLOC_CHUNK;
}
obcount += ALLOC_CHUNK;
x = realloc(oblist, obcount * sizeof(atom));
if (!x)
- ick_lose(IE333, iyylineno, (char *)NULL);
+ ick_lose(IE333, iyylineno, (const char *)NULL);
obdex = x + (obdex - oblist);
oblist = x;
}
void checklabel(int label)
{
if (label < 1 || label > 65535)
- ick_lose(IE197, iyylineno, (char *)NULL);
+ ick_lose(IE197, iyylineno, (const char *)NULL);
}
/*************************************************************************
else
tuples = malloc(tuplecount * sizeof(tuple));
if (!tuples)
- ick_lose(IE666, iyylineno, (char *)NULL);
+ ick_lose(IE666, iyylineno, (const char *)NULL);
memset(tuples + ick_lineno, 0, (tuplecount - ick_lineno) * sizeof(tuple));
}
if(mark112) tuples[ick_lineno].warn112 = 1; mark112 = 0; /* AIS */
for (tp = tuples; tp < tuples + ick_lineno; tp++)
if (tp->type == GETS)
if (tp->u.node->lval->width == 16 && tp->u.node->rval->width == 32)
- ick_lose(IE275, tp - tuples + 1, (char *)NULL);
+ ick_lose(IE275, tp - tuples + 1, (const char *)NULL);
*/
/* check for duplicate labels */
if (tp->label)
for (up = tuples; up < tuples + ick_lineno; up++)
if (tp != up && tp->label == up->label)
- ick_lose(IE182, tp - tuples + 1, (char *)NULL);
+ ick_lose(IE182, tp - tuples + 1, (const char *)NULL);
/*
* Check that every NEXT, ABSTAIN, REINSTATE and COME_FROM actually has a
}
if (tp->u.target > 65535 && !tp->preproc) /* AIS */
- ick_lose(IE197, tp - tuples + 1, (char*) NULL);
+ ick_lose(IE197, tp - tuples + 1, (const char*) NULL);
for (up = tuples; up < tuples + ick_lineno; up++)
if (tp->u.target == up->label)
a nonexistent line label */
if (tp->type == NEXT && !useickec &&
(!pickcompile||tp->u.target<1000||tp->u.target>1999))
- ick_lose(IE129, tp - tuples + 1, (char *)NULL);
+ ick_lose(IE129, tp - tuples + 1, (const char *)NULL);
else if (tp->type == NEXT) /* AIS */
{tp->nexttarget=0; continue;}
else if (useickec) /* AIS */
continue;
/* AIS: NEXTFROMLABEL's basically identical to COME_FROM */
else if (tp->type == COME_FROM || tp->type == NEXTFROMLABEL)
- ick_lose(IE444, tp - tuples + 1, (char *)NULL);
+ ick_lose(IE444, tp - tuples + 1, (const char *)NULL);
else
- ick_lose(IE139, tp - tuples + 1, (char *)NULL);
+ ick_lose(IE139, tp - tuples + 1, (const char *)NULL);
}
/* tell the other tuple if it is a COME FROM target */
/* AIS: NEXTFROMLABEL again */
else if (tp->type == COME_FROM || tp->type == NEXTFROMLABEL)
{
if (up->ncomefrom && !multithread) /* AIS: multithread check */
- ick_lose(IE555, iyylineno, (char *)NULL);
+ ick_lose(IE555, iyylineno, (const char *)NULL);
else
up->ncomefrom++; /* AIS: to handle multiple COME FROMs */
}
unsigned long varextern(unsigned long intern, int vartype)
{
atom *x;
- if(!oblist) ick_lose(IE778, emitlineno, (char*) NULL);
+ if(!oblist) ick_lose(IE778, emitlineno, (const char*) NULL);
for (x = oblist; x < obdex; x++)
if (x->type == vartype && (unsigned long)x->intindex == intern)
return(x->extindex);
if(vartype==MESH) return 0; /* the mesh wasn't used after all */
- ick_lose(IE778, emitlineno, (char*) NULL);
+ ick_lose(IE778, emitlineno, (const char*) NULL);
/*@-unreachable@*/ return 0; /*@=unreachable@*/
}
(void) fprintf(fp, ")");
break;
default:
- ick_lose(IE778, emitlineno, (char*) NULL);
+ ick_lose(IE778, emitlineno, (const char*) NULL);
}
}
case FIN:
if (ick_Base < 3)
- ick_lose(IE997, emitlineno, (char *)NULL);
+ ick_lose(IE997, emitlineno, (const char *)NULL);
(void) fprintf(fp, "(^ ");
explexpr(np->rval, fp);
(void) fprintf(fp, ")");
case WHIRL4:
case WHIRL5:
if (np->opcode - WHIRL + 3 > ick_Base)
- ick_lose(IE997, emitlineno, (char *)NULL);
+ ick_lose(IE997, emitlineno, (const char *)NULL);
if(np->opcode == WHIRL)
(void) fprintf(fp, "(@ ");
else
break;
default:
- ick_lose(IE778, emitlineno, (char*) NULL);
+ ick_lose(IE778, emitlineno, (const char*) NULL);
/*@-unreachable@*/ break; /*@=unreachable@*/
}
}
}
break;
default: /* Added by AIS */
- ick_lose(IE778, emitlineno, (char*) NULL);
+ ick_lose(IE778, emitlineno, (const char*) NULL);
/*@-unreachable@*/ break; /*@=unreachable@*/
}
}
case ick_TAIL:
case ick_HYBRID:
/* This should never be reached */
- ick_lose(IE778, emitlineno, (char*) NULL);
+ ick_lose(IE778, emitlineno, (const char*) NULL);
/*@-unreachable@*/ break; /*@=unreachable@*/
case SUB:
}
break;
default:
- ick_lose(IE778, emitlineno, (char*) NULL);
+ ick_lose(IE778, emitlineno, (const char*) NULL);
/*@-unreachable@*/ break; /*@=unreachable@*/
}
}
to become equal to, as long as we're in base 2. */
if(ick_Base!=2)
{
- fprintf(fp, " ick_lose(IE277, ick_lineno, (char*) NULL);\n");
- ick_lwarn(W278, emitlineno, (char*) NULL);
+ fprintf(fp, " ick_lose(IE277, ick_lineno, (const char*) NULL);\n");
+ ick_lwarn(W278, emitlineno, (const char*) NULL);
break;
}
temp=cons(MESH,0,0);
to 0xffffffff or 0xffff. This only works in base 2. */
if(ick_Base!=2)
{
- fprintf(fp, " ick_lose(IE277, ick_lineno, (char*) NULL);\n");
- ick_lwarn(W278, emitlineno, (char*) NULL);
+ fprintf(fp, " ick_lose(IE277, ick_lineno, (const char*) NULL);\n");
+ ick_lwarn(W278, emitlineno, (const char*) NULL);
break;
}
temp=cons(MESH,0,0);
break;
case UNKNOWNOP: /* don't be silly */
- fprintf(fp, " ick_lose(IE277, ick_lineno, (char*) NULL);\n");
- ick_lwarn(W278, emitlineno, (char*) NULL);
+ fprintf(fp, " ick_lose(IE277, ick_lineno, (const char*) NULL);\n");
+ ick_lwarn(W278, emitlineno, (const char*) NULL);
break;
case BACKSLAT:
/* Unimplemented. This isn't even in the parser yet, so it's a
ick_mystery how we got here. */
- ick_lose(IE778, emitlineno, (char*) NULL);
+ ick_lose(IE778, emitlineno, (const char*) NULL);
/*@-unreachable@*/ break; /*@=unreachable@*/
case SLAT:
if(!variableconstants)
{
/* Can't set a mesh in this case */
- fprintf(fp, " ick_lose(IE277, ick_lineno, (char*) NULL);\n");
- ick_lwarn(W278, emitlineno, (char*) NULL);
+ fprintf(fp, " ick_lose(IE277, ick_lineno, (const char*) NULL);\n");
+ ick_lwarn(W278, emitlineno, (const char*) NULL);
break;
}
(void) fprintf(fp," meshes[%lu] = ",np->constant);
case C_LOGICALOR:
case GETS: /* should never come up */
default:
- ick_lose(IE778, emitlineno, (char*) NULL);
+ ick_lose(IE778, emitlineno, (const char*) NULL);
/*@-unreachable@*/ break; /*@=unreachable@*/
}
}
case BACKSLAT: /* AIS */
/* Unimplemented. This isn't even in the parser yet, so it's a
ick_mystery how we got here. */
- ick_lose(IE778, emitlineno, (char*) NULL);
+ ick_lose(IE778, emitlineno, (const char*) NULL);
/*@-unreachable@*/ break; /*@=unreachable@*/
case SLAT: /* AIS */
case FIN:
if (ick_Base < 3)
- ick_lose(IE997, emitlineno, (char *)NULL);
+ ick_lose(IE997, emitlineno, (const char *)NULL);
(void) fprintf(fp, "ick_fin%d(", np->width);
prexpr(np->rval, fp, freenode);
(void) fprintf(fp, ")");
case WHIRL4:
case WHIRL5:
if (np->opcode - WHIRL + 3 > ick_Base)
- ick_lose(IE997, emitlineno, (char *)NULL);
+ ick_lose(IE997, emitlineno, (const char *)NULL);
(void) fprintf(fp, "ick_whirl%d(%d, ", np->width, np->opcode - WHIRL + 1);
prexpr(np->rval, fp, freenode);
(void) fprintf(fp, ")");
case REV_FIN:
if (ick_Base < 3)
- ick_lose(IE997, emitlineno, (char *)NULL);
+ ick_lose(IE997, emitlineno, (const char *)NULL);
(void) fprintf(fp, "rev_fin%d(", np->width);
prexpr(np->rval, fp, freenode);
(void) fprintf(fp, ")");
case REV_WHIRL4:
case REV_WHIRL5:
if (np->opcode - WHIRL + 3 > ick_Base)
- ick_lose(IE997, emitlineno, (char *)NULL);
+ ick_lose(IE997, emitlineno, (const char *)NULL);
(void) fprintf(fp,
"rev_whirl%d(%d, ", np->width, np->opcode - WHIRL + 1);
prexpr(np->rval, fp, freenode);
break;
case GETS: /* AIS: this is used only if freenode == 0 */
- if(freenode) ick_lose(IE778, emitlineno, (char*) NULL);
+ if(freenode) ick_lose(IE778, emitlineno, (const char*) NULL);
prexpr(np->lval, fp, freenode);
(void) fprintf(fp, " = ");
prexpr(np->rval, fp, freenode);
if(!freenode) break; /* Be less careful when not freeing, because
this is used by -hH to print out its
intermediate optimization stages */
- ick_lose(IE778, emitlineno, (char*) NULL);
+ ick_lose(IE778, emitlineno, (const char*) NULL);
/*@-unreachable@*/ break; /*@=unreachable@*/
}
case US_SCALAR: (void) fputc('.', fp); return 1;
case US_ARRVAR: (void) fputc(',', fp); return 1;
case US_EXPR: (void) fputc('~', fp); return 1;
- default: ick_lose(IE778, emitlineno, (char*) NULL);
+ default: ick_lose(IE778, emitlineno, (const char*) NULL);
}
/*@-unreachable@*/ return 0; /*@=unreachable@*/
}
case US_EXPR: /* because expressions can be assigned to */
fprintf(fp,"\t\t{%d,0,0,",np->rval->width);
break;
- default: ick_lose(IE778, emitlineno, (char*) NULL);
+ default: ick_lose(IE778, emitlineno, (const char*) NULL);
}
if(createsused)
fprintf(fp,"{ick_og%lx,ick_os%lx},",
{
if(tn->maybe) /* AIS */
{
- if(!multithread) ick_lose(IE405, emitlineno, (char *)NULL);
+ if(!multithread) ick_lose(IE405, emitlineno, (const char *)NULL);
(void) fprintf(fp, " gonebackto = setjmp(btjb); choicepoint();\n");
}
if(!flowoptimize || tn->abstainable) /* This condition by AIS */
}
else
{ /* AIS */
- if(tn->maybe) ick_lose(IE778, emitlineno, (char*) NULL);
+ if(tn->maybe) ick_lose(IE778, emitlineno, (const char*) NULL);
if(!tn->initabstain)
{
if(tn->type != COMPUCOME && tn->type != GERUCOME
/* AIS: print warnings on -l */
if(ick_checkforbugs)
{
- if(tn->warn112) ick_lwarn(W112, emitlineno, (char*) NULL);
- if(tn->warn128) ick_lwarn(W128, emitlineno, (char*) NULL);
- if(tn->warn534) ick_lwarn(W534, emitlineno, (char*) NULL);
- if(tn->warn018) ick_lwarn(W018, emitlineno, (char*) NULL);
- if(tn->warn016) ick_lwarn(W016, emitlineno, (char*) NULL);
- if(tn->warn276) ick_lwarn(W276, emitlineno, (char*) NULL);
- if(tn->warn239) ick_lwarn(W239, emitlineno, (char*) NULL);
- if(tn->warn622) ick_lwarn(W622, emitlineno, (char*) NULL);
+ if(tn->warn112) ick_lwarn(W112, emitlineno, (const char*) NULL);
+ if(tn->warn128) ick_lwarn(W128, emitlineno, (const char*) NULL);
+ if(tn->warn534) ick_lwarn(W534, emitlineno, (const char*) NULL);
+ if(tn->warn018) ick_lwarn(W018, emitlineno, (const char*) NULL);
+ if(tn->warn016) ick_lwarn(W016, emitlineno, (const char*) NULL);
+ if(tn->warn276) ick_lwarn(W276, emitlineno, (const char*) NULL);
+ if(tn->warn239) ick_lwarn(W239, emitlineno, (const char*) NULL);
+ if(tn->warn622) ick_lwarn(W622, emitlineno, (const char*) NULL);
}
/* AIS: emit debugging information */
to be undesirable behaviour. */
if(pasttryagain) /* AIS */
{
- ick_lose(IE993, emitlineno, (char*)NULL);
+ ick_lose(IE993, emitlineno, (const char*)NULL);
}
if(flowoptimize && tn->initabstain && !tn->abstainable
break;
case RESIZE:
- if(pickcompile) ick_lose(IE256, emitlineno, (char*) NULL); /* AIS */
+ if(pickcompile) ick_lose(IE256, emitlineno, (const char*) NULL); /* AIS */
np = tn->u.node;
dim = 0;
for (sp = np->rval; sp; sp = sp->rval)
break;
case GO_BACK: /* By AIS */
- if(!multithread) ick_lose(IE405, emitlineno, (char*) NULL);
+ if(!multithread) ick_lose(IE405, emitlineno, (const char*) NULL);
(void) fprintf(fp, "\t""choiceback();\n");
break;
case GO_AHEAD: /* By AIS */
- if(!multithread) ick_lose(IE405, emitlineno, (char*) NULL);
+ if(!multithread) ick_lose(IE405, emitlineno, (const char*) NULL);
(void) fprintf(fp, "\t""choiceahead();\n");
break;
break;
case FROM:
- if(pickcompile) ick_lose(IE256, emitlineno, (char*) NULL);
+ if(pickcompile) ick_lose(IE256, emitlineno, (const char*) NULL);
(void) fprintf(fp, "\t""ICKABSTAINED(%u)+=", tn->u.target-1);
tn->u.node->width = 32;
prexpr(tn->u.node,fp, 1);
using his code, but rewriting it, to make use of a single array and an
index to it, rather than one array for each command type, for
maintainability reasons. */
- if(pickcompile) ick_lose(IE256, emitlineno, (char*) NULL);
+ if(pickcompile) ick_lose(IE256, emitlineno, (const char*) NULL);
(void) fprintf(fp,"\tint i;\n");
np=tn->u.node;
if(tn->type==MANYFROM)
case DISABLE: (void) fprintf(fp,"\t if(!ick_abstained[revlinetype[i]])"
"\t\tick_abstained[revlinetype[i]]=1;\n"); break;
case MANYFROM:(void) fprintf(fp,"\tick_abstained[revlinetype[i]]+=j;\n"); break;
- default: ick_lose(IE778, emitlineno, (char *)NULL);
+ default: ick_lose(IE778, emitlineno, (const char *)NULL);
}
switch(npc)
{
case COMPUCOME: /* By AIS. Note that this doesn't even have balanced
braces; it's designed to work with COMPUCOME's
crazy guarding arrangements */
- if(pickcompile) ick_lose(IE256, emitlineno, (char*) NULL); /* AIS */
+ if(pickcompile) ick_lose(IE256, emitlineno, (const char*) NULL); /* AIS */
if(useickec) /* use ick_ec's features for next from and come from*/
{
if(tn->type == COMPUCOME)
break;
case WRITE_IN:
- if(pickcompile) ick_lose(IE256, emitlineno, (char*) NULL); /* AIS */
+ if(pickcompile) ick_lose(IE256, emitlineno, (const char*) NULL); /* AIS */
for (np = tn->u.node; np; np = np->rval) {
if (np->lval->opcode == ick_TAIL || np->lval->opcode == ick_HYBRID) {
(void) fprintf(fp,"\t""ick_binin(");
break;
case READ_OUT:
- if(pickcompile) ick_lose(IE256, emitlineno, (char*) NULL); /* AIS */
+ if(pickcompile) ick_lose(IE256, emitlineno, (const char*) NULL); /* AIS */
for (np = tn->u.node; np; np = np->rval)
{
if (np->lval->opcode == ick_TAIL || np->lval->opcode == ick_HYBRID) {
case WHILE: /* AIS: fall through to the error, because this shouldn't
come up yet. */
default:
- ick_lose(IE778, emitlineno, (char *)NULL);
+ ick_lose(IE778, emitlineno, (const char *)NULL);
/*@-unreachable@*/ break; /*@=unreachable@*/
}
{
fprintf(fp,
"void ick_os%lx(%s a, void(*f)())\n{\n static int l=0;\n"
- " if(l)\n {\n if(!f) ick_lose(IE778, ick_lineno, (char *)NULL);\n"
+ " if(l)\n {\n if(!f) ick_lose(IE778, ick_lineno, (const char *)NULL);\n"
" f(a,0);\n return;\n }\n l=1;\n",
(unsigned long)np,t);
temp=cons(C_A, 0, 0);
longjmp(ick_next_jmpbufs[ick_nextindex],2);
}
else if(ick_nextindex==81)
- ick_lose(IE123, emitlineno, (char*)NULL);
+ ick_lose(IE123, emitlineno, (const char*)NULL);
/* longjmp return codes: 1 = resume, 2 = redo to a different target */
if(setjmp(ick_next_jmpbufs[ick_nextindex])==1)
{
ick_allecfuncs();
/* If the checkmode is 4, we didn't find a target. */
if(ick_global_checkmode == 4)
- ick_lose(IE129, emitlineno, (char*) NULL);
+ ick_lose(IE129, emitlineno, (const char*) NULL);
/* Otherwise, the function called return(). */
ick_doresume(1,emitlineno);
}
/*@noreturn@*/ void ick_doresume(unsigned short amount, int emitlineno)
{
if(ick_printflow) fprintf(stderr,"[resume:%hu]",amount);
- if(ick_forgetamount) ick_lose(IE778, emitlineno, (char *)NULL);
- if(!amount) ick_lose(IE621, emitlineno, (char *)NULL);
+ if(ick_forgetamount) ick_lose(IE778, emitlineno, (const char *)NULL);
+ if(!amount) ick_lose(IE621, emitlineno, (const char *)NULL);
ick_nextindex -= amount;
if(ick_nextindex < 1) /* the very first NEXT can't be RESUMEd to */
- ick_lose(IE632, emitlineno, (char *)NULL);
+ ick_lose(IE632, emitlineno, (const char *)NULL);
longjmp(ick_next_jmpbufs[ick_nextindex],1);
}
return; /* we were RESUMEd to */
}
/* This line should be unreachable. */
- ick_lose(IE778, -1, (char *)NULL);
+ ick_lose(IE778, -1, (const char *)NULL);
}
uint16_t ick_getonespot(unsigned short extername)
if(ick_ec_vars[i].ick_ec_extername==extername)
return ick_onespots[ick_ec_vars[i].ick_ec_intername];
}
- ick_lose(IE200,-1,(char*)NULL);
+ ick_lose(IE200,-1,(const char*)NULL);
}
void ick_setonespot(unsigned short extername, uint16_t value)
return;
}
}
- ick_lose(IE200,-1,(char*)NULL);
+ ick_lose(IE200,-1,(const char*)NULL);
}
uint32_t ick_gettwospot(unsigned short extername)
if(ick_ec_vars[i].ick_ec_extername==extername)
return ick_twospots[ick_ec_vars[i].ick_ec_intername];
}
- ick_lose(IE200,-1,(char*)NULL);
+ ick_lose(IE200,-1,(const char*)NULL);
}
void ick_settwospot(unsigned short extername, uint32_t value)
return;
}
}
- ick_lose(IE200,-1,(char*)NULL);
+ ick_lose(IE200,-1,(const char*)NULL);
}
/* Register a CREATE target. This is just a wrapper for
static RETSIGTYPE abend(int signim)
{
/*@-noeffect@*/ (void) signim; /*@=noeffect@*/
- ick_lose(IE778, iyylineno, (char *)NULL);
+ ick_lose(IE778, iyylineno, (const char *)NULL);
}
static void print_usage(const char *prog, const char *options)
{
case 't':
ick_traditional = ick_TRUE;
- if(multithread) ick_lose(IE111, 1, (char*) NULL); /* AIS */
- if(pickcompile) ick_lose(IE111, 1, (char*) NULL); /* AIS */
+ if(multithread) ick_lose(IE111, 1, (const char*) NULL); /* AIS */
+ if(pickcompile) ick_lose(IE111, 1, (const char*) NULL); /* AIS */
break;
case 'O':
variableconstants = useickec = ick_FALSE;
yukdebug = yukprofile = yydebug = outtostdout =
compile_only = cdebug = ick_FALSE;
- if(pickcompile) ick_lose(IE256, 1, (char*) NULL);
+ if(pickcompile) ick_lose(IE256, 1, (const char*) NULL);
break;
case 'h': /* By AIS */
yukprofile=ick_FALSE;
yukdebug=ick_FALSE;
useickec=ick_FALSE;
- if(ick_traditional) ick_lose(IE111, 1, (char*) NULL);
+ if(ick_traditional) ick_lose(IE111, 1, (const char*) NULL);
break;
case 'a': /* By AIS */
/* AIS: New function for enhanced file-finding */
ifp = ick_findandfopen(pickcompile?PSKELETON:SKELETON,
ick_datadir, "r", argv[0]);
- if(!ifp) ick_lose(IE999, 1, (char *)NULL);
+ if(!ifp) ick_lose(IE999, 1, (const char *)NULL);
/* now substitute in tokens in the skeleton */
if (/* AIS */ strrchr(argv[optind],'.') != NULL &&
freopen(argv[optind], "rb", stdin) == (FILE *)NULL &&
/* AIS */ strcmp(strchr(argv[optind],'.')+1,"a"))
- ick_lose(IE777, 1, (char *)NULL);
+ ick_lose(IE777, 1, (const char *)NULL);
else
{
/* strip off the file extension */
#endif
fromcopy = ick_findandfopen(buf2,ick_datadir,"rb",argv[0]);
if(!fromcopy) /* same error as for syslib */
- ick_lose(IE127, 1, (char*) NULL);
+ ick_lose(IE127, 1, (const char*) NULL);
#if __DJGPP__
/* Look for a temp directory to store a copy of the C file,
the resulting .cio, .o files, etc. */
#endif
/*@=formatconst@*/
if((tocopy = fopen(buf2,"wb")) == NULL)
- ick_lose(IE888, 1, (char*) NULL);
+ ick_lose(IE888, 1, (const char*) NULL);
for(;;)
{
argv[optind]=malloc(sizeof(buf2)+1);
/*@=onlytrans@*/
if(!(argv[optind]))
- ick_lose(IE888, 1, (char*) NULL);
+ ick_lose(IE888, 1, (const char*) NULL);
strcpy(argv[optind],buf2);
*(strrchr(argv[optind],'.')) = '\0';
continue;
}
- ick_lose(IE998, 1, (char *)NULL);
+ ick_lose(IE998, 1, (const char *)NULL);
}
*chp++ = '\0';
!strcmp(chp,"c99"))) /* AIS */
{
if(firstfile != ick_FALSE) /* need exactly 1 INTERCAL file */
- ick_lose(IE998, 1, (char *)NULL);
+ ick_lose(IE998, 1, (const char *)NULL);
continue; /* don't process C or cio files further yet */
}
/* Error if libick_ecto_b98.a is missing. It might be, and not
just due to installation problems. */
if(!ick_findandtestopen("libick_ecto_b98.a",libdir,"rb",argv[0]))
- ick_lose(IE899,-1,(char *)NULL);
+ ick_lose(IE899,-1,(const char *)NULL);
/* Compile the .b98 file into a .cio. It's open on stdin right now,
so we just need to handle the output side of things. */
#endif
if(!((of = ick_debfopen(buf2,"w"))))
- ick_lose(IE888,-1,(char *)NULL);
+ ick_lose(IE888,-1,(const char *)NULL);
fprintf(of,"const char* ick_iffi_befungeString=\n\"");
}
if(useickec && firstfile == ick_FALSE) /* AIS */
- ick_lose(IE998, 1, (char *)NULL);
+ ick_lose(IE998, 1, (const char *)NULL);
/* wwp: reset the base variables to defaults, because if the */
/* sourcefile has extension .i they will not be reset in the */
{
ick_Base = (int)strtol(chp,&chp,10);
if (ick_Base < 2 || ick_Base > maxbase)
- ick_lose(IE998, 1, (char *)NULL);
+ ick_lose(IE998, 1, (const char *)NULL);
else if (ick_traditional && ick_Base != 2)
- ick_lose(IE111, 1, (char *)NULL);
+ ick_lose(IE111, 1, (const char *)NULL);
else if (pickcompile && ick_Base != 2)
- ick_lose(IE256, 1, (char *)NULL); /* AIS */
+ ick_lose(IE256, 1, (const char *)NULL); /* AIS */
ick_Small_digits = smallsizes[ick_Base];
ick_Large_digits = 2 * ick_Small_digits;
ick_Max_small = maxsmalls[ick_Base];
if (ick_lineno > 2)
{
if (politesse == 0 || (ick_lineno - 1) / politesse >= 5)
- ick_lose(IE079, iyylineno, (char *)NULL);
+ ick_lose(IE079, iyylineno, (const char *)NULL);
else if (ick_lineno / politesse < 3)
- ick_lose(IE099, iyylineno, (char *)NULL);
+ ick_lose(IE099, iyylineno, (const char *)NULL);
}
/*
(void) snprintf(buf2, sizeof buf2, "%s.%di", SYSLIB, ick_Base);
#endif
if (ick_findandfreopen(buf2, ick_datadir, "r", argv[0], stdin) == NULL)
- ick_lose(IE127, 1, (char*) NULL);
+ ick_lose(IE127, 1, (const char*) NULL);
#ifdef USE_YYRESTART
yyrestart(stdin);
#endif /* USE_YYRESTART */
/*@-branchstate@*/
if(outtostdout) ofp=stdout; /* AIS */
else if((ofp = ick_debfopen(buf, "w")) == (FILE *)NULL)
- ick_lose(IE888, 1, (char *)NULL);
+ ick_lose(IE888, 1, (const char *)NULL);
/*@=branchstate@*/
(void) fseek(ifp,0L,0); /* rewind skeleton file */
/* Compiling for PIC */
/* Arrays not supported on PICs */
if(ntails || nhybrids)
- ick_lose(IE256, iyylineno, (char*) NULL);
+ ick_lose(IE256, iyylineno, (const char*) NULL);
/* and neither are variable constants */
if(variableconstants)
- ick_lose(IE256, iyylineno, (char*) NULL);
+ ick_lose(IE256, iyylineno, (const char*) NULL);
assert(oblist != NULL);
for (op = oblist; op < obdex; op++)
{
#endif
cioallec=ick_debfopen(tempfn,"w");
if(cioallec == NULL)
- ick_lose(IE888, -1, (char*) NULL);
+ ick_lose(IE888, -1, (const char*) NULL);
(void) fprintf(cioallec,"void ick_doresume(unsigned short,int);\n");
(void) fprintf(cioallec,"extern int ick_global_checkmode;\n");
(void) fprintf(cioallec,"void ick_allecfuncs(void)\n{\n");
fprintf(cioin,"%-11ld",ppnum6++/2);
break;
default:
- ick_lose(IE778, -1, (char*) NULL);
+ ick_lose(IE778, -1, (const char*) NULL);
}
(void) fseek(cioin,0L,SEEK_CUR); /* synch the file */
}
if(!*(argv[optind])) continue;
remspace -= strlen(argv[optind]) - 5; /* 5 for <space>.cio */
if(remspace <= 0)
- ick_lose(IE666, -1, (char*)NULL);
+ ick_lose(IE666, -1, (const char*)NULL);
strcat(buf2," ");
strcat(buf2,argv[optind]);
strcat(buf2,".cio");
}
remspace -= strlen(libbuf);
if(remspace <= 0)
- ick_lose(IE666, -1, (char*)NULL);
+ ick_lose(IE666, -1, (const char*)NULL);
strcat(buf2,libbuf);
remspace -= strlen(" -lickec");
if(remspace <= 0)
- ick_lose(IE666, -1, (char*)NULL);
+ ick_lose(IE666, -1, (const char*)NULL);
strcat(buf2," -lickec");
ICK_SYSTEM(buf2);
(void) remove(tempfn);
/*@-onlytrans@*/
topchoice = (ickthread*) malloc(sizeof(ickthread));
/*@=onlytrans@*/
- if(!topchoice) ick_lose(IE991, ick_lineno, (char*) NULL);
+ if(!topchoice) ick_lose(IE991, ick_lineno, (const char*) NULL);
topchoice->choicepoint = oldtc;
topchoice->stale = 1;
topchoice->refcount = 1; /* At the moment, this is the only
ickthread* tempthread;
jmp_buf fakepc;
- if(!topchoice) ick_lose(IE404, ick_lineno, (char*) NULL); /* That's what IE404's for */
+ if(!topchoice) ick_lose(IE404, ick_lineno, (const char*) NULL); /* That's what IE404's for */
/* GO AHEAD with multithreading requires care. The choicepoint should only
be removed from this thread. topchoice = topchoice->ick_next almost works, but
is a memory leak. So most of this is garbage-collection. */
void choiceback(void)
{
- if(!topchoice) ick_lose(IE404, ick_lineno, (char *) NULL);
+ if(!topchoice) ick_lose(IE404, ick_lineno, (const char *) NULL);
if(topchoice->stale)
{
if(ick_printflow) fluputs("(back=)");
ick_array* a;
int prod, i, j;
newthread = malloc(sizeof(ickthread));
- if(!newthread) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!newthread) ick_lose(IE991, errlineno, (const char *) NULL);
ickmt_prev->ick_next = newthread;
newthread->ick_next = ickmt_cur;
ickmt_cur = newthread;
i = onespotcount;
tvp = ick_onespots;
ick_onespots = malloc(i * sizeof *ick_onespots);
- if(!ick_onespots) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!ick_onespots) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(ick_onespots, tvp, i * sizeof *ick_onespots);
if(ick_oo_onespots)
{
tvp = ick_oo_onespots;
ick_oo_onespots = malloc(i * sizeof *ick_oo_onespots);
- if(!ick_oo_onespots) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!ick_oo_onespots) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(ick_oo_onespots, tvp, i * sizeof *ick_oo_onespots);
}
i = twospotcount;
tvp = ick_twospots;
ick_twospots = malloc(i * sizeof *ick_twospots);
- if(!ick_twospots) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!ick_twospots) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(ick_twospots, tvp, i * sizeof *ick_twospots);
if(ick_oo_twospots)
{
tvp = ick_oo_twospots;
ick_oo_twospots = malloc(i * sizeof *ick_oo_twospots);
- if(!ick_oo_twospots) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!ick_oo_twospots) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(ick_oo_twospots, tvp, i * sizeof *ick_oo_twospots);
}
i = tailcount;
tvp = ick_tails;
ick_tails = malloc(i * sizeof *ick_tails);
- if(!ick_tails) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!ick_tails) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(ick_tails, tvp, i * sizeof *ick_tails);
i = hybridcount;
tvp = ick_hybrids;
ick_hybrids = malloc(i * sizeof *ick_hybrids);
- if(!ick_hybrids) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!ick_hybrids) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(ick_hybrids, tvp, i * sizeof *ick_hybrids);
i = onespotcount;
tvp = ick_oneforget;
ick_oneforget = malloc(i * sizeof *ick_oneforget);
- if(!ick_oneforget) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!ick_oneforget) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(ick_oneforget, tvp, i * sizeof *ick_oneforget);
i = twospotcount;
tvp = ick_twoforget;
ick_twoforget = malloc(i * sizeof *ick_twoforget);
- if(!ick_twoforget) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!ick_twoforget) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(ick_twoforget, tvp, i * sizeof *ick_twoforget);
i = tailcount;
tvp = ick_tailforget;
ick_tailforget = malloc(i * sizeof *ick_tailforget);
- if(!ick_tailforget) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!ick_tailforget) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(ick_tailforget, tvp, i * sizeof *ick_tailforget);
i = hybridcount;
tvp = ick_hyforget;
ick_hyforget = malloc(i * sizeof *ick_hyforget);
- if(!ick_hyforget) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!ick_hyforget) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(ick_hyforget, tvp, i * sizeof *ick_hyforget);
/* duplicate data stored in arrays */
write. So any errors in this code are probably mine, but the algorithm
isn't. */
a->dims = malloc(a->rank * sizeof *(a->dims));
- if(a->dims == NULL) ick_lose(IE991, errlineno, (char *) NULL);
+ if(a->dims == NULL) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(a->dims, tvp, a->rank * sizeof *(a->dims));
prod = (int)!!a->rank;
i = (int)a->rank;
tvp = a->data.tail;
/*@=mustfreeonly@*/
a->data.tail = malloc(prod * sizeof(ick_type16));
- if(!a->data.tail) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!a->data.tail) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(a->data.tail, tvp, prod * sizeof(ick_type16));
/*@-mustfreeonly@*/ /* likewise. This isn't only, honest! */
tvp = NULL;
write. So any errors in this code are probably mine, but the algorithm
isn't. */
a->dims = malloc(a->rank * sizeof(*(a->dims)));
- if(!a->dims) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!a->dims) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(a->dims, tvp, a->rank * sizeof(*(a->dims)));
prod = (int)!!a->rank;
i = (int)a->rank;
tvp = a->data.hybrid;
/*@=mustfreeonly@*/
a->data.hybrid = malloc(prod * sizeof(ick_type32));
- if(!a->data.hybrid) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!a->data.hybrid) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(a->data.hybrid, tvp, prod * sizeof(ick_type32));
/*@-mustfreeonly@*/
tvp=NULL;
while(isb2)
{
isb = (ick_stashbox*)malloc(sizeof(ick_stashbox));
- if(!isb) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!isb) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(isb,isb2,sizeof(ick_stashbox));
if(isbprev) isbprev->ick_next = isb;
isbprev = isb;
and variable names changed. So, although it's in this file, I can't
take the credit for it. */
isb->save.a = (ick_array*)malloc(sizeof(ick_array));
- if(!isb->save.a) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!isb->save.a) ick_lose(IE991, errlineno, (const char *) NULL);
assert(isb2 != NULL); /* we already said that in the while condition,
so it's surprising that Splint needs this hint */
isb->save.a->rank = isb2->save.a->rank;
isb->save.a->dims = malloc(isb2->save.a->rank *
sizeof(*(isb2->save.a->dims)));
- if(!isb->save.a->dims) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!isb->save.a->dims) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(isb->save.a->dims, isb2->save.a->dims,
isb2->save.a->rank * sizeof(*(isb2->save.a->dims)));
prod = (int)!!isb2->save.a->rank;
if(isb2->type == ick_TAIL)
{
isb->save.a->data.tail = (ick_type16*)malloc(prod * sizeof(ick_type16));
- if(!isb->save.a->data.tail) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!isb->save.a->data.tail) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(isb->save.a->data.tail, isb2->save.a->data.tail,
prod * sizeof(ick_type16));
}
else
{
isb->save.a->data.hybrid = (ick_type32*)malloc(prod * sizeof(ick_type32));
- if(!isb->save.a->data.hybrid) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!isb->save.a->data.hybrid) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(isb->save.a->data.hybrid, isb2->save.a->data.hybrid,
prod * sizeof(ick_type32));
}
ickthread* tempthread;
if(ick_printflow) fluputs("(weave)");
/* Sanity check to make sure that the threads are arranged correctly */
- if(newthread->ick_next!=ickmt_cur) ick_lose(IE778, errlineno, (char *) NULL);
+ if(newthread->ick_next!=ickmt_cur) ick_lose(IE778, errlineno, (const char *) NULL);
tempthread=newthread->ick_next; /* the old current thread */
while(tempthread->usesthis) tempthread=tempthread->usesthis;
newthread->dsi=tempthread->dsi;
/* duplicate NEXT stack */
tvp = ick_next;
ick_next = malloc(ick_MAXNEXT * sizeof *ick_next);
- if(!ick_next) ick_lose(IE991, errlineno, (char *) NULL);
+ if(!ick_next) ick_lose(IE991, errlineno, (const char *) NULL);
memcpy(ick_next, tvp, ick_MAXNEXT * sizeof *ick_next);
/* allow for multithreading with choicepoints on the stack */
/*@-onlytrans@*/
ickmt_cur = malloc(sizeof(ickthread));
/*@=onlytrans@*/
- if(!ickmt_cur) ick_lose(IE991, 1, (char *) NULL);
+ if(!ickmt_cur) ick_lose(IE991, 1, (const char *) NULL);
ickmt_prev = ickmt_cur;
ickmt_cur->ick_next = ickmt_cur;
topchoice = (ickthread*) NULL; /* No choicepoints */
if(ick_printflow) fluputs("(deweave)");
while(!temp||temp->usesthis!=ickmt_cur)
{
- if(!temp) ick_lose(IE778, -1, (char *) NULL);
+ if(!temp) ick_lose(IE778, -1, (const char *) NULL);
temp=temp->usesthis;
}
temp->usesthis=ickmt_cur->usesthis;
/*@=dependenttrans@*/
ickmt_cur = ickmt_prev;
nextthread(dummy, -1, 2); /* dummy is not used by nextthread */
- ick_lose(IE778, -1, (char *) NULL); /* nextthread does not return */
+ ick_lose(IE778, -1, (const char *) NULL); /* nextthread does not return */
}
}