ActionUtilP.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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 libraries 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. #ifndef _ActionUtilP_h
  41. #define _ActionUtilP_h
  42. #include <X11/Intrinsic.h> /* for Display struct definition */
  43. #include "ActionP.h"
  44. /*****************************************************************************
  45. *
  46. * Macro to protect against sending a NULL pointer to certain
  47. * library functions (i.e. sprintf, strlen, ...) with on some
  48. * systems choke on a NULL pointer.
  49. *
  50. ****************************************************************************/
  51. #define _DtActNULL_GUARD(s) ((s) ? (s) : "")
  52. /******************************************************************************
  53. External Utility Function Declarations
  54. These functions are for internal use and are not part of the
  55. public Action API. Each of the following functions returns a
  56. newly allocated version of the desired string. It is up to the
  57. caller to free the strings obtained.
  58. ******************************************************************************/
  59. extern char *_DtBasename(const char *s);
  60. extern char *_DtDirname(const char *s);
  61. extern char *_DtPathname(const char *s);
  62. extern char *_DtHostString(const char *s);
  63. extern char *_DtGetSessionHostName( void );
  64. extern char *_DtGetDisplayHostName( Display *d);
  65. extern char *_DtGetLocalHostName( void );
  66. extern char *_DtGetExecHostsDefault (void);
  67. extern char *_DtGetActionIconDefault (void);
  68. extern char *_DtGetDtTmpDir(void);
  69. extern char *_DtActGenerateTmpFile(char *dir,
  70. char *format,
  71. mode_t mode,
  72. int *fd );
  73. extern int _DtIsSameHost( const char *host1, const char *host2 );
  74. extern void _DtRemoveTrailingBlanksInPlace(char **s);
  75. extern int _DtExecuteAccess(const char *path);
  76. extern DtActionInvocationID _DtActAllocID();
  77. extern _DtActInvRecT *_DtActAllocInvRec();
  78. extern _DtActChildRecT *_DtActAllocChildRec( _DtActInvRecT *recp );
  79. extern int _DtActDeleteInvRec( DtActionInvocationID id);
  80. extern _DtActInvRecT *_DtActFindInvRec( DtActionInvocationID id);
  81. extern _DtActChildRecT *_DtActFindChildRec(
  82. DtActionInvocationID id,
  83. unsigned long childId);
  84. extern unsigned long _DtActEvalChildren(DtActionInvocationID id);
  85. extern void _DtActExecutionLeafNodeCleanup(
  86. DtActionInvocationID id,
  87. DtActionArg *newArgp,
  88. int newArgc,
  89. int respectQuitBlock);
  90. extern DtActionArg *_DtActMallocEmptyArgArray(int ac);
  91. extern void _DtActFreeArgArray( DtActionArg *argp, int ac );
  92. extern void *_DtActReadTmpFileToBuffer (
  93. char *fname,
  94. int *sizep);
  95. extern int _DtActGetCmdReturnArgs (
  96. DtActionInvocationID invId,
  97. _DtActChildRecT *childp,
  98. DtActionArg **aargv );
  99. /******************************************************************************/
  100. #endif /* _ActionUtilP_h */
  101. /* DON'T ADD ANYTHING AFTER THIS #endif */