-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathreader.h
More file actions
36 lines (29 loc) · 695 Bytes
/
reader.h
File metadata and controls
36 lines (29 loc) · 695 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef _READER_H
#define _READER_H
/**
* The initial size of the string that will hold a line of the file. If the row
* exceeds the initial length, more space will be allocated.
*/
#define ReaderLineLengthInit 20
#define ReaderFileExtension "as"
/**
* Open a file for reading.
*/
void reader_open_file(const char* file_name);
/**
* Close the reader's file.
*/
void reader_close_file();
/**
* Get the currently open file's name.
*
* @param extension
* Extension to attach to the file name.
*/
char* reader_get_file_name(const char* extension);
/**
* Read the next line from a file.
* The returned string must be freed by the invoker.
*/
char* reader_get_line();
#endif