Add forgotten files 1.4.70b
[polyglot.git] / io.c
diff --git a/io.c b/io.c
index 6e9dde7..ff795d9 100644 (file)
--- a/io.c
+++ b/io.c
@@ -22,8 +22,6 @@
 static const bool UseDebug = FALSE;
 static const bool UseCR = FALSE;
 
-static const int StringSize = 4096;
-
 static const char LF = '\n';
 static const char CR = '\r';
 
@@ -119,7 +117,14 @@ void io_get_update(io_t * io) {
    pos = io->in_size;
 
    size = BufferSize - pos;
-   if (size <= 0) my_fatal("io_get_update(): buffer overflow\n");
+
+
+   if (size <= 0){
+       //  io->in_buffer[FormatBufferSize-20]='\0';
+       //  my_log("%s","io_get_update(): buffer too small; content starts with:\n");
+       //  my_log("[%s...]\n",io->in_buffer);
+       my_fatal("io_get_update(): buffer overflow\n");
+   }
 
    // read as many data as possible
    n = my_read(io->in_fd,&io->in_buffer[pos],size);
@@ -140,6 +145,7 @@ void io_get_update(io_t * io) {
 
       io->in_eof = TRUE;
    }
+
 }
 
 // io_line_ready()