Open Font Render 1.2
Loading...
Searching...
No Matches
FileSupport.cpp File Reference
#include "FileSupport.h"
Include dependency graph for FileSupport.cpp:

Functions

void OFR_fclose (FT_FILE *stream)
 Close file.
 
FT_FILEOFR_fopen (const char *filename, const char *mode)
 Open file and get file pointer.
 
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.
 
int OFR_fseek (FT_FILE *stream, long int offset, int whence)
 Moves the cursor to the specified position.
 
long int OFR_ftell (FT_FILE *stream)
 Get file cursor position.
 

Function Documentation

◆ OFR_fclose()

void OFR_fclose ( FT_FILE stream)

Close file.

Parameters
[in](*stream)File pointer.
Note
The weak symbol is defined.
Need to override this function delay on the device used.

◆ OFR_fopen()

FT_FILE * OFR_fopen ( const char *  filename,
const char *  mode 
)

Open file and get file pointer.

Parameters
[in](*filename)Target file path.
[in](*mode)Open mode.
Returns
File pointer or false (NULL).
Note
The weak symbol is defined.
Need to override this function delay on the device used.

◆ OFR_fread()

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.

Parameters
[in](*ptr)Buffer pointer.
[in](size)Data size.
[in](nmemb)Number of read data.
[in](*stream)File pointer.
Returns
Number of successfully read data.
Note
The weak symbol is defined.
Need to override this function delay on the device used.

◆ OFR_fseek()

int OFR_fseek ( FT_FILE stream,
long int  offset,
int  whence 
)

Moves the cursor to the specified position.

Parameters
[in](*stream)File pointer.
[in](offset)Move offset.
[in](whence)Seek position.
Returns
If successful, return 0, otherwise return non-zero.
Note
The weak symbol is defined.
Need to override this function delay on the device used.

◆ OFR_ftell()

long int OFR_ftell ( FT_FILE stream)

Get file cursor position.

Parameters
[in](*stream)File pointer.
Returns
If successful, return position, otherwise return -1L.
Note
The weak symbol is defined.
Need to override this function delay on the device used.