diff options
-rw-r--r-- | parsing.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -16,12 +16,13 @@ #define LINE_BUFFER_SIZE 0x400 #define TIME_BUFFER_SIZE 0xf -pthread_mutex_t user_mutex, word_mutex; +static pthread_mutex_t user_mutex, word_mutex; + +static struct user_t *last_user = NULL; +static int in_monolog = 0, monolog_len = 0;; static void process_file(FILE *f, struct channel_t *channel, struct regexset_t *rs) { char line[LINE_BUFFER_SIZE]; - struct user_t *last_user = NULL; - int in_monolog = 0, monolog_len = 0;; while(fgets(line, LINE_BUFFER_SIZE, f)) { int rc; @@ -161,6 +162,9 @@ void process(int thread_n) { } else printf("\tParsing %s\n", file->path); + last_user = NULL; + in_monolog = monolog_len = 0; + pthread_t *threads; threads = malloc(sizeof(pthread_t) * thread_n); struct thread_arg_t ta; |