********> bugfix.67 Author: Bill Ross Date: 3/15/96 Programs: Carnal Severity: Moderate Problem: Using a STATIC coordinate set with an explicitly referenced PARM results in carnal treating the PARM id as the file name. Also, when loading a prmtop, sometimes carnal prints additional lines after the title. Cause: Opening PARM id: failed to read next word to get file name. Printing extra: need to explicitly terminate the title line. Fix: Make the following change to static.c -------------------------------------------------------------------------- *************** *** 65,70 if (idptr->id_type == PARM) { /* TODO: err if not null & not parm? */ prm = idptr->idunion.parm.prm; } } else { prm = defprm; --- 65,71 ----- if (idptr->id_type == PARM) { /* TODO: err if not null & not parm? */ prm = idptr->idunion.parm.prm; + gettok(); } } else { prm = defprm; -------------------------------------------------------------------------- Fix: Make the following change to rdprm.c -------------------------------------------------------------------------- *** OLD rdprm.c --- NEW rdprm.c *************** *** 119,124 printf("Error: line too long in %s:\n%.80s", name, string); exit(1); } } /*************************************************************************** --- 119,125 ----- printf("Error: line too long in %s:\n%.80s", name, string); exit(1); } + string[i] = '\0'; /* replace newline w/ end-of-string */ } /*************************************************************************** *************** *** 145,151 /* READ TITLE */ preadln(file, name, prm->ititl); ! printf("%s title:\n%s", name, prm->ititl); /* READ CONTROL INTEGERS */ --- 146,152 ----- /* READ TITLE */ preadln(file, name, prm->ititl); ! printf("%s title:\n%s\n", name, prm->ititl); /* READ CONTROL INTEGERS */ -------------------------------------------------------------------------- Temporary workarounds: Opening PARM id instead of file: use default PARM for STATIC. Extra lines: cosmetic problem, no workaround. --