diff --git a/uppsrc/Core/Format.cpp b/uppsrc/Core/Format.cpp index 2c547e856..5287af534 100644 --- a/uppsrc/Core/Format.cpp +++ b/uppsrc/Core/Format.cpp @@ -551,6 +551,14 @@ String IntFormatter(const Formatting& f) return q; } +String Int64Formatter(const Formatting& f) +{ + StringBuffer q; + q.SetLength(1000); + q.SetLength(sprintf(q, '%' + f.format + f.id, (int64)f.arg)); + return q; +} + String IntLowerAlphaFormatter(const Formatting& f) { return FormatIntAlpha(f.arg, false); @@ -804,6 +812,12 @@ void IntDoubleRegister(int type) RegisterFormatter(type, "lx", &IntFormatter); RegisterFormatter(type, "lX", &IntFormatter); + RegisterFormatter(type, "lld", &Int64Formatter); + RegisterFormatter(type, "lli", &Int64Formatter); + RegisterFormatter(type, "llo", &Int64Formatter); + RegisterFormatter(type, "llx", &Int64Formatter); + RegisterFormatter(type, "llX", &Int64Formatter); + RegisterFormatter(type, "e", &FloatFormatter); RegisterFormatter(type, "E", &FloatFormatter); RegisterFormatter(type, "f", &FloatFormatter); diff --git a/uppsrc/Core/src.tpp/Format$en-us.tpp b/uppsrc/Core/src.tpp/Format$en-us.tpp index a18dfdd85..9c364c93f 100644 --- a/uppsrc/Core/src.tpp/Format$en-us.tpp +++ b/uppsrc/Core/src.tpp/Format$en-us.tpp @@ -110,7 +110,7 @@ delimits the formatter`-id).&] [s0; &] [s0; Most printf formatters are supported:&] [s0; &] -[s0; [* c d i o x X ld li lo lx lX e E f g G s]&] +[s0; [* c d i o x X ld li lo lx lX lld lli llo llx llX e E f g G s]&] [s0; &] [s0; Please refer to printf documentation for the description.&] [s0; &]