Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kosloot committed Nov 17, 2024
1 parent 8e8f8fe commit 51a2255
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions include/libfolia/folia_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "libxml/tree.h"

#include "ticcutils/StringOps.h"
#include "ticcutils/XMLtools.h"

namespace folia {

Expand Down Expand Up @@ -207,11 +208,11 @@ namespace folia {
/// some xml goodies
///
inline const xmlChar *to_xmlChar( const std::string& in ){
return reinterpret_cast<const xmlChar *>(in.c_str());
return TiCC::to_xmlChar( in );
}

inline const std::string to_string( const xmlChar *in ){
return reinterpret_cast<const char *>(in);
return TiCC::to_string( in );
}

inline const std::string to_string( const xmlChar *in, size_t size ){
Expand Down
4 changes: 2 additions & 2 deletions src/folia_document.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const char *output_encoding = "UTF-8";
namespace folia {
using TiCC::operator<<;
/// define a static default LogStream
TiCC::LogStream DBG_CERR(cerr,"folia:");
TiCC::LogStream DBG_CERR(cerr,NoStamp);
/// connect to the default
TiCC::LogStream *_dbg_file = &DBG_CERR;
ostream& operator<<( ostream& os,
Expand Down Expand Up @@ -327,6 +327,7 @@ namespace folia {
_minor_version = 0;
_sub_version = 0;
_dbg_file = 0;
DBG_CERR.set_message("folia:");
}

Document::~Document(){
Expand Down Expand Up @@ -671,7 +672,6 @@ namespace folia {
}
line += " XML-error: " + string(error->message);
cerr << line;
DBG << line;
if ( error->ctxt ){
xmlParserCtxt *ctx = static_cast<xmlParserCtxt*>(error->ctxt);
xmlBuffer *buffer = xmlBufferCreate();
Expand Down
7 changes: 5 additions & 2 deletions src/folia_engine.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

using namespace std;

TiCC::LogStream DBG_CERR(cerr,"folia-engine:");
TiCC::LogStream DBG_CERR(cerr);
#define DBG *TiCC::Log((_dbg_file?_dbg_file:&DBG_CERR))

namespace folia {
Expand Down Expand Up @@ -118,6 +118,7 @@ namespace folia {
_finished(false),
_debug(false)
{
DBG_CERR.set_message("folia-engine:");
}

Engine::~Engine(){
Expand Down Expand Up @@ -153,7 +154,9 @@ namespace folia {
if ( d ){
if ( !_dbg_file ){
_dbg_file
= new TiCC::LogStream( cerr, "folia-engine", StampMessage );
= new TiCC::LogStream( cerr );
_dbg_file->set_message( "folia-engine" );
_dbg_file->set_stamp(StampMessage);
}
}
_debug = d;
Expand Down

0 comments on commit 51a2255

Please sign in to comment.