Skip to content

Commit

Permalink
More reverts as requested in the pull request #2
Browse files Browse the repository at this point in the history
  • Loading branch information
lpla committed May 14, 2020
1 parent 495b45f commit 61de999
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 25 deletions.
4 changes: 2 additions & 2 deletions code/mgb/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1375,7 +1375,7 @@ int f;
sprintf(t,"%s%s",basefname,RAMNAME);
f=open(t,O_RDONLY|O_BINARY);
if(f<0) return;
res=read(f,ramblock+0xa000,0x2000);
res=read(f,ramblock+0xa000,0x2000);res=res;
close(f);
}

Expand All @@ -1387,7 +1387,7 @@ int f;
sprintf(t,"%s%s",basefname,RAMNAME);
f=open(t,O_WRONLY|O_BINARY|O_CREAT|O_TRUNC,0644);
if(f<0) return;
res=write(f,ramblock+0xa000,0x2000);
res=write(f,ramblock+0xa000,0x2000);res=res;
close(f);
}

Expand Down
10 changes: 5 additions & 5 deletions code/mgb/mgb.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ char namecopy[128];
if(file<0)
return -1;
}
res=read(file,romblock,ROMSIZE);
res=read(file,romblock,ROMSIZE);res=res;
close(file);
loadsymbols(name);
return 0;
Expand Down Expand Up @@ -523,7 +523,7 @@ int i,j,k;
*p++=1; //palette info
*p++=0;
for(i=0;i<58;++i) *p++=0;
res=write(file,temp,p-temp);
res=write(file,temp,p-temp);res=res;
for(j=0;j<height;++j)
{
fetch(temp,j);
Expand All @@ -549,10 +549,10 @@ int i,j,k;
i-=k;
k=0;
}
res=write(file,temp2,p2-temp2);
res=write(file,temp2,p2-temp2);res=res;
}
res=write(file,"\014",1);
res=write(file,colors,0x300);
res=write(file,"\014",1);res=res;
res=write(file,colors,0x300);res=res;
close(file);
return 0;
}
Expand Down
32 changes: 14 additions & 18 deletions code/util/agbspr.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,7 @@ int complook(unsigned char *at,int before,int after) {
if(bestlen>1) return 1;
return 0;
}

void dumpliteral(unsigned char *from,int len)
{
void dumpliteral(unsigned char *from,int len) {
if(!len) return;
while(len)
{
Expand All @@ -399,9 +397,7 @@ void dumpliteral(unsigned char *from,int len)
len--;
}
}
dumpcopy()
{
int t;
void dumpcopy() {
//printf("bestlen=%d\n",bestlen);
if(bestlen==2)
bitsout(2,1);
Expand All @@ -421,16 +417,16 @@ int t;
else
{bitsout(2,3);bitsout(10,bestoff-0x2a1);}
}
int docompress(char *to,char *from,int len)
{
int offset;
int i,j,k;
int literal;
int val;
int out;

int docompress(unsigned char *to, unsigned char *from,int len) {
int offset;
int i;
int literal;
int val;

ocount=0;
obuff=(unsigned long *)to;
out=offset=literal=0;
obuff=(ULONG *)to;
offset=literal=0;
totalcost=0;
bitsin=0;
while(offset<len)
Expand Down Expand Up @@ -462,9 +458,9 @@ int out;
bitsout(32,0);
return ocount<<2;
}
initswd()
{
int i;

void initswd() {
int i;
for(i=0;i<MAXOVERALL;++i)
{
if(i==2) costsize[i]=2;
Expand Down

0 comments on commit 61de999

Please sign in to comment.