aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/boxes
diff options
context:
space:
mode:
Diffstat (limited to 'src/boxes')
-rw-r--r--src/boxes/boxes.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/boxes/boxes.c b/src/boxes/boxes.c
index 25fc880..f07af49 100644
--- a/src/boxes/boxes.c
+++ b/src/boxes/boxes.c
@@ -539,18 +539,14 @@ void loadFile(struct content *content)
539 if (-1 != fd) 539 if (-1 != fd)
540 { 540 {
541 char *temp = NULL; 541 char *temp = NULL;
542 long len; 542 long len = 0;
543 543
544 do 544 do
545 { 545 {
546 // TODO - get_rawline() is slow, and wont help much with DOS and Mac line endings. 546 // TODO - get_line() is slow, and wont help much with DOS and Mac line endings.
547 temp = get_rawline(fd, &len, '\n'); 547 temp = get_line(fd);
548 if (temp) 548 if (temp)
549 {
550 if (temp[len - 1] == '\n')
551 temp[--len] = '\0';
552 addLine(content, NULL, temp, len); 549 addLine(content, NULL, temp, len);
553 }
554 } while (temp); 550 } while (temp);
555 close(fd); 551 close(fd);
556 } 552 }