File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 7
7
#include <stdio.h>
8
8
#include <stdlib.h>
9
9
10
- /* Lista encadeada utilizando celula cabeça */
10
+ /* Lista encadeada utilizando celula cabeça */
11
11
12
12
typedef struct cel celula ;
13
13
struct cel {
@@ -16,15 +16,15 @@ struct cel{
16
16
struct cel * ant ;
17
17
};
18
18
19
- /* O ponteiro 'p' é a cabeça da lista*/
19
+ /* O ponteiro 'p' é a cabeça da lista*/
20
20
21
21
void insereInicio (int x , celula * p ) /* Insere no inicio da lista*/
22
22
{
23
23
celula * nova , * q ;
24
24
nova = malloc (sizeof (celula ));
25
25
nova -> dado = x ;
26
26
nova -> prox = p -> prox ;
27
- /* verifica se a lista está vazia*/
27
+ /* verifica se a lista está vazia*/
28
28
if (p -> prox != NULL )
29
29
{
30
30
q = nova -> prox ;
@@ -93,9 +93,9 @@ void libera (celula *ini)
93
93
celula * p ;
94
94
p = ini ;
95
95
while (p != NULL ) {
96
- celula * q = p -> prox ; /* guarda referência para o próximo elemento*/
97
- free (p ); /* libera a memória apontada por p */
98
- p = q ; /* faz p apontar para o próximo */
96
+ celula * q = p -> prox ; /* guarda referência para o próximo elemento*/
97
+ free (p ); /* libera a memória apontada por p */
98
+ p = q ; /* faz p apontar para o próximo */
99
99
}
100
100
}
101
101
You can’t perform that action at this time.
0 commit comments