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_USL "USL" /* verify */
130 #define _DtPLATFORM_SCO "SCO" /* verify */
131 #define _DtPLATFORM_XENIX "Xenix" /* verify */
137 const char * databaseName,
138 _DtXlateDb * ret_db);
140 int _DtXlateOpenAndMergeDbs(
141 const char * databaseName,
144 int _DtXlateMergeDbs(
145 _DtXlateDb * io_dbToMerge,
146 _DtXlateDb * io_mergeIntoDb);
148 int _DtXlateOpenAllDbs(
149 const char * searchPaths,
150 const char * databaseName,
151 _DtXlateDb * ret_db);
156 int _DtXlateStdToOpValue(
158 const char * platform,
160 const char * operation,
161 const char * stdValue,
162 char * * ret_opValue,
163 void * ret_reserved);
165 int _DtXlateOpToStdValue(
167 const char * platform,
169 const char * operation,
170 const char * opValue,
171 char * * ret_stdValue,
172 void * ret_reserved);
174 int _DtXlateGetXlateEnv(
176 char * ret_AppExecEnvPlatform,
177 int * ret_AppExecEnvVersion,
178 int * ret_XlateCompiledForOSVersion);
180 /* Non DtXlate functions currently in XlationSvc.c */
185 const char * * ret_ptr );
191 const char * * ret_ptr );
197 #endif /*_DtXLATE_XLATION_SVC_I*/
198 /********* do not put anything below this line ********/