1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-23 23:17:45 +00:00

remove dangling spaces

This commit is contained in:
mrdudz
2022-04-17 16:07:52 +02:00
parent b54fb2dfd1
commit 9d3cdc5a10
89 changed files with 459 additions and 459 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ main() {
p[j] = x[i][j];
}
g(z, y);
return 0;
}
+1 -1
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]);
+1 -1
View File
@@ -1,5 +1,5 @@
/*
!!DESCRIPTION!!
!!DESCRIPTION!!
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!!
+1 -1
View File
@@ -1,5 +1,5 @@
/*
!!DESCRIPTION!!
!!DESCRIPTION!!
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!!
+1 -1
View File
@@ -1,5 +1,5 @@
/*
!!DESCRIPTION!!
!!DESCRIPTION!!
!!ORIGIN!! testsuite
!!LICENCE!! Public Domain
!!AUTHOR!!
+3 -3
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)
*/
+2 -2
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
}
+1 -1
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.
*/
+1 -1
View File
@@ -67,7 +67,7 @@ char *argv[];
}
printf("input:\n\n");
nc = 0;
while ((c = GETCHAR()) != -1)
{
+9 -9
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");
+1 -1
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);
+3 -3
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);
+87 -87
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;
}
+11 -11
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];