remove dangling spaces

This commit is contained in:
mrdudz 2022-04-17 16:07:52 +02:00
parent 1be54d13bc
commit 0129622383
89 changed files with 459 additions and 459 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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)
{

View File

@ -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++;

View File

@ -106,7 +106,7 @@ int
main() {
int status = 0; /* exit status to be returned */
/* <stdint.h> 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;

View File

@ -29,7 +29,7 @@ main() {
p[j] = x[i][j];
}
g(z, y);
return 0;
}

View File

@ -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]);

View File

@ -1,5 +1,5 @@
/*
!!DESCRIPTION!!
!!DESCRIPTION!!
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!!

View File

@ -1,5 +1,5 @@
/*
!!DESCRIPTION!!
!!DESCRIPTION!!
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!!

View File

@ -1,5 +1,5 @@
/*
!!DESCRIPTION!!
!!DESCRIPTION!!
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!!

View File

@ -1,5 +1,5 @@
/*
!!DESCRIPTION!!
!!DESCRIPTION!!
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!!
@ -8,7 +8,7 @@
#include <stdio.h>
/*
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)
*/

View File

@ -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
}

View File

@ -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.
*/

View File

@ -67,7 +67,7 @@ char *argv[];
}
printf("input:\n\n");
nc = 0;
while ((c = GETCHAR()) != -1)
{

View File

@ -1,5 +1,5 @@
/*
!!DESCRIPTION!!
!!DESCRIPTION!!
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!! Groepaz/Hitmen
@ -24,7 +24,7 @@ FILE *outfile=NULL;
#else
#endif
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@ -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");

View File

@ -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);

View File

@ -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);

View File

@ -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;
}

View File

@ -8,9 +8,9 @@
#include <stdio.h>
# 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];

View File

@ -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;
}

View File

@ -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) ||

View File

@ -1,5 +1,5 @@
/* bug #1181 - Testing struct member against NULL is broken */
/* bug #1181 - Testing struct member against NULL is broken */
#include <stdio.h>
#include <stdlib.h>
@ -52,7 +52,7 @@ MENUITEM optionsitems_menu[] = {
static MENU optionsmenu_menu = {
&optionsitems_menu[0],
};
};
unsigned char __fastcall__ menu_getnumitems(MENU *menu)
{

View File

@ -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.

View File

@ -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:
{

View File

@ -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)

View File

@ -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;

View File

@ -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;

View File

@ -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 */

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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
*/

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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. */

View File

@ -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++;

View File

@ -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

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -1,7 +1,7 @@
#include <string.h>
#include "unittest.h"
/* Test string. Must NOT have duplicate characters! */
static char S[] = "Helo wrd!\n";

View File

@ -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

View File

@ -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);

View File

@ -1,6 +1,6 @@
#include <string.h>
#include "unittest.h"
static char TestString[] = "01234567890123456789"; // two times the same string
static char Found[256];

View File

@ -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

View File

@ -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++;
}

View File

@ -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++;
}

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -1,12 +1,12 @@
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -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, };

View File

@ -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(,,) };

View File

@ -10,7 +10,7 @@ void test1(void)
}
fails++;
return;
}
}
void test2(void)
{

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -2,12 +2,12 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __C64__
#ifdef __C64__
#include <conio.h>
#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();

View File

@ -15,7 +15,7 @@ typedef struct _DIRMENU
{
const char *name;
struct _DIRMENU *dest;
} DIRMENU;
} DIRMENU;
static DIRMENU rmenu;

View File

@ -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

View File

@ -1,6 +1,6 @@
/*
!!DESCRIPTION!! Testing empty bodied switch statements.
!!ORIGIN!!
!!ORIGIN!!
!!LICENCE!! GPL, read COPYING.GPL
*/

View File

@ -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;

View File

@ -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++;
}