Source/ThunderBeast/QuakeToon/qcommon/files.c
int FS_LoadFile (char *path, void **buffer)
{
	FILE	*h;
	byte	*buf;
	int		len;

	buf = NULL;	// quiet compiler warning

// look for it in the filesystem or pack files
	len = FS_FOpenFile (path, &h);
	if (!h)
	{
		if (buffer)
			*buffer = NULL;
		return -1;
	}
	
	if (!buffer)
	{
		fclose (h);
		return len;
	}

	buf = Z_Malloc(len);
	*buffer = buf;

	FS_Read (buf, len, h);

	fclose (h);

	return len;
}
/*
============
FS_LoadFile

Filename are reletive to the quake search path
a null buffer will just return the file length without loading
============
*/
FS_LoadFile
Filename are reletive to the quake search path
a null buffer will just return the file length without loading
FS_LoadFile Filename are reletive to the quake search path a null buffer will just return the file length without loading
int FS_LoadFile (char *path, void **buffer)
{
	FILE	*h;
	byte	*buf;
	int		len;
	buf = NULL;	
	len = FS_FOpenFile (path, &h);
	if (!h)
	{
		if (buffer)
			*buffer = NULL;
		return -1;
	}
	if (!buffer)
	{
		fclose (h);
		return len;
	}
	buf = Z_Malloc(len);
	*buffer = buf;
	FS_Read (buf, len, h);
	fclose (h);
	return len;
}
int FS_LoadFile ( char * path , void * * buffer ) { FILE * h ; byte * buf ; int len ; buf = NULL ; len = FS_FOpenFile ( path , & h ) ; if ( ! h ) { if ( buffer ) * buffer = NULL ; return -1 ; } if ( ! buffer ) { fclose ( h ) ; return len ; } buf = Z_Malloc ( len ) ; * buffer = buf ; FS_Read ( buf , len , h ) ; fclose ( h ) ; return len ; }
FS_LoadFile
Filename are reletive to the quake search path
a null buffer will just return the file length without loading
FS_LoadFile Filename are reletive to the quake search path a null buffer will just return the file length without loading
// quiet compiler warning // look for it in the filesystem or pack files