Jelajahi Sumber

simplified some code and removed a no longer used const

git-svn-id: trunk@34378 -
Károly Balogh 9 tahun lalu
induk
melakukan
deda4c8247
1 mengubah file dengan 4 tambahan dan 18 penghapusan
  1. 4 18
      compiler/ppu.pas

+ 4 - 18
compiler/ppu.pas

@@ -45,8 +45,6 @@ type
 const
 const
   CurrentPPUVersion = 185;
   CurrentPPUVersion = 185;
 
 
-  ppubufsize   = 16384;
-
 { unit flags }
 { unit flags }
   uf_init                = $000001; { unit has initialization section }
   uf_init                = $000001; { unit has initialization section }
   uf_finalize            = $000002; { unit has finalization section   }
   uf_finalize            = $000002; { unit has finalization section   }
@@ -238,24 +236,12 @@ begin
   header.indirect_checksum := swapendian(header.indirect_checksum);
   header.indirect_checksum := swapendian(header.indirect_checksum);
   header.deflistsize:=swapendian(header.deflistsize);
   header.deflistsize:=swapendian(header.deflistsize);
   header.symlistsize:=swapendian(header.symlistsize);
   header.symlistsize:=swapendian(header.symlistsize);
-{$ENDIF}
+
   { the PPU DATA is stored in native order }
   { the PPU DATA is stored in native order }
-  if (header.common.flags and uf_big_endian) = uf_big_endian then
-   Begin
-{$IFDEF ENDIAN_LITTLE}
-     change_endian := TRUE;
-{$ELSE}
-     change_endian := FALSE;
-{$ENDIF}
-   End
-  else if (header.common.flags and uf_little_endian) = uf_little_endian then
-   Begin
-{$IFDEF ENDIAN_BIG}
-     change_endian := TRUE;
-{$ELSE}
-     change_endian := FALSE;
+  change_endian := (header.common.flags and uf_little_endian) = uf_little_endian;
+{$ELSE not ENDIAN_BIG}
+  change_endian := (header.common.flags and uf_big_endian) = uf_big_endian;
 {$ENDIF}
 {$ENDIF}
-   End;
 end;
 end;
 
 
 function tppufile.outputallowed: boolean;
 function tppufile.outputallowed: boolean;