123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- /*
- * CDE - Common Desktop Environment
- *
- * Copyright (c) 1993-2012, The Open Group. All rights reserved.
- *
- * These libraries and programs are free software; you can
- * redistribute them and/or modify them under the terms of the GNU
- * Lesser General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * These libraries and programs are distributed in the hope that
- * they will be useful, but WITHOUT ANY WARRANTY; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more
- * details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with these libraries and programs; if not, write
- * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
- * Floor, Boston, MA 02110-1301 USA
- */
- /* $XConsortium: XlationSvc.h /main/6 1996/08/22 09:07:18 rswiston $ */
- /************************************<+>*************************************
- ****************************************************************************
- **
- ** File: XlationSvc.h
- **
- ** Project: DtXlate
- **
- ** Description: table-based translation services
- **
- ** (c) Copyright 1993, 1994 Hewlett-Packard Company
- ** (c) Copyright 1993, 1994 International Business Machines Corp.
- ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
- ** (c) Copyright 1993, 1994 Unix System Labs, Inc., a subsidiary of Novell, Inc.
- **
- ****************************************************************************
- ************************************<+>*************************************/
- #ifndef _DtXLATE_XLATION_SVC_I
- #define _DtXLATE_XLATION_SVC_I
- #include <sys/utsname.h> /* for UTSLEN, SYS_NMLN */
- #ifdef __cplusplus
- extern "C" {
- #endif
- /*=================================================================
- $SHAREDBEG$: This header appears in all appropriate DtXlate topics
- $INCLUDE$
- #include <XlationSvc.h>
- =$END$==========================================================*/
- #if DOC
- /*========================================================*/
- $TYPEBEG$: _DtXlateDb
- $1LINER$: An opaque object used to represent translation dbs
- $SUMMARY$:
- _DtXlateDb is the type of a translation database object.
- The database object must be opened before use and closed
- after use. The definition of the object is opaque to users.
- $ARGS$:
- /*================================================$SKIP$==*/
- #endif
- /*$DEF$*/
- typedef struct __DtXlateDbRec * _DtXlateDb;
- /*$END$*/
- #if DOC
- /*========================================================*/
- $CONSTBEG$: _DtXLATE_OPER_xxx
- $1LINER$: Constants for specifying operations
- $SUMMARY$:
- The _DtXLATE_OPER_xxx are constants that produce strings
- used in the translation specifications when specifying
- the operation of a translation.
- The operation string name must be identical both in the
- source code and in the translation table.
- These constants should be used whenever referencing
- operations as part of a translation.
- /*================================================$SKIP$==*/
- #endif
- /* $DEF$, Operation constants */
- #define _DtXLATE_OPER_VERSION "version"
- /*$END$*/
- #if DOC
- /*========================================================*/
- $CONSTBEG$: _DtPLATFORM_xxx
- $1LINER$: Constants for specifying platforms strings
- $SUMMARY$:
- The _DtPLATFORM_xxx are constants that produce strings
- used in the translation specifications and when performing
- a translation using the API. Recall that the platform name must
- be an exact match if specified as translation criteria.
- These names are the same strings returned by 'uname(1) -s'
- and uname(2):utsname.sysname.
- The operation string name must be identical both in the
- source code and in the translation table.
- These constants should be used whenever referencing
- platforms as part of a translation.
- /*================================================$SKIP$==*/
- #endif
- /* $DEF$, Platform constants */
- #if defined(SVR4) || defined(_AIX) || defined(SYS_NMLN)
- #define _DtPLATFORM_MAX_LEN SYS_NMLN
- #elif defined(UTSLEN)
- #define _DtPLATFORM_MAX_LEN UTSLEN
- #else
- /* POSIX guarantees that hostnames are limited to 255 bytes,
- * but SVR4 platforms commonly allow for 256.
- */
- #define _DtPLATFORM_MAX_LEN 257
- #endif
- #define _DtPLATFORM_UNKNOWN ((const char *)0)
- #define _DtPLATFORM_CURRENT ((const char *)0)
- #define _DtPLATFORM_CDE "CDE"
- #define _DtPLATFORM_AIX "AIX"
- #define _DtPLATFORM_SUNOS "SunOS"
- #define _DtPLATFORM_SOLARIS "Solaris" /* verify */
- /*$END$*/
- /* Functions */
- int _DtXlateOpenDb(
- const char * databaseName,
- _DtXlateDb * ret_db);
- int _DtXlateOpenAndMergeDbs(
- const char * databaseName,
- _DtXlateDb * io_db);
- int _DtXlateMergeDbs(
- _DtXlateDb * io_dbToMerge,
- _DtXlateDb * io_mergeIntoDb);
- int _DtXlateOpenAllDbs(
- const char * searchPaths,
- const char * databaseName,
- _DtXlateDb * ret_db);
- int _DtXlateCloseDb(
- _DtXlateDb * io_db);
- int _DtXlateStdToOpValue(
- _DtXlateDb db,
- const char * platform,
- const int version,
- const char * operation,
- const char * stdValue,
- char * * ret_opValue,
- void * ret_reserved);
- int _DtXlateOpToStdValue(
- _DtXlateDb db,
- const char * platform,
- const int version,
- const char * operation,
- const char * opValue,
- char * * ret_stdValue,
- void * ret_reserved);
- int _DtXlateGetXlateEnv(
- _DtXlateDb db,
- char * ret_AppExecEnvPlatform,
- int * ret_AppExecEnvVersion,
- int * ret_XlateCompiledForOSVersion);
- /* Non DtXlate functions currently in XlationSvc.c */
- int _DtMBStrrchr (
- const char * s1,
- int value,
- int max_len,
- const char * * ret_ptr );
- int _DtMBStrchr (
- const char * s1,
- int value,
- int max_len,
- const char * * ret_ptr );
- #ifdef __cplusplus
- }
- #endif
- #endif /*_DtXLATE_XLATION_SVC_I*/
- /********* do not put anything below this line ********/
|