#include <h/utils.h>
#include <stdio.h>
#include <ctype.h>
-#include <stdbool.h>
enum threestate {
*/
static enum threestate is_falted(FILE *);
static size_t copyname(char *, char *);
-static bool is_separator(char *);
+static boolean is_separator(char *);
/*
f->valuelen = nchars;
}
- while (ret == FLD2 && (falted = is_falted(msg)) == B_TRUE) {
+ while ((ret == FLD2 || ret == LENERR2) && (falted = is_falted(msg)) == B_TRUE) {
nchars = getline(&tmpline, &len, msg);
if (nchars <= 0) {
free(tmpline);
}
}
- if (nchars >= NAMESZ) {
- ret = LENERR2;
- }
-
free(f->value);
f->value = tmpline;
f->valuelen = nchars;
return strlen(dst);
}
-static bool
+static boolean
is_separator(char *line)
{
/*
line++;
}
if (strcmp("\n", line) == 0 || strcmp("\r\n", line) == 0 ) {
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}