-
Notifications
You must be signed in to change notification settings - Fork 0
/
dns_fix.c
47 lines (39 loc) · 958 Bytes
/
dns_fix.c
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
#include <stdio.h>
#include <stdlib.h>
// Version of the program
#define VERSION "v1.0.0"
// User-defined Header files
#include "auth.h"
#include "displayUtil.h"
#include "displayContent.h"
#include "executionEngine.h"
// Driver Program
int main(int argc, char * argv[])
{
// Function Prototypes
void displayStartUpMessage(void);
// If the user is executing through command line interface and has passed more than 1 argument value.
if( argc > 2 )
{
printError("\nError: Too many argument passed, Please try again...\n");
puts("Press Enter to continue");
fflush(stdin);
getchar();
exit(1);
}
// If the user is executing through command line interface and sent single argument.
else if ( argc == 2 )
{
executeCommandLineInterface( argv[1] );
}
// If the user is running the .exe file directly.
else
{
displayStartUpMessage();
int option = showMenu();
optionExecutor(option);
fflush(stdin);
getchar();
}
return 0;
}