EnvControlI.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. /*
  24. * (c) Copyright 1993, 1994 Hewlett-Packard Company *
  25. * (c) Copyright 1993, 1994 International Business Machines Corp. *
  26. * (c) Copyright 1993, 1994 Sun Microsystems, Inc. *
  27. * (c) Copyright 1993, 1994 Novell, Inc. *
  28. */
  29. /****************************<+>*************************************
  30. **
  31. ** File: EnvControlI.h
  32. **
  33. ** RCS: $TOG: EnvControlI.h /main/6 1998/07/30 12:14:02 mgreess $
  34. **
  35. ** Project: DT Runtime Library -- Private header
  36. **
  37. ** Description: Defines structures, and parameters used
  38. ** for communication with the environment
  39. **
  40. ** (c) Copyright 1992-94 by Hewlett-Packard Company
  41. **
  42. ****************************<+>*************************************/
  43. /*******************************************************************
  44. The environment variables
  45. *******************************************************************/
  46. #define BIN_PATH_ENVIRON "PATH"
  47. #define NLS_PATH_ENVIRON "NLSPATH"
  48. #define SYSTEM_APPL_PATH_ENVIRON "XFILESEARCHPATH"
  49. #define PM_PATH_ENVIRON "XMICONSEARCHPATH"
  50. #define BM_PATH_ENVIRON "XMICONBMSEARCHPATH"
  51. /*******************************************************************
  52. The default DT path strings, architecture-dependent
  53. *******************************************************************/
  54. #define BIN_PATH_STRING CDE_INSTALLATION_TOP "/bin"
  55. #define NLS_PATH_STRING CDE_INSTALLATION_TOP "/lib/nls/msg/%L/%N.cat:" \
  56. CDE_INSTALLATION_TOP "/lib/nls/msg/C/%N.cat"
  57. #if defined(sun)
  58. #define X_BIN_PATH_STRING "/usr/openwin/bin"
  59. #else
  60. #define X_BIN_PATH_STRING "/usr/bin/X11"
  61. #endif
  62. /*
  63. * Some notes on the behavior and use of the XFILESEARCHPATH component, as
  64. * defined through the SYSTEM_APPL_PATH_STRING definition below:
  65. *
  66. * Its precedence in the lookup of X resources is fairly low--it can
  67. * be overridden by XRM resources, by resources specified in
  68. * the user's $HOME/.Xdefaults-<hostname> file, and by resources
  69. * found using the $XUSERFILESEARCHPATH setting.
  70. *
  71. * The order of pathnames in the XFILESEARCHPATH is such that the first
  72. * match satisfies the lookup, and the lookup stops there.
  73. *
  74. * We place the pathname components in our XFILESEARCHPATH such that
  75. * the lookup goes, from first match attempt to last match attempt, as
  76. * follows:
  77. *
  78. * - Custom resources: /etc/../$LANG
  79. * - Custom resources: /etc/../C
  80. * - Factory defaults: /opt/../$LANG --shipped with every localized system
  81. * - Factory defaults: /opt/../C --shipped with every system
  82. *
  83. * These resources are used ONLY for the DT components themselves
  84. * (not, for example, for MIT client resources).
  85. *
  86. * The CDE vendors retain the right to alter, remove, append to, and
  87. * ignore any settings in the factory defaults locations. The vendors
  88. * will not modify the settings in the "custom resources" locations.
  89. *
  90. */
  91. #define SYSTEM_APPL_PATH_STRING CDE_CONFIGURATION_TOP "/app-defaults/%L/%N:" \
  92. CDE_CONFIGURATION_TOP "/app-defaults/C/%N:" \
  93. CDE_INSTALLATION_TOP "/app-defaults/%L/%N:" \
  94. CDE_INSTALLATION_TOP "/app-defaults/C/%N"
  95. /**********************************************************************
  96. * Data representation of the user's DT environment
  97. **********************************************************************/
  98. typedef struct environStruct {
  99. char * pmPath;
  100. char * binPath;
  101. char * nlsPath;
  102. char * sysApplPath;
  103. char * bmPath;
  104. } _environStruct;
  105. /**********************************************************************
  106. * Miscellaneous
  107. **********************************************************************/
  108. #define BV_BINPATH (1<<0)
  109. #define BV_SYSAPPLPATH (1<<1)
  110. #define BV_NLSPATH (1<<2)
  111. #define BV_PMPATH (1<<3)
  112. #define BV_BMPATH (1<<4)
  113. #define MAX_ENV_STRING (2*BUFSIZ)
  114. /**************************** eof **********************/