]> thyrsus.com Git - intercal.git/commitdiff
Change a lot of (char*) to (const char*) for calls to ick_lose().
authorArvid Norlander <anmaster@tele2.se>
Tue, 18 Nov 2008 18:20:09 +0000 (13:20 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 26 Aug 2010 00:35:20 +0000 (20:35 -0400)
src/arrgghh.c
src/cesspool.c
src/dekludge.c
src/feh2.c
src/ick_ec.c
src/perpet.c
src/unravel.c

index c2caa95c3baae624703e34a1e155fc8b1e3ec51f..ef55bf6c2897bb4176216d32463372d61361000e 100644 (file)
@@ -94,7 +94,7 @@ ick_parseargs(int argc, char **argv)
        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");
index 097bd737fb04c641d6a849201b0f7ceaf8c55df7..71e6511550de9329ee73e2025f59591b41e895ea 100644 (file)
@@ -103,7 +103,7 @@ void ick_pushnext(unsigned 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)
@@ -123,12 +123,12 @@ unsigned int ick_resume(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);
@@ -152,7 +152,7 @@ unsigned int ick_pin(void)
     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;
@@ -182,13 +182,13 @@ unsigned int ick_pin(void)
            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);
 }
 
@@ -374,10 +374,10 @@ static void clcbinin(unsigned int type, ick_array *a, ick_bool forget)
    * 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 */
@@ -385,12 +385,12 @@ static void clcbinin(unsigned int type, ick_array *a, ick_bool forget)
   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--)
@@ -401,9 +401,9 @@ static void clcbinin(unsigned int type, ick_array *a, ick_bool forget)
   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]+
@@ -421,9 +421,9 @@ static void clcbinout(unsigned int type, const ick_array* a)
   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])
   {
@@ -444,9 +444,9 @@ static void clcbinout(unsigned int type, const ick_array* a)
    * 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
@@ -480,7 +480,7 @@ void ick_binin(unsigned int type, ick_array *a, ick_bool forget)
   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 */
 
@@ -506,7 +506,7 @@ void ick_binout(unsigned int type, const ick_array *a)
   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 */
 
@@ -539,7 +539,7 @@ unsigned int ick_assign(char *dest, unsigned int type, ick_bool forget,
   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 {
@@ -591,12 +591,12 @@ unsigned int ick_assign(char *dest, unsigned int type, ick_bool forget,
   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;
   }
 
@@ -649,13 +649,13 @@ void ick_resize(va_alist) va_dcl
       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 */
@@ -670,14 +670,14 @@ void ick_resize(va_alist) va_dcl
        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);
     }
   }
 
@@ -726,7 +726,7 @@ void ick_stash(unsigned int type, unsigned int index, void *from, ick_overop* oo
   /*@=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;
 
@@ -746,10 +746,10 @@ void ick_stash(unsigned int type, unsigned int index, void *from, ick_overop* oo
     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;
@@ -759,14 +759,14 @@ void ick_stash(unsigned int type, unsigned int index, void *from, ick_overop* oo
     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));
     }
@@ -781,7 +781,7 @@ void ick_retrieve(void *to, unsigned int type, unsigned int index,
   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)
@@ -850,7 +850,7 @@ int ick_multicome0(int errlineno, jmp_buf pc)
   /*@-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;
@@ -915,7 +915,7 @@ ick_type32 ick_ieg277(ick_type32 ignored)
   /*@-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)())
@@ -924,7 +924,7 @@ 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 */
index 6f3a6c7a925cc9bf95ef618de0063e096778cb2a..84142b94205bd51602e89eb29bfd4b483d4efe5b 100644 (file)
@@ -140,7 +140,7 @@ void optimizef(void)
   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;
@@ -489,7 +489,7 @@ void checknodeactbits(node *np)
   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@*/
index ba797000bbdb58fcc1dc9ae67ee7211e2e08aa33..6e095fead4583c38a3e7de152359c0a8025623d4 100644 (file)
@@ -64,7 +64,7 @@ extern int ick_clcsemantics;
 {
   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;
 }
 
@@ -93,7 +93,7 @@ unsigned long intern(int type, unsigned long index)
 
     /* 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)
@@ -101,7 +101,7 @@ unsigned long intern(int type, unsigned long index)
        /* 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;
     }
@@ -124,7 +124,7 @@ unsigned long intern(int type, unsigned long index)
        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;
     }
@@ -162,7 +162,7 @@ unsigned long intern(int type, unsigned long index)
 void checklabel(int label)
 {
     if (label < 1 || label > 65535)
-       ick_lose(IE197, iyylineno, (char *)NULL);
+       ick_lose(IE197, iyylineno, (const char *)NULL);
 }
 
 /*************************************************************************
@@ -232,7 +232,7 @@ void treset(void)
     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 */
@@ -344,7 +344,7 @@ void codecheck(void)
     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 */
@@ -352,7 +352,7 @@ void codecheck(void)
        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
@@ -377,7 +377,7 @@ void codecheck(void)
            }
 
            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)
