********> bugfix.40 Author: Tom Cheatham Date: 9/11/95 !!!!! SUPERSEDED by bugfix.56 !!!!!! Programs: carnal Severity: moderate Problem: Fails to read pdb files with lines < 80 chars. Fix: Make the following change to src/carnal/util.c ----------------------------------------------------------------------- === If bugfix.39 was installed: *** OLD util.c --- NEW util.c 485c485 < if (fgets(scanbuf, 80, file) != 1) --- > if (fgets(scanbuf, 80, file) == NULL) ----------------------------------------------------------------------- === If bugfix.39 was not installed: *** OLD util.c --- NEW util.c *************** *** 482,488 { int c; ! if (fscanf(file, "%80c", scanbuf) != 1) return(-1); scanbuf[78] = '\0'; --- 482,488 ----- { int c; ! if (fgets(scanbuf, 80, file) == NULL) return(-1); scanbuf[78] = '\0'; *************** *** 501,511 if (sscanf(scanbuf+46, "%12f", &xyz[2]) != 1) return(-2); #endif - while (1) { /* skip to eoln */ - c = getc(file); - if ( c == 10 || c == EOF) - break; - } return(0); } --- 501,506 ----- if (sscanf(scanbuf+46, "%12f", &xyz[2]) != 1) return(-2); #endif return(0); } ----------------------------------------------------------------------- Temporary workarounds: pad out lines in pdb to >= 80 characters. --