132.jpg was not split

This commit is contained in:
dockes 2006-09-21 05:59:02 +00:00
parent 43cb8ffdc7
commit 507ee32fdb

View File

@ -1,5 +1,5 @@
#ifndef lint #ifndef lint
static char rcsid[] = "@(#$Id: textsplit.cpp,v 1.22 2006-04-25 08:17:36 dockes Exp $ (C) 2004 J.F.Dockes"; static char rcsid[] = "@(#$Id: textsplit.cpp,v 1.23 2006-09-21 05:59:02 dockes Exp $ (C) 2004 J.F.Dockes";
#endif #endif
/* /*
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -263,6 +263,9 @@ bool TextSplit::text_to_words(const string &in)
case '.': case '.':
case ',': case ',':
if (number) { if (number) {
// 132.jpg ?
if (whatcc(it[charpos+1]) != DIGIT)
goto SPACE;
word += it; word += it;
span += it; span += it;
break; break;
@ -368,7 +371,7 @@ using namespace std;
class mySplitterCB : public TextSplitCB { class mySplitterCB : public TextSplitCB {
int first; int first;
public: public:
mySplitterCB() : first(0) {} mySplitterCB() : first(1) {}
bool takeword(const std::string &term, int pos, int bs, int be) { bool takeword(const std::string &term, int pos, int bs, int be) {
if (first) { if (first) {