2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
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
23 /* $XConsortium: XlationSvc.h /main/6 1996/08/22 09:07:18 rswiston $ */
24 /************************************<+>*************************************
25 ****************************************************************************
31 ** Description: table-based translation services
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.
38 ****************************************************************************
39 ************************************<+>*************************************/
42 #ifndef _DtXLATE_XLATION_SVC_I
43 #define _DtXLATE_XLATION_SVC_I
45 #include <sys/utsname.h> /* for UTSLEN, SYS_NMLN */
51 /*=================================================================
52 $SHAREDBEG$: This header appears in all appropriate DtXlate topics
54 #include <XlationSvc.h>
55 =$END$==========================================================*/
59 /*========================================================*/
61 $1LINER$: An opaque object used to represent translation dbs
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.
67 /*================================================$SKIP$==*/
70 typedef struct __DtXlateDbRec * _DtXlateDb;
75 /*========================================================*/
76 $CONSTBEG$: _DtXLATE_OPER_xxx
77 $1LINER$: Constants for specifying operations
79 The _DtXLATE_OPER_xxx are constants that produce strings
80 used in the translation specifications when specifying
81 the operation of a translation.
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$==*/
89 /* $DEF$, Operation constants */
90 #define _DtXLATE_OPER_VERSION "version"
94 /*========================================================*/
95 $CONSTBEG$: _DtPLATFORM_xxx
96 $1LINER$: Constants for specifying platforms strings
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.
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$==*/
111 /* $DEF$, Platform constants */
112 #if defined(SVR4) || defined(_AIX)
113 #define _DtPLATFORM_MAX_LEN SYS_NMLN
115 #if defined(SYS_NMLN)
116 #define _DtPLATFORM_MAX_LEN SYS_NMLN
118 #define _DtPLATFORM_MAX_LEN UTSLEN
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 */
135 const char * databaseName,
136 _DtXlateDb * ret_db);
138 int _DtXlateOpenAndMergeDbs(
139 const char * databaseName,
142 int _DtXlateMergeDbs(
143 _DtXlateDb * io_dbToMerge,
144 _DtXlateDb * io_mergeIntoDb);
146 int _DtXlateOpenAllDbs(
147 const char * searchPaths,
148 const char * databaseName,
149 _DtXlateDb * ret_db);
154 int _DtXlateStdToOpValue(
156 const char * platform,
158 const char * operation,
159 const char * stdValue,
160 char * * ret_opValue,
161 void * ret_reserved);
163 int _DtXlateOpToStdValue(
165 const char * platform,
167 const char * operation,
168 const char * opValue,
169 char * * ret_stdValue,
170 void * ret_reserved);
172 int _DtXlateGetXlateEnv(
174 char * ret_AppExecEnvPlatform,
175 int * ret_AppExecEnvVersion,
176 int * ret_XlateCompiledForOSVersion);
178 /* Non DtXlate functions currently in XlationSvc.c */
183 const char * * ret_ptr );
189 const char * * ret_ptr );
195 #endif /*_DtXLATE_XLATION_SVC_I*/
196 /********* do not put anything below this line ********/