]> thyrsus.com Git - intercal.git/commitdiff
Change some (char*) to (const char*) for calls to ick_lose().
authorArvid Norlander <anmaster@tele2.se>
Tue, 18 Nov 2008 17:51:38 +0000 (12:51 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 26 Aug 2010 00:35:18 +0000 (20:35 -0400)
src/fiddle.c
src/ick-wrap.c
src/pickwrap.c
src/yuk.c

index aaf24e5b4b67276c0be360740a6d92f206e03a4c..e1c2d976c4da3f13aef8dc907b6e40781118297d 100644 (file)
@@ -30,7 +30,7 @@ unsigned int ick_mingle(register unsigned int r, register unsigned int s)
 {
   if (ick_Base == 2) {
     if (r>0xffff || s>0xffff)
-      ick_lose(IE533, ick_lineno, (char *)NULL);
+      ick_lose(IE533, ick_lineno, (const char *)NULL);
     r = ((r & 0x0000ff00) << 8) | (r & 0x000000ff);
     r = ((r & 0x00f000f0) << 4) | (r & 0x000f000f);
     r = ((r & 0x0c0c0c0c) << 2) | (r & 0x03030303);
@@ -268,28 +268,28 @@ static unsigned int ick_rotleft32(unsigned int n)
 unsigned int ick_rev_or16(unsigned int n)
 {
   if(ick_or16(ick_rotleft16(ick_and16(n)))==n) return ick_rotleft16(ick_and16(n));
-  ick_lose(IE277, ick_lineno, (char*) NULL);
+  ick_lose(IE277, ick_lineno, (const char*) NULL);
   /*@-unreachable@*/ return 0; /*@=unreachable@*/
 }
 
 unsigned int ick_rev_or32(unsigned int n)
 {
   if(ick_or32(ick_rotleft32(ick_and32(n)))==n) return ick_rotleft32(ick_and32(n));
-  ick_lose(IE277, ick_lineno, (char*) NULL);
+  ick_lose(IE277, ick_lineno, (const char*) NULL);
   /*@-unreachable@*/ return 0; /*@=unreachable@*/
 }
 
 unsigned int ick_rev_and16(unsigned int n)
 {
   if(ick_and16(ick_rotleft16(ick_or16(n)))==n) return ick_rotleft16(ick_or16(n));
-  ick_lose(IE277, ick_lineno, (char*) NULL);
+  ick_lose(IE277, ick_lineno, (const char*) NULL);
   /*@-unreachable@*/ return 0; /*@=unreachable@*/
 }
 
 unsigned int ick_rev_and32(unsigned int n)
 {
   if(ick_and32(ick_rotleft32(ick_or32(n)))==n) return ick_rotleft32(ick_or32(n));
-  ick_lose(IE277, ick_lineno, (char*) NULL);
+  ick_lose(IE277, ick_lineno, (const char*) NULL);
   /*@-unreachable@*/ return 0; /*@=unreachable@*/
 }
 
@@ -305,7 +305,7 @@ unsigned int ick_rev_xor16(unsigned int n)
     l*=2;
   }
   if(ick_xor16(a)==n) return a;
-  ick_lose(IE277, ick_lineno, (char*) NULL);
+  ick_lose(IE277, ick_lineno, (const char*) NULL);
   /*@-unreachable@*/ return 0; /*@=unreachable@*/
 }
 
@@ -322,7 +322,7 @@ unsigned int ick_rev_xor32(unsigned int n)
     l*=2;
   }
   if(ick_xor32(a)==n) return a;
-  ick_lose(IE277, ick_lineno, (char*) NULL);
+  ick_lose(IE277, ick_lineno, (const char*) NULL);
   /*@-unreachable@*/ return 0; /*@=unreachable@*/
 }
 
@@ -338,7 +338,7 @@ unsigned int ick_rev_fin16(unsigned int n)
     l*=2;
   }
   if(ick_fin16(a)==n) return a;
-  ick_lose(IE277, ick_lineno, (char*) NULL);
+  ick_lose(IE277, ick_lineno, (const char*) NULL);
   /*@-unreachable@*/ return 0; /*@=unreachable@*/
 }
 
@@ -355,7 +355,7 @@ unsigned int ick_rev_fin32(unsigned int n)
     l*=2;
   }
   if(ick_fin32(a)==n) return a;
-  ick_lose(IE277, ick_lineno, (char*) NULL);
+  ick_lose(IE277, ick_lineno, (const char*) NULL);
   /*@-unreachable@*/ return 0; /*@=unreachable@*/
 }
 
