#define HDR_LEN 128
#define TAB 0x09
+#define LWSP 0x20
/*
* Like strncpy() but with terminated result.
if (inheader && !feof(f)) {
lookahead = fgetc(f);
- if (lookahead == TAB) {
+ if (lookahead == TAB || lookahead == LWSP) {
+ if (buf[strlen(buf)-1] != LWSP)
+ strncat (buf, " ", sizeof(buf)-strlen(buf)-1);
if ((cp = fgets(tmp, sizeof(tmp), f)) != NULL) {
strncat (buf, tmp, sizeof(buf)-strlen(buf)-1);
if (strlen(buf) > 0 && buf[strlen(buf)-1] == '\n')