diff --git a/uppsrc/Core/Format.cpp b/uppsrc/Core/Format.cpp index 23213334d..63a26ce69 100644 --- a/uppsrc/Core/Format.cpp +++ b/uppsrc/Core/Format.cpp @@ -3,28 +3,6 @@ namespace Upp { -// Old format --------------------------- - -String VFormat(const char *fmt, va_list ptr) { - int limit = 2 * (int)strlen(fmt) + 1024; - if(limit < 1500) { - char buffer[1500]; - vsnprintf(buffer, 1500, fmt, ptr); - va_end(ptr); - int len = (int)strlen(buffer); - ASSERT(len <= limit); - return String(buffer, len); - } - else { - Buffer buffer(limit); - vsnprintf(buffer, 1500, fmt, ptr); - va_end(ptr); - int len = (int)strlen(buffer); - ASSERT(len <= limit); - return String(buffer, len); - } -} - // Formatting routines --------------------------- // utoa32, utoa64 inspired by @@ -1121,10 +1099,33 @@ String Format(int language, const char *s, const Vector& v) String Format(const char *s, const Vector& v) { return Format(GetCurrentLanguage(), s, v); } +// Old format --------------------------- + +String VFormat(const char *fmt, va_list ptr) { + int limit = 2 * (int)strlen(fmt) + 1024; + if(limit < 1500) { + char buffer[1500]; + vsnprintf(buffer, 1500, fmt, ptr); + int len = (int)strlen(buffer); + ASSERT(len <= limit); + return String(buffer, len); + } + else { + Buffer buffer(limit); + vsnprintf(buffer, 1500, fmt, ptr); + int len = (int)strlen(buffer); + ASSERT(len <= limit); + return String(buffer, len); + } +} + + String Sprintf(const char *fmt, ...) { va_list argptr; va_start(argptr, fmt); - return VFormat(fmt, argptr); + String s = VFormat(fmt, argptr); + va_end(argptr); + return s; } String DeFormat(const char *text) diff --git a/uppsrc/Core/Format.h b/uppsrc/Core/Format.h index f9a263fcd..fe8dbd2bc 100644 --- a/uppsrc/Core/Format.h +++ b/uppsrc/Core/Format.h @@ -110,7 +110,6 @@ String Format(const char *s, const Args& ...args) return Format(s, gather>(args...)); } -String VFormat(const char *fmt, va_list args); String Sprintf(const char *fmt, ...); String DeFormat(const char *text); diff --git a/uppsrc/HexView/HexView.h b/uppsrc/HexView/HexView.h index 8c64782f2..2e4ab996e 100644 --- a/uppsrc/HexView/HexView.h +++ b/uppsrc/HexView/HexView.h @@ -14,7 +14,7 @@ class HexViewInfo : public FrameBottom { private: Font font; int64 pos; - int data[80]; + int data[200]; int mode; bool longmode; bool empty = false; diff --git a/uppsrc/RichText/RichText.h b/uppsrc/RichText/RichText.h index 025757fc2..e9c7b3eed 100644 --- a/uppsrc/RichText/RichText.h +++ b/uppsrc/RichText/RichText.h @@ -429,7 +429,6 @@ struct RichCellPos { int tabpos; int tablen; int cellpos; - int celllen; int level; RichCell::Format format; RichTable::Format tableformat;