I'm working with some old code and the users tell me that the original program's output was a single binary file containing multiple stuct data. The output I get is a binary file containing a single structure. The comment also indicates that this what is happening but I need to be sure before I tell the user they must have given me the wrong code. I would have thought to output the whole linked list one would need to iterate through said list and output each binary file individually.
The code that writes to the binary file is a single line, as follows:
/*output RTZ indication set to binary data file*/
if((fwrite(&(NodePtr->sb),sizeof(struct SbOutput),1,foutp))!=1)
FatalError(FATAL_FILEIOERR, INFO(errno));
There is no loop, it is contained within a function. It also appears that it overwrites the file everytime the function is called which confuses matters further.
Thanks for any input!