From 0129622383d2d8226ad0ad2e25b412f0fc2d7c21 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Sun, 17 Apr 2022 16:07:52 +0200 Subject: [PATCH] remove dangling spaces --- test/err/bug1098.c | 2 +- test/err/bug1098a.c | 2 +- test/err/bug1098b.c | 2 +- test/err/pr1110.c | 4 +- test/misc/bug1265.c | 4 +- test/misc/sitest.c | 10 +- test/ref/array.c | 2 +- test/ref/cc65070303.c | 2 +- test/ref/cc65080227.c | 2 +- test/ref/cc65080328.c | 2 +- test/ref/cc65090111.c | 2 +- test/ref/cc65090124.c | 6 +- test/ref/cc65090726.c | 4 +- test/ref/cc65101209.c | 2 +- test/ref/cf.c | 2 +- test/ref/strptr.c | 18 ++-- test/ref/struct.c | 2 +- test/ref/switch2.c | 6 +- test/ref/yacc.c | 174 +++++++++++++++++----------------- test/ref/yacc2.c | 22 ++--- test/val/bug1075.c | 2 +- test/val/bug1178.c | 4 +- test/val/bug1181.c | 4 +- test/val/bug1438.c | 2 +- test/val/bug1552.c | 2 +- test/val/call1.c | 4 +- test/val/compare10.c | 10 +- test/val/compare5.c | 4 +- test/val/compare6.c | 6 +- test/val/compare7.c | 8 +- test/val/compare8.c | 12 +-- test/val/compare9.c | 10 +- test/val/constexpr.c | 2 +- test/val/cq22.c | 2 +- test/val/cq241.c | 2 +- test/val/cq243.c | 2 +- test/val/cq244.c | 2 +- test/val/cq25.c | 2 +- test/val/cq26.c | 2 +- test/val/cq4.c | 2 +- test/val/cq61.c | 2 +- test/val/cq626.c | 2 +- test/val/cq71.c | 2 +- test/val/cq714.c | 2 +- test/val/cq714b.c | 2 +- test/val/cq715.c | 2 +- test/val/cq72.c | 2 +- test/val/cq7813.c | 2 +- test/val/cq81.c | 2 +- test/val/cq84.c | 2 +- test/val/cq85.c | 2 +- test/val/cq86.c | 2 +- test/val/cq88.c | 2 +- test/val/duffs-device.c | 10 +- test/val/lib_common_ctype.c | 8 +- test/val/lib_common_memmove.c | 4 +- test/val/lib_common_mulxx.c | 2 +- test/val/lib_common_strcat.c | 8 +- test/val/lib_common_strchr.c | 2 +- test/val/lib_common_strcspn.c | 2 +- test/val/lib_common_strncat.c | 8 +- test/val/lib_common_strrchr.c | 2 +- test/val/lib_common_strspn.c | 2 +- test/val/mult1.c | 32 +++---- test/val/or1.c | 22 ++--- test/val/postdec-16-16.c | 26 ++--- test/val/postdec-16-8.c | 26 ++--- test/val/postdec-8-16.c | 26 ++--- test/val/postdec-8-8.c | 26 ++--- test/val/postinc-16-16.c | 26 ++--- test/val/postinc-16-8.c | 26 ++--- test/val/postinc-8-16.c | 26 ++--- test/val/postinc-8-8.c | 26 ++--- test/val/pptest4.c | 2 +- test/val/pptest5.c | 2 +- test/val/pr1423.c | 2 +- test/val/predec-16-16.c | 26 ++--- test/val/predec-16-8.c | 26 ++--- test/val/predec-8-16.c | 26 ++--- test/val/predec-8-8.c | 26 ++--- test/val/preinc-16-16.c | 26 ++--- test/val/preinc-16-8.c | 26 ++--- test/val/preinc-8-16.c | 26 ++--- test/val/preinc-8-8.c | 26 ++--- test/val/static-fwd-decl.c | 2 +- test/val/strnicmp-test.c | 4 +- test/val/switch2.c | 2 +- test/val/time-test.c | 2 +- test/val/xor.c | 4 +- 89 files changed, 459 insertions(+), 459 deletions(-) diff --git a/test/err/bug1098.c b/test/err/bug1098.c index c49296245..eddbce3f1 100644 --- a/test/err/bug1098.c +++ b/test/err/bug1098.c @@ -1,7 +1,7 @@ /* bug #1098 Empty enumerator-list */ -/* The C Standard requires that something exists between the braces for +/* The C Standard requires that something exists between the braces for * enum, struct, and union. */ enum { diff --git a/test/err/bug1098a.c b/test/err/bug1098a.c index 63c1c8da0..aed750267 100644 --- a/test/err/bug1098a.c +++ b/test/err/bug1098a.c @@ -1,7 +1,7 @@ /* bug #1098 Empty enumerator-list */ -/* The C Standard requires that something exists between the braces for +/* The C Standard requires that something exists between the braces for * enum, struct, and union. */ struct { diff --git a/test/err/bug1098b.c b/test/err/bug1098b.c index ebd3e94c8..5f6d8b0f2 100644 --- a/test/err/bug1098b.c +++ b/test/err/bug1098b.c @@ -1,7 +1,7 @@ /* bug #1098 Empty enumerator-list */ -/* The C Standard requires that something exists between the braces for +/* The C Standard requires that something exists between the braces for * enum, struct, and union. */ union { diff --git a/test/err/pr1110.c b/test/err/pr1110.c index 86955c720..671abf9a4 100644 --- a/test/err/pr1110.c +++ b/test/err/pr1110.c @@ -1,5 +1,5 @@ -/* pr #1110 - not only should the current test case for #975 compile and work, +/* pr #1110 - not only should the current test case for #975 compile and work, * but also the code piece below fail to compile and generate errors like commented: */ static const unsigned char array[3]; /* OK */ @@ -7,7 +7,7 @@ static const unsigned char array[] = { 0, 1, 2 }; /* OK - complete definition* static const unsigned char array[3]; /* OK */ static const unsigned char array[]; /* OK */ static const unsigned char array[] = { 1, 2, 3 }; /* Error - redefinition */ -static const unsigned char array[4]; /* Error - conflicting size */ +static const unsigned char array[4]; /* Error - conflicting size */ int main(void) { diff --git a/test/misc/bug1265.c b/test/misc/bug1265.c index 36d1459a7..7c34a25b7 100644 --- a/test/misc/bug1265.c +++ b/test/misc/bug1265.c @@ -17,7 +17,7 @@ int main (void) { x = 1234; n = f1 (x); sprintf (str2, "%p\n", &x); - + if (strcmp(str1, str2)) { puts("not equal"); failures++; @@ -31,7 +31,7 @@ int main (void) { x = 2345; n = f2 (x); sprintf (str2, "%p\n", &x); - + if (strcmp(str1, str2)) { puts("not equal"); failures++; diff --git a/test/misc/sitest.c b/test/misc/sitest.c index 2f1d7df4d..6c8a6f1e2 100644 --- a/test/misc/sitest.c +++ b/test/misc/sitest.c @@ -106,7 +106,7 @@ int main() { int status = 0; /* exit status to be returned */ - + /* features: */ printf("CHAR_BIT=%u\n", (unsigned)CHAR_BIT ); @@ -526,12 +526,12 @@ main() { else /* for trailing semicolon */ #else - + #define SCAN(buf,fs,var,exp) #define PRINT(fs,var,exp) #endif - + #ifdef SCNo32 SCAN(in_dn, SCNo32, int32, 9); @@ -586,7 +586,7 @@ main() { #endif #if 0 - + #ifdef INT16_MAX { INT16_MAX, INT16_MAX, }, { -INT16_MAX, INT16_MAX, }, @@ -830,7 +830,7 @@ main() { } #endif } - + { char *endptr; wchar_t *wendptr; diff --git a/test/ref/array.c b/test/ref/array.c index 96bf22c3a..19265ef90 100644 --- a/test/ref/array.c +++ b/test/ref/array.c @@ -29,7 +29,7 @@ main() { p[j] = x[i][j]; } g(z, y); - + return 0; } diff --git a/test/ref/cc65070303.c b/test/ref/cc65070303.c index 049f14c40..6cf2e9dc7 100644 --- a/test/ref/cc65070303.c +++ b/test/ref/cc65070303.c @@ -27,7 +27,7 @@ int main(int argc, char* argv[]) test.c(20): Error: Incompatible pointer types for   APtr=&(Bs[7].Data[1]); -My experience in C is very limited, but as this works both in MSVC and +My experience in C is very limited, but as this works both in MSVC and the 8 bit Z80 compiler i originally used, i guess its an bug in CC65. As a workaround, an typecast via  APtr=(TypA*)&(Bs[7].Data[1]); diff --git a/test/ref/cc65080227.c b/test/ref/cc65080227.c index b6d068b2a..86d5ee331 100644 --- a/test/ref/cc65080227.c +++ b/test/ref/cc65080227.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! diff --git a/test/ref/cc65080328.c b/test/ref/cc65080328.c index 630638f3d..7e26ea20a 100644 --- a/test/ref/cc65080328.c +++ b/test/ref/cc65080328.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! diff --git a/test/ref/cc65090111.c b/test/ref/cc65090111.c index be889a608..30b2b3cd0 100644 --- a/test/ref/cc65090111.c +++ b/test/ref/cc65090111.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! diff --git a/test/ref/cc65090124.c b/test/ref/cc65090124.c index 3a75b28fa..910dc1195 100644 --- a/test/ref/cc65090124.c +++ b/test/ref/cc65090124.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! @@ -8,7 +8,7 @@ #include /* -there is a bug in the preprocessor (i think) ... the following works +there is a bug in the preprocessor (i think) ... the following works (compiles) correctly: unsigned long fs,fd,a; @@ -32,7 +32,7 @@ int main(void) fs=(func((fd/a),(func(2,0x0082c90f)))); } -i get "Error: ')' expected" on that line. (this is with the snapshot, freshly +i get "Error: ')' expected" on that line. (this is with the snapshot, freshly compiled 5 minutes ago) */ diff --git a/test/ref/cc65090726.c b/test/ref/cc65090726.c index 609594dc4..f22b9c203 100644 --- a/test/ref/cc65090726.c +++ b/test/ref/cc65090726.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! @@ -36,7 +36,7 @@ void Proc1(RecordPtr PtrParIn) Proc3((*(PtrParIn->PtrComp)).PtrComp); Proc3(NextRecord.PtrComp); #endif - + #undef NextRecord } diff --git a/test/ref/cc65101209.c b/test/ref/cc65101209.c index daeab8509..eba209d1d 100644 --- a/test/ref/cc65101209.c +++ b/test/ref/cc65101209.c @@ -34,5 +34,5 @@ So testing with 999 gives: 231 mod 999 is 0 999 mod 999 is 0 -This seems to be systematic. +This seems to be systematic. */ diff --git a/test/ref/cf.c b/test/ref/cf.c index bb0c13e8b..6001009ce 100644 --- a/test/ref/cf.c +++ b/test/ref/cf.c @@ -67,7 +67,7 @@ char *argv[]; } printf("input:\n\n"); - + nc = 0; while ((c = GETCHAR()) != -1) { diff --git a/test/ref/strptr.c b/test/ref/strptr.c index 152c1bb48..d596e19d1 100644 --- a/test/ref/strptr.c +++ b/test/ref/strptr.c @@ -1,5 +1,5 @@ /* - !!DESCRIPTION!! + !!DESCRIPTION!! !!ORIGIN!! testsuite !!LICENCE!! Public Domain !!AUTHOR!! Groepaz/Hitmen @@ -24,7 +24,7 @@ FILE *outfile=NULL; #else #endif - + #include #include #include @@ -65,17 +65,17 @@ static unsigned char ch; /* basic line-link / file-length */ memcpy(buffer,b1,4); - - dir->off=dir->off+4; + + dir->off=dir->off+4; entry.d_reclen=254*(buffer[2]+(buffer[3]<<8)); /* read file entry */ memcpy(buffer,b2,0x10); - - dir->off=dir->off+i; + + dir->off=dir->off+i; printf("Xreaddir: '%s'\n",buffer); - + /* skip until either quote (file) or b (blocks free => end) */ i=0;ii=0; while(i==0){ @@ -113,9 +113,9 @@ int main(void) char mydirname[XNAME_MAX+1]="."; XDIR mydir; struct Xdirent *mydirent; - + printf("start\n"); - + if((mydirent=Xreaddir(&mydir))==NULL) { printf("NULL\n"); diff --git a/test/ref/struct.c b/test/ref/struct.c index 15fae62fc..e5957f265 100644 --- a/test/ref/struct.c +++ b/test/ref/struct.c @@ -246,7 +246,7 @@ rect screen = ); test1(); - + for (i = 0; i < sizeof pts/sizeof pts[0]; i++) { printf("(%d,%d) is ", pts[i].x, (x = makepoint(pts[i].x, pts[i].y)).y); diff --git a/test/ref/switch2.c b/test/ref/switch2.c index 78d383b52..0e52775e4 100644 --- a/test/ref/switch2.c +++ b/test/ref/switch2.c @@ -169,7 +169,7 @@ void testdefault2(unsigned char i) { case 170: break; - + case 18: break; case 19: @@ -215,12 +215,12 @@ int main(void) { testlimits(32767); testlimits(-32768); testlimits(-1); - + testdefault1(1); testdefault1(2); testdefault1(3); testdefault1(4); - + testdefault2(1); testdefault2(2); testdefault2(3); diff --git a/test/ref/yacc.c b/test/ref/yacc.c index 776e4f93d..3831b67fd 100644 --- a/test/ref/yacc.c +++ b/test/ref/yacc.c @@ -70,7 +70,7 @@ int yytchar; #define yyout outfile extern int yylineno; -struct yysvf +struct yysvf { struct yywork *yystoff; struct yysvf *yyother; @@ -150,7 +150,7 @@ yyfussy: } } - + #ifdef YYDEBUG fprintf(yyout,"yylex: return 0\n"); #endif @@ -164,9 +164,9 @@ int yyvstop[] = }; # define YYTYPE char -struct yywork -{ - YYTYPE verify, advance; +struct yywork +{ + YYTYPE verify, advance; } yycrank[] = { {0,0}, {0,0}, {1,3}, {0,0}, @@ -178,12 +178,12 @@ struct yywork {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, - + {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, - + {0,0}, {1,5}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, @@ -193,17 +193,17 @@ struct yywork {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {0,0}, {0,0}, {0,0}, - + {0,0}, {0,0}, {0,0}, {0,0}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, - + {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {0,0}, {0,0}, - + {0,0}, {0,0}, {6,8}, {0,0}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, @@ -240,7 +240,7 @@ struct yywork }; /* -struct yysvf +struct yysvf { struct yywork *yystoff; struct yysvf *yyother; @@ -281,27 +281,27 @@ char yymatch[] = #endif 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , - + 011 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 , - + '0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' , '0' ,'0' ,01 ,01 ,01 ,01 ,01 ,01 , - + /* 0x40 (ascii) @A... (petscii) @a... */ 01 ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , - + 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,01 ,01 ,01 ,01 ,'A' , - + /* 0x60 (ascii) @a... */ 01 ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , - + 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,01 ,01 ,01 ,01 ,01 , - + #ifdef CHARSETHACK /* 0x80 */ 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, @@ -312,10 +312,10 @@ char yymatch[] = /* 0xc0 (petcii) @A... */ 01 ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , - + 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' , 'A' ,'A' ,'A' ,01 ,01 ,01 ,01 ,01 , - + 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, @@ -354,9 +354,9 @@ yylook() int debug; # endif */ - + char *yylastch; - + /* start off machines */ /* @@ -372,11 +372,11 @@ yylook() # else #define debug 0 #endif - + #ifdef YYDEBUG fprintf(yyout,"yylook()\n"); # endif - + if (!yymorfg) yylastch = yytext; else @@ -388,7 +388,7 @@ yylook() #ifdef YYDEBUG fprintf(yyout,"yylook: yymorfg=%d\n",yymorfg); # endif - + for(;;) { #ifdef YYDEBUG @@ -400,7 +400,7 @@ yylook() if (yyprevious==YYNEWLINE) yystate++; testbreak=0; - + for (;;) { # ifdef LEXDEBUG @@ -412,12 +412,12 @@ yylook() exit(EXIT_FAILURE); } testbreak++; - + yyt = yystate->yystoff; /* fprintf(yyout,"yylook: yyt offs: %02x\n",yyt-yycrank); */ - + if(yyt == yycrank) { /* may not be any transitions */ yyz = yystate->yyother; @@ -430,7 +430,7 @@ yylook() fprintf(yyout,"yylook: input "); printchar("yych",yych); # endif - + tryagain: # ifdef LEXDEBUG @@ -440,7 +440,7 @@ yylook() yyr = yyt; /* fprintf(yyout,"yylook: yyr offs: %02x\n",yyr-yycrank); */ - + if ( yyt > yycrank) { yyt = yyr + yych; @@ -467,7 +467,7 @@ yylook() } # ifdef YYOPTIM else if(yyt < yycrank) /* r < yycrank */ - { + { yyt = yyr = yycrank+(yycrank-yyt); # ifdef LEXDEBUG fprintf(yyout,"yylook: compressed state\n"); @@ -492,7 +492,7 @@ yylook() fprintf(yyout,"yylook: continue (2)\n"); # endif goto contin; - + } # ifdef LEXDEBUG /* @@ -509,12 +509,12 @@ yylook() */ fprintf(yyout,"yylook: try fall back character\n"); # endif - if(yyt <= yytop && yyt->verify+yysvec == yystate) + if(yyt <= yytop && yyt->verify+yysvec == yystate) { # ifdef LEXDEBUG fprintf(yyout,"yylook: (2a)\n"); # endif - + if(yyt->advance+yysvec == YYLERR) /* error transition */ { # ifdef LEXDEBUG @@ -531,7 +531,7 @@ yylook() fprintf(yyout,"yylook: continue (3)\n"); # endif goto contin; - + } # ifdef LEXDEBUG fprintf(yyout,"yylook: (2)\n"); @@ -578,7 +578,7 @@ yylook() { yyolsp = lsp; if(yyextra[*yyfnd]) /* must backup */ - { + { while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate) { lsp--; @@ -630,7 +630,7 @@ yylook() # endif } - + yyback(p, m) int *p; { @@ -648,25 +648,25 @@ yyback(p, m) yyinput() { int out=input(); - + #ifdef YYDEBUG fprintf(yyout,"yylook: input "); printchar("out",out); -#endif +#endif return(out); } yyoutput(c) - int c; + int c; { output(c); } yyunput(c) - int c; + int c; { unput(c); } -main() +main() { printf("main start\n"); infile = fopen("yacc.in","rb"); @@ -681,8 +681,8 @@ main() } /* yyerror - issue error message */ -yyerror(s) -char *s; +yyerror(s) +char *s; { printf("[%s]\n", s); } @@ -722,39 +722,39 @@ short yyact[]= 0, 0, 0, 0, 0, 0, 0, 6, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 4, 6 + 0, 0, 0, 0, 0, 0, 0, 4, 6 }; short yypact[]= { -1000, -9,-1000, 5, -7, -59,-1000,-1000,-1000, -40, -29, -40, -40,-1000,-1000, -40, -40, -40, -40, -38, - -35, -38, -38,-1000,-1000,-1000 + -35, -38, -38,-1000,-1000,-1000 }; short yypgo[]= { - 0, 21, 20, 17, 11 + 0, 21, 20, 17, 11 }; short yyr1[]= { 0, 1, 1, 1, 1, 2, 4, 4, 4, 4, - 4, 4, 4, 4, 3 + 4, 4, 4, 4, 3 }; short yyr2[]= { 0, 0, 2, 3, 3, 3, 3, 3, 3, 3, - 2, 3, 1, 1, 1 + 2, 3, 1, 1, 1 }; short yychk[]= { -1000, -1, 10, -2, 256, -3, 257, 10, 10, 61, -4, 45, 40, -3, 258, 43, 45, 42, 47, -4, - -4, -4, -4, -4, -4, 41 + -4, -4, -4, -4, -4, 41 }; short yydef[]= { 1, -2, 2, 0, 0, 0, 14, 3, 4, 0, 5, 0, 0, 12, 13, 0, 0, 0, 0, 10, - 0, 6, 7, 8, 9, 11 + 0, 6, 7, 8, 9, 11 }; # define YYFLAG -1000 @@ -774,7 +774,7 @@ int yychar = -1; /* current input token number */ int yynerrs = 0; /* number of errors */ short yyerrflag = 0; /* error recovery flag */ -yyparse() +yyparse() { short yys[YYMAXDEPTH]; short yyj, yym; @@ -820,23 +820,23 @@ yyparse() #ifdef YYDEBUG printf("yyparse: yynewstate (1)\n"); #endif - + if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0; #ifdef YYDEBUG - + printf("yyparse: yynewstate yyn=%d ",yyn); printchar("yychar",yychar); #endif - + if( (yyn += yychar)<0 || yyn >= YYLAST ) goto yydefault; #ifdef YYDEBUG printf("yyparse: yynewstate (2)\n"); #endif - + if( yychk[ yyn=yyact[ yyn ] ] == yychar ) /* valid shift */ - { + { yychar = -1; yyval = yylval; yystate = yyn; @@ -872,9 +872,9 @@ yyparse() #ifdef YYDEBUG printf("yyparse: yyn=%d yyerrflag=%d\n",yyn,yyerrflag); #endif - + if( yyn == 0 ) /* error */ - { + { /* error ... attempt to resume parsing */ switch( yyerrflag ){ @@ -942,65 +942,65 @@ yyparse() yyn = yyr1[yyn]; yyj = yypgo[yyn] + *yyps + 1; if( yyj>=YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) yystate = yyact[yypgo[yyn]]; - + switch(yym) { case 4: - { - yyerrok; + { + yyerrok; } break; case 5: - { + { printf("[STORE]\n"); - } + } break; case 6: - { + { printf("[ADD]\n"); - } + } break; case 7: - { + { printf("[NEG]\n[ADD]\n"); - } + } break; case 8: - { + { printf("[MUL]\n"); - } + } break; case 9: - { + { printf("[DIV]\n"); - } + } break; case 10: - { - printf("[NEG]\n"); - } + { + printf("[NEG]\n"); + } break; case 12: - { - printf("[LOAD]\n"); - } + { + printf("[LOAD]\n"); + } break; case 13: - { + { printf("[PUSH %s]\n", yytext); - } + } break; case 14: - { + { printf("[%s]\n", yytext); - } + } break; } - + goto yystack; /* stack new state and value */ } - -int yywrap() -{ - return 1; + +int yywrap() +{ + return 1; } diff --git a/test/ref/yacc2.c b/test/ref/yacc2.c index 3b4819c55..33288b25d 100644 --- a/test/ref/yacc2.c +++ b/test/ref/yacc2.c @@ -8,9 +8,9 @@ #include # define YYTYPE char -struct yywork -{ - YYTYPE verify, advance; +struct yywork +{ + YYTYPE verify, advance; } yycrank[] = { {0,0}, {0,0}, {1,3}, {0,0}, @@ -22,12 +22,12 @@ struct yywork {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, - + {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, {0,0}, - + {0,0}, {1,5}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, {5,7}, @@ -37,17 +37,17 @@ struct yywork {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {0,0}, {0,0}, {0,0}, - + {0,0}, {0,0}, {0,0}, {0,0}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, - + {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {0,0}, {0,0}, - + {0,0}, {0,0}, {6,8}, {0,0}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, {6,8}, @@ -90,7 +90,7 @@ int yyvstop[] = 0,4,0,3,4,0,2,4,0,1,4,0,2,0,1,0,0 }; -struct yysvf +struct yysvf { struct yywork *yystoff; struct yysvf *yyother; @@ -157,7 +157,7 @@ void subtest3(void) yyt=yycrank; yystate=yysvec; - + bogus(); if(yyt <= yytop && yyt->verify+yysvec == yystate) { @@ -173,7 +173,7 @@ void subtest3(void) short yyr2[]= { 0, 0, 2, 3, 3, 3, 3, 3, 3, 3, - 2, 3, 1, 1, 1 + 2, 3, 1, 1, 1 }; // yyps -= yyr2[yyn]; diff --git a/test/val/bug1075.c b/test/val/bug1075.c index 6ff5ec8e7..3e259fd22 100644 --- a/test/val/bug1075.c +++ b/test/val/bug1075.c @@ -8,7 +8,7 @@ long rhs; int test(void) { - /* the whole lhs is errorneously treated as an absolute address (integer + /* the whole lhs is errorneously treated as an absolute address (integer constant) neglecting its dereference */ return *(char *)0xD77C + rhs; } diff --git a/test/val/bug1178.c b/test/val/bug1178.c index 043767e4c..7fb7e7803 100644 --- a/test/val/bug1178.c +++ b/test/val/bug1178.c @@ -41,7 +41,7 @@ void dotest1(void) StructArray1[0] = test1; - printf ("test1: %d, %d, %d, %d, %d\n", + printf ("test1: %d, %d, %d, %d, %d\n", (int)StructArray1[0].a, (int)StructArray1[0].b, (int)StructArray1[0].c, (int)StructArray1[0].d, (int)StructArray1[0].e); if ((StructArray1[0].a != 42) || @@ -62,7 +62,7 @@ void dotest2(void) StructArray2[0] = test2; - printf ("test2: %d, %d, %d, %d, %d\n", + printf ("test2: %d, %d, %d, %d, %d\n", (int)StructArray2[0].a, (int)StructArray2[0].b, (int)StructArray2[0].c, (int)StructArray2[0].d); if ((StructArray2[0].a != 42) || diff --git a/test/val/bug1181.c b/test/val/bug1181.c index 4ea2d54bf..077707d94 100644 --- a/test/val/bug1181.c +++ b/test/val/bug1181.c @@ -1,5 +1,5 @@ -/* bug #1181 - Testing struct member against NULL is broken */ +/* bug #1181 - Testing struct member against NULL is broken */ #include #include @@ -52,7 +52,7 @@ MENUITEM optionsitems_menu[] = { static MENU optionsmenu_menu = { &optionsitems_menu[0], -}; +}; unsigned char __fastcall__ menu_getnumitems(MENU *menu) { diff --git a/test/val/bug1438.c b/test/val/bug1438.c index 3894f87f1..9c8f7a8ce 100644 --- a/test/val/bug1438.c +++ b/test/val/bug1438.c @@ -1,5 +1,5 @@ -/* Issue #1438 fix #1439 - crash in cc65, related to delayed post-counting +/* Issue #1438 fix #1439 - crash in cc65, related to delayed post-counting this is an odd issue, the compile would crash *sometimes*, perhaps in one of ten compilation runs. diff --git a/test/val/bug1552.c b/test/val/bug1552.c index 42f39eec6..92ad902bd 100644 --- a/test/val/bug1552.c +++ b/test/val/bug1552.c @@ -23,7 +23,7 @@ int execute(TREPTR argt, int execflg, int *pf1, int *pf2) { register TREPTR t; int type; - switch (type) + switch (type) { case 6: { diff --git a/test/val/call1.c b/test/val/call1.c index c7ac920b3..d09ae0dec 100644 --- a/test/val/call1.c +++ b/test/val/call1.c @@ -70,7 +70,7 @@ call5 (unsigned int k) return (k); } -unsigned char +unsigned char call6a(unsigned char uc) { if(uc>uchar1) @@ -85,7 +85,7 @@ call6(unsigned char uc) return(call6a(uc)); } -unsigned int +unsigned int call7a(unsigned int ui) { if(ui) diff --git a/test/val/compare10.c b/test/val/compare10.c index 861a02d64..742213851 100644 --- a/test/val/compare10.c +++ b/test/val/compare10.c @@ -59,7 +59,7 @@ void c_char_gte_lit1(unsigned char expected_result) if(char0 >= 0x7e) result |= 0x10; - + if(char0 >= 0x7f) result |= 0x20; @@ -138,10 +138,10 @@ void c_int_gte_lit1(unsigned char expected_result) if(int0 >= 0x0101) result |= 0x10; - + if(int0 >= 0x01ff) result |= 0x20; - + if(int0 >= 0x0200) result |= 0x40; @@ -226,10 +226,10 @@ void c_int_gte_lit2(unsigned char expected_result) if(int0 >= -0x0101) result |= 0x10; - + if(int0 >= -0x0100) result |= 0x20; - + if(int0 >= -0xff) result |= 0x40; diff --git a/test/val/compare5.c b/test/val/compare5.c index f1d94d537..cf51fac89 100644 --- a/test/val/compare5.c +++ b/test/val/compare5.c @@ -284,7 +284,7 @@ void c_ifelse1(void) void c_minus1(void) { printf("long0:%ld long1:%ld\n",long0,long1); - + printf("(long0 != -1)\n"); if(long0 != -1) { @@ -432,7 +432,7 @@ main (void) success = failures; done (); - + printf("failures: %d\n",failures); return failures; diff --git a/test/val/compare6.c b/test/val/compare6.c index 85f16a1c4..bad411c0c 100644 --- a/test/val/compare6.c +++ b/test/val/compare6.c @@ -60,7 +60,7 @@ void c_char(void) if(char1 || !char0) failures++; - if((char0 >5 ) && (char0 < 10)) + if((char0 >5 ) && (char0 < 10)) failures++; char0 +=5; /* char0 = 6 now */ @@ -100,7 +100,7 @@ void c_int(void) if(int1 || !int0) failures++; - if((int0 >5 ) && (int0 < 10)) + if((int0 >5 ) && (int0 < 10)) failures++; int0 +=5; /* int0 = 6 now */ @@ -140,7 +140,7 @@ void c_long(void) if(long1 || !long0) failures++; - if((long0 >5 ) && (long0 < 10)) + if((long0 >5 ) && (long0 < 10)) failures++; long0 +=5; /* long0 = 6 now */ diff --git a/test/val/compare7.c b/test/val/compare7.c index 6c9636dec..d88952f62 100644 --- a/test/val/compare7.c +++ b/test/val/compare7.c @@ -129,10 +129,10 @@ void c_int_lt_lit1(unsigned char expected_result) if(int0 < 0x0101) result |= 0x10; - + if(int0 < 0x01ff) result |= 0x20; - + if(int0 < 0x0200) result |= 0x40; @@ -214,10 +214,10 @@ void c_int_lt_lit2(unsigned char expected_result) if(int0 < -0x0101) result |= 0x10; - + if(int0 < -0x0100) result |= 0x20; - + if(int0 < -0xff) result |= 0x40; diff --git a/test/val/compare8.c b/test/val/compare8.c index 0abff8c69..2621dad1d 100644 --- a/test/val/compare8.c +++ b/test/val/compare8.c @@ -59,10 +59,10 @@ void c_char_gt_lit1(unsigned char expected_result) if(char0 > 0x7e) result |= 0x10; - + if(char0 > 0x7f) result |= 0x20; - + if(result != expected_result) failures++; } @@ -132,10 +132,10 @@ void c_int_gt_lit1(unsigned char expected_result) if(int0 > 0x0101) result |= 0x10; - + if(int0 > 0x01ff) result |= 0x20; - + if(int0 > 0x0200) result |= 0x40; @@ -220,10 +220,10 @@ void c_int_gt_lit2(unsigned char expected_result) if(int0 > -0x0101) result |= 0x10; - + if(int0 > -0x0100) result |= 0x20; - + if(int0 > -0xff) result |= 0x40; diff --git a/test/val/compare9.c b/test/val/compare9.c index 4a3714199..a498c15cb 100644 --- a/test/val/compare9.c +++ b/test/val/compare9.c @@ -54,7 +54,7 @@ void c_char_lte_lit1(unsigned char expected_result) if(char0 <= 0x7f) result |= 0x10; - + if(result != expected_result) failures++; } @@ -124,10 +124,10 @@ void c_int_lte_lit1(unsigned char expected_result) if(int0 <= 0x0101) result |= 0x10; - + if(int0 <= 0x01ff) result |= 0x20; - + if(int0 <= 0x0200) result |= 0x40; @@ -209,10 +209,10 @@ void c_int_lte_lit2(unsigned char expected_result) if(int0 <= -0x0101) result |= 0x10; - + if(int0 <= -0x0100) result |= 0x20; - + if(int0 <= -0xff) result |= 0x40; diff --git a/test/val/constexpr.c b/test/val/constexpr.c index 4338717f4..c66946a19 100644 --- a/test/val/constexpr.c +++ b/test/val/constexpr.c @@ -8,7 +8,7 @@ if they are being compiled/evaluated correctly. related: pr #1424 - More compile-time constant expressions regarding object addresses -issue #1196 - Constant expressions in general +issue #1196 - Constant expressions in general */ diff --git a/test/val/cq22.c b/test/val/cq22.c index 015b7bf77..20048fa2c 100644 --- a/test/val/cq22.c +++ b/test/val/cq22.c @@ -125,7 +125,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq241.c b/test/val/cq241.c index 1f66a378c..611b5a376 100644 --- a/test/val/cq241.c +++ b/test/val/cq241.c @@ -267,7 +267,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq243.c b/test/val/cq243.c index aaec9a8ea..8aba7dfe8 100644 --- a/test/val/cq243.c +++ b/test/val/cq243.c @@ -245,7 +245,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq244.c b/test/val/cq244.c index 9f4704f36..896ddb75b 100644 --- a/test/val/cq244.c +++ b/test/val/cq244.c @@ -140,7 +140,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq25.c b/test/val/cq25.c index bfdade957..7cacebf0a 100644 --- a/test/val/cq25.c +++ b/test/val/cq25.c @@ -152,7 +152,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq26.c b/test/val/cq26.c index 239411f1c..1c88dfed6 100644 --- a/test/val/cq26.c +++ b/test/val/cq26.c @@ -197,7 +197,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq4.c b/test/val/cq4.c index a8b6b1d52..205f62c88 100644 --- a/test/val/cq4.c +++ b/test/val/cq4.c @@ -344,7 +344,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq61.c b/test/val/cq61.c index fc4d1d95f..c16b64066 100644 --- a/test/val/cq61.c +++ b/test/val/cq61.c @@ -167,7 +167,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq626.c b/test/val/cq626.c index a8b05c8f2..b7c592d58 100644 --- a/test/val/cq626.c +++ b/test/val/cq626.c @@ -318,7 +318,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq71.c b/test/val/cq71.c index f7167c728..725a40e88 100644 --- a/test/val/cq71.c +++ b/test/val/cq71.c @@ -221,7 +221,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq714.c b/test/val/cq714.c index d7a878033..c36c992aa 100644 --- a/test/val/cq714.c +++ b/test/val/cq714.c @@ -1776,7 +1776,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq714b.c b/test/val/cq714b.c index 9538281b8..19b58628c 100644 --- a/test/val/cq714b.c +++ b/test/val/cq714b.c @@ -997,7 +997,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq715.c b/test/val/cq715.c index 0fe864159..2e7e22d85 100644 --- a/test/val/cq715.c +++ b/test/val/cq715.c @@ -132,7 +132,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq72.c b/test/val/cq72.c index 421177a0b..6b8026576 100644 --- a/test/val/cq72.c +++ b/test/val/cq72.c @@ -326,7 +326,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq7813.c b/test/val/cq7813.c index 9d4308a3e..d6c9b445f 100644 --- a/test/val/cq7813.c +++ b/test/val/cq7813.c @@ -362,7 +362,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq81.c b/test/val/cq81.c index 85e1ac1d6..1e83a2e04 100644 --- a/test/val/cq81.c +++ b/test/val/cq81.c @@ -708,7 +708,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq84.c b/test/val/cq84.c index 64429e300..c1f62913e 100644 --- a/test/val/cq84.c +++ b/test/val/cq84.c @@ -249,7 +249,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq85.c b/test/val/cq85.c index 49423e7de..81a99c960 100644 --- a/test/val/cq85.c +++ b/test/val/cq85.c @@ -294,7 +294,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq86.c b/test/val/cq86.c index 9c850662a..90cfa0b7c 100644 --- a/test/val/cq86.c +++ b/test/val/cq86.c @@ -209,7 +209,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/cq88.c b/test/val/cq88.c index ef742824e..a9af7bef7 100644 --- a/test/val/cq88.c +++ b/test/val/cq88.c @@ -165,7 +165,7 @@ int main(int n,char **args) { int j; static struct defs d0, *pd0; - + d0.flgs = 1; /* These flags dictate */ d0.flgm = 1; /* the verbosity of */ d0.flgd = 1; /* the program. */ diff --git a/test/val/duffs-device.c b/test/val/duffs-device.c index effb33bb2..eb91e244f 100644 --- a/test/val/duffs-device.c +++ b/test/val/duffs-device.c @@ -1,6 +1,6 @@ /* !!DESCRIPTION!! Implementation of Duff's device (loop unrolling). - !!ORIGIN!! + !!ORIGIN!! !!LICENCE!! GPL, read COPYING.GPL */ @@ -34,7 +34,7 @@ int acmp(char* a, char* b, int count) return 0; } -void duffit (char* to, char* from, int count) +void duffit (char* to, char* from, int count) { int n = (count + 7) / 8; @@ -55,14 +55,14 @@ int main(void) { char a[ASIZE] = {1}; char b[ASIZE] = {2}; - + /* a and b should be different */ if(!acmp(a, b, ASIZE)) { failures++; } - + duffit(a, b, ASIZE); - + /* a and b should be the same */ if(acmp(a, b, ASIZE)) { failures++; diff --git a/test/val/lib_common_ctype.c b/test/val/lib_common_ctype.c index 39c92953b..281ee454e 100644 --- a/test/val/lib_common_ctype.c +++ b/test/val/lib_common_ctype.c @@ -16,7 +16,7 @@ #define NUMTESTS 257 -typedef struct +typedef struct { bool isalnum; bool isalpha; @@ -30,7 +30,7 @@ typedef struct bool isspace; bool isupper; bool isxdigit; - bool isblank; + bool isblank; } CTypeClassifications; @@ -89,7 +89,7 @@ CTypeClassifications testSet[NUMTESTS] = {false, false, true, false, false, true, false, true, true, false, false, false, false}, // 2D {false, false, true, false, false, true, false, true, true, false, false, false, false}, // 2E {false, false, true, false, false, true, false, true, true, false, false, false, false}, // 2F - + {true, false, true, false, true, true, false, true, false, false, false, true, false}, // 30 {true, false, true, false, true, true, false, true, false, false, false, true, false}, // 31 {true, false, true, false, true, true, false, true, false, false, false, true, false}, // 32 @@ -123,7 +123,7 @@ CTypeClassifications testSet[NUMTESTS] = {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 4D {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 4E {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 4F - + {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 50 {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 51 {true, true, true, false, false, true, false, true, false, false, true, false, false}, // 52 diff --git a/test/val/lib_common_memmove.c b/test/val/lib_common_memmove.c index 6b2273e78..cf81bc404 100644 --- a/test/val/lib_common_memmove.c +++ b/test/val/lib_common_memmove.c @@ -10,7 +10,7 @@ TEST { unsigned i, v; char* p; - + for (i=0; i < BufferSize; ++i) Buffer[i+1] = (i%128); @@ -35,7 +35,7 @@ TEST ASSERT_AreEqual(i%128, (unsigned)Buffer[i+2], "%u", "Unexpected value in buffer at position %u!" COMMA i+2); } - v = Buffer[BufferSize+1]; // rember value of first untouched end-byte + v = Buffer[BufferSize+1]; // rember value of first untouched end-byte // copy downwards p = memmove(Buffer+1, Buffer+2, BufferSize); diff --git a/test/val/lib_common_mulxx.c b/test/val/lib_common_mulxx.c index cf5f089e9..e5afb3f0e 100644 --- a/test/val/lib_common_mulxx.c +++ b/test/val/lib_common_mulxx.c @@ -4,7 +4,7 @@ TEST { unsigned i; - + for (i=0; i < 256; ++i) { ASSERT_AreEqual(i*20, mul20(i), "%u", "Invalid 'mul20(%u)' calculation!" COMMA i); diff --git a/test/val/lib_common_strcat.c b/test/val/lib_common_strcat.c index 1872053a4..3947c5130 100644 --- a/test/val/lib_common_strcat.c +++ b/test/val/lib_common_strcat.c @@ -11,7 +11,7 @@ TEST { unsigned i,j; char* p; - + for (i=0; i < SourceStringSize; ++i) SourceString[i] = (i%128)+1; @@ -23,13 +23,13 @@ TEST DestinationString[0] = 0; ASSERT_AreEqual(0, strlen(DestinationString), "%u", "Destination string initialization or 'strlen()' problem!"); - + /* Test concatenation to empty buffer */ strcat(DestinationString, SourceString); - + ASSERT_AreEqual(SourceStringSize, strlen(DestinationString), "%u", "Unexpected string length while string concatenation to empty buffer!"); - + /* Test concatenation to non empty buffer */ p = strcat(DestinationString, SourceString); diff --git a/test/val/lib_common_strchr.c b/test/val/lib_common_strchr.c index a48d287e5..6f2db258a 100644 --- a/test/val/lib_common_strchr.c +++ b/test/val/lib_common_strchr.c @@ -1,7 +1,7 @@ #include #include "unittest.h" - + /* Test string. Must NOT have duplicate characters! */ static char S[] = "Helo wrd!\n"; diff --git a/test/val/lib_common_strcspn.c b/test/val/lib_common_strcspn.c index f289ddb95..1adb19671 100644 --- a/test/val/lib_common_strcspn.c +++ b/test/val/lib_common_strcspn.c @@ -11,7 +11,7 @@ static char* TestChars="1234567890"; // we like to find numbe TEST { unsigned i; - + for (i=0; i < EstimatedStringSize; ++i) EstimatedString[i] = (i%26)+'A'; // put ABCD... into the string to be estimated diff --git a/test/val/lib_common_strncat.c b/test/val/lib_common_strncat.c index a6f92ac05..54cf0e3e5 100644 --- a/test/val/lib_common_strncat.c +++ b/test/val/lib_common_strncat.c @@ -11,7 +11,7 @@ TEST { unsigned i; char* p; - + for (i=0; i < SourceStringSize; ++i) SourceString[i] = (i%128)+1; @@ -23,13 +23,13 @@ TEST DestinationString[0] = 0; ASSERT_AreEqual(0, strlen(DestinationString), "%u", "Destination string initialization or 'strlen()' problem!"); - + /* Test "unlimted" concatenation to empty buffer */ strncat(DestinationString, SourceString, 1024); - + ASSERT_AreEqual(SourceStringSize, strlen(DestinationString), "%u", "Unexpected string length while string concatenation to empty buffer!"); - + /* Test limited concatenation to non empty buffer */ p = strncat(DestinationString, SourceString, 128); diff --git a/test/val/lib_common_strrchr.c b/test/val/lib_common_strrchr.c index a72c44db9..840ec2b7c 100644 --- a/test/val/lib_common_strrchr.c +++ b/test/val/lib_common_strrchr.c @@ -1,6 +1,6 @@ #include #include "unittest.h" - + static char TestString[] = "01234567890123456789"; // two times the same string static char Found[256]; diff --git a/test/val/lib_common_strspn.c b/test/val/lib_common_strspn.c index 96a006469..b7b4c1d85 100644 --- a/test/val/lib_common_strspn.c +++ b/test/val/lib_common_strspn.c @@ -10,7 +10,7 @@ static char* TestChars="1234567890"; // we like to find numbe TEST { unsigned i; - + for (i=0; i < EstimatedStringSize; ++i) EstimatedString[i] = (i%10)+'0'; // put 0123... into the string to be estimated diff --git a/test/val/mult1.c b/test/val/mult1.c index 831bde7ec..6d491a427 100644 --- a/test/val/mult1.c +++ b/test/val/mult1.c @@ -48,23 +48,23 @@ void m2(unsigned char uc) void m3(unsigned char uc) { volatile unsigned char vuc; - + /* uchar = uchar * lit */ /* testing literal multiply with same source and destination */ vuc = uc; - uc2 = 0; - uc1 = vuc; uc1 = uc1*1; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*2; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*3; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*4; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc2 = 0; + uc1 = vuc; uc1 = uc1*1; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*2; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*3; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*4; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*5; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*6; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*7; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*8; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*6; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*7; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*8; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*9; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*10; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*11; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*12; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*10; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*11; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*12; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*13; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*14; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*15; if( uc1 != (uc2+=TESTLIT) ) failures++; @@ -75,17 +75,17 @@ void m3(unsigned char uc) uc1 = vuc; uc1 = uc1*20; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*21; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*22; if( uc1 != (uc2+=TESTLIT) ) failures++; - uc1 = vuc; uc1 = uc1*23; if( uc1 != (uc2+=TESTLIT) ) failures++; + uc1 = vuc; uc1 = uc1*23; if( uc1 != (uc2+=TESTLIT) ) failures++; uc1 = vuc; uc1 = uc1*24; if( uc1 != (uc2+=TESTLIT) ) failures++; - + uc1 = vuc; uc1 = uc1*31; if( uc1 != ((31*TESTLIT) & 0xff) ) failures++; uc1 = vuc; uc1 = uc1*32; if( uc1 != ((32*TESTLIT) & 0xff) ) failures++; uc1 = vuc; uc1 = uc1*64; if( uc1 != ((64*TESTLIT) & 0xff) ) failures++; uc1 = vuc; uc1 = uc1*128;if( uc1 != ((128*TESTLIT)& 0xff) ) failures++; /* testing literal multiply with different source and destination */ - uc1 = vuc*1; if( uc1 != ((1*TESTLIT) & 0xff) ) failures++; - uc1 = vuc*2; if( uc1 != ((2*TESTLIT) & 0xff) ) failures++; + uc1 = vuc*1; if( uc1 != ((1*TESTLIT) & 0xff) ) failures++; + uc1 = vuc*2; if( uc1 != ((2*TESTLIT) & 0xff) ) failures++; uc1 = vuc*4; if( uc1 != ((4*TESTLIT) & 0xff) ) failures++; } diff --git a/test/val/or1.c b/test/val/or1.c index 9e41d7a39..b5f550331 100644 --- a/test/val/or1.c +++ b/test/val/or1.c @@ -57,23 +57,23 @@ void or_lit2uint(void) failures++; uint0 |= 1; - if(uint0 != 1) + if(uint0 != 1) failures++; uint0 |= 2; - if(uint0 != 3) + if(uint0 != 3) failures++; uint0 |= 0x100; - if(uint0 != 0x103) + if(uint0 != 0x103) failures++; uint0 |= 0x102; - if(uint0 != 0x103) + if(uint0 != 0x103) failures++; uint0 |= 0x303; - if(uint0 != 0x303) + if(uint0 != 0x303) failures++; } @@ -83,27 +83,27 @@ void or_lit2ulong(void) failures++; ulong0 |= 1; - if(ulong0 != 1) + if(ulong0 != 1) failures++; ulong0 |= 2; - if(ulong0 != 3) + if(ulong0 != 3) failures++; ulong0 |= 0x100; - if(ulong0 != 0x103) + if(ulong0 != 0x103) failures++; ulong0 |= 0x102; - if(ulong0 != 0x103) + if(ulong0 != 0x103) failures++; ulong0 |= 0x303; - if(ulong0 != 0x303) + if(ulong0 != 0x303) failures++; ulong0 |= 0x80000000; - if(ulong0 != 0x80000303) + if(ulong0 != 0x80000303) failures++; } diff --git a/test/val/postdec-16-16.c b/test/val/postdec-16-16.c index e55b5765f..bb4475959 100644 --- a/test/val/postdec-16-16.c +++ b/test/val/postdec-16-16.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postdec-16-8.c b/test/val/postdec-16-8.c index 76a64d769..d2a5bab3b 100644 --- a/test/val/postdec-16-8.c +++ b/test/val/postdec-16-8.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postdec-8-16.c b/test/val/postdec-8-16.c index f7716ae89..7eeda2dcc 100644 --- a/test/val/postdec-8-16.c +++ b/test/val/postdec-8-16.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postdec-8-8.c b/test/val/postdec-8-8.c index b620c46dc..38470cb14 100644 --- a/test/val/postdec-8-8.c +++ b/test/val/postdec-8-8.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0xc, 0xd, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postinc-16-16.c b/test/val/postinc-16-16.c index 286e0364b..4a122e51f 100644 --- a/test/val/postinc-16-16.c +++ b/test/val/postinc-16-16.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 1; static unsigned short u16r = 3; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postinc-16-8.c b/test/val/postinc-16-8.c index dd0a03d6c..a604ab34c 100644 --- a/test/val/postinc-16-8.c +++ b/test/val/postinc-16-8.c @@ -1,12 +1,12 @@ #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -26,9 +26,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 1; static unsigned char u8r = 3; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = 0; @@ -40,17 +40,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -60,13 +60,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postinc-8-16.c b/test/val/postinc-8-16.c index 57e934ced..7ac57e9da 100644 --- a/test/val/postinc-8-16.c +++ b/test/val/postinc-8-16.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 1; static unsigned short u16r = 3; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/postinc-8-8.c b/test/val/postinc-8-8.c index b168af8df..97c8aa9f7 100644 --- a/test/val/postinc-8-8.c +++ b/test/val/postinc-8-8.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 1; static unsigned char u8r = 3; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/pptest4.c b/test/val/pptest4.c index 827be7200..6c0891661 100644 --- a/test/val/pptest4.c +++ b/test/val/pptest4.c @@ -2,7 +2,7 @@ /* preprocessor test #4 */ #define t(x,y,z) x ## y ## z -int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), +int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), t(10,,), t(,11,), t(,,12), t(,,) }; int e[] = { 123, 45, 67, 89, 10, 11, 12, }; diff --git a/test/val/pptest5.c b/test/val/pptest5.c index 82f642c8e..0b9db291d 100644 --- a/test/val/pptest5.c +++ b/test/val/pptest5.c @@ -1,7 +1,7 @@ /* preprocessor test #5 */ -#define t(x,y,z) x ## y ## z +#define t(x,y,z) x ## y ## z int j[] = { t(1,2,3), t(,4,5), t(6,,7), t(8,9,), t(10,,), t(,11,), t(,,12), t(,,) }; diff --git a/test/val/pr1423.c b/test/val/pr1423.c index 3135b64a3..47f0f0610 100644 --- a/test/val/pr1423.c +++ b/test/val/pr1423.c @@ -10,7 +10,7 @@ void test1(void) } fails++; return; -} +} void test2(void) { diff --git a/test/val/predec-16-16.c b/test/val/predec-16-16.c index 7d70b1208..a8c1658e4 100644 --- a/test/val/predec-16-16.c +++ b/test/val/predec-16-16.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/predec-16-8.c b/test/val/predec-16-8.c index 69a0a3e28..a0e77da89 100644 --- a/test/val/predec-16-8.c +++ b/test/val/predec-16-8.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/predec-8-16.c b/test/val/predec-8-16.c index 750312215..353f819d2 100644 --- a/test/val/predec-8-16.c +++ b/test/val/predec-8-16.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/predec-8-8.c b/test/val/predec-8-8.c index d1069b39e..e468c9426 100644 --- a/test/val/predec-8-8.c +++ b/test/val/predec-8-8.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0xb, 0xc, 0x3, 0x4, 0x5, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/preinc-16-16.c b/test/val/preinc-16-16.c index d9c6dbf62..b600b6533 100644 --- a/test/val/preinc-16-16.c +++ b/test/val/preinc-16-16.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/preinc-16-8.c b/test/val/preinc-16-8.c index 97a5dd306..a7bc5d53a 100644 --- a/test/val/preinc-16-8.c +++ b/test/val/preinc-16-8.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned short u16w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u16w: %d\n\r", u16w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/preinc-8-16.c b/test/val/preinc-8-16.c index 3c3a9b479..2b4104df5 100644 --- a/test/val/preinc-8-16.c +++ b/test/val/preinc-8-16.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned short u16r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u16r: %d\n\r", u16r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/preinc-8-8.c b/test/val/preinc-8-8.c index a700bfc48..9f6ec35a9 100644 --- a/test/val/preinc-8-8.c +++ b/test/val/preinc-8-8.c @@ -2,12 +2,12 @@ #include #include #include -#ifdef __C64__ +#ifdef __C64__ #include #endif /* apparently we dont trigger the bug when not using absolute addresses? */ -#ifdef __C64__ +#ifdef __C64__ #define TARGETMEM 0x4c8 #define SOURCEMEM 0x702 #elif __SIM6502__ @@ -27,9 +27,9 @@ static unsigned char mem[0x10]; static unsigned char u8w = 3; static unsigned char u8r = 5; -static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; -static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; -static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; +static unsigned char target[8] = { 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7 }; +static unsigned char source[8] = { 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; +static unsigned char expect[8] = { 0x0, 0x1, 0x2, 0x3, 0xe, 0xf, 0x6, 0x7 }; static unsigned char i; static unsigned char err = EXIT_SUCCESS; @@ -41,17 +41,17 @@ void test1(void) void dotest(void) { - + memcpy(TARGETMEM, target, 8); memcpy(SOURCEMEM, source, 8); - + test1(); memcpy(target, TARGETMEM, 8); memcpy(source, SOURCEMEM, 8); -#ifdef __C64__ +#ifdef __C64__ clrscr(); -#endif +#endif printf("source:"); for(i = 0; i < 8; ++i) { printf("%0x ", source[i]); @@ -61,13 +61,13 @@ void dotest(void) printf("%0x ", target[i]); } printf("\n\r"); - + printf("u8w: %d\n\r", u8w); printf("u8r: %d\n\r", u8r); - + } - -int main(void) + +int main(void) { dotest(); dotest(); diff --git a/test/val/static-fwd-decl.c b/test/val/static-fwd-decl.c index 420640d97..a133e930f 100644 --- a/test/val/static-fwd-decl.c +++ b/test/val/static-fwd-decl.c @@ -15,7 +15,7 @@ typedef struct _DIRMENU { const char *name; struct _DIRMENU *dest; -} DIRMENU; +} DIRMENU; static DIRMENU rmenu; diff --git a/test/val/strnicmp-test.c b/test/val/strnicmp-test.c index 6376a39bb..e6e5a3b04 100644 --- a/test/val/strnicmp-test.c +++ b/test/val/strnicmp-test.c @@ -71,9 +71,9 @@ int main(void) ret = do_test("", "", 5); printresult(ret); - + printf("fails: %d\n", fails); - + #if defined(__CC65__) && !defined(__SIM6502__) && !defined(__SIM65C02__) cgetc(); #endif diff --git a/test/val/switch2.c b/test/val/switch2.c index 65c24eeda..eff06ce12 100644 --- a/test/val/switch2.c +++ b/test/val/switch2.c @@ -1,6 +1,6 @@ /* !!DESCRIPTION!! Testing empty bodied switch statements. - !!ORIGIN!! + !!ORIGIN!! !!LICENCE!! GPL, read COPYING.GPL */ diff --git a/test/val/time-test.c b/test/val/time-test.c index 304238fa0..db086410d 100644 --- a/test/val/time-test.c +++ b/test/val/time-test.c @@ -46,7 +46,7 @@ int main (void) sprintf (result, "%08lX - %s\n", t, buf); printf (result); if (strcmp(result, EXPECTSTR) != 0) { fails++; } - + printf("fails: %d\n", fails); return fails; diff --git a/test/val/xor.c b/test/val/xor.c index 2a346023e..98bd5faf1 100644 --- a/test/val/xor.c +++ b/test/val/xor.c @@ -31,12 +31,12 @@ void xor_chars_0_1(void) void xor_if(void) { - if(achar0 ^ achar1) + if(achar0 ^ achar1) failures++; achar0 ^= 0xff; - if( !(achar0 ^ achar1) ) + if( !(achar0 ^ achar1) ) failures++; }