Make sure EOF is defined
[xapian.git] / xapian-applications / omega / hashterm.h
blob313d9f5fd0560b5e9c5c108e3b3d2af196c7af86
1 /* hashterm.h: replace the end of a long term with a hash.
3 * Copyright (C) 2006,2007 Olly Betts
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
18 * USA
21 #ifndef OMEGA_INCLUDED_HASHTERM_H
22 #define OMEGA_INCLUDED_HASHTERM_H
24 #include <string>
26 const unsigned int MAX_SAFE_TERM_LENGTH = 240;
28 /* If term is longer than max_length, replace the end with a hashed version
29 * so that it's exactly max_length characters long.
31 std::string hash_long_term(const std::string &term, unsigned int max_length);
33 #endif // OMEGA_INCLUDED_HASHTERM_H