This repository has been archived by the owner on May 23, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Lista.h
66 lines (44 loc) · 1.59 KB
/
Lista.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
TRABALHO 1 -- SSC0502 -- ALGORITMOS E ESTRUTURAS DE DADOS
PROFESSOR: Bruno Roberto Nepomuceno Matheus
ALUNOS:
Bruno Arantes de Achilles Mello 9866490
Laura Pereira de Gouveia 9880200
*/
#ifndef LISTA_H_INCLUDED
#define LISTA_H_INCLUDED
#include "AllocationsStatic.h"
//#include "AllocationsDyn.h"
//### FUNCOES BASICAS DE FILA ###
// FUNCAO QUE COLOCA NO FIM DA FILA
int entraLista(Lista* lista, void* elemento);
// FUNCAO QUE RETIRA DO INICIO DA FILA
void* saiLista(Lista* lista, int* erro);
//################################
//### FUNCOES BASICAS DE PILHA ###
// FUNCAO QUE COLOCA NO TOPO DA PILHA
int pushLista(Lista* lista, void* elemento);
// FUNCAO QUE PEGA DO TOPO DA PILHA
void* popLista(Lista* lista, int* erro);
//################################
//### FUNCOES DE LISTA ###
// INICIALIZA A LISTA
void initLista(Lista* lista);
// LIMPA A LISTA
void limpaLista(Lista* lista);
// RETORNA O ELEMENTO NA POSICAO ESPECIFICADA NA LISTA
void* atLista(Lista* lista, uint32 posicao, int* erro);
// RETIRA E RETORNA O ELEMENTO NA POSICAO ESPECIFICADA NA LISTA
void* getLista(Lista* lista, uint32 posicao, int* erro);
// CHECA SE A LISTA ESTA VAZIA
int estaVazia(Lista* lista);
// INSERE NO FIM DA LISTA
int insereFim(Lista* lista, void* elemento);
// INSERE NO INICIO DA LISTA
int insereInicio(Lista* lista, void* elemento);
// RETIRA DO FIM DA LISTA
void* retiraFim(Lista* lista, int* erro);
// RETIRA DO INICIO DA LISTA
void* retiraInicio(Lista* lista, int* erro);
//################################
#endif // LISTA_H_INCLUDED