From 7f43eb397159bd039286d96cd0ac8eddc67166bc Mon Sep 17 00:00:00 2001 From: Arvid Norlander Date: Tue, 18 Nov 2008 12:51:38 -0500 Subject: [PATCH] Change some (char*) to (const char*) for calls to ick_lose(). --- src/fiddle.c | 24 ++++++++++++------------ src/ick-wrap.c | 4 ++-- src/pickwrap.c | 2 +- src/yuk.c | 8 ++++---- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/fiddle.c b/src/fiddle.c index aaf24e5..e1c2d97 100644 --- a/src/fiddle.c +++ b/src/fiddle.c @@ -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; } diff --git a/src/ick-wrap.c b/src/ick-wrap.c index 313b1d0..69307ad 100644 --- a/src/ick-wrap.c +++ b/src/ick-wrap.c @@ -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 diff --git a/src/pickwrap.c b/src/pickwrap.c index b9a98be..2133baa 100644 --- a/src/pickwrap.c +++ b/src/pickwrap.c @@ -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 diff --git a/src/yuk.c b/src/yuk.c index b4d3277..08c876e 100644 --- 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."); -- 2.43.0