Skip to content

Commit

Permalink
Revert "drop unused get_csconv"
Browse files Browse the repository at this point in the history
This reverts commit 2efae03.
  • Loading branch information
dimztimz committed Nov 27, 2016
1 parent 1f6e2fb commit ab0079d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 3 deletions.
5 changes: 5 additions & 0 deletions man/hunspell.3
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
.sp
.BI "unsigned short * get_wordchars_utf16(int *" len);
.sp
.BI "struct cs_info * get_csconv(" );
.sp
.BI "const char * get_version(" );
.SH DESCRIPTION
The \fBHunspell\fR library routines give the user word-level
Expand Down Expand Up @@ -137,6 +139,9 @@ as a model of the enabled affixation of the new word.
The get_dic_encoding() function returns "ISO8859-1" or the character
encoding defined in the affix file with the "SET" keyword.
.PP
The get_csconv() function returns the 8-bit character case table of the
encoding of the dictionary.
.PP
The get_wordchars() and get_wordchars_utf16() return the
extra word characters definied in affix file for tokenization by
the "WORDCHARS" keyword.
Expand Down
2 changes: 1 addition & 1 deletion src/hunspell/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ libhunspell_1_5_la_SOURCES=affentry.cxx affixmgr.cxx csutil.cxx \
phonet.hxx filemgr.hxx hunzip.hxx replist.hxx

libhunspell_1_5_include_HEADERS=hunspell.hxx hunspell.h hunvisapi.h \
w_char.hxx atypes.hxx
w_char.hxx atypes.hxx csutil.hxx

libhunspell_1_5_la_DEPENDENCIES=utf_info.cxx
libhunspell_1_5_la_LDFLAGS=-no-undefined
Expand Down
2 changes: 1 addition & 1 deletion src/hunspell/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ libhunspell_1_5_la_SOURCES = affentry.cxx affixmgr.cxx csutil.cxx \
phonet.hxx filemgr.hxx hunzip.hxx replist.hxx

libhunspell_1_5_include_HEADERS = hunspell.hxx hunspell.h hunvisapi.h \
w_char.hxx atypes.hxx
w_char.hxx atypes.hxx csutil.hxx

libhunspell_1_5_la_DEPENDENCIES = utf_info.cxx
libhunspell_1_5_la_LDFLAGS = -no-undefined
Expand Down
11 changes: 10 additions & 1 deletion src/hunspell/hunspell.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class HunspellImpl
int add_with_affix(const std::string& word, const std::string& example);
int remove(const std::string& word);
const std::string& get_version() const;
struct cs_info* get_csconv();


private:
Expand Down Expand Up @@ -1339,6 +1340,14 @@ const std::string& HunspellImpl::get_version() const {
return pAMgr->get_version();
}

struct cs_info* HunspellImpl::get_csconv() {
return csconv;
}

struct cs_info* Hunspell::get_csconv() {
return m_Impl->get_csconv();
}

void HunspellImpl::cat_result(std::string& result, const std::string& st) {
if (!st.empty()) {
if (!result.empty())
Expand Down Expand Up @@ -1675,7 +1684,7 @@ bool Hunspell::input_conv(const std::string& word, std::string& dest) {

int Hunspell::input_conv(const char* word, char* dest, size_t destsize) {
std::string d;
int ret = input_conv(word, d);
bool ret = input_conv(word, d);
if (ret && d.size() < destsize) {
strncpy(dest, d.c_str(), destsize);
return 1;
Expand Down
3 changes: 3 additions & 0 deletions src/hunspell/hunspell.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
#include "hunvisapi.h"
#include "w_char.hxx"
#include "atypes.hxx"
#include "csutil.hxx"

This comment has been minimized.

Copy link
@jbeich

jbeich Nov 28, 2016

Maybe use struct cs_info; but it's not required for return types. So, drop the line
to avoid breaking libreoffice.

This comment has been minimized.

Copy link
@dimztimz

dimztimz Nov 28, 2016

Author Contributor

@jbeich I fixed that too. Already put a new version. Please report when you can.

#include <string>
#include <vector>

Expand Down Expand Up @@ -214,6 +215,8 @@ class LIBHUNSPELL_DLL_EXPORTED Hunspell {
const std::string& get_wordchars_cpp() const;
const std::vector<w_char>& get_wordchars_utf16() const;

struct cs_info* get_csconv();

const char* get_version() const;
const std::string& get_version_cpp() const;

Expand Down

0 comments on commit ab0079d

Please sign in to comment.