Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / DtHelp / FormatUtilI.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: FormatUtilI.h /main/9 1996/05/09 03:42:14 drk $ */
24 /*************************************<+>*************************************
25  ****************************************************************************
26  **
27  **   File:        FormatUtilI.h
28  **
29  **   Project:     TextGraphic Display routines
30  **
31  **  
32  **   Description: Header file for FormatUtil.c
33  **
34  **
35  **  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
36  **
37  **  (c) Copyright 1993, 1994 Hewlett-Packard Company
38  **  (c) Copyright 1993, 1994 International Business Machines Corp.
39  **  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
40  **  (c) Copyright 1993, 1994 Novell, Inc.
41  **
42  **
43  ****************************************************************************
44  ************************************<+>*************************************/
45 #ifndef _DtHelpFormatUtilI_h
46 #define _DtHelpFormatUtilI_h
47
48 /********    Semi-Private Structure Declarations    ********/
49 typedef struct  sdlMatchData {
50         int     clan;
51         int     level;
52         char    *ssi;
53 } SdlMatchData;
54
55 typedef struct  _frmtUiInfo {
56         _DtCvValue      (*load_graphic)();
57         _DtCvValue      (*resolve_spc)();
58         void            (*load_font)();
59         int             (*exec_filter)();
60         void            (*destroy_region)();
61         _DtCvPointer    client_data;
62         _DtCvUnit       line_width;
63         _DtCvUnit       line_height;
64         _DtCvUnit       leading;
65         int             avg_char;
66         short           nl_to_space;
67 } _FrmtUiInfo;
68
69 typedef struct  _frmtPrivateInfo {
70         char             top_block;
71         char             dup_flag;
72         int              sdl_el_type;
73         int              interp;
74         void            *match_info;
75         void            *id_info;
76         void            *doc_info;
77         void            *entry;
78         void            *toss;
79         void            *lang_char;
80         char            *abbrev;
81 } FrmtPrivateInfo;
82
83 /********    Semi-Private Function Declarations    ********/
84 extern  int     _DtHelpCeAddCharToBuf (
85                         char    **src,
86                         char    **dst,
87                         int      *dst_size,
88                         int      *dst_max,
89                         int       grow_size );
90 extern  int     _DtHelpCeAddOctalToBuf(
91                         char     *src,
92                         char    **dst,
93                         int      *dst_size,
94                         int      *dst_max,
95                         int       grow_size );
96 extern  int     _DtHelpCeAddStrToBuf (
97                         char    **src,
98                         char    **dst,
99                         int      *dst_size,
100                         int      *dst_max,
101                         int       copy_size,
102                         int       grow_size );
103 extern _DtCvSegment *_DtHelpAllocateSegments (
104                         int          malloc_size);
105 extern  int     _DtHelpCeGetMbLen(
106                         char    *lang,
107                         char    *char_set);
108 extern  int     _DtHelpCeGetNxtBuf(
109                         BufFilePtr        file,
110                         char             *dst,
111                         char            **src,
112                         int               max_size);
113 extern  char *  _DtHelpGetNxtToken (
114                         char             *str,
115                         char            **retToken);
116 extern  int     _DtHelpCeReadBuf(
117                         BufFilePtr       file,
118                         char            *buffer,
119                         int              size);
120 extern  int     _DtHelpFmtFindBreak(
121                         char            *ptr,
122                         int              mb_len,
123                         int             *num_chars);
124 extern  void    _DtHelpLoadMultiInfo(
125                         wchar_t         **cant_begin_chars,
126                         wchar_t         **cant_end_chars,
127                         short            *nl_to_space);
128
129 /********    Semi-Private Macro Declarations    ********/
130 #define FrmtPrivInfoPtr(x)      ((FrmtPrivateInfo *) (x)->client_use)
131
132 #endif /* _DtHelpFormatUtilI_h */