Merge branch 'master' into cde-next
[oweals/cde.git] / cde / lib / DtHelp / FileUtilsI.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 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: FileUtilsI.h /main/5 1995/10/26 12:19:41 rswiston $ */
24 /************************************<+>*************************************
25  ****************************************************************************
26  **
27  **   File:        FileUtilsI.h
28  **
29  **   Project:     DtHelp Project
30  **
31  **   Description: File locating and handling utilities
32  ** 
33  **  (c) Copyright 1993, 1994 Hewlett-Packard Company
34  **  (c) Copyright 1993, 1994 International Business Machines Corp.
35  **  (c) Copyright 1993, 1994 Sun Microsystems, Inc.
36  **  (c) Copyright 1993, 1994 Novell, Inc.
37  **
38  **
39  **
40  ****************************************************************************
41  ************************************<+>*************************************/
42 #ifndef _DtHelpFileUtilsI_h
43 #define _DtHelpFileUtilsI_h
44
45 #define DtHelpVOLUME_TYPE "volumes"      /* dir for %T in XtResolvePathname */
46 #define DtHelpCCDF_VOL_SUFFIX ".hv"      /* possible basename suffix */
47 #define DtHelpSDL_VOL_SUFFIX ".sdl"      /* possible basename suffix */
48
49 /* array indices and size for use with _DtHelpFileGetSearchPaths() */
50 #define _DtHELP_FILE_USER_PATH 0
51 #define _DtHELP_FILE_SYS_PATH  1
52 #define _DtHELP_FILE_HOME_PATH 2
53 #define _DtHELP_FILE_NUM_PATHS 3
54
55 typedef struct _dtHelpCeDirStruct {
56         char    *dir_name;
57         int      type;
58         int      user_flag;
59         struct _dtHelpCeDirStruct *next_dir;
60 } _DtHelpCeDirStruct;
61
62 /* list of suffixes that help volumes may have */
63 extern const char * _DtHelpFileSuffixList[];
64
65 extern  int                      _DtHelpCeCheckAndCacheDir(char *dir);
66 extern  void                     _DtHelpFileGetSearchPaths(
67                                          char *  paths[],
68                                          Boolean searchHomeDir);
69 extern  char                     *_DtHelpFileLocate (
70                                         char *       type,
71                                         char *       base,
72                                         const char * suffixList[],
73                                         Boolean      searchCurDir,
74                                         int          accessMode);
75 extern  Boolean                  _DtHelpFileTraceLinks (
76                                         char * *  pPathName);
77 extern  Boolean                  _DtHelpFileTraceToFile (
78                                         char * *  pPathName,
79                                         int       accessMode,
80                                         char * *  pFoundPath);
81
82 #endif /* _DtHelpFileUtilsI_h */
83 /* DON'T ADD ANYTHING AFTER THIS #endif */
84