![]() |
Qt 4.8
|
#include "qlocale_tools_p.h"#include "qlocale_p.h"#include "qstring.h"#include <ctype.h>#include <float.h>#include <limits.h>#include <math.h>#include <stdlib.h>#include <time.h>#include "qfunctions_wince.h"#include <fenv.h>Go to the source code of this file.
Classes | |
| struct | Bigint |
| struct | p5s_deleter |
Macros | |
| #define | Bcopy(x, y) |
| #define | Bias 1023 |
| #define | Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1)) |
| #define | Big1 0xffffffff |
| #define | Bletch 0x10 |
| #define | Bndry_mask 0xfffff |
| #define | Bndry_mask1 0xfffff |
| #define | Ebits 11 |
| #define | Emin (-1022) |
| #define | Exp_1 0x3ff00000 |
| #define | Exp_11 0x3ff00000 |
| #define | Exp_mask 0x7ff00000 |
| #define | Exp_msk1 0x100000 |
| #define | Exp_msk11 0x100000 |
| #define | Exp_shift 20 |
| #define | Exp_shift1 20 |
| #define | Frac_mask 0xfffff |
| #define | Frac_mask1 0xfffff |
| #define | IEEE_Arith |
| #define | IEEE_BIG_OR_LITTLE_ENDIAN 1 |
| #define | Infinite(x) (getWord0(x) == 0x7ff00000) /* sufficient test for here */ |
| #define | Int_max 14 |
| #define | Kmax 15 |
| #define | LLONG_MAX Q_INT64_C(0x7fffffffffffffff) |
| #define | LLONG_MIN (-LLONG_MAX - Q_INT64_C(1)) |
| #define | Log2P 1 |
| #define | Long qint32 |
| #define | LSB 1 |
| #define | MALLOC malloc |
| #define | MCW_EM 0x0008001F |
| #define | n_bigtens 5 |
| #define | P 53 |
| #define | Pack_32 |
| #define | Quick_max 14 |
| #define | rounded_product(a, b) a *= b |
| #define | rounded_quotient(a, b) a /= b |
| #define | Sign_bit 0x80000000 |
| #define | Sign_Extend(a, b) /*no-op*/ |
| #define | Ten_pmax 22 |
| #define | Tiny0 0 |
| #define | Tiny1 1 |
| #define | ULLONG_MAX Q_UINT64_C(0xffffffffffffffff) |
| #define | ULong quint32 |
Typedefs | |
| typedef struct Bigint | Bigint |
Functions | |
| static ULong | _getWord0 (const NEEDS_VOLATILE double x) |
| static ULong | _getWord1 (const NEEDS_VOLATILE double x) |
| static char * | _qdtoa (NEEDS_VOLATILE double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **digits_str) |
| static void | _setWord0 (NEEDS_VOLATILE double *x, ULong l) |
| static void | _setWord1 (NEEDS_VOLATILE double *x, ULong l) |
| static double | b2d (Bigint *a, int *e) |
| static Bigint * | Balloc (int k) |
| static void | Bfree (Bigint *v) |
| static int | cmp (Bigint *a, Bigint *b) |
| static Bigint * | d2b (double d, int *e, int *bits) |
| QString & | decimalForm (QChar zero, QChar decimal, QChar group, QString &digits, int decpt, uint precision, PrecisionMode pm, bool always_show_decpt, bool thousands_group) |
| static Bigint * | diff (Bigint *a, Bigint *b) |
| QString & | exponentForm (QChar zero, QChar decimal, QChar exponential, QChar group, QChar plus, QChar minus, QString &digits, int decpt, uint precision, PrecisionMode pm, bool always_show_decpt) |
| static ULong | getWord0 (const NEEDS_VOLATILE double x) |
| static ULong | getWord1 (const NEEDS_VOLATILE double x) |
| static int | hi0bits (ULong x) |
| static Bigint * | i2b (int i) |
| static int | lo0bits (ULong *y) |
| static Bigint * | lshift (Bigint *b, int k) |
| static Bigint * | mult (Bigint *a, Bigint *b) |
| static Bigint * | multadd (Bigint *b, int m, int a) |
| static Bigint * | pow5mult (Bigint *b, int k) |
| Q_CORE_EXPORT char * | qdtoa (double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **resultp) |
| QString | qlltoa (qlonglong l, int base, const QChar zero) |
| Q_CORE_EXPORT double | qstrtod (const char *s00, const char **se, bool *ok) |
| qlonglong | qstrtoll (const char *nptr, const char **endptr, register int base, bool *ok) |
| qulonglong | qstrtoull (const char *nptr, const char **endptr, register int base, bool *ok) |
| QString | qulltoa (qulonglong l, int base, const QChar _zero) |
| static int | quorem (Bigint *b, Bigint *S) |
| static double | ratio (Bigint *a, Bigint *b) |
| bool | removeGroupSeparators (QLocalePrivate::CharBuff *num) |
| static Bigint * | s2b (const char *s, int nd0, int nd, ULong y9) |
| static void | setWord0 (NEEDS_VOLATILE double *x, ULong l) |
| static void | setWord1 (NEEDS_VOLATILE double *x, ULong l) |
| static void | Storeinc (ULong *&a, const ULong &b, const ULong &c) |
| static double | ulp (double x) |
Variables | |
| static const double | bigtens [] = { 1e16, 1e32, 1e64, 1e128, 1e256 } |
| static double | g_double_zero = 0.0 |
| static Bigint * | p5s |
| static const double | tens [] |
| static const double | tinytens [] = { 1e-16, 1e-32, 1e-64, 1e-128, 1e-256 } |
| #define Bcopy | ( | x, | |
| y | |||
| ) |
Definition at line 852 of file qlocale_tools.cpp.
| #define Bias 1023 |
Definition at line 718 of file qlocale_tools.cpp.
| #define Big0 (Frac_mask1 | Exp_msk1*(DBL_MAX_EXP+Bias-1)) |
Definition at line 808 of file qlocale_tools.cpp.
Referenced by qstrtod().
| #define Big1 0xffffffff |
Definition at line 809 of file qlocale_tools.cpp.
Referenced by qstrtod().
| #define Bletch 0x10 |
Definition at line 727 of file qlocale_tools.cpp.
Referenced by _qdtoa().
| #define Bndry_mask 0xfffff |
Definition at line 728 of file qlocale_tools.cpp.
| #define Bndry_mask1 0xfffff |
Definition at line 729 of file qlocale_tools.cpp.
Referenced by qstrtod().
| #define Ebits 11 |
Definition at line 723 of file qlocale_tools.cpp.
Referenced by b2d().
| #define Emin (-1022) |
Definition at line 720 of file qlocale_tools.cpp.
Referenced by qstrtod().
| #define Exp_1 0x3ff00000 |
Definition at line 721 of file qlocale_tools.cpp.
Referenced by b2d().
| #define Exp_11 0x3ff00000 |
Definition at line 722 of file qlocale_tools.cpp.
Referenced by _qdtoa().
| #define Exp_mask 0x7ff00000 |
Definition at line 716 of file qlocale_tools.cpp.
| #define Exp_msk1 0x100000 |
| #define Exp_msk11 0x100000 |
Definition at line 715 of file qlocale_tools.cpp.
Referenced by d2b().
| #define Exp_shift 20 |
Definition at line 712 of file qlocale_tools.cpp.
| #define Exp_shift1 20 |
Definition at line 713 of file qlocale_tools.cpp.
Referenced by _qdtoa().
| #define Frac_mask 0xfffff |
Definition at line 724 of file qlocale_tools.cpp.
| #define Frac_mask1 0xfffff |
Definition at line 725 of file qlocale_tools.cpp.
Referenced by _qdtoa().
| #define IEEE_Arith |
Definition at line 719 of file qlocale_tools.cpp.
| #define IEEE_BIG_OR_LITTLE_ENDIAN 1 |
Definition at line 573 of file qlocale_tools.cpp.
| #define Infinite | ( | x | ) | (getWord0(x) == 0x7ff00000) /* sufficient test for here */ |
Definition at line 740 of file qlocale_tools.cpp.
| #define Int_max 14 |
Definition at line 739 of file qlocale_tools.cpp.
Referenced by _qdtoa().
| #define Kmax 15 |
Definition at line 822 of file qlocale_tools.cpp.
| #define LLONG_MAX Q_INT64_C(0x7fffffffffffffff) |
Definition at line 63 of file qlocale_tools.cpp.
Referenced by qstrtoll().
Definition at line 66 of file qlocale_tools.cpp.
Referenced by qstrtoll().
| #define Log2P 1 |
Definition at line 735 of file qlocale_tools.cpp.
| #define Long qint32 |
| #define LSB 1 |
Definition at line 733 of file qlocale_tools.cpp.
Referenced by qstrtod().
| #define MALLOC malloc |
Definition at line 591 of file qlocale_tools.cpp.
Referenced by Balloc().
| #define MCW_EM 0x0008001F |
Referenced by qdtoa().
| #define n_bigtens 5 |
Definition at line 1546 of file qlocale_tools.cpp.
| #define P 53 |
| #define Pack_32 |
Definition at line 818 of file qlocale_tools.cpp.
| #define Quick_max 14 |
Definition at line 738 of file qlocale_tools.cpp.
Referenced by _qdtoa().
Definition at line 804 of file qlocale_tools.cpp.
Referenced by qstrtod().
Definition at line 805 of file qlocale_tools.cpp.
Referenced by qstrtod().
| #define Sign_bit 0x80000000 |
Definition at line 734 of file qlocale_tools.cpp.
Referenced by _qdtoa().
| #define Sign_Extend | ( | a, | |
| b | |||
| ) | /*no-op*/ |
Definition at line 604 of file qlocale_tools.cpp.
| #define Ten_pmax 22 |
Definition at line 726 of file qlocale_tools.cpp.
| #define Tiny0 0 |
Definition at line 736 of file qlocale_tools.cpp.
Referenced by qstrtod().
| #define Tiny1 1 |
Definition at line 737 of file qlocale_tools.cpp.
Referenced by qstrtod().
| #define ULLONG_MAX Q_UINT64_C(0xffffffffffffffff) |
Definition at line 69 of file qlocale_tools.cpp.
Referenced by qstrtoull().
| #define ULong quint32 |
Definition at line 831 of file qlocale_tools.cpp.
|
inlinestatic |
|
inlinestatic |
|
static |
Definition at line 2311 of file qlocale_tools.cpp.
Referenced by qdtoa().
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
static |
Definition at line 847 of file qlocale_tools.cpp.
Referenced by _qdtoa(), lshift(), multadd(), pow5mult(), qstrtod(), and p5s_deleter::~p5s_deleter().
|
static |
Definition at line 1386 of file qlocale_tools.cpp.
Referenced by _qdtoa(), and qstrtod().
| QString& decimalForm | ( | QChar | zero, |
| QChar | decimal, | ||
| QChar | group, | ||
| QString & | digits, | ||
| int | decpt, | ||
| uint | precision, | ||
| PrecisionMode | pm, | ||
| bool | always_show_decpt, | ||
| bool | thousands_group | ||
| ) |
Definition at line 116 of file qlocale_tools.cpp.
Referenced by QLocalePrivate::doubleToString().
Definition at line 1227 of file qlocale_tools.cpp.
Referenced by _q_interpolateClockwiseRotation(), _q_interpolateCounterclockwiseRotation(), _q_interpolateShortestRotation(), QDeclarativeVisualDataModel::_q_itemsMoved(), _qdtoa(), QTextDocumentPrivate::adjustDocumentChangesAndCursors(), QScreen::alloc(), QDeclarativeSpringAnimationPrivate::animate(), QKeySequence::assign(), QPatternist::AbstractDateTimeMathematician::calculate(), cmp(), convertARGB32_to_RGBA4444(), QTextDocumentPrivate::documentChange(), QDeclarativeJS::TextWriter::doReplace(), QGraphicsScenePrivate::drawItemHelper(), QTextHtmlExporter::emitBlockAttributes(), formatDifference(), QGradientCache::generateGradientColorTable(), QDeclarativePathViewPrivate::handleMouseMoveEvent(), QDeclarativeListView::itemsInserted(), QNetworkAccessHttpBackend::loadFromCacheIfAllowed(), QTabBar::moveTab(), QToolBarAreaLayoutInfo::moveToolBar(), QElapsedTimer::msecsTo(), QAudioDeviceInfo::nearestFormat(), QApplication::notify(), QPlainTextEditPrivate::pageUpDown(), QDeclarativeBorderImage::paint(), QDateTimeParser::parse(), QDeclarativePathViewPrivate::pointNear(), qstrcmp(), qstrtod(), QColumnView::resizeEvent(), QMdiAreaPrivate::resizeToMinimumTileSize(), QPageSetupWidget::selectPrinter(), QDeclarativePathViewPrivate::setHighlightPosition(), QRectF::setLeft(), QFragmentMapData< QTextBlockData >::setSize(), QRectF::setTop(), QComboBox::showPopup(), QMacStyle::styleHint(), QTimerInfoList::timerRepair(), and ucstricmp().
| QString& exponentForm | ( | QChar | zero, |
| QChar | decimal, | ||
| QChar | exponential, | ||
| QChar | group, | ||
| QChar | plus, | ||
| QChar | minus, | ||
| QString & | digits, | ||
| int | decpt, | ||
| uint | precision, | ||
| PrecisionMode | pm, | ||
| bool | always_show_decpt | ||
| ) |
Definition at line 158 of file qlocale_tools.cpp.
Referenced by QLocalePrivate::doubleToString().
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
Definition at line 997 of file qlocale_tools.cpp.
Referenced by _qdtoa(), pow5mult(), and qstrtod().
|
static |
Definition at line 1145 of file qlocale_tools.cpp.
Referenced by _qdtoa(), and qstrtod().
Definition at line 1007 of file qlocale_tools.cpp.
Referenced by _qdtoa(), pow5mult(), and qstrtod().
Definition at line 856 of file qlocale_tools.cpp.
Referenced by _qdtoa(), pow5mult(), and s2b().
Definition at line 1103 of file qlocale_tools.cpp.
Referenced by _qdtoa(), and qstrtod().
| Q_CORE_EXPORT char* qdtoa | ( | double | d, |
| int | mode, | ||
| int | ndigits, | ||
| int * | decpt, | ||
| int * | sign, | ||
| char ** | rve, | ||
| char ** | resultp | ||
| ) |
Defined in QtCore's qlocale.cpp.
Definition at line 2271 of file qlocale_tools.cpp.
Referenced by _qdtoa(), QLocalePrivate::doubleToString(), isZero(), QPatternist::AbstractFloat< isDouble >::stringValue(), and QPatternist::Decimal::toString().
| Q_CORE_EXPORT double qstrtod | ( | const char * | s00, |
| const char ** | se, | ||
| bool * | ok | ||
| ) |
Definition at line 1570 of file qlocale_tools.cpp.
Referenced by _qdtoa(), QLocalePrivate::bytearrayToDouble(), isZero(), QScript::Lexer::lex(), QDeclarativeJS::Lexer::lex(), and toDouble().
| qlonglong qstrtoll | ( | const char * | nptr, |
| const char ** | endptr, | ||
| register int | base, | ||
| bool * | ok | ||
| ) |
Definition at line 391 of file qlocale_tools.cpp.
Referenced by QLocalePrivate::bytearrayToLongLong(), getWinLocaleName(), and isZero().
| qulonglong qstrtoull | ( | const char * | nptr, |
| const char ** | endptr, | ||
| register int | base, | ||
| bool * | ok | ||
| ) |
Definition at line 310 of file qlocale_tools.cpp.
Referenced by QLocalePrivate::bytearrayToUnsLongLong(), isZero(), and winIso639LangName().
| QString qulltoa | ( | qulonglong | l, |
| int | base, | ||
| const QChar | _zero | ||
| ) |
Definition at line 79 of file qlocale_tools.cpp.
Referenced by QLocalePrivate::longLongToString(), qlltoa(), and QLocalePrivate::unsLongLongToString().
Definition at line 2126 of file qlocale_tools.cpp.
Referenced by _qdtoa().
Definition at line 1499 of file qlocale_tools.cpp.
Referenced by QSimplexConstraint::invert(), qstrtod(), QSimplex::setConstraints(), and QVideoSurfaceFormat::setPixelAspectRatio().
| bool removeGroupSeparators | ( | QLocalePrivate::CharBuff * | num | ) |
Definition at line 188 of file qlocale_tools.cpp.
Referenced by isZero(), and QLocalePrivate::numberToCLocale().
Definition at line 895 of file qlocale_tools.cpp.
Referenced by qstrtod().
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
Definition at line 1544 of file qlocale_tools.cpp.
|
static |
Definition at line 1568 of file qlocale_tools.cpp.
|
static |
Definition at line 1089 of file qlocale_tools.cpp.
|
static |
Definition at line 1534 of file qlocale_tools.cpp.
|
static |
Definition at line 1545 of file qlocale_tools.cpp.
Referenced by qstrtod().