XlationSvc: remove a "'" added in previous spelling commit that causes warnings
[oweals/cde.git] / cde / lib / DtSvc / DtUtil2 / XlationSvc.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 libraries 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: XlationSvc.h /main/6 1996/08/22 09:07:18 rswiston $ */
24 /************************************<+>*************************************
25  ****************************************************************************
26  **
27  **   File:        XlationSvc.h
28  **
29  **   Project:     DtXlate
30  **
31  **   Description: table-based translation services
32  **
33  **   (c) Copyright 1993, 1994 Hewlett-Packard Company
34  **   (c) Copyright 1993, 1994 International Business Machines Corp.
35  **   (c) Copyright 1993, 1994 Sun Microsystems, Inc.
36  **   (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of Novell, Inc.
37  **
38  ****************************************************************************
39  ************************************<+>*************************************/
40
41
42 #ifndef _DtXLATE_XLATION_SVC_I
43 #define _DtXLATE_XLATION_SVC_I
44
45 #include <sys/utsname.h>      /* for UTSLEN, SYS_NMLN */
46
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50
51 /*=================================================================
52 $SHAREDBEG$: This header appears in all appropriate DtXlate topics
53 $INCLUDE$
54 #include <XlationSvc.h>
55 =$END$==========================================================*/
56
57
58 #if DOC
59 /*========================================================*/
60 $TYPEBEG$: _DtXlateDb
61 $1LINER$:  An opaque object used to represent translation dbs
62 $SUMMARY$:
63 _DtXlateDb is the type of a translation database object.
64 The database object must be opened before use and closed
65 after use.  The definition of the object is opaque to users.
66 $ARGS$:
67 /*================================================$SKIP$==*/
68 #endif
69 /*$DEF$*/
70 typedef struct __DtXlateDbRec * _DtXlateDb;
71 /*$END$*/
72
73
74 #if DOC
75 /*========================================================*/
76 $CONSTBEG$: _DtXLATE_OPER_xxx
77 $1LINER$:  Constants for specifying operations 
78 $SUMMARY$:
79 The _DtXLATE_OPER_xxx are constants that produce strings 
80 used in the translation specifications when specifying
81 the operation of a translation.
82
83 The operation string name must be identical both in the
84 source code and in the translation table.
85 These constants should be used whenever referencing
86 operations as part of a translation.
87 /*================================================$SKIP$==*/
88 #endif
89 /* $DEF$, Operation constants */
90 #define _DtXLATE_OPER_VERSION  "version"
91 /*$END$*/
92
93 #if DOC
94 /*========================================================*/
95 $CONSTBEG$: _DtPLATFORM_xxx
96 $1LINER$:  Constants for specifying platforms strings
97 $SUMMARY$:
98 The _DtPLATFORM_xxx are constants that produce strings 
99 used in the translation specifications and when performing
100 a translation using the API.  Recall that the platform name must
101 be an exact match if specified as translation criteria.
102 These names are the same strings returned by 'uname(1) -s'
103 and uname(2):utsname.sysname.
104
105 The operation string name must be identical both in the
106 source code and in the translation table.
107 These constants should be used whenever referencing
108 platforms as part of a translation.
109 /*================================================$SKIP$==*/
110 #endif
111 /* $DEF$, Platform constants */
112 #if defined(SVR4) || defined(_AIX)
113 #define _DtPLATFORM_MAX_LEN SYS_NMLN
114 #else
115 #if defined(SYS_NMLN)
116 #define _DtPLATFORM_MAX_LEN SYS_NMLN
117 #else
118 #define _DtPLATFORM_MAX_LEN UTSLEN
119 #endif
120 #endif
121
122 #define _DtPLATFORM_UNKNOWN ((const char *)0)
123 #define _DtPLATFORM_CURRENT ((const char *)0)
124 #define _DtPLATFORM_CDE     "CDE"
125 #define _DtPLATFORM_HPUX    "HP-UX"
126 #define _DtPLATFORM_AIX     "AIX"
127 #define _DtPLATFORM_SUNOS   "SunOS"
128 #define _DtPLATFORM_SOLARIS "Solaris"      /* verify */
129 #define _DtPLATFORM_XENIX   "Xenix"        /* verify */
130 /*$END$*/
131
132
133 /* Functions */
134 int _DtXlateOpenDb(
135        const char *  databaseName,
136        _DtXlateDb *  ret_db);
137
138 int _DtXlateOpenAndMergeDbs(
139        const char *   databaseName,
140        _DtXlateDb *   io_db);
141
142 int  _DtXlateMergeDbs(
143        _DtXlateDb *  io_dbToMerge,
144        _DtXlateDb *  io_mergeIntoDb);
145
146 int _DtXlateOpenAllDbs(
147          const char * searchPaths,
148          const char * databaseName,
149          _DtXlateDb * ret_db);
150
151 int _DtXlateCloseDb(
152        _DtXlateDb * io_db);
153
154 int _DtXlateStdToOpValue(
155        _DtXlateDb        db,
156        const char *      platform,
157        const int         version,
158        const char *      operation,
159        const char *      stdValue,
160        char * *          ret_opValue,
161        void *            ret_reserved);
162
163 int _DtXlateOpToStdValue(
164        _DtXlateDb        db,
165        const char *      platform,
166        const int         version,
167        const char *      operation,
168        const char *      opValue,
169        char * *          ret_stdValue,
170        void *            ret_reserved);
171
172 int _DtXlateGetXlateEnv(
173          _DtXlateDb db,
174          char *     ret_AppExecEnvPlatform,
175          int *      ret_AppExecEnvVersion,
176          int *      ret_XlateCompiledForOSVersion);
177
178 /* Non DtXlate functions currently in XlationSvc.c */
179 int _DtMBStrrchr (
180     const char *   s1,
181     int            value,
182     int            max_len,
183     const char * * ret_ptr );
184
185 int _DtMBStrchr (
186     const char * s1,
187     int          value,
188     int          max_len,
189     const char * * ret_ptr );
190
191 #ifdef __cplusplus
192 }
193 #endif
194
195 #endif /*_DtXLATE_XLATION_SVC_I*/
196 /********* do not put anything below this line ********/