~ubuntu-branches/ubuntu/maverick/notecase/maverick

« back to all changes in this revision

Viewing changes to src/lib/TextSearch.h

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Van Wambeke
  • Date: 2008-05-29 20:20:17 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080529202017-kp2a07u83prpz0id
Tags: 1.9.1-0ubuntu1
New Upstream Release (LP: #230041)

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
//
4
4
// This code is licensed under BSD license.See "license.txt" for more details.
5
5
//
6
 
// File: Class implements fast text buffer search method
7
 
//               - search using Boyer-Moore-Horspool-Sunday string search algorithm
8
 
//               - some of the code borrowed from SFL library (www.imatix.com)
 
6
// File: Class implements text buffer search method
9
7
////////////////////////////////////////////////////////////////////////////
10
8
 
11
9
#ifndef TEXTSEARCH_H__
16
14
#endif // _MSC_VER > 1000
17
15
 
18
16
#include <memory.h>
19
 
#ifndef BYTE
20
 
 #define BYTE unsigned char
21
 
#endif
 
17
#include <glib.h>
22
18
 
23
19
//possible find styles
24
20
#define FS_CASE_INSENSITIVE     1
41
37
        void Clear();
42
38
 
43
39
protected:
44
 
        void BuildShiftTable();
45
 
 
46
 
protected:
47
40
        unsigned long   m_dwStyle;
48
41
        size_t                  m_shift[256];
49
42
 
50
 
        const BYTE *m_pszPattern;
 
43
        const gchar *m_pszPattern;
51
44
        unsigned int    m_nPtrnSize;    
52
 
        const BYTE *m_pszBlock;
 
45
        const gchar *m_pszBlock;
53
46
        unsigned int    m_nBlkSize;     
54
47
};
55
48