ASF docs  3.1.3
Some important library documentation
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
reader_txt.c File Reference
#include "conf_explorer.h"
#include <LIB_MEM>
#include "file.h"
#include "navigation.h"
#include "reader_txt.h"
#include "unicode.h"
+ Include dependency graph for reader_txt.c:

Go to the source code of this file.

Functions

bool reader_txt_open (bool b_readonly)
 Open a selected text file in the current navigator.
bool reader_txt_new (const FS_STRING sz_name, uint8_t u8_txt_format)
 Create a new text file.
void reader_txt_beg (void)
 This function goes at the beginning of file and read the text header.
void reader_txt_select_format (uint8_t u8_txt_format)
 This function allow to select the text format to decode.
uint16_t reader_txt_get_line (bool b_unicode, FS_STRING string, uint16_t u16_str_size)
 This function fills an ASCII buffer with the current text line of opened file.
bool reader_txt_jump_line (uint16_t nb_line)
 This function jumps text lines.
void reader_txt_close (void)
 Close text file.

Function Documentation

void reader_txt_beg ( void  )

Definition at line 106 of file reader_txt.c.

void reader_txt_close ( void  )

Definition at line 274 of file reader_txt.c.

uint16_t reader_txt_get_line ( bool  b_unicode,
FS_STRING  string,
uint16_t  u16_str_size 
)
Parameters:
b_unicodetrue to return a unicode string (UTF16), ASCII otherwise over there
stringstring used to store text line
u16_str_sizemaximum size of string (unit character, 1B for ASCII, 2B for unicode)
Returns:
size of the line (may be < or > at u16_str_size)
0, in case of error
//! This routine remove the character '\n' '\r'
//! 

Definition at line 145 of file reader_txt.c.

bool reader_txt_jump_line ( uint16_t  nb_line)
Parameters:
nb_linenumber of lines to jump
Returns:
false in case of error

Definition at line 259 of file reader_txt.c.

bool reader_txt_new ( const FS_STRING  sz_name,
uint8_t  u8_txt_format 
)
Parameters:
sz_namecontains the file name (ASCII or UNICODE )
u8_txt_formattext format to use (UNI_TYPE_UTF8, UNI_TYPE_UTF16BE, UNI_TYPE_UTF16LE, UNI_TYPE_ASCII)
Returns:
false in case of error, see global value "fs_g_status" for more detail
true otherwise

Definition at line 85 of file reader_txt.c.

bool reader_txt_open ( bool  b_readonly)
Parameters:
b_readonlytrue to open the text file in read only access
Returns:
false in case of error, see global value "fs_g_status" for more detail
true otherwise

Definition at line 68 of file reader_txt.c.

void reader_txt_select_format ( uint8_t  u8_txt_format)
Parameters:
u8_txt_formattext format selected (UNI_TYPE_UTF8, UNI_TYPE_UTF16BE, UNI_TYPE_UTF16LE, UNI_TYPE_ASCII)

Definition at line 126 of file reader_txt.c.