~clint-fewbar/ubuntu/precise/squid3/ignore-sighup-early

« back to all changes in this revision

Viewing changes to lib/libTrie/include/Trie.cci

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2006-11-11 10:32:06 UTC
  • Revision ID: james.westby@ubuntu.com-20061111103206-f3p0r9g0vq44rp3r
Tags: upstream-3.0.PRE5
ImportĀ upstreamĀ versionĀ 3.0.PRE5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2002,2003 Robert Collins <rbtcollins@hotmail.com>
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; either version 2 of the License, or
 
7
 * (at your option) any later version.
 
8
 * 
 
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.
 
13
 * 
 
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, USA.
 
17
 *
 
18
 */
 
19
 
 
20
#ifdef __cplusplus
 
21
#include "Trie.h"
 
22
#include "TrieNode.h"
 
23
 
 
24
void *
 
25
Trie::find (char const *aString, size_t theLength)
 
26
{
 
27
    if (head)
 
28
        return head->find (aString, theLength, transform, false);
 
29
 
 
30
    return NULL;
 
31
}
 
32
 
 
33
void *
 
34
Trie::findPrefix (char const *aString, size_t theLength)
 
35
{
 
36
    if (head)
 
37
        return head->find (aString, theLength, transform, true);
 
38
 
 
39
    return NULL;
 
40
}
 
41
 
 
42
#endif