Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / DtSvc / DtUtil2 / DtosP.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 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 /* $TOG: DtosP.h /main/4 1998/01/21 16:37:29 mgreess $ */
24 /*
25  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
26  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
27  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
28  * (c) Copyright 1993, 1994 Novell, Inc.                                *
29  */
30 #ifdef REV_INFO
31 #ifndef lint
32 static char SCCSID[] = "OSF/Motif: @(#)_DtosP.h 4.16 91/09/12";
33 #endif /* lint */
34 #endif /* REV_INFO */
35 /******************************************************************************
36 *******************************************************************************
37 *
38 *  (c) Copyright 1989, 1990, 1991 OPEN SOFTWARE FOUNDATION, INC.
39 *  (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
40 *  (c) Copyright 1987, 1988, 1989, 1990, 1991 HEWLETT-PACKARD COMPANY
41 *  ALL RIGHTS RESERVED
42 *  
43 *       THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED
44 *  AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND
45 *  WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR
46 *  ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE
47 *  AVAILABLE TO ANY OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF THE
48 *  SOFTWARE IS HEREBY TRANSFERRED.
49 *  
50 *       THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
51 *  NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY OPEN SOFTWARE
52 *  FOUNDATION, INC. OR ITS THIRD PARTY SUPPLIERS  
53 *  
54 *       OPEN SOFTWARE FOUNDATION, INC. AND ITS THIRD PARTY SUPPLIERS,
55 *  ASSUME NO RESPONSIBILITY FOR THE USE OR INABILITY TO USE ANY OF ITS
56 *  SOFTWARE .   OSF SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
57 *  KIND, AND OSF EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING
58 *  BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
59 *  FITNESS FOR A PARTICULAR PURPOSE.
60 *  
61 *  Notice:  Notwithstanding any other lease or license that may pertain to,
62 *  or accompany the delivery of, this computer software, the rights of the
63 *  Government regarding its use, reproduction and disclosure are as set
64 *  forth in Section 52.227-19 of the FARS Computer Software-Restricted
65 *  Rights clause.
66 *  
67 *  (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc.  Unpublished - all
68 *  rights reserved under the Copyright laws of the United States.
69 *  
70 *  RESTRICTED RIGHTS NOTICE:  Use, duplication, or disclosure by the
71 *  Government is subject to the restrictions as set forth in subparagraph
72 *  (c)(1)(ii) of the Rights in Technical Data and Computer Software clause
73 *  at DFARS 52.227-7013.
74 *  
75 *  Open Software Foundation, Inc.
76 *  11 Cambridge Center
77 *  Cambridge, MA   02142
78 *  (617)621-8700
79 *  
80 *  RESTRICTED RIGHTS LEGEND:  This computer software is submitted with
81 *  "restricted rights."  Use, duplication or disclosure is subject to the
82 *  restrictions as set forth in NASA FAR SUP 18-52.227-79 (April 1985)
83 *  "Commercial Computer Software- Restricted Rights (April 1985)."  Open
84 *  Software Foundation, Inc., 11 Cambridge Center, Cambridge, MA  02142.  If
85 *  the contract contains the Clause at 18-52.227-74 "Rights in Data General"
86 *  then the "Alternate III" clause applies.
87 *  
88 *  (c) Copyright 1989, 1990, 1991 Open Software Foundation, Inc.
89 *  ALL RIGHTS RESERVED 
90 *  
91 *  
92 * Open Software Foundation is a trademark of The Open Software Foundation, Inc.
93 * OSF is a trademark of Open Software Foundation, Inc.
94 * OSF/Motif is a trademark of Open Software Foundation, Inc.
95 * Motif is a trademark of Open Software Foundation, Inc.
96 * DEC is a registered trademark of Digital Equipment Corporation
97 * DIGITAL is a registered trademark of Digital Equipment Corporation
98 * X Window System is a trademark of the Massachusetts Institute of Technology
99 *
100 *******************************************************************************
101 ******************************************************************************/
102 #ifndef __DtosP_h
103 #define __DtosP_h
104
105 #ifndef NO_MEMMOVE
106 # ifndef X_NOT_STDC_ENV
107 #  include <stdlib.h> /* Needed for MB_CUR_MAX, mbtowc, mbstowcs and mblen */
108 # endif
109 #else
110 # define memmove( p1, p2, p3 )   bcopy( p2, p1, p3 )
111 #endif
112
113 #ifdef BOGUS_MB_MAX  /* some systems don't properly set MB_[CUR|LEN]_MAX */
114 # undef  MB_LEN_MAX
115 # define MB_LEN_MAX 1 /* temp fix for ultrix */
116 # undef  MB_CUR_MAX
117 # define MB_CUR_MAX 1 /* temp fix for ultrix */
118 #endif /* BOGUS_MB_MAX */
119
120 /**********************************************************************/
121 /* here we duplicate Xtos.h, since we can't include this private file */
122
123 #ifdef INCLUDE_ALLOCA_H
124 # include <alloca.h>
125 #endif
126
127 #ifdef CRAY
128 # define WORD64
129 #endif
130
131 /* stolen from server/include/os.h */
132 #ifndef NO_ALLOCA
133 /*
134  * os-dependent definition of local allocation and deallocation
135  * If you want something other than XtMalloc/XtFree for ALLOCATE/DEALLOCATE
136  * LOCAL then you add that in here.
137  */
138 # if defined(__HIGHC__)
139
140 #  if HCVERSION < 21003
141 #   define ALLOCATE_LOCAL(size) alloca((int)(size))
142 #pragma on(alloca);
143 #  else /* HCVERSION >= 21003 */
144 #   define      ALLOCATE_LOCAL(size)    _Alloca((int)(size))
145 #  endif /* HCVERSION < 21003 */
146
147 #  define DEALLOCATE_LOCAL(ptr)  /* as nothing */
148
149 # endif /* defined(__HIGHC__) */
150
151
152 # ifdef __GNUC__
153 #  define alloca __builtin_alloca
154 #  define ALLOCATE_LOCAL(size) alloca((int)(size))
155 #  define DEALLOCATE_LOCAL(ptr)  /* as nothing */
156 # else /* ! __GNUC__ */
157 /*
158  * warning: mips alloca is unsuitable, do not use.
159  */
160 #  if defined(vax) || defined(sun) || defined(apollo) || defined(stellar)
161 /*
162  * Some System V boxes extract alloca.o from /lib/libPW.a; if you
163  * decide that you don't want to use alloca, you might want to fix it here.
164  */
165 char *alloca();
166 #   define ALLOCATE_LOCAL(size) alloca((int)(size))
167 #   define DEALLOCATE_LOCAL(ptr)  /* as nothing */
168 #  endif /* who does alloca */
169 # endif /* __GNUC__ */
170
171 #endif /* NO_ALLOCA */
172
173 #ifndef ALLOCATE_LOCAL
174 # define ALLOCATE_LOCAL(size) XtMalloc((unsigned long)(size))
175 # define DEALLOCATE_LOCAL(ptr) XtFree((XtPointer)(ptr))
176 #endif /* ALLOCATE_LOCAL */
177
178 /* End of Xtos.h */
179 /*****************/
180
181
182 /*
183  * Default Icon Search Paths
184  * 
185  * The following are default starter values for XMICONSEARCHPATH and
186  * XMICONBMSEARCHPATH, respectively.  Code elsewhere must ensure that paths
187  * into the user's home directory occur in front of these paths in the
188  * environment variables.  Note the apparently redundant use of ANSI C string
189  * constant concatenation; this is necessary in order to avoid the sequence of
190  * characters % B %, which form an SCCS id keyword.
191  */
192
193 #define DTPMSYSDEFAULT                                          \
194         CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.pm:" \
195         CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.bm:" \
196         CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B:"         \
197                                                                 \
198         CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.pm:"  \
199         CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.bm:"  \
200         CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B:"          \
201                                                                 \
202         CDE_INSTALLATION_TOP  "/appconfig/icons/%L/%B" "%M.pm:" \
203         CDE_INSTALLATION_TOP  "/appconfig/icons/%L/%B" "%M.bm:" \
204         CDE_INSTALLATION_TOP  "/appconfig/icons/%L/%B:"         \
205                                                                 \
206         CDE_INSTALLATION_TOP  "/appconfig/icons/C/%B" "%M.pm:"  \
207         CDE_INSTALLATION_TOP  "/appconfig/icons/C/%B" "%M.bm:"  \
208         CDE_INSTALLATION_TOP  "/appconfig/icons/C/%B"
209
210 #define DTBMSYSDEFAULT                                          \
211         CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.bm:" \
212         CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B" "%M.pm:" \
213         CDE_CONFIGURATION_TOP "/appconfig/icons/%L/%B:"         \
214                                                                 \
215         CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.bm:"  \
216         CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B" "%M.pm:"  \
217         CDE_CONFIGURATION_TOP "/appconfig/icons/C/%B:"          \
218                                                                 \
219         CDE_INSTALLATION_TOP  "/appconfig/icons/%L/%B" "%M.bm:" \
220         CDE_INSTALLATION_TOP  "/appconfig/icons/%L/%B" "%M.pm:" \
221         CDE_INSTALLATION_TOP  "/appconfig/icons/%L/%B:"         \
222                                                                 \
223         CDE_INSTALLATION_TOP  "/appconfig/icons/C/%B" "%M.bm:"  \
224         CDE_INSTALLATION_TOP  "/appconfig/icons/C/%B" "%M.pm:"  \
225         CDE_INSTALLATION_TOP  "/appconfig/icons/C/%B"
226
227
228 #ifdef __cplusplus
229 extern "C" {
230 #endif
231
232 /********    Private Function Declarations ********/
233
234 /********    End Private Function Declarations    ********/
235
236 #ifdef __cplusplus
237 }  /* Close scope of 'extern "C"' declaration which encloses file. */
238 #endif
239
240 #endif /* __DtosP_h */
241 /* DON'T ADD ANYTHING AFTER THIS #endif */
242
243
244
245