Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / DtSvc / DtUtil1 / ActionUtilP.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 /* $XConsortium: ActionUtilP.h /main/3 1995/10/26 15:01:19 rswiston $ */
24 /************************************<+>*************************************
25  ****************************************************************************
26  **
27  **   File:        ActionUtilP.h
28  **
29  **   Project:     DT
30  **
31  **   Description: Private include file for the Action Library Utilities.
32  **
33  **
34  ** (c) Copyright 1993, 1994 Hewlett-Packard Company
35  ** (c) Copyright 1993, 1994 International Business Machines Corp.
36  ** (c) Copyright 1993, 1994 Sun Microsystems, Inc.
37  ** (c) Copyright 1993, 1994 Novell, Inc.
38  ****************************************************************************
39  ************************************<+>*************************************/
40
41 #ifndef _ActionUtilP_h
42 #define _ActionUtilP_h
43
44 #include <X11/Intrinsic.h>              /* for Display struct definition */
45 #include "ActionP.h"
46
47
48 /*****************************************************************************
49  *
50  *      Macro to protect against sending a NULL pointer to certain
51  *      library functions (i.e. sprintf, strlen, ...) with on some
52  *      systems choke on a NULL pointer.
53  *
54  ****************************************************************************/
55 #define _DtActNULL_GUARD(s)     ((s) ? (s) : "")
56
57 /******************************************************************************
58             External Utility Function Declarations
59
60         These functions are for internal use and are not part of the
61         public Action API. Each of the following functions returns a
62         newly allocated version of the desired string. It is up to the
63         caller to free the strings obtained.
64 ******************************************************************************/
65
66 extern char     *_DtBasename(const char *s);
67 extern char     *_DtDirname(const char *s);
68 extern char     *_DtPathname(const char *s);
69 extern char     *_DtHostString(const char *s);
70 extern char     *_DtGetSessionHostName( void );
71 extern char     *_DtGetDisplayHostName( Display *d);
72 extern char     *_DtGetLocalHostName( void );
73 extern char     *_DtGetExecHostsDefault (void);
74 extern char     *_DtGetActionIconDefault (void);
75 extern char     *_DtGetDtTmpDir(void);
76 extern char     *_DtActGenerateTmpFile(char *dir,
77         char *format,
78         mode_t mode,
79         int *fd );
80 extern int      _DtIsSameHost( const char *host1, const char *host2 );
81 extern void     _DtRemoveTrailingBlanksInPlace(char **s);
82 extern int      _DtExecuteAccess(const char *path);
83
84 extern DtActionInvocationID _DtActAllocID();
85 extern _DtActInvRecT *_DtActAllocInvRec();
86 extern _DtActChildRecT *_DtActAllocChildRec( _DtActInvRecT *recp );
87 extern int _DtActDeleteInvRec( DtActionInvocationID id);
88 extern _DtActInvRecT *_DtActFindInvRec( DtActionInvocationID id);
89 extern _DtActChildRecT *_DtActFindChildRec( 
90         DtActionInvocationID id,
91         unsigned long        childId);
92 extern unsigned long _DtActEvalChildren(DtActionInvocationID id);
93 extern void _DtActExecutionLeafNodeCleanup(
94         DtActionInvocationID  id,
95         DtActionArg           *newArgp,
96         int                   newArgc,
97         int                   respectQuitBlock);
98 extern DtActionArg *_DtActMallocEmptyArgArray(int ac);
99 extern void _DtActFreeArgArray( DtActionArg *argp, int ac );
100 extern void *_DtActReadTmpFileToBuffer ( 
101         char *fname,
102         int *sizep);
103 extern int _DtActGetCmdReturnArgs ( 
104         DtActionInvocationID invId,
105         _DtActChildRecT *childp,
106         DtActionArg     **aargv );
107
108 /******************************************************************************/
109
110
111 #endif /* _ActionUtilP_h */
112 /* DON'T ADD ANYTHING AFTER THIS #endif */
113
114