3rdparty/iio/iio.c
// Input: a pointer to raw data
//
// Output: the name of a temporary file containing the data
//
// Implementation: re-invent the wheel
a pointer to raw data
Output: the name of a temporary file containing the data

re-invent the wheel
a pointer to raw data Output : the name of a temporary file containing the data re - invent the wheel
static char *put_data_into_temporary_file(void *filedata, size_t filesize)
{
	static char filename[FILENAME_MAX];
	fill_temporary_filename(filename);
	FILE *f = xfopen(filename, "w");
	int cx = fwrite(filedata, filesize, 1, f);
	if (cx != 1) fail("fwrite to temporary file failed");
	xfclose(f);
	return filename;
}
static char * put_data_into_temporary_file ( void * filedata , size_t filesize ) { static char filename [ FILENAME_MAX ] ; fill_temporary_filename ( filename ) ; FILE * f = xfopen ( filename , " " ) ; int cx = fwrite ( filedata , filesize , 1 , f ) ; if ( cx != 1 ) fail ( " " ) ; xfclose ( f ) ; return filename ; }
Input: a pointer to raw data
Output: the name of a temporary file containing the data
Input : a pointer to raw data Output : the name of a temporary file containing the data