Home | Develop | Download | Contact
pdslstring.h
1 /*
2  * pdslstring.h
3  *
4  * Copyright 2011 Fernando Pujaico Rivera <fernando.pujaico.rivera@gmail.com>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  * MA 02110-1301, USA.
20  *
21  */
22 
31 #ifndef __PDSLSTRING_H__
32 #define __PDSLSTRING_H__
33 
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 #include <stdio.h>
40 
41 #ifndef TRUE
42  #define TRUE 1
43 #endif
44 
45 #ifndef FALSE
46  #define FALSE 0
47 #endif
48 
68 
70 {
71  // Dirección del nodo anterios de la lista.
73  // Strings real asociado; dentro;del nodo.
74  char *S;
75  // Direccion del nodo siguiente en la lista.
77 };
78 
79 
80 
81 
88 
89 
97 int pds_list_string_push(PdsListString **Lprev,const char* string_data);
98 
99 
107 
108 
116 
117 
125 int pds_list_string_unshift(PdsListString **Lnext,const char* string_data);
126 
127 
135 
136 
144 
145 
153 
154 
162 
163 
171 
172 
180 
181 
189 
190 
198 
199 
200 
201 
210 int pds_list_string_add(PdsListString **Lprev,const char* string_data);
211 
212 
222 int pds_list_string_read(PdsListString **Lprev,char** string_data);
223 
224 
232 
233 
241 
242 
253 
254 
262 
263 
268 #ifdef __cplusplus
269 }
270 #endif
271 
272 #endif /* __PDSLSTRING_H__ */
273 
int pds_list_string_top(PdsListString **L)
Busca el elemento final; superior; de la lista.
int pds_list_string_printf(const PdsListString *L)
Imprime en pantalla los datos de un nodo de tipo puntero PdsListString.
int pds_list_string_unshift(PdsListString **Lnext, const char *string_data)
Agrega un elemento al inicio de la lista.
int pds_list_string_push(PdsListString **Lprev, const char *string_data)
Agrega un elemento a la cima de la lista.
int pds_list_string_add(PdsListString **Lprev, const char *string_data)
Agrega un elemento a la cima de la lista. Si la lista no esta en la cima, la lista es llevada a la ci...
int pds_list_string_is_bottom(const PdsListString *L)
Retorna TRUE si L apunta el nodo que esta en el bottom de la lista.
PdsListString * pds_list_string_new(void)
Crea una lista de tipo PdsListString vacia.
int pds_list_string_bottom(PdsListString **L)
Busca el elemento inicial; inferior; de la lista.
int pds_list_string_detailed_printf(const PdsListString *L)
Imprime en pantalla detalladamente los datos de un nodo de tipo puntero PdsListString.
struct PdsListString * AddPrev
Definition: pdslstring.h:72
struct PdsListString * AddNext
Definition: pdslstring.h:76
int pds_list_string_all_printf(const PdsListString *L)
Imprime en pantalla todos los datos de la lista.
int pds_list_string_shift(PdsListString **L)
Quita el elemento inicial;mas antiguo; de la lista, si no hay elementos retorna FALSE.
void pds_list_string_free(PdsListString *L)
Libera una lista entera de tipo puntero PdsListString.
int pds_list_string_is_top(const PdsListString *L)
Retorna TRUE si L apunta el nodo que esta en el top de la lista.
int pds_list_string_all_detailed_printf(const PdsListString *L)
Imprime en pantalla todos los datos de la lista detalladamente.
void pds_list_string_destroy(PdsListString **L)
Libera una lista de tipo puntero PdsListString, y limpia el puntero con NULL.
int pds_list_string_read(PdsListString **Lprev, char **string_data)
Lee una cadena de texto, en la lista actual y se coloca en el siguiente nodo de la lista...
Una estructura tipo PdsListString . Esta estructura genera una doblemente enlazada lista de cadenas t...
Definition: pdslstring.h:69
int pds_list_string_pop(PdsListString **L)
Quita un elemento de la lista. Si no hay elementos retorna FALSE.
int pds_list_string_is_empty(const PdsListString *L)
Indica si la lista está vacía.
int pds_list_string_get_length(const PdsListString *L)
Cuenta la cantidad de nodos de la lista. Es considerada una lista con cero nodos cuando no exiten nod...

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed