-
Notifications
You must be signed in to change notification settings - Fork 0
/
IOMngr.h
55 lines (48 loc) · 1.33 KB
/
IOMngr.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <stdlib.h>
#include <stdio.h>
#define MAXLINE 1024
/**
* @brief Open the source file whose name is given in sourceName
* If listingName is not NULL open the listing file whose name is given in listingName
* If listingName is NULL, the output goes to stdout
*
* PRE: You can assume sourceName is assigned a legal
* @param sourceName represents the name of the source file
* @param listingName represents the name of the listing file to use
* @return 1 if the file open(s) were successful, otherwise return 0
*/
int openFiles(char * source, char * listingName);
/**
* @brief Close the source file and the listing file if one was created
*/
void closeFiles();
/**
* @brief Get the Next Source Char object
*
* @return char
*/
char getNextSourceChar();
/**
* @brief Write a line containing a single ‘^’ character in the indicated column
*
* @param column represents the column number that the indicator needs to be written into
*/
void writeIndicator(int column);
/**
* @brief Write the message on a separate line
*
* @param message represents the message that's written on the line
*/
void writeMessage(char * message);
/**
* @brief Get the Current Line Num object
*
* @return int
*/
int getCurrentLineNum();
/**
* @brief Get the Current Column Num object
*
* @return int
*/
int getCurrentColumnNum();