Skip to content

Commit

Permalink
2011-06-25 Pace Willisson <[email protected]>
Browse files Browse the repository at this point in the history
	* V268
	* fix a couple of compiler warnings - now compiles cleanly on
	ubuntu 10.04 and 11.04
  • Loading branch information
pace committed Jun 25, 2011
1 parent 7713859 commit 0aeea60
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 8 deletions.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2011-06-25 Pace Willisson <[email protected]>

* V268

* fix a couple of compiler warnings - now compiles cleanly on
ubuntu 10.04 and 11.04

2011-06-25 Pace Willisson <[email protected]>

* V267
Expand Down
3 changes: 1 addition & 2 deletions aipur.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,7 @@ int GenPur(char plr,int hardware_index,int unit_index)
if (Data->P[plr].Probe[unit_index].InitCost < Data->P[plr].Cash)
{
Data->P[plr].Cash = Data->P[plr].Cash - Data->P[plr].Probe[unit_index].InitCost;
if (Data->P[plr].Probe[unit_index].Num == PROGRAM_NOT_STARTED) Data->P[plr].Probe[unit_index].Num=1;
else Data->P[plr].Probe[unit_index].Num = Data->P[plr].Probe[unit_index].Num = 1;
Data->P[plr].Probe[unit_index].Num = 1;
RT_value=1;newf=1;
}
}
Expand Down
2 changes: 1 addition & 1 deletion endgame.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ void EndGame(char win,char pad)
month = Data->P[win].Mission[pad].Month;
}
else {
month = Month[Data->Prestige[22].Month];
month = Data->Prestige[22].Month;
if (MAIL!=-1 || Option==win) strcpy(capName , Data->P[win].History[Data->Prestige[22].Indec].MissionName[0]);
else {
prog=Data->P[win].History[Data->Prestige[22].Indec].Hard[i][0]+1;
Expand Down
6 changes: 5 additions & 1 deletion endianness.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ float _SwapFloat(float value)
void _SwapGameDat(void)
{
i16 i, j;
ui32 val_ui32;

memcpy (&val_ui32, Data->EMark, 4);
val_ui32 = _Swap32bit (val_ui32);
memcpy (Data->EMark, &val_ui32, 4);

*((ui32 *) & Data->EMark) = _Swap32bit(*((ui32 *) & Data->EMark));
Data->Checksum = _Swap32bit(Data->Checksum);

for (j = 0; j < 28; j++)
Expand Down
9 changes: 7 additions & 2 deletions future.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,8 +1099,13 @@ void Missions(char plr,int X,int Y,int val,char bub)


MSteps=sOpen("missSteps.dat","r",FT_DATA);
fgets(missStep, 1024, MSteps);
while (!feof(MSteps)&&((missStep[0]-0x30)*10+(missStep[1]-0x30))!=val) fgets(missStep, 1024, MSteps);
if (fgets(missStep, 1024, MSteps) == NULL)
memset (missStep, 0, sizeof missStep);

while (!feof(MSteps)&&((missStep[0]-0x30)*10+(missStep[1]-0x30))!=val) {
if (fgets(missStep, 1024, MSteps) == NULL)
break;
}
fclose(MSteps);

for (int n=2;missStep[n]!='Z';n++)
Expand Down
3 changes: 2 additions & 1 deletion mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,8 @@ void MissionPast(char plr,char pad,int prest)
Rep.Qty=0;
fout=sOpen("REPLAY.TMP","rt",1);
while (!feof(fout)) {
fscanf(fout,"%u\n",&num);
if (fscanf(fout,"%u\n",&num) != 1)
break;
Rep.Off[Rep.Qty++]=num;
};
fclose(fout);
Expand Down
2 changes: 1 addition & 1 deletion version.c
Original file line number Diff line number Diff line change
@@ -1 +1 @@
267
268

0 comments on commit 0aeea60

Please sign in to comment.