replaced path|ipath with unique doc id in rcldb i/f. Still depends on udi structure for parent/child

This commit is contained in:
dockes
2008-07-28 12:24:15 +00:00
parent 1dd66b5b1d
commit 3109a33f4a
10 changed files with 93 additions and 71 deletions
+7 -1
View File
@@ -1,7 +1,7 @@
depth = ..
include $(depth)/mk/sysconf
PROGS = trconftree wipedir smallut trfstreewalk trpathut \
PROGS = trfileudi trconftree wipedir smallut trfstreewalk trpathut \
transcode trbase64 \
trmimeparse trexecmd utf8iter idfile
@@ -24,6 +24,12 @@ trpathut : $(PATHUT_OBJS)
trpathut.o : pathut.cpp pathut.h
$(CXX) -o trpathut.o -c $(ALL_CXXFLAGS) -DTEST_PATHUT pathut.cpp
FILEUDI_OBJS= trfileudi.o $(BIGLIB)
trfileudi : $(FILEUDI_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o trfileudi $(FILEUDI_OBJS)
trfileudi.o : fileudi.cpp fileudi.h
$(CXX) -o trfileudi.o -c $(ALL_CXXFLAGS) -DTEST_FILEUDI fileudi.cpp
EXECMD_OBJS= trexecmd.o $(BIGLIB)
trexecmd : $(EXECMD_OBJS)
$(CXX) $(ALL_CXXFLAGS) -o trexecmd $(EXECMD_OBJS)
+2 -1
View File
@@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: fileudi.cpp,v 1.1 2008-07-28 10:20:20 dockes Exp $ (C) 2005 J.F.Dockes";
static char rcsid[] = "@(#$Id: fileudi.cpp,v 1.2 2008-07-28 12:24:15 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@@ -100,6 +100,7 @@ void pathHash(const std::string &path, std::string &phash, unsigned int maxlen)
void make_udi(const string& fn, const string& ipath, string &udi)
{
string s(fn);
// Note that we append a "|" in all cases. Historical, could be removed
s.append("|");
s.append(ipath);
pathHash(s, udi, PATHHASHLEN);