|
@@ -427,10 +427,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFOPEN(NAME, MODE) vf_open((const char *)NAME, VO_RDONLY, 0)
|
|
|
#define XFSEEK ebsnet_fseek
|
|
|
#define XFTELL vf_tell
|
|
|
- #define XREWIND vf_rewind
|
|
|
#define XFREAD(BUF, SZ, AMT, FD) vf_read(FD, BUF, SZ*AMT)
|
|
|
#define XFWRITE(BUF, SZ, AMT, FD) vf_write(FD, BUF, SZ*AMT)
|
|
|
#define XFCLOSE vf_close
|
|
|
+ #define XSEEK_SET VSEEK_SET
|
|
|
#define XSEEK_END VSEEK_END
|
|
|
#define XBADFILE -1
|
|
|
#define XFGETS(b,s,f) -2 /* Not ported yet */
|
|
@@ -441,10 +441,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFOPEN(NAME, MODE) fs_open((char*)NAME)
|
|
|
#define XFSEEK(F, O, W) (void)F
|
|
|
#define XFTELL(F) (F)->len
|
|
|
- #define XREWIND(F) (void)F
|
|
|
#define XFREAD(BUF, SZ, AMT, F) fs_read(F, (char*)BUF, SZ*AMT)
|
|
|
#define XFWRITE(BUF, SZ, AMT, F) fs_write(F, (char*)BUF, SZ*AMT)
|
|
|
#define XFCLOSE fs_close
|
|
|
+ #define XSEEK_SET 0
|
|
|
#define XSEEK_END 0
|
|
|
#define XBADFILE NULL
|
|
|
#define XFGETS(b,s,f) -2 /* Not ported yet */
|
|
@@ -454,10 +454,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFOPEN fopen
|
|
|
#define XFSEEK fseek
|
|
|
#define XFTELL ftell
|
|
|
- #define XREWIND(F) fseek(F, 0, IO_SEEK_SET)
|
|
|
#define XFREAD fread
|
|
|
#define XFWRITE fwrite
|
|
|
#define XFCLOSE fclose
|
|
|
+ #define XSEEK_SET IO_SEEK_SET
|
|
|
#define XSEEK_END IO_SEEK_END
|
|
|
#define XBADFILE NULL
|
|
|
#define XFGETS fgets
|
|
@@ -471,10 +471,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFOPEN fs_fopen
|
|
|
#define XFSEEK fs_fseek
|
|
|
#define XFTELL fs_ftell
|
|
|
- #define XREWIND fs_rewind
|
|
|
#define XFREAD fs_fread
|
|
|
#define XFWRITE fs_fwrite
|
|
|
#define XFCLOSE fs_fclose
|
|
|
+ #define XSEEK_SET FS_SEEK_SET
|
|
|
#define XSEEK_END FS_SEEK_END
|
|
|
#define XBADFILE NULL
|
|
|
#define XFGETS(b,s,f) -2 /* Not ported yet */
|
|
@@ -485,10 +485,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFOPEN fopen
|
|
|
#define XFSEEK fseek
|
|
|
#define XFTELL ftell
|
|
|
- #define XREWIND rewind
|
|
|
#define XFREAD fread
|
|
|
#define XFWRITE fwrite
|
|
|
#define XFCLOSE fclose
|
|
|
+ #define XSEEK_SET PSEEK_SET
|
|
|
#define XSEEK_END PSEEK_END
|
|
|
#define XBADFILE NULL
|
|
|
|
|
@@ -499,10 +499,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFOPEN mynewt_fopen
|
|
|
#define XFSEEK mynewt_fseek
|
|
|
#define XFTELL mynewt_ftell
|
|
|
- #define XREWIND mynewt_rewind
|
|
|
#define XFREAD mynewt_fread
|
|
|
#define XFWRITE mynewt_fwrite
|
|
|
#define XFCLOSE mynewt_fclose
|
|
|
+ #define XSEEK_SET 0
|
|
|
#define XSEEK_END 2
|
|
|
#define XBADFILE NULL
|
|
|
#define XFGETS(b,s,f) -2 /* Not ported yet */
|
|
@@ -521,9 +521,9 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFSEEK fs_seek
|
|
|
#define XFTELL fs_tell
|
|
|
#define XFREWIND fs_rewind
|
|
|
- #define XREWIND(F) fs_seek(F, 0, FS_SEEK_SET)
|
|
|
#define XFREAD(P,S,N,F) fs_read(F, P, S*N)
|
|
|
#define XFWRITE(P,S,N,F) fs_write(F, P, S*N)
|
|
|
+ #define XSEEK_SET FS_SEEK_SET
|
|
|
#define XSEEK_END FS_SEEK_END
|
|
|
#define XBADFILE NULL
|
|
|
#define XFGETS(b,s,f) -2 /* Not ported yet */
|
|
@@ -533,10 +533,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFOPEN(NAME, MODE) m2mb_fs_open((NAME), 0, (MODE))
|
|
|
#define XFSEEK(F, O, W) m2mb_fs_lseek((F), (O), (W))
|
|
|
#define XFTELL(F) m2mb_fs_lseek((F), 0, M2MB_SEEK_END)
|
|
|
- #define XREWIND(F) (void)F
|
|
|
#define XFREAD(BUF, SZ, AMT, F) m2mb_fs_read((F), (BUF), (SZ)*(AMT))
|
|
|
#define XFWRITE(BUF, SZ, AMT, F) m2mb_fs_write((F), (BUF), (SZ)*(AMT))
|
|
|
#define XFCLOSE m2mb_fs_close
|
|
|
+ #define XSEEK_SET M2MB_SEEK_SET
|
|
|
#define XSEEK_END M2MB_SEEK_END
|
|
|
#define XBADFILE -1
|
|
|
#define XFGETS(b,s,f) -2 /* Not ported yet */
|
|
@@ -550,10 +550,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFOPEN(NAME, MODE) ({ FRESULT res; res = f_open(&curFile, (NAME), (FA_OPEN_ALWAYS | FA_WRITE | FA_READ)); (res == FR_OK) ? &curFile : NULL; })
|
|
|
#define XFSEEK(F, O, W) f_lseek((F), (O))
|
|
|
#define XFTELL(F) f_tell((F))
|
|
|
- #define XREWIND(F) f_rewind((F))
|
|
|
#define XFREAD(BUF, SZ, AMT, F) ({ FRESULT res; UINT br; res = f_read((F), (BUF), (SZ)*(AMT), &br); (void)br; res; })
|
|
|
#define XFWRITE(BUF, SZ, AMT, F) ({ FRESULT res; UINT written; res = f_write((F), (BUF), (SZ)*(AMT), &written); (void)written; res; })
|
|
|
#define XFCLOSE(F) f_close((F))
|
|
|
+ #define XSEEK_SET 0
|
|
|
#define XSEEK_END 0
|
|
|
#define XBADFILE NULL
|
|
|
#define XFGETS(b,s,f) f_gets((b), (s), (f))
|
|
@@ -565,10 +565,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFDOPEN fdopen
|
|
|
#define XFSEEK fseek
|
|
|
#define XFTELL ftell
|
|
|
- #define XREWIND(F) XFSEEK(F, 0, SEEK_SET)
|
|
|
#define XFREAD fread
|
|
|
#define XFWRITE fwrite
|
|
|
#define XFCLOSE fclose
|
|
|
+ #define XSEEK_END SEEK_SET
|
|
|
#define XSEEK_END SEEK_END
|
|
|
#define XBADFILE NULL
|
|
|
#define XFGETS fgets
|
|
@@ -585,10 +585,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFOPEN FCL_FOPEN
|
|
|
#define XFSEEK FCL_FSEEK
|
|
|
#define XFTELL FCL_FTELL
|
|
|
- #define XREWIND FCL_REWIND
|
|
|
#define XFREAD FCL_FREAD
|
|
|
#define XFWRITE FCL_FWRITE
|
|
|
#define XFCLOSE FCL_FCLOSE
|
|
|
+ #define XSEEK_SET SEEK_SET
|
|
|
#define XSEEK_END SEEK_END
|
|
|
#define XBADFILE NULL
|
|
|
#define XFGETS FCL_FGETS
|
|
@@ -624,10 +624,10 @@ WOLFSSL_ABI WOLFSSL_API int wolfCrypt_Cleanup(void);
|
|
|
#define XFDOPEN fdopen
|
|
|
#define XFSEEK fseek
|
|
|
#define XFTELL ftell
|
|
|
- #define XREWIND rewind
|
|
|
#define XFREAD fread
|
|
|
#define XFWRITE fwrite
|
|
|
#define XFCLOSE fclose
|
|
|
+ #define XSEEK_SET SEEK_SET
|
|
|
#define XSEEK_END SEEK_END
|
|
|
#define XBADFILE NULL
|
|
|
#define XFGETS fgets
|