The correction for the Doppler-preprocessor bug requires more than a few lines of editing, but it can be done. Remove lines 104-135 from dopplerbroad.c:

Code: Select all

```
/***** Get XSS, NXS and JXS arrays *********************************/
/* Get pointer to ACE data */
ace = (long)RDB[nuc + NUCLIDE_PTR_ACE];
CheckPointer(FUNCTION_NAME, "(ace)", ACE_ARRAY, ace);
/* Pointer to XSS array */
ptr = (long)ACE[ace + ACE_PTR_XSS];
CheckPointer(FUNCTION_NAME, "(xss)", ACE_ARRAY, ptr);
XSS = &ACE[ptr];
/* Read data to NXS array */
ptr = (long)ACE[ace + ACE_PTR_NXS];
CheckPointer(FUNCTION_NAME, "(nxs)", ACE_ARRAY, ptr);
for (n = 0; n < 16; n++)
NXS[n] = (long)ACE[ptr++];
/* Read data to JXS array */
ptr = (long)ACE[ace + ACE_PTR_JXS];
CheckPointer(FUNCTION_NAME, "(jxs)", ACE_ARRAY, ptr);
for (n = 0; n < 32; n++)
JXS[n] = (long)ACE[ptr++];
/*******************************************************************/
```

and replace with:

Code: Select all

```
/***** Get NXS and JXS arrays **************************************/
/* Pointer to ace block */
ace = (long)RDB[nuc + NUCLIDE_PTR_ACE];
CheckPointer(FUNCTION_NAME, "(ace)", ACE_ARRAY, ace);
/* Read data to NXS array */
ptr = (long)ACE[ace + ACE_PTR_NXS];
CheckPointer(FUNCTION_NAME, "(nxs)", ACE_ARRAY, ptr);
for (n = 0; n < 16; n++)
NXS[n] = (long)ACE[ptr++];
/* Read data to JXS array */
ptr = (long)ACE[ace + ACE_PTR_JXS];
CheckPointer(FUNCTION_NAME, "(jxs)", ACE_ARRAY, ptr);
for (n = 0; n < 32; n++)
JXS[n] = (long)ACE[ptr++];
/********************************************************************/
/***** Make copies of ACE and XSS ***********************************/
/* Pointer to original ace block */
ptr = (long)RDB[nuc + NUCLIDE_PTR_ACE];
CheckPointer(FUNCTION_NAME, "(ace)", ACE_ARRAY, ptr);
/* Make a copy */
ace = ReallocMem(ACE_ARRAY, ACE_BLOCK_SIZE);
memcpy(&ACE[ace], &ACE[ptr], ACE_BLOCK_SIZE*sizeof(double));
/* Set pointer */
WDB[nuc + NUCLIDE_PTR_ACE] = (double)ace;
/* Pointer to XSS array */
ptr = (long)ACE[ace + ACE_PTR_XSS];
CheckPointer(FUNCTION_NAME, "(xss)", ACE_ARRAY, ptr);
/* Make a copy */
loc0 = ReallocMem(ACE_ARRAY, NXS[0]);
memcpy(&ACE[loc0], &ACE[ptr], NXS[0]*sizeof(double));
/* Set pointer */
ACE[ace + ACE_PTR_XSS] = (double)loc0;
/* Pointer to data */
XSS = &ACE[loc0];
```

You also need to define variable loc0 (type long). That should do the trick.