- for(f = 0; f < nb_fields_to_parse; f++) {
- if(regexec(&fields_to_parse[f].regexp, raw_line, 1, &matches, 0) == 0) {
- fprintf(db_file, "%s %s",
- fields_to_parse[f].name,
- raw_line + matches.rm_eo);
+
+ if(raw_line[0] == ' ' || raw_line[0] == '\t') {
+ char *start = raw_line;
+ while(*start == ' ' || *start == '\t') start++;
+ *(end_of_full_line++) = ' ';
+ strcpy(end_of_full_line, start);
+ while(*end_of_full_line && *end_of_full_line != '\n') {
+ end_of_full_line++;
+ }
+ *end_of_full_line = '\0';
+ }
+
+ else {
+ /* if(!((raw_line[0] >= 'a' && raw_line[0] <= 'z') || */
+ /* (raw_line[0] >= 'A' && raw_line[0] <= 'Z'))) { */
+ /* fprintf(stderr, */
+ /* "Header line syntax error %s:%lu.\n", */
+ /* input_filename, position_in_file); */
+ /* fprintf(stderr, "%s", raw_line); */
+ /* } */
+
+ if(full_line[0]) {
+ index_one_mbox_line(nb_fields_to_parse, fields_to_parse, full_line, db_file);
+ }
+
+ end_of_full_line = full_line;
+ strcpy(end_of_full_line, raw_line);
+ while(*end_of_full_line && *end_of_full_line != '\n') {
+ end_of_full_line++;