15#ifndef OFR_VISUAL_STUDIO_PRESET_H
16#define OFR_VISUAL_STUDIO_PRESET_H
25 FILE *f = fopen(filename, mode);
31 if (stream !=
nullptr) {
32 fclose((FILE *)stream);
37 if (stream !=
nullptr) {
38 return fread((uint8_t *)ptr, size, nmemb, (FILE *)stream);
44 if (stream !=
nullptr) {
45 return fseek((FILE *)stream, offset, whence);
51 if (stream !=
nullptr) {
52 return ftell((FILE *)stream);
#define FT_FILE
Definition: FileSupport.h:16
std::list< FILE * > ofr_file_list
Definition: VisualStudio_Preset.h:22
int OFR_fseek(FT_FILE *stream, long int offset, int whence)
Moves the cursor to the specified position.
Definition: VisualStudio_Preset.h:43
long int OFR_ftell(FT_FILE *stream)
Get file cursor position.
Definition: VisualStudio_Preset.h:50
size_t OFR_fread(void *ptr, size_t size, size_t nmemb, FT_FILE *stream)
Read data from a file and store it in a buffer.
Definition: VisualStudio_Preset.h:36
FT_FILE * OFR_fopen(const char *filename, const char *mode)
Open file and get file pointer.
Definition: VisualStudio_Preset.h:24
void OFR_fclose(FT_FILE *stream)
Close file.
Definition: VisualStudio_Preset.h:30