-
Notifications
You must be signed in to change notification settings - Fork 0
/
dicionario.h
36 lines (28 loc) · 859 Bytes
/
dicionario.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
#ifndef DICIONARIO_H_INCLUDED
#define DICIONARIO_H_INCLUDED
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <regex.h>
#include <ctype.h>
#include <locale.h>
#include <time.h>
#include <stdbool.h>
#define MIN3(a, b, c) ((a) < (b) ? ((a) < (c) ? (a) : (c)) : ((b) < (c) ? (b) : (c)))
#define MAX_SIZE_WORD 47
typedef char* String;
// ternary tree
typedef struct no {
int character;
struct no *left, *eq, *right;
} No;
// Funções de assistencia
void openAndVerifyFile(FILE **filePGM, String filePath, String operation);
int levenshtein(const String s1, const String s2);
String changeLowerCase(String changedWord);
No* LoadDictionary();
// Functions related to ternary tree
No* create(char character);
void insert(No **root, String keyword);
bool search(No *root, String keyword);
#endif