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 librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
24 * $TOG: TermHeader.h /main/3 1999/10/14 16:34:46 mgreess $";
28 * (c) Copyright 1993, 1994, 1996 Hewlett-Packard Company *
29 * (c) Copyright 1993, 1994, 1996 International Business Machines Corp. *
30 * (c) Copyright 1993, 1994, 1996 Sun Microsystems, Inc. *
31 * (c) Copyright 1993, 1994, 1996 Novell, Inc. *
32 * (c) Copyright 1996 Digital Equipment Corporation. *
33 * (c) Copyright 1996 FUJITSU LIMITED. *
34 * (c) Copyright 1996 Hitachi. *
37 #ifndef _Dt_TermHeader_h
38 #define _Dt_TermHeader_h
43 #include <sys/param.h> /* for MIN, MAX macros */
47 #if defined(linux) || defined(UXPArchitecture) || (defined(USL) && (OSMAJORVERSION > 1)) || defined(CSRG_BASED)
48 #define _NFILE FOPEN_MAX
52 #define MIN(a,b) (((a) > (b)) ? (b) : (a))
55 #define MAX(a,b) (((a) < (b)) ? (b) : (a))
58 /******** Conditionally defined macros for thread_safe DtTerm ******/
60 #define _DtTermWidgetToAppContext(w) \
61 XtAppContext app = XtWidgetToApplicationContext(w)
62 #define _DtTermDisplayToAppContext(d) \
63 XtAppContext app = XtDisplayToApplicationContext(d)
64 #define _DtTermAppLock(app) XtAppLock(app)
65 #define _DtTermAppUnlock(app) XtAppUnlock(app)
66 #define _DtTermProcessLock() XtProcessLock()
67 #define _DtTermProcessUnlock() XtProcessUnlock()
69 #define _DtTermWidgetToAppContext(w)
70 #define _DtTermDisplayToAppContext(d)
71 #define _DtTermAppLock(app)
72 #define _DtTermAppUnlock(app)
73 #define _DtTermProcessLock()
74 #define _DtTermProcessUnlock()
77 #endif /* _Dt_TermHeader_h */
78 /* DON'T ADD ANYTHING AFTER THIS #endif... */