Silence lots of warnings in lib/DtHelp.
[oweals/cde.git] / cde / lib / DtHelp / Obsolete.c
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: Obsolete.c /main/4 1996/05/09 03:44:04 drk $ */
24 /************************************<+>*************************************
25  ****************************************************************************
26  **
27  **   File:        Obsolete.c
28  **
29  **   Project:     Run Time Project File Access
30  **
31  **   Description: This module is for backwards compatibility only.
32  **                These internal routines are used by dthelpview,
33  **                dthelpgen and dthelpprint.
34  **
35  **
36  **  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 Hewlett-Packard Company
37  **
38  **  (c) Copyright 1993, 1994 Hewlett-Packard Company
39  **  (c) Copyright 1993, 1994 International Business Machines Corp.
40  **  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
41  **  (c) Copyright 1993, 1994 Novell, Inc.
42  **
43  **
44  ****************************************************************************
45  ************************************<+>*************************************/
46
47 /*
48  * system includes
49  */
50 #include <stdlib.h>
51
52 /*
53  * Canvas Engine
54  */
55 #include "CanvasP.h"
56
57 /*
58  * private includes
59  */
60 #include "ObsoleteP.h"
61 #include "bufioI.h"
62 #include "Access.h"
63 #include "AccessI.h"
64
65 #ifdef NLS16
66 #endif
67
68 /********    Private Defines      ********/
69 /********    End Private Defines  ********/
70
71 /********    Private Function Declarations    ********/
72 /********    End Private Function Declarations    ********/
73 /********    Private Macro Declarations        ********/
74 /********    End Private Macro Declarations    ********/
75
76 /******************************************************************************
77 *
78 * Private variables used within this file.
79 *
80 *******************************************************************************/
81 /******************************************************************************
82  *                             Private Functions
83  ******************************************************************************/
84 /******************************************************************************
85  *                          Semi-Public Functions
86  ******************************************************************************/
87 /******************************************************************************
88  * Function:    int _DtHelpCeOpenVolume (char *volFile, _DtHelpVolume *retVol);
89  *
90  * Parameters:  volFile         Specifies the name of the Help Volume file
91  *                              to load.
92  *
93  *              retVol          Returns the handle to the loaded volume.
94  *                              If a volume is opened several times, the
95  *                              same handle will be returned each time.
96  *
97  * Return Value:                0 if successful, -1 if a failure occurred.
98  *
99  * Purpose:     This function must be called to open a Help Volume file
100  *              before any of the information in the volume can be
101  *              accessed. 
102  *
103  * Used by:     dthelpgen 1.0
104  *
105  ******************************************************************************/
106 int 
107 _DtHelpCeOpenVolume (
108     CanvasHandle canvas_handle,
109     char        *volFile, 
110     VolumeHandle  *retVol)
111 {
112     return (_DtHelpOpenVolume(volFile, retVol));
113 }
114
115 /******************************************************************************
116  * Function:    int _DtHelpCeCloseVolume (VolumeHandle vol);
117  *
118  * Parameters:  vol     Specifies the loaded volume.
119  *
120  * Return Value: 0 if successful, -1 if a failure occurs
121  *
122  * Purpose:     When the volume is no longer needed, it should be
123  *              closed with this call.  If the volume has been opened
124  *              several times, closing it will just decrement the
125  *              reference count.  When it has been closed as many times
126  *              as it was opened, the memory it is using will be freed
127  *              and any handles to the volume will be invalid.
128  *
129  * Used by:     dthelpgen 1.0
130  *
131  ******************************************************************************/
132 int
133 _DtHelpCeCloseVolume (
134      CanvasHandle       canvas,
135      VolumeHandle       volume)
136 {
137     return(_DtHelpCloseVolume(volume));
138 }
139
140 /*****************************************************************************
141  * Function: int _DtHelpCeGetTopicTitle (CanvasHandle canvas_handle,
142  *                                      VolumeHandle volume,
143  *                                      char *id, char **ret_title)
144  *
145  * Parameters:  volume          Specifies the volume containing the id.
146  *              id              Specifies the id for the topic desired.
147  *              ret_title       Returns a null terminated string containing
148  *                              the title.
149  *
150  * Memory own by caller:
151  *              ret_title
152  *
153  * Returns:     0 if successful, -2 if didn't find the id,
154  *              otherwise -1.
155  *
156  * Purpose:     Get the title of a topic.
157  *
158  *****************************************************************************/
159 int
160 _DtHelpCeGetTopicTitle (
161     CanvasHandle          canvas,
162     VolumeHandle          volume,
163     char                 *id,
164     char                **ret_title)
165 {
166     return(_DtHelpGetTopicTitle(volume, id, ret_title));
167 }
168
169 /*****************************************************************************
170  * Function:    void _DtHelpCeDestroyCanvas (CanvasHandle canvas);
171  *
172  * Parameters:
173  *              canvas          Specifies the handle for the canvas.
174  *
175  * Returns:     A handle to the canvas or NULL if an error occurs.
176  *
177  * Purpose:     Create a canvas and attach the appropriate virtual functions
178  *              to the canvas.
179  *****************************************************************************/
180 void
181 _DtHelpCeDestroyCanvas (CanvasHandle canvas)
182 {
183     _DtCanvasDestroy(canvas);
184 }
185
186 /*****************************************************************************
187  * Function: char * _DtHelpCeGetVolumeLocale (_DtHelpVolume vol)
188  *
189  * Parameters:  vol             Specifies the loaded volume
190  *
191  * Returns:     The pointer to the locale string if successful. Otherwise
192  *              NULL.
193  *
194  * Purpose:     Get the locale of the specified volume.
195  *              Returns the locale in a unix specific format
196  *              - locale[_ter][.charset] - This memory is owned by
197  *              the caller.
198  *
199  *****************************************************************************/
200 char *
201 _DtHelpCeGetVolumeLocale (
202         VolumeHandle    volume)
203 {
204     return (_DtHelpGetVolumeLocale(volume));
205
206 }  /* End _DtHelpCeGetVolumeLocale */