blob: 44e6cc9c13f881851b037c556a0ef277be9d7be1 (
plain)
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
|
#include "session.h"
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
FILE *dictionary = NULL;
switch (argc)
{
case 1:
if (checkIfFileExists("dictionary.dict") == 0)
{
dictionary = fopen("dictionary.dict", "r");
}
break;
case 2:
if (checkIfFileExists(argv[1]) == 0)
{
dictionary = fopen(argv[1], "r");
}
}
if (dictionary != NULL)
{
startSession(dictionary);
fclose(dictionary);
}
return 0;
}
|