dtcalc: change from obsoleted MAXFLOAT to FLT_MAX from std C
[oweals/cde.git] / cde / lib / DtHelp / UtilSDLI.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: UtilSDLI.h /main/8 1996/01/29 12:21:37 cde-hp $ */
24 /*************************************<+>*************************************
25  *****************************************************************************
26  **
27  **  File:        UtilSDLI.h
28  **
29  **  Project:     Cde Help System
30  **
31  **  Description: Internal header file for UtilSDL.c
32  **
33  **  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
34  **
35  **  (c) Copyright 1993, 1994 Hewlett-Packard Company
36  **  (c) Copyright 1993, 1994 International Business Machines Corp.
37  **  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
38  **  (c) Copyright 1993, 1994 Novell, Inc.
39  **
40  *****************************************************************************
41  *************************************<+>*************************************/
42 #ifndef _DtHelpUtilSDLI_h
43 #define _DtHelpUtilSDLI_h
44
45
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49
50 /********     Private Define Declarations    ********/
51 #define DTD_NAMELEN     64
52 /******** End Private Define Declarations    ********/
53
54 enum    _sdlFontMode
55   {
56     _SdlFontModeResolve,
57     _SdlFontModeSave,
58     _SdlFontModeNone
59   };
60
61 typedef enum _sdlFontMode  _SdlFontMode;
62
63 /********    Private Macro Declarations    ********/
64
65 #define _SdlContainerPtrOfSeg(x)        (&((x)->handle.container))
66
67 /********    Private Function Declarations    ********/
68
69 extern  int     _DtHelpCeAllocateFontStruct (
70                         int               num,
71                         _DtHelpFontHints **ret_ptr);
72 extern  _DtCvString *_DtHelpCeAllocStrStruct(void);
73 extern  void    _DtHelpCeAddSegToList(
74                         _DtCvSegment       *seg_ptr,
75                         _DtCvSegment      **seg_list,
76                         _DtCvSegment      **last_seg);
77 extern  int     _DtHelpCeAllocSegment (
78                         int                 malloc_size,
79                         int                *alloc_size,
80                         _DtCvSegment      **next_seg,
81                         _DtCvSegment      **ret_seg);
82 extern  int     _DtHelpCeFindSkipSdlElementEnd(
83                         BufFilePtr        f);
84 extern  int     _DtHelpCeGetSdlAttribute (
85                         BufFilePtr       f,
86                         int              max_len,
87                         char            *attribute_name);
88 extern  int     _DtHelpCeGetSdlAttributeCdata (
89                         BufFilePtr        f,
90                         _DtCvValue        limit,
91                         char            **string);
92 extern  int     _DtHelpCeGetSdlCdata (
93                         BufFilePtr        f,
94                         SdlOption         type,
95                         int               char_len,
96                         _DtCvValue        nl_to_space,
97                         _DtCvValue       *cur_space,
98                         _DtCvValue       *cur_nl,
99                         _DtCvValue       *cur_mb,
100                         char             *non_break_char,
101                         char            **string,
102                         int              *str_max);
103 extern  int     _DtHelpCeGetSdlId (
104                         BufFilePtr        f,
105                         char            **id_value);
106 extern  int     _DtHelpCeGetSdlNumber (
107                         BufFilePtr       f,
108                         char            *number_string);
109 extern  int     _DtHelpCeMatchSdlElement (
110                         BufFilePtr       f,
111                         const char      *element_str,
112                         int              sig_chars);
113 extern  _DtCvSegment *_DtHelpCeMatchSemanticStyle (
114                         _DtCvSegment    *toss,
115                         SdlOption        clan,
116                         int              level,
117                         char            *ssi);
118 extern  void    _DtHelpCeMergeSdlAttribInfo(
119                         _DtCvSegment           *src_toss,
120                         _DtCvSegment        *dst_contain,
121                         _DtHelpFontHints    *dst_fonts,
122                         void                *el_info,
123                         unsigned long       *str1_values,
124                         unsigned long       *str2_values);
125 extern  int     _DtHelpCeReturnSdlElement (
126                         BufFilePtr        f,
127                         const SDLElementInfo *el_list,
128                         _DtCvValue        cdata_flag,
129                         enum SdlElement *ret_el_define,
130                         char            **ret_data,
131                         _DtCvValue       *ret_end_flag);
132 extern  int     _DtHelpCeSaveString (
133                         _DtCvPointer        client_data,
134                         _DtCvSegment      **seg_list,
135                         _DtCvSegment      **last_seg,
136                         _DtCvSegment      **prev_seg,
137                         char               *string,
138                         _DtHelpFontHints   *font_specs,
139                         int                 link_index,
140                         int                 multi_len,
141                         int                 flags,
142                         void               (*load_font)(),
143                         _SdlFontMode        resolve_font,
144                         _DtCvValue          newline);
145 extern  int     _DtHelpCeSkipCdata (
146                         BufFilePtr      f,
147                         _DtCvValue      flag);
148
149 #ifdef __cplusplus
150 }  /* Close scope of 'extern "C"' declaration which encloses file. */
151 #endif
152
153 #endif /* _DtHelpUtilSDLI_h */
154 /* DON'T ADD ANYTHING AFTER THIS #endif */