@@ -363,7 +363,7 @@ unsigned int ick_rev_whirl16(unsigned int p, unsigned int n)
 {
   /* Only reverse if all digits are the same. */
   if(ick_whirl16(p,n)==n) return n;
-  ick_lose(IE277, ick_lineno, (char*) NULL);
+  ick_lose(IE277, ick_lineno, (const char*) NULL);
   /*@-unreachable@*/ return 0; /*@=unreachable@*/
 }
 
@@ -371,7 +371,7 @@ unsigned int ick_rev_whirl32(unsigned int p, unsigned int n)
 {
   /* Only reverse if all digits are the same. */
   if(ick_whirl32(p,n)==n) return n;
-  ick_lose(IE277, ick_lineno, (char*) NULL);
+  ick_lose(IE277, ick_lineno, (const char*) NULL);
   /*@-unreachable@*/ return 0; /*@=unreachable@*/
 }
 
@@ -380,7 +380,7 @@ unsigned int ick_rev_whirl32(unsigned int p, unsigned int n)
 unsigned int ick_xselx(unsigned int x)
 {
   register unsigned int r=0;
-  if(ick_Base != 2) ick_lose(IE778, ick_lineno, (char*) NULL);
+  if(ick_Base != 2) ick_lose(IE778, ick_lineno, (const char*) NULL);
   while(x) {if(x&1) r=(r<<1)|1; x>>=1;}
   return r;
 }
index 313b1d08f508f4cce5e0410569d6181d7fe14b4f..69307ad31f4190fd29aa96114d2e47c9fdef1e01 100644 (file)
@@ -91,13 +91,13 @@ ICK_EC_FUNC_START(ick_main)
     case 0:
       $G
     default:
-      ick_lose(IE129, 0, (char *)0);
+      ick_lose(IE129, 0, (const char *)0);
     }
 
 #ifdef YUK
     if(yukloop) goto ick_restart;
 #endif
-    ick_lose(IE633, $J, (char *)0);
+    ick_lose(IE633, $J, (const char *)0);
 
     $H
 #ifndef ICK_EC
index b9a98befebf4081b7352a40c304670cda5b64017..2133baa36dd571b31fbe1f585a62ab6ddba5cdea 100644 (file)
@@ -35,7 +35,7 @@ int ick_main(void)
 #ifdef YUK
     if(yukloop) goto ick_restart; 
 #endif
-    ick_lose(IE633, $J, (char *)0);
+    ick_lose(IE633, $J, (const char *)0);
 
     $H
     
index b4d32774349e49b20bdecaed855a3f74f1ba798c..08c876eb6d5274c62ed2139eb597692007ff844a 100644 (file)
--- a/src/yuk.c
+++ b/src/yuk.c
@@ -201,7 +201,7 @@ void yukline(int aboff,int emitlineno)
   const char* tempcharp;
   if(!yukopts) return;
   if(globalargc!=3)
-    ick_lose(IE778,emitlineno,(char*)NULL);
+    ick_lose(IE778,emitlineno,(const char*)NULL);
   if(yukopts & 1)
   { /* profile */
     temptick=YPGETTIME;
@@ -337,7 +337,7 @@ void yukline(int aboff,int emitlineno)
        (void) fgets(buf,20,stdin);
        if(!strchr(buf,'\n'))
        {
-         ick_lose(IE810,emitlineno,(char*)NULL);
+         ick_lose(IE810,emitlineno,(const char*)NULL);
        }
        templine=0;
        switch(*buf)
@@ -683,7 +683,7 @@ void yukline(int aboff,int emitlineno)
          {
            printf("Breakpoint set at line %d.\n",templine);
            breakpoints[nbreakpoints++]=templine;
-           if(nbreakpoints>=80) ick_lose(IE811,emitlineno,(char*)NULL);
+           if(nbreakpoints>=80) ick_lose(IE811,emitlineno,(const char*)NULL);
          }
          else
            (void) puts("Don't know which line you mean.");
@@ -709,7 +709,7 @@ void yukline(int aboff,int emitlineno)
          {
            printf("Monitor set at line %d.\n",templine);
            monitors[nmonitors++]=templine;
-           if(nmonitors>=80) ick_lose(IE811,emitlineno,(char*)NULL);
+           if(nmonitors>=80) ick_lose(IE811,emitlineno,(const char*)NULL);
          }
          else
            (void) puts("Don't know which line you mean.");