@@ -395,23 +395,23 @@ void codecheck(void)
                 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 */
            }
@@ -567,12 +567,12 @@ static assoc typedefs[] =
 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@*/
 }
 
@@ -602,7 +602,7 @@ static void explvar(node* np, FILE* fp)
     (void) fprintf(fp, ")");
     break;
   default:
-    ick_lose(IE778, emitlineno, (char*) NULL);
+    ick_lose(IE778, emitlineno, (const char*) NULL);
   }
 }
 
@@ -677,7 +677,7 @@ void explexpr(node* np, FILE* fp)
 
   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, ")");
@@ -689,7 +689,7 @@ void explexpr(node* np, FILE* 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
@@ -882,7 +882,7 @@ void explexpr(node* np, FILE* fp)
     break;
     
   default: 
-    ick_lose(IE778, emitlineno, (char*) NULL);
+    ick_lose(IE778, emitlineno, (const char*) NULL);
     /*@-unreachable@*/ break; /*@=unreachable@*/
   }
 }
@@ -936,7 +936,7 @@ static void prvar(node *np, FILE *fp, int freenode)
        }
        break;
     default: /* Added by AIS */
-      ick_lose(IE778, emitlineno, (char*) NULL);
+      ick_lose(IE778, emitlineno, (const char*) NULL);
       /*@-unreachable@*/ break; /*@=unreachable@*/
     }
 }
@@ -960,7 +960,7 @@ static void ooprvar(node *np, FILE *fp, int freenode)
     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:
@@ -981,7 +981,7 @@ static void ooprvar(node *np, FILE *fp, int freenode)
        }
        break;
     default:
-      ick_lose(IE778, emitlineno, (char*) NULL);
+      ick_lose(IE778, emitlineno, (const char*) NULL);
       /*@-unreachable@*/ break; /*@=unreachable@*/
     }
 }
@@ -1016,8 +1016,8 @@ static void revprexpr(node *np, FILE *fp, node *target)
        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);
@@ -1043,8 +1043,8 @@ static void revprexpr(node *np, FILE *fp, node *target)
        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);
@@ -1056,14 +1056,14 @@ static void revprexpr(node *np, FILE *fp, node *target)
     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:
@@ -1124,8 +1124,8 @@ static void revprexpr(node *np, FILE *fp, node *target)
     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);
@@ -1208,7 +1208,7 @@ static void revprexpr(node *np, FILE *fp, node *target)
   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@*/
   }
 }
@@ -1283,7 +1283,7 @@ void prexpr(node *np, FILE *fp, int freenode)
     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 */
@@ -1323,7 +1323,7 @@ void prexpr(node *np, FILE *fp, int freenode)
 
     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, ")");
@@ -1335,7 +1335,7 @@ void prexpr(node *np, FILE *fp, int freenode)
     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, ")");
@@ -1362,7 +1362,7 @@ void prexpr(node *np, FILE *fp, int freenode)
 
     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, ")");
@@ -1374,7 +1374,7 @@ void prexpr(node *np, FILE *fp, int freenode)
     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);
@@ -1563,7 +1563,7 @@ void prexpr(node *np, FILE *fp, int 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);
@@ -1573,7 +1573,7 @@ void prexpr(node *np, FILE *fp, int 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@*/
     }
 
@@ -1604,7 +1604,7 @@ static int prunknownstr(node *np, FILE* fp)
   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@*/
 }
@@ -1633,7 +1633,7 @@ static void prunknowncreatedata(node *np, FILE* fp)
   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},",
@@ -1744,7 +1744,7 @@ static void emit_guard(tuple *tn, FILE *fp)
 {
   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 */
@@ -1766,7 +1766,7 @@ static void emit_guard(tuple *tn, FILE *fp)
   }
   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
@@ -1869,14 +1869,14 @@ void emit(tuple *tn, FILE *fp)
     /* 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 */
@@ -1984,7 +1984,7 @@ void emit(tuple *tn, FILE *fp)
        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
@@ -2090,7 +2090,7 @@ void emit(tuple *tn, FILE *fp)
        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)
@@ -2139,12 +2139,12 @@ void emit(tuple *tn, FILE *fp)
       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;
 
@@ -2237,7 +2237,7 @@ void emit(tuple *tn, FILE *fp)
       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);
@@ -2265,7 +2265,7 @@ void emit(tuple *tn, FILE *fp)
         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)
@@ -2288,7 +2288,7 @@ void emit(tuple *tn, FILE *fp)
        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)
        {
@@ -2311,7 +2311,7 @@ void emit(tuple *tn, FILE *fp)
     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)
@@ -2399,7 +2399,7 @@ void emit(tuple *tn, FILE *fp)
       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(");
@@ -2428,7 +2428,7 @@ void emit(tuple *tn, FILE *fp)
        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) {
@@ -2569,7 +2569,7 @@ void emit(tuple *tn, FILE *fp)
     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@*/
     }
 
@@ -2738,7 +2738,7 @@ void emitslat(FILE* fp)
   {
     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);
