3 // Copyright (C) 2004 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; version 2 of the License.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #ifndef H_UTIL_VSERVER_SRC_VUNIFY_H
20 #define H_UTIL_VSERVER_SRC_VUNIFY_H
22 #include "vunify-matchlist.h"
28 struct MatchList dst_list;
36 enum { rsDOTFILE, rsEXCL_DST, rsEXCL_SRC,
37 rsFSTAT, rsNOEXISTS, rsSYMLINK, rsUNIFIED,
38 rsSPECIAL, rsDIFFERENT } r;
41 struct MatchList const * list;
46 enum {mdMANUALLY, mdVSERVER} mode;
49 unsigned int verbosity;
55 static void visitDirEntry(struct dirent const *) NONNULL((1));
56 static void visitDir(char const *, struct stat const *) NONNULL((1));
57 static bool checkFstat(struct MatchList const * const,
58 PathInfo const * const,
59 PathInfo const * const,
60 struct stat const ** const, struct stat * const,
61 struct stat *) NONNULL((1,2,3,4,5,6,7));
63 static struct MatchList const *
64 checkDirEntry(PathInfo const *,
66 bool *, struct stat *, struct stat *) NONNULL((1,2,3,4,5));
68 static bool updateSkipDepth(PathInfo const *, bool) NONNULL((1));
69 static void EsafeChdir(char const *, struct stat const *) NONNULL((1,2));
70 static bool doit(struct MatchList const *,
71 PathInfo const *, struct stat const *,
72 char const *dst_path, struct stat const *) NONNULL((1,2,3));
74 #endif // H_UTIL_VSERVER_SRC_VUNIFY_H