Skip to content

Commit 8bd248b

Browse files
Ko van der SlootKo van der Sloot
authored andcommitted
Merge branch 'generic'
2 parents 7745584 + f0a11a4 commit 8bd248b

21 files changed

Lines changed: 706 additions & 504 deletions

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Process this file with autoconf to produce a configure script.
33

44
AC_PREREQ(2.59)
5-
AC_INIT([frog], [0.13.1], [lamasoftware@science.ru.nl])
5+
AC_INIT([frog], [0.13.3], [lamasoftware@science.ru.nl])
66
AM_INIT_AUTOMAKE
77
AC_CONFIG_SRCDIR([configure.ac])
88
AC_CONFIG_MACRO_DIR([m4])
@@ -131,15 +131,15 @@ AC_ARG_WITH(folia,
131131
[PKG_CONFIG_PATH="$withval/lib/pkgconfig:$PKG_CONFIG_PATH"],
132132
[PKG_CONFIG_PATH="$prefix/lib/pkgconfig:$PKG_CONFIG_PATH"])
133133
AC_MSG_NOTICE( [pkg-config search path: $PKG_CONFIG_PATH] )
134-
PKG_CHECK_MODULES([folia],[folia >= 0.13])
134+
PKG_CHECK_MODULES([folia],[folia >= 1.0])
135135
CXXFLAGS="$CXXFLAGS $folia_CFLAGS"
136136
LIBS="$folia_LIBS $LIBS"
137137

138138
AC_ARG_WITH(ucto,
139139
[ --with-ucto=DIR use ucto installed in <DIR>],
140140
[PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$withval/lib/pkgconfig"],
141141
[PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$prefix/lib/pkgconfig"])
142-
PKG_CHECK_MODULES([ucto], [ucto >= 0.8.1] )
142+
PKG_CHECK_MODULES([ucto], [ucto >= 0.8.4] )
143143
CXXFLAGS="$CXXFLAGS $ucto_CFLAGS"
144144
LIBS="$ucto_LIBS $LIBS"
145145

include/frog/Frog.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@
3838
#include "ticcutils/Timer.h"
3939
#include "ticcutils/PrettyPrint.h"
4040
#include "ticcutils/StringOps.h"
41-
#include "libfolia/foliautils.h"
4241
#include "libfolia/folia.h"
43-
#include "libfolia/document.h"
4442

4543

4644
//declared here and defined in Frog-util.cxx (bit messy)

include/frog/ucto_tokenizer_mod.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
class UctoTokenizer {
3434
public:
3535
UctoTokenizer(TiCC::LogStream *);
36-
~UctoTokenizer() { delete tokenizer; delete uctoLog; };
36+
~UctoTokenizer() { delete tokenizer; };
3737
bool init( const TiCC::Configuration& );
3838
void setUttMarker( const std::string& );
3939
void setPassThru( bool );
@@ -44,8 +44,8 @@ class UctoTokenizer {
4444
void setInputXml( bool );
4545
void setTextClass( const std::string& );
4646
void setDocID( const std::string& );
47-
folia::Document tokenizestring( const std::string& );
48-
folia::Document tokenize( std::istream& );
47+
folia::Document *tokenizestring( const std::string& );
48+
folia::Document *tokenize( std::istream& );
4949
bool tokenize( folia::Document& );
5050
std::vector<std::string> tokenize( const std::string& );
5151
std::string tokenizeStream( std::istream& );

src/Frog.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ bool parse_args( TiCC::CL_Options& Opts, FrogOptions& options,
159159
value = TiCC::lowercase( value );
160160
vector<string> vec;
161161
TiCC::split_at( value, vec, "," );
162-
for ( size_t i=0; i < vec.size(); ++i ){
163-
char mod = vec[i][0];
164-
string value = vec[i].substr(1);
162+
for ( const auto& val : vec ){
163+
char mod = val[0];
164+
string value = val.substr(1);
165165
int dbval = 0;
166166
if ( !stringTo<int>( value, dbval ) ){
167167
cerr << "expected integer value for --debug=" << mod << value << endl;
@@ -369,8 +369,8 @@ bool parse_args( TiCC::CL_Options& Opts, FrogOptions& options,
369369
}
370370
else {
371371
vector<string> mass = Opts.getMassOpts();
372-
for (size_t i=0; i < mass.size(); ++i ){
373-
fileNames.insert( mass[i] );
372+
for ( const auto& name : mass ){
373+
fileNames.insert( name );
374374
}
375375
}
376376
}
@@ -558,5 +558,6 @@ int main(int argc, char *argv[]) {
558558
*Log(theErrLog) << "fatal error: " << e.what() << endl;
559559
return EXIT_FAILURE;
560560
}
561+
delete theErrLog;
561562
return EXIT_SUCCESS;
562563
}

0 commit comments

Comments
 (0)