Selaa lähdekoodia

* 64 bit fixes

peter 21 vuotta sitten
vanhempi
commit
7183fbbb7f
2 muutettua tiedostoa jossa 22 lisäystä ja 15 poistoa
  1. 7 3
      packages/extra/ncurses/ncrt.inc
  2. 15 12
      packages/extra/unzip/unzip.pp

+ 7 - 3
packages/extra/ncurses/ncrt.inc

@@ -227,12 +227,12 @@ const
 type
 type
   TextBuf = array[0..TextRecBufSize-1] of char;
   TextBuf = array[0..TextRecBufSize-1] of char;
   TextRec = Packed Record
   TextRec = Packed Record
-    Handle,
+    Handle    : THandle;
     Mode,
     Mode,
     bufsize,
     bufsize,
     _private,
     _private,
     bufpos,
     bufpos,
-    bufend    : longint;
+    bufend    : SizeInt;
     bufptr    : ^textbuf;
     bufptr    : ^textbuf;
     openfunc,
     openfunc,
     inoutfunc,
     inoutfunc,
@@ -242,6 +242,7 @@ type
     name      : array[0..textrecnamelength-1] of char;
     name      : array[0..textrecnamelength-1] of char;
     buffer    : textbuf;
     buffer    : textbuf;
   End;
   End;
+  
 {==========================================================================}
 {==========================================================================}
 
 
 { set the active window for write(ln), read(ln) }
 { set the active window for write(ln), read(ln) }
