~efargaspro/+junk/codeblocks-16.01-release

« back to all changes in this revision

Viewing changes to src/plugins/contrib/SpellChecker/hunspell/src/hunspell/replist.hxx

  • Committer: damienlmoore at gmail
  • Date: 2016-02-02 02:43:22 UTC
  • Revision ID: damienlmoore@gmail.com-20160202024322-yql5qmtbwdyamdwd
Code::Blocks 16.01

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ***** BEGIN LICENSE BLOCK *****
 
2
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
3
 *
 
4
 * The contents of this file are subject to the Mozilla Public License Version
 
5
 * 1.1 (the "License"); you may not use this file except in compliance with
 
6
 * the License. You may obtain a copy of the License at
 
7
 * http://www.mozilla.org/MPL/
 
8
 *
 
9
 * Software distributed under the License is distributed on an "AS IS" basis,
 
10
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 
11
 * for the specific language governing rights and limitations under the
 
12
 * License.
 
13
 *
 
14
 * The Original Code is Hunspell, based on MySpell.
 
15
 *
 
16
 * The Initial Developers of the Original Code are
 
17
 * Kevin Hendricks (MySpell) and Németh László (Hunspell).
 
18
 * Portions created by the Initial Developers are Copyright (C) 2002-2005
 
19
 * the Initial Developers. All Rights Reserved.
 
20
 *
 
21
 * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno,
 
22
 * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád,
 
23
 * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter,
 
24
 * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls,
 
25
 * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen
 
26
 *
 
27
 * Alternatively, the contents of this file may be used under the terms of
 
28
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 
29
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
30
 * in which case the provisions of the GPL or the LGPL are applicable instead
 
31
 * of those above. If you wish to allow use of your version of this file only
 
32
 * under the terms of either the GPL or the LGPL, and not to allow others to
 
33
 * use your version of this file under the terms of the MPL, indicate your
 
34
 * decision by deleting the provisions above and replace them with the notice
 
35
 * and other provisions required by the GPL or the LGPL. If you do not delete
 
36
 * the provisions above, a recipient may use your version of this file under
 
37
 * the terms of any one of the MPL, the GPL or the LGPL.
 
38
 *
 
39
 * ***** END LICENSE BLOCK ***** */
 
40
/*
 
41
 * Copyright 2002 Kevin B. Hendricks, Stratford, Ontario, Canada
 
42
 * And Contributors.  All rights reserved.
 
43
 *
 
44
 * Redistribution and use in source and binary forms, with or without
 
45
 * modification, are permitted provided that the following conditions
 
46
 * are met:
 
47
 *
 
48
 * 1. Redistributions of source code must retain the above copyright
 
49
 *    notice, this list of conditions and the following disclaimer.
 
50
 *
 
51
 * 2. Redistributions in binary form must reproduce the above copyright
 
52
 *    notice, this list of conditions and the following disclaimer in the
 
53
 *    documentation and/or other materials provided with the distribution.
 
54
 *
 
55
 * 3. All modifications to the source code must be clearly marked as
 
56
 *    such.  Binary redistributions based on modified source code
 
57
 *    must be clearly marked as modified versions in the documentation
 
58
 *    and/or other materials provided with the distribution.
 
59
 *
 
60
 * THIS SOFTWARE IS PROVIDED BY KEVIN B. HENDRICKS AND CONTRIBUTORS
 
61
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 
62
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 
63
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
 
64
 * KEVIN B. HENDRICKS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 
65
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 
66
 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 
67
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
68
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 
69
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 
70
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 
71
 * SUCH DAMAGE.
 
72
 */
 
73
 
 
74
/* string replacement list class */
 
75
#ifndef _REPLIST_HXX_
 
76
#define _REPLIST_HXX_
 
77
 
 
78
#include "hunvisapi.h"
 
79
 
 
80
#include "w_char.hxx"
 
81
 
 
82
class LIBHUNSPELL_DLL_EXPORTED RepList
 
83
{
 
84
private:
 
85
    RepList(const RepList&);
 
86
    RepList& operator = (const RepList&);
 
87
protected:
 
88
    replentry ** dat;
 
89
    int size;
 
90
    int pos;
 
91
 
 
92
public:
 
93
    RepList(int n);
 
94
    ~RepList();
 
95
 
 
96
    int get_pos();
 
97
    int add(char * pat1, char * pat2);
 
98
    replentry * item(int n);
 
99
    int near(const char * word);
 
100
    int match(const char * word, int n);
 
101
    int conv(const char * word, char * dest, size_t destsize);
 
102
};
 
103
#endif