forked from danigfavero/LAREIRA
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlista.h
More file actions
36 lines (22 loc) · 932 Bytes
/
lista.h
File metadata and controls
36 lines (22 loc) · 932 Bytes
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 LISTA_H
#define LISTA_H
#include "elemento.h"
extern Lista *sym_table;
void socorro(void);
Lista Lcria(void);
//Instanciando uma lista e alocando o primeiro endereço (cabec)
Lista* LinsereGlobal(Lista*, char *, int, void *);
void* LBuscaGlobal(Lista*, char*, char);
int LBuscaTipoGlobal(Lista*, char*);
int stringsIguais(char* s1, char* s2);
//Função que verifica se duas strings são iguais, será usada na função de busca
void Ldestroi(Lista lista1);
//Percorre a lista destruindo os elos dela
struct elo* Linsere(Lista lista1, Elemento* val);
//Percorre a lista até chegar no final (crawler == NULL) ou
//chegar em alguma posição vazia (crawler->val == NULL)
Elemento* Lbusca(Lista lista1, char* n);
//Mesma estrutura do insere, percorre a lista até achar ou chegar no final
Elemento* Lretira(Lista lista1, Elemento* val);
//Percorre a lista até encontrar o elemento para retirá-lo
#endif