diff options
author | lluís gómez i bigordà <lluisbigorda@users.sourceforge.net> | 2007-10-24 20:37:21 +0000 |
---|---|---|
committer | lluís gómez i bigordà <lluisbigorda@users.sourceforge.net> | 2007-10-24 20:37:21 +0000 |
commit | 3c050000c6918b77a353583999e6e810aa675fda (patch) | |
tree | fc6aab7c92efb156966f5c926517f2f02e7b417e /videogrid/cua.h |
This commit was generated by cvs2svn to compensate for changes in r8875,svn2git-root
which included commits to RCS files with non-trunk default branches.
svn path=/trunk/externals/pdvjtools/; revision=8876
Diffstat (limited to 'videogrid/cua.h')
-rw-r--r-- | videogrid/cua.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/videogrid/cua.h b/videogrid/cua.h new file mode 100644 index 0000000..4144770 --- /dev/null +++ b/videogrid/cua.h @@ -0,0 +1,47 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +/* nombre de caracters per el nom del path del fitxer */ +#define BYTESNOMFITXER 512 + +typedef char path[BYTESNOMFITXER]; + +/* estructures i tipus de dades de la cua */ + +/* estructura de dades: un node de la cua */ +struct node +{ + /* nom del path de la imatge */ + path pathFitxer; + /* apuntador al següent node en cua */ + struct node *seguent; +}; + +/* definició del tipus node */ +typedef struct node Node; + +/* definició del tipus de cua */ +typedef struct +{ + Node *davanter; + Node *final; +}Cua; + + +/* declaracions de les funcions */ + +/* crea una cua */ +void crearCua(Cua *cua); +/* encuara un element al final de la cua */ +void encuar (Cua *cua, path x); +/* elimina un element de la cua */ +int desencuar (Cua *cua); +/* retorna si la cua és buida */ +int cuaBuida(Cua *cua); +/* elimina el contingut de la cua */ +void eliminarCua(Cua *cua); +/* retorna el nombre de nodes de la cua */ +int numNodes(Cua *cua); +/* escriu el contingut de la cua */ +void escriuCua(Cua *cua); |