diff options
author | onefang | 2020-03-16 14:43:30 +1000 |
---|---|---|
committer | onefang | 2020-03-16 14:43:30 +1000 |
commit | 3f37ff0b65143435f6794d4b2ebed1f28c64e831 (patch) | |
tree | 22fbced983c2889a8420e922258b4f68c870aedf /src/boxes/boxes.c | |
parent | Compile boxes by default. (diff) | |
download | opensim-SC_OLD-3f37ff0b65143435f6794d4b2ebed1f28c64e831.zip opensim-SC_OLD-3f37ff0b65143435f6794d4b2ebed1f28c64e831.tar.gz opensim-SC_OLD-3f37ff0b65143435f6794d4b2ebed1f28c64e831.tar.bz2 opensim-SC_OLD-3f37ff0b65143435f6794d4b2ebed1f28c64e831.tar.xz |
Update to toybox API change.
Diffstat (limited to 'src/boxes/boxes.c')
-rw-r--r-- | src/boxes/boxes.c | 10 |
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 | } |