Kaydet (Commit) 71487983 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

#i10000# build fix

üst 7a51b509
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: HelpCompiler.hxx,v $ * $RCSfile: HelpCompiler.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: ihi $ $Date: 2007-06-05 10:24:46 $ * last change: $Author: vg $ $Date: 2007-06-08 15:00:57 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -89,7 +89,7 @@ namespace fs ...@@ -89,7 +89,7 @@ namespace fs
osl_getProcessWorkingDir(&sWorkingDir.pData); osl_getProcessWorkingDir(&sWorkingDir.pData);
rtl::OString tmp(in.c_str()); rtl::OString tmp(in.c_str());
rtl::OUString ustrSystemPath(OStringToOUString(tmp, osl_getThreadTextEncoding())); rtl::OUString ustrSystemPath(rtl::OStringToOUString(tmp, osl_getThreadTextEncoding()));
osl::File::getFileURLFromSystemPath(ustrSystemPath, data); osl::File::getFileURLFromSystemPath(ustrSystemPath, data);
osl::File::getAbsoluteFileURL(sWorkingDir, data, data); osl::File::getAbsoluteFileURL(sWorkingDir, data, data);
} }
...@@ -97,14 +97,14 @@ namespace fs ...@@ -97,14 +97,14 @@ namespace fs
{ {
::rtl::OUString ustrSystemPath; ::rtl::OUString ustrSystemPath;
osl::File::getSystemPathFromFileURL(data, ustrSystemPath); osl::File::getSystemPathFromFileURL(data, ustrSystemPath);
rtl::OString tmp(OUStringToOString(ustrSystemPath, osl_getThreadTextEncoding())); rtl::OString tmp(rtl::OUStringToOString(ustrSystemPath, osl_getThreadTextEncoding()));
HCDBG(std::cerr << "native_file_string is " << tmp.getStr() << std::endl); HCDBG(std::cerr << "native_file_string is " << tmp.getStr() << std::endl);
return std::string(tmp.getStr()); return std::string(tmp.getStr());
} }
std::string native_directory_string() const { return native_file_string(); } std::string native_directory_string() const { return native_file_string(); }
std::string toUTF8() const std::string toUTF8() const
{ {
rtl::OString tmp(OUStringToOString(data, RTL_TEXTENCODING_UTF8)); rtl::OString tmp(rtl::OUStringToOString(data, RTL_TEXTENCODING_UTF8));
return std::string(tmp.getStr()); return std::string(tmp.getStr());
} }
bool empty() const { return data.getLength() == 0; } bool empty() const { return data.getLength() == 0; }
...@@ -114,7 +114,7 @@ namespace fs ...@@ -114,7 +114,7 @@ namespace fs
HCDBG(std::cerr << "orig was " << HCDBG(std::cerr << "orig was " <<
rtl::OUStringToOString(ret.data, RTL_TEXTENCODING_UTF8).getStr() << std::endl); rtl::OUStringToOString(ret.data, RTL_TEXTENCODING_UTF8).getStr() << std::endl);
rtl::OString tmp(in.c_str()); rtl::OString tmp(in.c_str());
rtl::OUString ustrSystemPath(OStringToOUString(tmp, osl_getThreadTextEncoding())); rtl::OUString ustrSystemPath(rtl::OStringToOUString(tmp, osl_getThreadTextEncoding()));
ret.data += rtl::OUString(sal_Unicode('/')); ret.data += rtl::OUString(sal_Unicode('/'));
ret.data += ustrSystemPath; ret.data += ustrSystemPath;
HCDBG(std::cerr << "final is " << HCDBG(std::cerr << "final is " <<
...@@ -124,7 +124,7 @@ namespace fs ...@@ -124,7 +124,7 @@ namespace fs
void append(const char *in) void append(const char *in)
{ {
rtl::OString tmp(in); rtl::OString tmp(in);
rtl::OUString ustrSystemPath(OStringToOUString(tmp, osl_getThreadTextEncoding())); rtl::OUString ustrSystemPath(rtl::OStringToOUString(tmp, osl_getThreadTextEncoding()));
data = data + ustrSystemPath; data = data + ustrSystemPath;
} }
void append(const std::string &in) { append(in.c_str()); } void append(const std::string &in) { append(in.c_str()); }
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: HelpLinker.cxx,v $ * $RCSfile: HelpLinker.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: ihi $ $Date: 2007-06-05 10:25:03 $ * last change: $Author: vg $ $Date: 2007-06-08 15:01:10 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -598,6 +598,7 @@ class EntryProcessor ...@@ -598,6 +598,7 @@ class EntryProcessor
{ {
public: public:
virtual void processEntry(const std::string &string, int id) const = 0; virtual void processEntry(const std::string &string, int id) const = 0;
virtual ~EntryProcessor() {};
}; };
class BtreeDict class BtreeDict
...@@ -641,6 +642,7 @@ class BlockFactory ...@@ -641,6 +642,7 @@ class BlockFactory
{ {
public: public:
virtual Block* makeBlock() const = 0; virtual Block* makeBlock() const = 0;
virtual ~BlockFactory() {}
}; };
static int dictcount; static int dictcount;
...@@ -797,6 +799,7 @@ protected: ...@@ -797,6 +799,7 @@ protected:
public: public:
BlockProcessor(std::vector<int> &_blocks) : blocks(_blocks) {} BlockProcessor(std::vector<int> &_blocks) : blocks(_blocks) {}
virtual void process(const Block &block) = 0; virtual void process(const Block &block) = 0;
virtual ~BlockProcessor() {}
}; };
...@@ -912,6 +915,9 @@ void BlockManager::addDescriptor(Block *block) ...@@ -912,6 +915,9 @@ void BlockManager::addDescriptor(Block *block)
{ {
BlockDescriptor desc(block); BlockDescriptor desc(block);
_blockTab.push_back(desc); _blockTab.push_back(desc);
// Ivo debug
fprintf(stderr, "numbers are %lx %lx\n", block->_number,
_blockTab.size() - 1);
if (block->_number != _blockTab.size() - 1) if (block->_number != _blockTab.size() - 1)
{ {
std::cerr << "totally screwed" << std::endl; std::cerr << "totally screwed" << std::endl;
...@@ -1629,7 +1635,7 @@ public: ...@@ -1629,7 +1635,7 @@ public:
std::fstream& getPositionsFile(); std::fstream& getPositionsFile();
std::fstream& getOffsetsFile(); std::fstream& getOffsetsFile();
DocumentCompressor& getDocumentCompressor(); DocumentCompressor& getDocumentCompressor();
void compress(int docID, int titleID, virtual void compress(int docID, int titleID,
std::vector<ConceptLocation> &locations, std::vector<ConceptLocation> &locations,
std::vector<ConceptLocation> &extents); std::vector<ConceptLocation> &extents);
void close(); void close();
...@@ -1654,7 +1660,7 @@ private: ...@@ -1654,7 +1660,7 @@ private:
protected: protected:
virtual int getNextByte() = 0; virtual int getNextByte() = 0;
void initReading() { _toRead = 0; _path = 0; } virtual void initReading() { _toRead = 0; _path = 0; }
private: private:
int countZeroes(); int countZeroes();
...@@ -1668,6 +1674,7 @@ public: ...@@ -1668,6 +1674,7 @@ public:
void decode(int k, IntegerArray &array); void decode(int k, IntegerArray &array);
void ascDecode(int k, IntegerArray &array); void ascDecode(int k, IntegerArray &array);
int ascendingDecode(int k, int start, std::vector<int> &array); int ascendingDecode(int k, int start, std::vector<int> &array);
virtual ~Decompressor() {}
}; };
int Decompressor::BitsInByte = 8; int Decompressor::BitsInByte = 8;
...@@ -1681,7 +1688,8 @@ private: ...@@ -1681,7 +1688,8 @@ private:
int _index0; int _index0;
public: public:
ByteArrayDecompressor(const std::vector<unsigned char> *array, int index) { initReading(array, index); } ByteArrayDecompressor(const std::vector<unsigned char> *array, int index) { initReading(array, index); }
void initReading(const std::vector<unsigned char> *array, int index) using Decompressor::initReading;
virtual void initReading(const std::vector<unsigned char> *array, int index)
{ {
_array = array; _array = array;
_index = _index0 = index; _index = _index0 = index;
...@@ -2491,6 +2499,7 @@ protected: ...@@ -2491,6 +2499,7 @@ protected:
else if (_data[idx] < nBytesEq) else if (_data[idx] < nBytesEq)
return false; return false;
} }
return false;
} }
public: public:
bool processLeafBlock(VectorProcessor &processor, const VectorBtree &tree) bool processLeafBlock(VectorProcessor &processor, const VectorBtree &tree)
...@@ -2578,6 +2587,7 @@ class CompressorIterator ...@@ -2578,6 +2587,7 @@ class CompressorIterator
{ {
public: public:
virtual void value(int value) = 0; virtual void value(int value) = 0;
virtual ~CompressorIterator() {}
}; };
int Decompressor::countZeroes() int Decompressor::countZeroes()
...@@ -2602,7 +2612,7 @@ int Decompressor::countZeroes() ...@@ -2602,7 +2612,7 @@ int Decompressor::countZeroes()
} }
} }
} }
return 0; //return 0;
} }
// reads 1 bit; returns non-0 for bit "1" // reads 1 bit; returns non-0 for bit "1"
...@@ -2804,7 +2814,8 @@ private: ...@@ -2804,7 +2814,8 @@ private:
std::ifstream *_input; std::ifstream *_input;
public: public:
StreamDecompressor(std::ifstream &input) { initReading(input); } StreamDecompressor(std::ifstream &input) { initReading(input); }
void initReading(std::ifstream &input) { _input = &input; Decompressor::initReading(); } using Decompressor::initReading;
virtual void initReading(std::ifstream &input) { _input = &input; Decompressor::initReading(); }
int getNextByte() int getNextByte()
{ {
unsigned char ret; unsigned char ret;
...@@ -3232,7 +3243,8 @@ public: ...@@ -3232,7 +3243,8 @@ public:
void close(); void close();
virtual ~XmlIndex() { delete _edgesParams; delete _edges; delete _contextTables; } virtual ~XmlIndex() { delete _edgesParams; delete _edges; delete _contextTables; }
std::fstream& getContextsFile(); std::fstream& getContextsFile();
void compress(int docID, int titleID, using Index::compress;
virtual void compress(int docID, int titleID,
std::vector<ConceptLocation> &locations, std::vector<ConceptLocation> &locations,
std::vector<ConceptLocation> &extents, std::vector<ConceptLocation> &extents,
int k, const Compressor &contextTables); int k, const Compressor &contextTables);
...@@ -4743,7 +4755,21 @@ void JarOutputStream::commit() ...@@ -4743,7 +4755,21 @@ void JarOutputStream::commit()
fos << perlline.str(); fos << perlline.str();
fos.close(); fos.close();
std::string commandline = "perl " + perlfile; std::string myperl( getenv( "PERL" ) );
std::string commandline;
const std::string is4nt ( getenv( "USE_SHELL" ) );
if( !is4nt.empty() && is4nt == "4nt" )
{
std::string myperl2 = replaceAll( myperl , "\\" , "\\\\" );
myperl = myperl2 ;
myperl2 = replaceAll( perlfile , "\\" , "\\\\" );
perlfile = myperl2 ;
commandline = myperl + " " + perlfile;
}
// std::string commandline = "perl " + perlfile;
else
commandline = "perl " + perlfile;
HCDBG(std::cerr << "command line 3 is" << commandline << std::endl); HCDBG(std::cerr << "command line 3 is" << commandline << std::endl);
system(commandline.c_str()); system(commandline.c_str());
...@@ -4841,7 +4867,7 @@ namespace ...@@ -4841,7 +4867,7 @@ namespace
} }
} }
void function_orig_pointer(xmlXPathParserContextPtr ctxt, int nargs) extern "C" void function_orig_pointer(xmlXPathParserContextPtr ctxt, int nargs)
{ {
if (nargs > 1) if (nargs > 1)
{ {
...@@ -4885,7 +4911,7 @@ void function_orig_pointer(xmlXPathParserContextPtr ctxt, int nargs) ...@@ -4885,7 +4911,7 @@ void function_orig_pointer(xmlXPathParserContextPtr ctxt, int nargs)
valuePush(ctxt, xmlXPathNewString(str)); valuePush(ctxt, xmlXPathNewString(str));
} }
void* cmc_module_init(xsltTransformContextPtr ctxt, const xmlChar* uri) extern "C" void* cmc_module_init(xsltTransformContextPtr ctxt, const xmlChar* uri)
{ {
if (xsltRegisterExtFunction(ctxt, (const xmlChar*)"orig-pointer", uri, function_orig_pointer)) if (xsltRegisterExtFunction(ctxt, (const xmlChar*)"orig-pointer", uri, function_orig_pointer))
{ {
...@@ -4895,7 +4921,7 @@ void* cmc_module_init(xsltTransformContextPtr ctxt, const xmlChar* uri) ...@@ -4895,7 +4921,7 @@ void* cmc_module_init(xsltTransformContextPtr ctxt, const xmlChar* uri)
return NULL; return NULL;
} }
void cmc_module_term(xsltTransformContextPtr, const xmlChar*, void*) extern "C" void cmc_module_term(xsltTransformContextPtr, const xmlChar*, void*)
{ {
} }
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
# #
# $RCSfile: makefile.mk,v $ # $RCSfile: makefile.mk,v $
# #
# $Revision: 1.26 $ # $Revision: 1.27 $
# #
# last change: $Author: ihi $ $Date: 2007-06-05 10:25:23 $ # last change: $Author: vg $ $Date: 2007-06-08 15:01:03 $
# #
# The Contents of this file are made available subject to # The Contents of this file are made available subject to
# the terms of GNU Lesser General Public License Version 2.1. # the terms of GNU Lesser General Public License Version 2.1.
...@@ -58,6 +58,11 @@ OBJFILES=\ ...@@ -58,6 +58,11 @@ OBJFILES=\
$(OBJ)$/HelpLinker.obj \ $(OBJ)$/HelpLinker.obj \
$(OBJ)$/HelpCompiler.obj $(OBJ)$/HelpCompiler.obj
EXCEPTIONSFILES=\
$(OBJ)$/HelpLinker.obj \
$(OBJ)$/HelpCompiler.obj
APP1TARGET= $(TARGET) APP1TARGET= $(TARGET)
APP1OBJS=\ APP1OBJS=\
$(OBJ)$/HelpLinker.obj \ $(OBJ)$/HelpLinker.obj \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment