Qualify.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. *
  25. * File: Qualify.h
  26. * RCS: $XConsortium: Qualify.h /main/3 1995/10/26 15:10:03 rswiston $
  27. * Description: Public header file for the Qualify routine
  28. * Project: DT Runtime Library
  29. * Language: C
  30. * Package: N/A
  31. *
  32. * (c) Copyright 1993 by Hewlett-Packard Company
  33. *
  34. *****************************************************************************/
  35. /*********************************************************************
  36. * _DtQualifyWithFirst
  37. *
  38. * takes: an unqualified filename like foo.txt, and
  39. * a colon-separated list of pathnames, such as
  40. * /etc/dt:/usr/dt/config
  41. *
  42. * returns: a fully qualified filename. Space for the filename
  43. * has been allocated off the heap using malloc. It is
  44. * the responsibility of the calling function to dispose
  45. * of the space using free.
  46. *
  47. * example: ...
  48. * char * filename;
  49. * ...
  50. * filename = _DtQualifyWithFirst("configFile",
  51. * "/foo/first/location:/foo/second/choice");
  52. * < use filename >
  53. * free(filename);
  54. *
  55. **********************************************************************/
  56. #ifndef _Dt_Qualify_h
  57. #define _Dt_Qualify_h
  58. # ifdef __cplusplus
  59. extern "C" {
  60. # endif
  61. extern char * _DtQualifyWithFirst
  62. (
  63. char *, /* file to locate */
  64. char * /* list of colon-separated paths in which to look */
  65. );
  66. # ifdef __cplusplus
  67. }
  68. # endif
  69. #endif /* _Dt_Qualify_h */
  70. /* DON'T ADD ANYTHING AFTER THIS #endif */