1 #ifndef _WORD_H_INCLUDED_ 2 #define _WORD_H_INCLUDED_ 3 4 /*============================================================================= 5 GNU UnRTF, a command-line program to convert RTF documents to other formats. 6 Copyright (C) 2000,2001,2004 by Zachary Smith 7 8 This program is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 3 of the License, or 11 (at your option) any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with this program; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 22 The maintainer is reachable by electronic mail at daved@physiol.usyd.edu.au 23 =============================================================================*/ 24 25 26 /*---------------------------------------------------------------------- 27 * Module name: word.h 28 * Author name: Zachary Smith 29 * Create date: 1 Sept 2000 30 * Purpose: Definitions for Word class. 31 *---------------------------------------------------------------------- 32 * Changes: 33 * 29 Mar 05, daved@physiol.usyd.edu.au: changes requested by ZT Smith 34 * 16 Dec 07, daved@physiol.usyd.edu.au: updated to GPL v3 35 * 09 Nov 08, arkadiusz.firus@gmail.com: add word_optimise 36 * 25 Sep 11, jf@dockes.org: reposition top #ifndef 37 *--------------------------------------------------------------------*/ 38 39 typedef struct _w 40 { 41 const char *str; 42 struct _w *next; 43 struct _w *child; 44 } Word; 45 46 extern Word *word_new(char *); 47 extern void word_free(Word *); 48 extern Word *word_read(FILE *); 49 extern const char *word_string(Word *); 50 extern void word_dump(Word *); 51 extern void word_print_html(Word *); 52 53 #ifndef MAX_GROUP_DEPTH 54 #define MAX_GROUP_DEPTH 1000 55 #endif 56 57 extern Word *optimize_word(Word *, int depth); 58 59 typedef struct _t 60 { 61 char *name; 62 int has_param; 63 } Tag; 64 65 #define OPT_ARRAY \ 66 {\ 67 {"\\fs", 1},\ 68 {"\\f", 1},\ 69 {"", 0}\ 70 } 71 72 #endif /* _WORD_H_INCLUDED_ */ 73