/usr/include/Xm/XmosP.h is in libmotif-dev 2.3.4-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | /*
* Motif
*
* Copyright (c) 1987-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 librararies and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
/*
* HISTORY
*/
/* $TOG: XmosP.h /main/15 1997/03/25 14:45:55 dbl $ */
/* (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
/* (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
#ifndef _XmosP_h
#define _XmosP_h
/* Some SVR4 systems don't have bzero. */
#include <Xm/Xmfuncs.h> /* for bzero et al */
/*
* Fix for 8975 - using LOGNAME instead of USER on SYSV and SVR4
*/
#ifndef USER_VAR
#if defined(SYSV) || defined(SVR4)
#define USER_VAR "LOGNAME"
#else
#define USER_VAR "USER"
#endif
#endif
/*
* Fix for 5222 - if NO_MEMMOVE is defined, some systems will still
* require stdlib.h.
*/
#ifdef NO_MEMMOVE
#ifdef bcopy
#undef bcopy
#endif
#ifdef memmove
#undef memmove
#endif
#define memmove( p1, p2, p3 ) bcopy( p2, p1, p3 )
#endif
#ifndef X_NOT_STDC_ENV
#include <stdlib.h> /* Needed for MB_CUR_MAX, mbtowc, mbstowcs and mblen */
#endif
/* On Sun systems, mblen is broken. It doesn't return 0 when the
string is empty. Here's a patch. NOTE: On Sun systems, mblen
is a macro wrapper around mbtowc. Hence the implementation below. */
#if defined(sun)
#undef mblen
#define mblen(ptr, size) \
((ptr && *(ptr) == '\0') ? 0 : mbtowc((wchar_t *)0, (ptr), (size)))
#endif
#include <limits.h> /* for MB_LEN_MAX et al */
#ifndef INT_MAX
#define INT_MAX 2147483647
#endif
#ifndef LONG_MAX
#define LONG_MAX 2147483647
#endif
#ifdef BOGUS_MB_MAX /* some systems don't properly set MB_[CUR|LEN]_MAX */
#undef MB_LEN_MAX
#define MB_LEN_MAX 1 /* temp fix for ultrix */
#undef MB_CUR_MAX
#define MB_CUR_MAX 1 /* temp fix for ultrix */
#endif /* BOGUS_MB_MAX */
/**********************************************************************/
/* here we duplicate Xtos.h, since we can't include this private file */
#if defined(INCLUDE_ALLOCA_H) || defined(HAVE_ALLOCA_H)
#include <alloca.h>
#endif
#ifdef CRAY
#define WORD64
#endif
/* Don't Use Alloca On Solaris */
#if defined(sun)
#define NO_ALLOCA
#endif
/* stolen from server/include/os.h */
#ifndef NO_ALLOCA
/*
* os-dependent definition of local allocation and deallocation
* If you want something other than XtMalloc/XtFree for ALLOCATE/DEALLOCATE
* LOCAL then you add that in here.
*/
#if defined(__HIGHC__)
#if HCVERSION < 21003
#define ALLOCATE_LOCAL(size) alloca(size)
pragma on(alloca);
#else /* HCVERSION >= 21003 */
#define ALLOCATE_LOCAL(size) _Alloca(size)
#endif /* HCVERSION < 21003 */
#define DEALLOCATE_LOCAL(ptr) /* as nothing */
#endif /* defined(__HIGHC__) */
#ifdef __GNUC__
#ifndef alloca /* gnu itself might have done that already */
#define alloca __builtin_alloca
#endif
#define ALLOCATE_LOCAL(size) alloca(size)
#define DEALLOCATE_LOCAL(ptr) /* as nothing */
#else /* ! __GNUC__ */
/*
* warning: mips alloca is unsuitable, do not use.
*/
#if defined(vax) || defined(sun) || defined(apollo) || defined(stellar)
/*
* Some System V boxes extract alloca.o from libPW.a; if you
* decide that you don't want to use alloca, you might want to fix it here.
*/
char *alloca();
#define ALLOCATE_LOCAL(size) alloca(size)
#define DEALLOCATE_LOCAL(ptr) /* as nothing */
#endif /* who does alloca */
#endif /* __GNUC__ */
#endif /* NO_ALLOCA */
#ifndef ALLOCATE_LOCAL
#define ALLOCATE_LOCAL(size) XtMalloc(size)
#define DEALLOCATE_LOCAL(ptr) XtFree(ptr)
#endif /* ALLOCATE_LOCAL */
/* End of Xtos.h */
/*****************/
#include <Xm/XmP.h>
/* For padding structures in Mrm we need to know how big pointers are. */
#if !defined(CRAY) && !defined(__alpha)
#define MrmShortPtr
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define MATCH_CHAR 'P' /* referenced in InitPath strings and in the files
that uses it (ImageCache.c and Mrmhier.c) */
/* OS-dependent file info for VirtKeys */
#define XMBINDDIR "XMBINDDIR"
#ifndef XMBINDDIR_FALLBACK
#define XMBINDDIR_FALLBACK "/usr/lib/Xm/bindings"
#endif
#define XMBINDFILE "xmbind.alias"
#define MOTIFBIND ".motifbind"
typedef enum {
XmOS_METHOD_NULL,
XmOS_METHOD_DEFAULTED,
XmOS_METHOD_REPLACED
} XmOSMethodStatus;
typedef XmDirection (*XmCharDirectionProc)(XtPointer /* char */,
XmTextType /* type */,
XmStringTag /* locale */);
typedef Status (*XmInitialDirectionProc)(XtPointer /* chars */,
XmTextType /* type */,
XmStringTag /* locale */,
unsigned int * /* num_bytes */,
XmDirection * /* direction */);
/******** Private Function Declarations ********/
extern XmOSMethodStatus XmOSGetMethod(Widget w,
String method_name,
XtPointer * method,
XtPointer * os_data);
/******** End Private Function Declarations ********/
#ifdef __cplusplus
} /* Close scope of 'extern "C"' declaration which encloses file. */
#endif
#endif /* _XmosP_h */
/* DON'T ADD ANYTHING AFTER THIS #endif */
|