From b254c706617223da1dd1b9543a74715e42a8a5b0 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 4 Oct 2007 20:27:43 +0000 Subject: [PATCH] core/error.h renamed to except.h Fix octal excapes in c_escape Add description and version to Build --- Build | 3 +++ source/codec.h | 2 +- source/fmt.cpp | 2 +- source/lexicalcast.h | 2 +- source/regex.cpp | 2 +- source/regmatch.cpp | 2 +- source/utils.cpp | 6 +++--- 7 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Build b/Build index 63ccdf9..84fd406 100644 --- a/Build +++ b/Build @@ -2,6 +2,9 @@ package "mspstrings" { + description "Mikkosoft Productions string utilities library"; + version "0.1"; + require "mspcore"; library "mspstrings" diff --git a/source/codec.h b/source/codec.h index 3470ccc..bb35b0b 100644 --- a/source/codec.h +++ b/source/codec.h @@ -9,7 +9,7 @@ Distributed under the LGPL #define MSP_STRINGS_CODEC_H_ #include -#include +#include namespace Msp { namespace Codecs { diff --git a/source/fmt.cpp b/source/fmt.cpp index de0d810..fdd73f3 100644 --- a/source/fmt.cpp +++ b/source/fmt.cpp @@ -4,7 +4,7 @@ This file is part of libmspstrings Copyright © 2006-2007 Mikko Rasa Distributed under the LGPL */ -#include +#include #include "fmt.h" using namespace std; diff --git a/source/lexicalcast.h b/source/lexicalcast.h index c73856b..e67f361 100644 --- a/source/lexicalcast.h +++ b/source/lexicalcast.h @@ -10,7 +10,7 @@ Distributed under the LGPL #include #include -#include +#include #include "fmt.h" namespace Msp { diff --git a/source/regex.cpp b/source/regex.cpp index 320705e..d3fd0b7 100644 --- a/source/regex.cpp +++ b/source/regex.cpp @@ -5,7 +5,7 @@ Copyright © 2007 Mikko Rasa Distributed under the LGPL */ #include -#include +#include #include "formatter.h" #include "regex.h" diff --git a/source/regmatch.cpp b/source/regmatch.cpp index abc5fd4..852174a 100644 --- a/source/regmatch.cpp +++ b/source/regmatch.cpp @@ -4,7 +4,7 @@ This file is part of libmspstrings Copyright © 2007 Mikko Rasa Distributed under the LGPL */ -#include +#include #include "regmatch.h" using namespace std; diff --git a/source/utils.cpp b/source/utils.cpp index 9898a07..0318e99 100644 --- a/source/utils.cpp +++ b/source/utils.cpp @@ -6,7 +6,7 @@ Distributed under the LGPL */ #include -#include +#include #include "utils.h" using namespace std; @@ -272,9 +272,9 @@ string c_escape(const string &str, bool escape_8bit) result+="\\\'"; else if(*i=='\\') result+="\\\\"; - else if(*i<' ' || (escape_8bit && (*i&0x80))) + else if(static_cast(*i)<' ' || (escape_8bit && (*i&0x80))) { - char buf[4]={'\\', (*i>>6)&7, (*i>>3)&7, *i&7}; + char buf[4]={'\\', '0'+((*i>>6)&7), '0'+((*i>>3)&7), '0'+(*i&7)}; result.append(buf, 4); } else -- 2.43.0