- switch (state = m_getfld (state, name, buf, sizeof(buf), fp)) {
- case FLD:
- case FLDPLUS:
- case FLDEOF:
- strncpy (mapname, name, namelen);
- if (state != FLDPLUS)
- cp = buf;
- else {
- cp = add (buf, NULL);
- while (state == FLDPLUS) {
- state = m_getfld (state, name, buf, sizeof(buf), fp);
- cp = add (buf, cp);
- }
- }
- dp = trimcpy (cp);
- if (cp != buf)
- free (cp);
- if (debugsw)
- fprintf (stderr, "compare %s to %s <- %s\n", id, dp,
- mapname);
- result = strcmp (id, dp);
- free (dp);
- if (result == 0) {
- lkfclose (fp, mapfile);
- return OK;
+ switch (state = m_getfld(state, name, buf, sizeof(buf), fp)) {
+ case FLD:
+ case FLDPLUS:
+ case FLDEOF:
+ strncpy(mapname, name, namelen);
+ if (state != FLDPLUS)
+ cp = buf;
+ else {
+ cp = getcpy(buf);
+ while (state == FLDPLUS) {
+ state = m_getfld(state, name, buf,
+ sizeof(buf), fp);
+ cp = add(buf, cp);