#include "globaldefs.h"
#include <stdio.h>
+#include <assert.h>
#include "cmdlib.h"
#include "mathlib.h"
#include "polyset.h"
for ( i = 0; i < count; ++i ) {
int j;
- fread( &tri, sizeof( tf_triangle ), 1, input );
+ assert(fread( &tri, sizeof( tf_triangle ), 1, input ));
ByteSwapTri( &tri );
for ( j = 0 ; j < 3 ; j++ )
{
iLevel = 0;
- fread( &magic, sizeof( int ), 1, input );
+ assert(fread( &magic, sizeof( int ), 1, input ));
if ( BigLong( magic ) != MAGIC ) {
Error( "%s is not a Alias object separated triangle file, magic number is wrong.", filename );
}
/* a file, but this does allow you to do error checking */
/* (which I'm not doing) on a per character basis. */
++i;
- fread( &( name[i] ), sizeof( char ), 1, input );
+ assert(fread( &( name[i] ), sizeof( char ), 1, input ));
} while ( name[i] != '\0' );
if ( i != 0 ) {
// indent();
// fprintf(stdout,"OBJECT START: %s\n",name);
- fread( &count, sizeof( int ), 1, input );
+ assert(fread( &count, sizeof( int ), 1, input ));
count = BigLong( count );
++iLevel;
if ( count != 0 ) {
i = -1;
do {
++i;
- fread( &( tex[i] ), sizeof( char ), 1, input );
+ assert(fread( &( tex[i] ), sizeof( char ), 1, input ));
} while ( tex[i] != '\0' );
/*
i = -1;
do {
++i;
- fread( &( name[i] ), sizeof( char ), 1, input );
+ assert(fread( &( name[i] ), sizeof( char ), 1, input ));
} while ( name[i] != '\0' );
if ( i != 0 ) {