This is the mail archive of the cygwin-apps-cvs mailing list for the cygwin-apps project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[setup] branch master, updated. release_2.871-3-gb3c035c




https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;h=b3c035ce90598aae00f248f0ed66cd6d298652a4

commit b3c035ce90598aae00f248f0ed66cd6d298652a4
Author: Achim Gratz <Stromeko@Stromeko.DE>
Date:   Thu Jun 11 06:28:19 2015 +0200

    Increase read buffer size for the lexer input buffer to 64kiB

https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git;h=94dfd783ef6005c371c6b2c560be80b6374b4aee

commit 94dfd783ef6005c371c6b2c560be80b6374b4aee
Author: Achim Gratz <Stromeko@Stromeko.DE>
Date:   Thu Jun 11 06:20:50 2015 +0200

    Increase read buffer size for io_stream to 64kiB


Diff:
---
 ChangeLog    |   10 ++++++++++
 inilex.ll    |    1 +
 io_stream.cc |    4 ++--
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b2b3ae0..1c50bfc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-06-11  Achim Gratz  <Stromeko@NexGo.DE>
+
+	* inilex.ll: Increase read buffer size for the lexer input buffer
+	to 64kiB.
+
+2015-06-11  Achim Gratz  <Stromeko@NexGo.DE>
+
+	* io_stream.cc (copy): Increase read buffer size for io_stream to
+	64kiB.  Use sizeof operator instead of repeating magic constant.
+
 2015-06-07  Achim Gratz  <Stromeko@NexGo.DE>
 
 	* ini.h: Add macros for use within the implementation of the
diff --git a/inilex.ll b/inilex.ll
index 2e767ec..86100ae 100644
--- a/inilex.ll
+++ b/inilex.ll
@@ -28,6 +28,7 @@
 #include "IniParseFeedback.h"
 #include "sha2.h"
 
+#define YY_READ_BUF_SIZE 65536
 #define YY_INPUT(buf,result,max_size) { result = ini_getchar(buf, max_size); }
 
 static int ini_getchar(char *buf, int max_size);
diff --git a/io_stream.cc b/io_stream.cc
index 8a550ad..8a1d635 100644
--- a/io_stream.cc
+++ b/io_stream.cc
@@ -170,11 +170,11 @@ ssize_t io_stream::copy (io_stream * in, io_stream * out)
   if (!in || !out)
     return -1;
   char
-    buffer[16384];
+    buffer[65536];
   ssize_t
     countin,
     countout;
-  while ((countin = in->read (buffer, 16384)) > 0)
+  while ((countin = in->read (buffer, sizeof(buffer))) > 0)
     {
       countout = out->write (buffer, countin);
       if (countout != countin)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]