2022-05-28 06:41:25 +00:00
|
|
|
#ifndef __MAIN_H__
|
|
|
|
#define __MAIN_H__
|
2022-05-28 00:30:18 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
|
|
|
|
//Function declarations
|
2022-05-30 19:52:15 +00:00
|
|
|
int ask_file(); // It has no flags, it just prompts for filename
|
|
|
|
int invert_file(void); // Invert the file stored in the variable info.filename
|
2022-05-28 00:30:18 +00:00
|
|
|
|
|
|
|
|
2022-05-30 19:52:15 +00:00
|
|
|
|
|
|
|
struct parameters { //This are general parameters for the program
|
2022-05-28 00:30:18 +00:00
|
|
|
|
|
|
|
char filename[100]; // Filename where the text is
|
|
|
|
FILE *fd; // File descriptor for the text file
|
|
|
|
char version[5]; // Holds the software version
|
|
|
|
int fileNameSize; // File maximum name size
|
|
|
|
char help[]; // Help menu to be printed on screen
|
|
|
|
};
|
|
|
|
|
2022-05-30 19:52:15 +00:00
|
|
|
struct parameters info; // Declare struct info of type parameters
|
2022-05-28 00:30:18 +00:00
|
|
|
|
|
|
|
#endif
|