/*************************************************************************** * Copyright (C) 2006 by Kessia Pinheiro * * kessiapinheiro@gmail.com * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef TRABALHO_H_ #define TRABALHO_H_ #define DIM_LINHA 51 #define DIM_WORD 30 #define MAX 5 /**************************************************************** * Define duas estruturas para o vetor de ponteiros (heads) * * para uma arvore de busca binaria contendo cada palavra * ****************************************************************/ typedef struct S_nodeTree ListWord; struct S_nodeTree{ char word[DIM_WORD]; ListWord *pleftWord; ListWord *prightWord; }; typedef struct S_nodeWord ListAlpha; struct S_nodeWord { char word[DIM_WORD]; ListAlpha *pnextWord; ListAlpha *pbackWord; }; typedef struct S_nodeVet VetList; struct S_nodeVet { ListWord *VetL[MAX]; }; /************************************************************* * Fim das estruturas para o vetor de arvores de palavras * *************************************************************/ /*********************************************************** * Define duas estruturas para uma lista simplesmente * * encadeada contendo o conteudo de toda a linha. Cada * * paragrafo é ligado com o seguinte. * ***********************************************************/ typedef struct S_nodeLine ListLine; struct S_nodeLine { int line; char caracter[51]; ListLine *pnextLine; }; typedef struct S_nodeParagraph ParagList; struct S_nodeParagraph { int paragraph; ParagList *pnextParagraph; ListLine *pnodeParagraph; }; /*********************************************************** * Fim das estruturas para a lista de paragrafos * ***********************************************************/ #endif /*TRABALHO_H_*/