********>Bugfix 14:
Author: Scott Brozell, reported by Myunggi Yi
Date: 08/24/06
Programs: Antechamber
Description: This is a correction to bugfix 12. prep.c when patched by
bugfix 12 has a declaration after executable statements inside
a block. This is not correct, but most compilers allow it.
Fix: apply the following patch to amber9/src/antechamber/prep.c
------------------------------------------------------------------------------
*** prep.c 18 Aug 2006 05:02:19 -0000
--- prep.c 24 Aug 2006 21:36:35 -0700
***************
*** 56,68 ****
if (strlen(line) == 1 && readindex == 3)
readindex = 4;
if (readindex == 1) {
number++;
if (number - 3 > (*cinfo).maxatom ) {
printf("\nInfo: the atom number exceeds the MAXATOM,"
" reallocate memory automatically");
overflow_flag = 1;
}
- double tmpcharge;
sscanf(line, "%d%s%s%s%d%d%d%lf%lf%lf%lf", &tmpint1, tmpchar1,
tmpchar2, tmpchar3, &tmpint2, &tmpint3, &tmpint4,
&tmpfloat1, &tmpfloat2, &tmpfloat3, &tmpcharge);
--- 56,68 ----
if (strlen(line) == 1 && readindex == 3)
readindex = 4;
if (readindex == 1) {
+ double tmpcharge;
number++;
if (number - 3 > (*cinfo).maxatom ) {
printf("\nInfo: the atom number exceeds the MAXATOM,"
" reallocate memory automatically");
overflow_flag = 1;
}
sscanf(line, "%d%s%s%s%d%d%d%lf%lf%lf%lf", &tmpint1, tmpchar1,
tmpchar2, tmpchar3, &tmpint2, &tmpint3, &tmpint4,
&tmpfloat1, &tmpfloat2, &tmpfloat3, &tmpcharge);
------------------------------------------------------------------------------
Temporary workarounds: none