scanner.c

changeset 27
95a958e3de88
parent 25
802c5382f499
child 28
72a98cbcb9f1
--- a/scanner.c	Thu Dec 01 17:06:27 2011 +0100
+++ b/scanner.c	Thu Jan 26 15:55:52 2012 +0100
@@ -9,6 +9,7 @@
 #include "scanner.h"
 #include "suffix_fnc.h"
 #include "bfile_heuristics.h"
+#include "regex_parser.h"
 #include <sys/stat.h>
 
 int scanDirectory(scanner_t scanner, settings_t* settings) {
@@ -61,7 +62,7 @@
         lines = 0;
         bfile = false;
         bfile_reset(settings->bfileHeuristics);
-        char line_buffer[2048];
+        char line_buffer[REGEX_MAX_LINELENGTH];
         int line_buffer_offset = 0;
 
         FILE *file = fopen(filename, "r");
@@ -83,7 +84,7 @@
             line_buffer_offset = 0;
             lines++;
           } else {
-            if (line_buffer_offset < 2048) {
+            if (line_buffer_offset < REGEX_MAX_LINELENGTH) {
               line_buffer[line_buffer_offset] = a;
               line_buffer_offset++;
             } else {

mercurial