New function : hxc_fopen.

git-svn-id: svn://svn.code.sf.net/p/hxcfloppyemu/code/HxCFloppyEmulator/libhxcadaptor/trunk@1366 63fa2f70-6a9b-4bc4-b855-9c6a949b1d69
This commit is contained in:
Jean-François DEL NERO
2016-01-02 13:55:31 +00:00
parent 997971798a
commit 5168491f7a
2 changed files with 13 additions and 0 deletions
+12
View File
@@ -243,6 +243,18 @@ FILE *hxc_fopen (const char *filename, const char *mode)
return stream;
}
int hxc_fread(void * ptr, size_t size, FILE *f)
{
if( fread(ptr,size,1,f) != 1 )
{
return 1; // Error
}
else
{
return 0; // No Error
}
}
int hxc_fclose(FILE * f)
{
return fclose(f);
+1
View File
@@ -44,6 +44,7 @@ char * hxc_strlower(char * str);
int hxc_open (const char *filename, int flags, ...);
FILE *hxc_fopen (const char *filename, const char *mode);
int hxc_fread(void * ptr, size_t size, FILE *f);
int hxc_fclose(FILE * f);
#ifndef stat