… | |
… | |
856 | { |
856 | { |
857 | char buf[HUGE_BUF], msgbuf[HUGE_BUF], maplorebuf[HUGE_BUF], *key = NULL, *value, *end; |
857 | char buf[HUGE_BUF], msgbuf[HUGE_BUF], maplorebuf[HUGE_BUF], *key = NULL, *value, *end; |
858 | int msgpos = 0; |
858 | int msgpos = 0; |
859 | int maplorepos = 0; |
859 | int maplorepos = 0; |
860 | |
860 | |
861 | while (fgets (buf, HUGE_BUF - 1, fp) != NULL) |
861 | while (fgets (buf, HUGE_BUF, fp) != NULL) |
862 | { |
862 | { |
863 | buf[HUGE_BUF - 1] = 0; |
863 | buf[HUGE_BUF - 1] = 0; |
864 | key = buf; |
864 | key = buf; |
865 | while (isspace (*key)) |
865 | while (isspace (*key)) |
866 | key++; |
866 | key++; |
… | |
… | |
913 | * that use the parameter. |
913 | * that use the parameter. |
914 | */ |
914 | */ |
915 | |
915 | |
916 | if (!strcmp (key, "msg")) |
916 | if (!strcmp (key, "msg")) |
917 | { |
917 | { |
918 | while (fgets (buf, HUGE_BUF - 1, fp) != NULL) |
918 | while (fgets (buf, HUGE_BUF, fp) != NULL) |
919 | { |
919 | { |
920 | if (!strcmp (buf, "endmsg\n")) |
920 | if (!strcmp (buf, "endmsg\n")) |
921 | break; |
921 | break; |
922 | else |
922 | else |
923 | { |
923 | { |
… | |
… | |
934 | if (msgpos != 0) |
934 | if (msgpos != 0) |
935 | m->msg = strdup_local (msgbuf); |
935 | m->msg = strdup_local (msgbuf); |
936 | } |
936 | } |
937 | else if (!strcmp (key, "maplore")) |
937 | else if (!strcmp (key, "maplore")) |
938 | { |
938 | { |
939 | while (fgets (buf, HUGE_BUF - 1, fp) != NULL) |
939 | while (fgets (buf, HUGE_BUF, fp) != NULL) |
940 | { |
940 | { |
941 | if (!strcmp (buf, "endmaplore\n")) |
941 | if (!strcmp (buf, "endmaplore\n")) |
942 | break; |
942 | break; |
943 | else |
943 | else |
944 | { |
944 | { |