@@ -963,7 +964,10 @@ Begin
 End;
 End;
 {
 {
   $Log$
   $Log$
-  Revision 1.3  2003-09-27 12:19:20  peter
+  Revision 1.4  2004-05-03 20:52:48  peter
+    * 64 bit fixes
+
+  Revision 1.3  2003/09/27 12:19:20  peter
     * fixed for unix
     * fixed for unix
 
 
   Revision 1.2  2002/09/07 15:43:01  peter
   Revision 1.2  2002/09/07 15:43:01  peter

+ 15 - 12
packages/extra/unzip/unzip.pp

@@ -818,7 +818,7 @@ VAR p, q : phuftlist;
 BEGIN
 BEGIN
   p := pointer ( t );
   p := pointer ( t );
   WHILE p <> NIL DO BEGIN
   WHILE p <> NIL DO BEGIN
-    dec ( longint ( p ), sizeof ( huft ) );
+    dec ( ptrint ( p ), sizeof ( huft ) );
     q := p^ [ 0 ].v_t;
     q := p^ [ 0 ].v_t;
     z := p^ [ 0 ].v_n;   {Size in Bytes, required by TP ***}
     z := p^ [ 0 ].v_n;   {Size in Bytes, required by TP ***}
     freemem ( p, ( z + 1 ) * sizeof ( huft ) );
     freemem ( p, ( z + 1 ) * sizeof ( huft ) );
@@ -866,7 +866,7 @@ BEGIN
       exit
       exit
     END;
     END;
     inc ( c [ p^ ] );
     inc ( c [ p^ ] );
-    inc ( longint ( p ), sizeof ( word ) );   {point to next item}
+    inc ( ptrint ( p ), sizeof ( word ) );   {point to next item}
     dec ( i );
     dec ( i );
   UNTIL i = 0;
   UNTIL i = 0;
   IF c [ 0 ] = n THEN BEGIN
   IF c [ 0 ] = n THEN BEGIN
@@ -907,14 +907,14 @@ BEGIN
   {generate starting offsets into the value table for each length}
   {generate starting offsets into the value table for each length}
   x [ 1 ] := 0;
   x [ 1 ] := 0;
   j := 0;
   j := 0;
-  p := @c; inc ( longint ( p ), sizeof ( word ) );
-  xp := @x;inc ( longint ( xp ), 2 * sizeof ( word ) );
+  p := @c; inc ( ptrint ( p ), sizeof ( word ) );
+  xp := @x;inc ( ptrint ( xp ), 2 * sizeof ( word ) );
   dec ( i );
   dec ( i );
   WHILE i <> 0 DO BEGIN
   WHILE i <> 0 DO BEGIN
     inc ( j, p^ );
     inc ( j, p^ );
     xp^ := j;
     xp^ := j;
-    inc ( longint ( p ), 2 );
-    inc ( longint ( xp ), 2 );
+    inc ( ptrint ( p ), 2 );
+    inc ( ptrint ( xp ), 2 );
     dec ( i );
     dec ( i );
   END;
   END;
 
 
@@ -922,7 +922,7 @@ BEGIN
   p := b; i := 0;
   p := b; i := 0;
   REPEAT
   REPEAT
     j := p^;
     j := p^;
-    inc ( longint ( p ), sizeof ( word ) );
+    inc ( ptrint ( p ), sizeof ( word ) );
     IF j <> 0 THEN BEGIN
     IF j <> 0 THEN BEGIN
       v [ x [ j ] ] := i;
       v [ x [ j ] ] := i;
       inc ( x [ j ] );
       inc ( x [ j ] );
@@ -958,7 +958,7 @@ BEGIN
           tryagain := TRUE;
           tryagain := TRUE;
           WHILE ( j < z ) AND tryagain DO BEGIN
           WHILE ( j < z ) AND tryagain DO BEGIN
             f := f SHL 1;
             f := f SHL 1;
-            inc ( longint ( xp ), sizeof ( word ) );
+            inc ( ptrint ( xp ), sizeof ( word ) );
             IF f <= xp^ THEN tryagain := FALSE
             IF f <= xp^ THEN tryagain := FALSE
                       ELSE BEGIN
                       ELSE BEGIN
                         dec ( f, xp^ );
                         dec ( f, xp^ );
@@ -1016,7 +1016,7 @@ BEGIN
       ELSE IF p^ < s THEN BEGIN
       ELSE IF p^ < s THEN BEGIN
         IF p^ < 256 THEN r.e := 16 ELSE r.e := 15;
         IF p^ < 256 THEN r.e := 16 ELSE r.e := 15;
         r.v_n := p^;
         r.v_n := p^;
-        inc ( longint ( p ), sizeof ( word ) );
+        inc ( ptrint ( p ), sizeof ( word ) );
       END ELSE BEGIN
       END ELSE BEGIN
         IF ( d = NIL ) OR ( e = NIL ) THEN BEGIN
         IF ( d = NIL ) OR ( e = NIL ) THEN BEGIN
           huft_free ( pointer ( u [ 0 ] ) );
           huft_free ( pointer ( u [ 0 ] ) );
@@ -1025,7 +1025,7 @@ BEGIN
         END;
         END;
         r.e := word ( e^ [ p^ -s ] );
         r.e := word ( e^ [ p^ -s ] );
         r.v_n := d^ [ p^ -s ];
         r.v_n := d^ [ p^ -s ];
-        inc ( longint ( p ), sizeof ( word ) );
+        inc ( ptrint ( p ), sizeof ( word ) );
       END;
       END;
 
 
       {fill code like entries with r}
       {fill code like entries with r}
@@ -1478,7 +1478,7 @@ BEGIN
     END;
     END;
     REPEAT
     REPEAT
       l^ := b;
       l^ := b;
-      inc ( longint ( l ), sizeof ( word ) );
+      inc ( ptrint ( l ), sizeof ( word ) );
       inc ( k );
       inc ( k );
       dec ( j );
       dec ( j );
     UNTIL j = 0;
     UNTIL j = 0;
@@ -3336,7 +3336,10 @@ BEGIN
 END.
 END.
 {
 {
   $Log$
   $Log$
-  Revision 1.7  2003-11-03 09:34:42  marco
+  Revision 1.8  2004-05-03 20:52:50  peter
+    * 64 bit fixes
+
+  Revision 1.7  2003/11/03 09:34:42  marco
    * fix from peter for 1.9 release problem
    * fix from peter for 1.9 release problem
 
 
   Revision 1.6  2002/09/07 15:43:06  peter
   Revision 1.6  2002/09/07 15:43:06  peter