indents and readability

This commit is contained in:
Jean-Francois Dockes
2021-11-02 12:05:04 +01:00
parent 4cc0bc90b6
commit a24fc7bacc
5 changed files with 715 additions and 749 deletions
+3
View File
@@ -163,6 +163,9 @@ private:
// Current span. Might be jf.dockes@wanadoo.f
std::string m_span;
// Words in span: byte positions of start and end of words in m_span. For example:
// 0 4 9
// bill@some.com -> (0,4) (5,9) (10,13)
std::vector <std::pair<int, int> > m_words_in_span;
// Current word: no punctuation at all in there. Byte offset
+5 -8
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2004-2019 J.F.Dockes
/* Copyright (C) 2004-2021 J.F.Dockes
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -29,7 +29,7 @@
using namespace std;
bool unacmaybefold(const string &in, string &out,
const char *encoding, UnacOp what)
const char *encoding, UnacOp what)
{
char *cout = 0;
size_t out_len;
@@ -37,16 +37,13 @@ bool unacmaybefold(const string &in, string &out,
switch (what) {
case UNACOP_UNAC:
status = unac_string(encoding, in.c_str(), in.length(),
&cout, &out_len);
status = unac_string(encoding, in.c_str(), in.length(), &cout, &out_len);
break;
case UNACOP_UNACFOLD:
status = unacfold_string(encoding, in.c_str(), in.length(),
&cout, &out_len);
status = unacfold_string(encoding, in.c_str(), in.length(), &cout, &out_len);
break;
case UNACOP_FOLD:
status = fold_string(encoding, in.c_str(), in.length(),
&cout, &out_len);
status = fold_string(encoding, in.c_str(), in.length(), &cout, &out_len);
break;
}