Yes, I put in the change you said. I know it is not reaching areadata. It appears the reason why it won't reach areadata, is that for some reason word is truncating the first letter. So it never reads areadata, but instead readata So it just gives all those error messages. Now I don't have a clue why that would be happening. Could the fact that I had to use char Newfile[MSL] to bring in AREA_DIR since smaugfuss don't use that, bypassing that with their startup file be an issue?
This guy here...
word = ( feof( fp ) ? "ENDAREA" : fread_word( fp ) );
if( word[0] == '\0' )
{
bug( "%s: EOF encountered reading file!", __FUNCTION__ );
word = "ENDAREA";
}
if( !str_cmp( word, "AREADATA" ) )
{
if( !tarea )
tarea = create_area( );
fread_fuss_areadata( fp, tarea );
}
My load_area_file looks had to have this added because I use area_dir while smaugfuss does not.
void load_area_file( AREA_DATA * tarea, const char *filename )
{
char *word;
char Newfile[MSL], check[MSL];
int aversion = 0;
if ( fBootDb )
tarea = last_area;
if ( !fBootDb && !tarea ) {
bug( "%s", "Load_area: null area!" );
return;
}
snprintf( check, MSL, "%s", BUILD_DIR );
if ( !str_prefix( check, filename ) )
snprintf( Newfile, MSL, "%s", filename );
else
snprintf( Newfile, MSL, "%s%s", AREA_DIR, filename );
if ( ( fpArea = FileOpen( Newfile, "r" ) ) == NULL ) {
perror( Newfile );
bug( "load_area: %s error loading file (can't open)", Newfile );
return;
}
if( fread_letter( fpArea ) != '#' )
{
if( fBootDb )
{
bug( "%s: No # found at start of area file.", __FUNCTION__ );
exit( 1 );
}
else
{
bug( "%s: No # found at start of area file.", __FUNCTION__ );
FileClose( fpArea );
fpArea = NULL;
return;
}
}
word = fread_word( fpArea );
// New FUSS area format support -- Samson 7/5/07
if( !str_cmp( word, "AREADATA" ) )
{
tarea = fread_fuss_area( tarea, fpArea );
FileClose( fpArea );
fpArea = NULL;
if( tarea )
process_sorting( tarea );
return;
}