Switch to unified view

a/src/rcldb/pathhash.cpp b/src/rcldb/pathhash.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: pathhash.cpp,v 1.3 2006-01-23 13:32:28 dockes Exp $ (C) 2005 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: pathhash.cpp,v 1.4 2006-11-15 14:57:53 dockes Exp $ (C) 2005 J.F.Dockes";
3
#endif
3
#endif
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
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
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
...
...
24
#include "md5.h"
24
#include "md5.h"
25
#include "base64.h"
25
#include "base64.h"
26
26
27
#ifndef NO_NAMESPACES
27
#ifndef NO_NAMESPACES
28
using std::string;
28
using std::string;
29
namespace Rcl {
29
#endif /* NO_NAMESPACES */
30
#endif /* NO_NAMESPACES */
30
31
31
#ifdef PATHHASH_HEX
32
#ifdef PATHHASH_HEX
32
static void md5hexprint(const unsigned char hash[16], string &out)
33
static void md5hexprint(const unsigned char hash[16], string &out)
33
{
34
{
...
...
83
84
84
85
85
    // Truncate path and append hash
86
    // Truncate path and append hash
86
    phash = path.substr(0, maxlen - HASHLEN) + hash;
87
    phash = path.substr(0, maxlen - HASHLEN) + hash;
87
}
88
}
89
#ifndef NO_NAMESPACES
90
}
91
#endif // NO_NAMESPACES
88
92
89
#ifdef TEST_PATHHASH
93
#ifdef TEST_PATHHASH
90
#include <stdio.h>
94
#include <stdio.h>
91
int main(int argc, char **argv)
95
int main(int argc, char **argv)
92
{
96
{