give nextChunk a bit more stack
authorClaus Gittinger <cg@exept.de>
Tue, 12 Aug 1997 02:30:45 +0200
changeset 2854 3c8bf66e4e7d
parent 2853 0647da37ba9a
child 2855 9c26fec68549
give nextChunk a bit more stack
ExtStream.st
ExternalStream.st
--- a/ExtStream.st	Mon Aug 11 19:15:58 1997 +0200
+++ b/ExtStream.st	Tue Aug 12 02:30:45 1997 +0200
@@ -2900,7 +2900,7 @@
     binary ifTrue:[^ self errorBinary].
     (mode == #writeonly) ifTrue:[^ self errorWriteOnly].
 
-%{  /* STACK: 8000 */
+%{  /* STACK: 12000 */
     /*
      * the main trick (and a bit of complication) here
      * is to read the first 7k into a stack-buffer.
@@ -2988,6 +2988,12 @@
                 break; 
             }
         }
+        if (!fastFlag) {
+            /*
+             * old buffer may have moved - refetch pointer
+             */
+            bufferPtr = __stringVal(buffer);
+        }
 
         /* 
          * do we have to resize the buffer ? 
@@ -3005,24 +3011,14 @@
                 goto err;
             }
             nbp = __stringVal(newBuffer);
-            if (!fastFlag) {
-                /*
-                 * old buffer may have moved - refetch pointer
-                 */
-                bufferPtr = __stringVal(buffer);
-            }
             bcopy(bufferPtr, nbp, index);
             bufferPtr = nbp;
             bufferPtr[index] = '\0';
             buffer = newBuffer;
             fastFlag = 0;
             currSize = currSize * 2;
-        } else if (!fastFlag) {
-            /*
-             * old buffer may have moved - refetch pointer
-             */
-            bufferPtr = __stringVal(buffer);
         }
+
         /*
          * filter out cr-nl; make it nl
          */
@@ -3954,6 +3950,6 @@
 !ExternalStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.135 1997-07-22 13:22:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/ExtStream.st,v 1.136 1997-08-12 00:30:45 cg Exp $'
 ! !
 ExternalStream initialize!
--- a/ExternalStream.st	Mon Aug 11 19:15:58 1997 +0200
+++ b/ExternalStream.st	Tue Aug 12 02:30:45 1997 +0200
@@ -2900,7 +2900,7 @@
     binary ifTrue:[^ self errorBinary].
     (mode == #writeonly) ifTrue:[^ self errorWriteOnly].
 
-%{  /* STACK: 8000 */
+%{  /* STACK: 12000 */
     /*
      * the main trick (and a bit of complication) here
      * is to read the first 7k into a stack-buffer.
@@ -2988,6 +2988,12 @@
                 break; 
             }
         }
+        if (!fastFlag) {
+            /*
+             * old buffer may have moved - refetch pointer
+             */
+            bufferPtr = __stringVal(buffer);
+        }
 
         /* 
          * do we have to resize the buffer ? 
@@ -3005,24 +3011,14 @@
                 goto err;
             }
             nbp = __stringVal(newBuffer);
-            if (!fastFlag) {
-                /*
-                 * old buffer may have moved - refetch pointer
-                 */
-                bufferPtr = __stringVal(buffer);
-            }
             bcopy(bufferPtr, nbp, index);
             bufferPtr = nbp;
             bufferPtr[index] = '\0';
             buffer = newBuffer;
             fastFlag = 0;
             currSize = currSize * 2;
-        } else if (!fastFlag) {
-            /*
-             * old buffer may have moved - refetch pointer
-             */
-            bufferPtr = __stringVal(buffer);
         }
+
         /*
          * filter out cr-nl; make it nl
          */
@@ -3954,6 +3950,6 @@
 !ExternalStream class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.135 1997-07-22 13:22:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.136 1997-08-12 00:30:45 cg Exp $'
 ! !
 ExternalStream initialize!