index 0530df6639fc93da05517a759bbd81e837f6a514..65324c8a5996f0942724815301a2aa8810c3e790 100644 (file)
@@ -129,7 +129,7 @@ extern ick_overop* ick_oo_twospots;
     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)
   {
@@ -144,7 +144,7 @@ extern ick_overop* ick_oo_twospots;
   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);
 }
@@ -162,11 +162,11 @@ void ick_scheduleforget(unsigned short amount)
 /*@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);
 }
 
@@ -205,7 +205,7 @@ void ick_runstartups(void)
     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)
@@ -218,7 +218,7 @@ 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)
@@ -235,7 +235,7 @@ 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)
@@ -248,7 +248,7 @@ 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)
@@ -265,7 +265,7 @@ 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
index 7f2b2c87d04d124c94b6e8c14a2297b19a6eff52..b0f20db819d2a4a91c80f7db75c5c63b8e62a7d5 100644 (file)
@@ -191,7 +191,7 @@ static int myfgetc(FILE* in)
 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)
 {
@@ -358,8 +358,8 @@ int main(int argc, char *argv[])
 
     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':
@@ -378,7 +378,7 @@ int main(int argc, char *argv[])
       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 */
@@ -416,7 +416,7 @@ int main(int argc, char *argv[])
       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 */
@@ -496,7 +496,7 @@ int main(int argc, char *argv[])
   /* 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 */
 
@@ -518,7 +518,7 @@ int main(int argc, char *argv[])
     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 */
@@ -543,7 +543,7 @@ int main(int argc, char *argv[])
 #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. */
@@ -562,7 +562,7 @@ int main(int argc, char *argv[])
 #endif
          /*@=formatconst@*/
          if((tocopy = fopen(buf2,"wb")) == NULL)
-           ick_lose(IE888, 1, (char*) NULL);
+           ick_lose(IE888, 1, (const char*) NULL);
 
          for(;;)
          {
@@ -577,13 +577,13 @@ int main(int argc, char *argv[])
          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';
 
@@ -591,7 +591,7 @@ int main(int argc, char *argv[])
                      !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 */
       }
 
@@ -644,7 +644,7 @@ int main(int argc, char *argv[])
        /* 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. */
@@ -656,7 +656,7 @@ int main(int argc, char *argv[])
 #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\"");
 
@@ -705,7 +705,7 @@ int main(int argc, char *argv[])
       }
 
       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  */
@@ -724,11 +724,11 @@ int main(int argc, char *argv[])
       {
        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];
@@ -777,9 +777,9 @@ int main(int argc, char *argv[])
       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);
       }
 
       /*
@@ -825,7 +825,7 @@ int main(int argc, char *argv[])
        (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 */
@@ -895,7 +895,7 @@ int main(int argc, char *argv[])
       /*@-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 */
@@ -1299,10 +1299,10 @@ int main(int argc, char *argv[])
                 /* 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++)
                 {
@@ -1671,7 +1671,7 @@ int main(int argc, char *argv[])
 #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");
@@ -1774,7 +1774,7 @@ int main(int argc, char *argv[])
              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 */
          }
@@ -1818,18 +1818,18 @@ needc99?99:89,tempfn);
       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);
index c5804ecf16fbfb76028f68a2b1ad3b7cac1734da..7bca5719eaa96e629142c4d48710f5a6a361a92f 100644 (file)
@@ -143,7 +143,7 @@ void choicepoint(void)
     /*@-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
@@ -184,7 +184,7 @@ void choiceahead(void)
   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. */
@@ -252,7 +252,7 @@ void choiceahead(void)
 
 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=)");
@@ -306,7 +306,7 @@ int multicome1(int errlineno, jmp_buf pc)
   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;
@@ -336,56 +336,56 @@ int multicome1(int errlineno, jmp_buf pc)
     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 */
@@ -401,7 +401,7 @@ int multicome1(int errlineno, jmp_buf pc)
         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;
@@ -410,7 +410,7 @@ int multicome1(int errlineno, jmp_buf pc)
       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;
@@ -427,7 +427,7 @@ int multicome1(int errlineno, jmp_buf pc)
         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;
@@ -436,7 +436,7 @@ int multicome1(int errlineno, jmp_buf pc)
       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;
@@ -449,7 +449,7 @@ int multicome1(int errlineno, jmp_buf pc)
     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;
@@ -464,13 +464,13 @@ int multicome1(int errlineno, jmp_buf pc)
         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;
@@ -481,14 +481,14 @@ int multicome1(int errlineno, jmp_buf pc)
       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));      
       }
@@ -500,7 +500,7 @@ int multicome1(int errlineno, jmp_buf pc)
     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;
@@ -509,7 +509,7 @@ int multicome1(int errlineno, jmp_buf pc)
   /* 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 */
@@ -559,7 +559,7 @@ void ickmtinit(void)
   /*@-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 */
@@ -590,7 +590,7 @@ void killthread(void)
     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;
@@ -697,7 +697,7 @@ void killthread(void)
     /*@=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 */
   }
 }