1 #ifndef ROBODOC_DIRECTORY_H
2 #define ROBODOC_DIRECTORY_H
4 Copyright (C) 1994-2007 Frans Slothouber, Jacco van Weert, Petteri Kettunen,
5 Bernd Koesling, Thomas Aglassinger, Anthon Pang, Stefan Kost, David Druffner,
6 Sasha Vasko, Kai Hofmann, Thierry Pierron, Friedrich Haase, and Gergely Budai.
8 This file is part of ROBODoc
10 ROBODoc is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
28 /****s* Directory/RB_Directory
30 * RB_Directory -- the directory tree with the source files.
32 * Stores information about files in a directory tree.
33 * The whole structure consist of two linked lists. One for
34 * directory paths, and one for filenames.
36 * The following show an example structure.
37 * RB_Directory RB_Path
38 * +-------+ +------+ +-------+ +-----------+
39 * | +-->| . |--->| ./sub |-->| ./sub/sub |
40 * | | +------+ +-------+ +-----------+
43 * | | |-----------+ +------+ +------+
46 * | | +------+ +------+ +------+ +-------+
47 * | +-->| a.c |--->| b.c |-->| sa.c |-->| ssb.c |
48 * +-------+ +------+ +------+ +------+ +-------+
52 * * first -- first RB_Filename in the list of files
53 * * current -- the last file that was returned in
54 * RB_Get_Next_Filename.
55 * * last -- the last RB_Filename in the list of files
56 * used for the insert operation
57 * * first_path -- first RB_Path in the list of paths.
63 struct RB_Filename *first; /* TODO should be called files */
64 struct RB_Filename *last;
65 struct RB_Path *first_path; /* TODO should be called paths */
71 /****t* Directory/T_RB_FileType
73 * Constants for the two different filetypes that
88 struct RB_Directory *RB_Get_RB_Directory(
90 char *arg_docroot_name );
91 struct RB_Directory *RB_Get_RB_SingleFileDirectory(
93 void RB_Dump_RB_Directory(
94 struct RB_Directory *arg_rb_directory );
95 void RB_Free_RB_Directory(
96 struct RB_Directory *arg_directory );
97 void RB_Directory_Insert_RB_Path(
98 struct RB_Directory *arg_rb_directory,
99 struct RB_Path *arg_rb_path );
100 void RB_Directory_Insert_RB_Filename(
101 struct RB_Directory *arg_rb_directory,
102 struct RB_Filename *arg_rb_filename );
104 void RB_Fill_Directory(
105 struct RB_Directory *arg_rb_directory,
106 struct RB_Path *arg_path,
107 struct RB_Path *arg_doc_path );
108 int RB_Is_Source_File(
109 struct RB_Path *path,
111 int RB_To_Be_Skipped(
117 char *RB_Get_FileName(
118 char *arg_fullpath );
119 char *RB_Get_PathName(
120 char *arg_fullpath );
121 void RB_SortDirectory(
122 struct RB_Directory *arg_rb_directory );
127 int RB_Filename_Compare(
130 unsigned int RB_Number_Of_Filenames(
131 struct RB_Directory *arg_rb_directory );
132 unsigned int RB_Number_Of_Paths(
133 struct RB_Directory *arg_rb_directory );
135 #endif /* ROBODOC_DIRECTORY_H */