summaryrefslogtreecommitdiffstats
path: root/src/tools/qlocale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/qlocale.cpp')
-rw-r--r--src/tools/qlocale.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/src/tools/qlocale.cpp b/src/tools/qlocale.cpp
index 3dabc3ee6..2b9a10bc4 100644
--- a/src/tools/qlocale.cpp
+++ b/src/tools/qlocale.cpp
@@ -163,8 +163,8 @@ static char *_qdtoa(double d, int mode, int ndigits, int *decpt,
int *sign, char **rve, char **digits_str);
static double qstrtod(const char *s00, char const **se, bool *ok);
#endif
-static Q_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok);
-static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok);
+static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok);
+static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok);
static inline bool compareBits(double d1, double d2)
{
@@ -2677,7 +2677,7 @@ TQString TQLocale::countryToString(Country country)
short TQLocale::toShort(const TQString &s, bool *ok) const
{
- Q_LLONG i = toLongLong(s, ok);
+ TQ_LLONG i = toLongLong(s, ok);
if (i < SHRT_MIN || i > SHRT_MAX) {
if (ok != 0)
*ok = FALSE;
@@ -2700,7 +2700,7 @@ short TQLocale::toShort(const TQString &s, bool *ok) const
ushort TQLocale::toUShort(const TQString &s, bool *ok) const
{
- Q_ULLONG i = toULongLong(s, ok);
+ TQ_ULLONG i = toULongLong(s, ok);
if (i > USHRT_MAX) {
if (ok != 0)
*ok = FALSE;
@@ -2723,7 +2723,7 @@ ushort TQLocale::toUShort(const TQString &s, bool *ok) const
int TQLocale::toInt(const TQString &s, bool *ok) const
{
- Q_LLONG i = toLongLong(s, ok);
+ TQ_LLONG i = toLongLong(s, ok);
if (i < INT_MIN || i > INT_MAX) {
if (ok != 0)
*ok = FALSE;
@@ -2746,7 +2746,7 @@ int TQLocale::toInt(const TQString &s, bool *ok) const
uint TQLocale::toUInt(const TQString &s, bool *ok) const
{
- Q_ULLONG i = toULongLong(s, ok);
+ TQ_ULLONG i = toULongLong(s, ok);
if (i > UINT_MAX) {
if (ok != 0)
*ok = FALSE;
@@ -2767,15 +2767,15 @@ uint TQLocale::toUInt(const TQString &s, bool *ok) const
\sa toString()
*/
-Q_LONG TQLocale::toLong(const TQString &s, bool *ok) const
+TQ_LONG TQLocale::toLong(const TQString &s, bool *ok) const
{
- Q_LLONG i = toLongLong(s, ok);
+ TQ_LLONG i = toLongLong(s, ok);
if (i < LONG_MIN || i > LONG_MAX) {
if (ok != 0)
*ok = FALSE;
return 0;
}
- return (Q_LONG) i;
+ return (TQ_LONG) i;
}
/*!
@@ -2790,15 +2790,15 @@ Q_LONG TQLocale::toLong(const TQString &s, bool *ok) const
\sa toString()
*/
-Q_ULONG TQLocale::toULong(const TQString &s, bool *ok) const
+TQ_ULONG TQLocale::toULong(const TQString &s, bool *ok) const
{
- Q_ULLONG i = toULongLong(s, ok);
+ TQ_ULLONG i = toULongLong(s, ok);
if (i > ULONG_MAX) {
if (ok != 0)
*ok = FALSE;
return 0;
}
- return (Q_ULONG) i;
+ return (TQ_ULONG) i;
}
/*!
@@ -2814,7 +2814,7 @@ Q_ULONG TQLocale::toULong(const TQString &s, bool *ok) const
*/
-Q_LLONG TQLocale::toLongLong(const TQString &s, bool *ok) const
+TQ_LLONG TQLocale::toLongLong(const TQString &s, bool *ok) const
{
return d->stringToLongLong(s, 0, ok, TQLocalePrivate::ParseGroupSeparators);
}
@@ -2832,7 +2832,7 @@ Q_LLONG TQLocale::toLongLong(const TQString &s, bool *ok) const
*/
-Q_ULLONG TQLocale::toULongLong(const TQString &s, bool *ok) const
+TQ_ULLONG TQLocale::toULongLong(const TQString &s, bool *ok) const
{
return d->stringToUnsLongLong(s, 0, ok, TQLocalePrivate::ParseGroupSeparators);
}
@@ -2912,7 +2912,7 @@ double TQLocale::toDouble(const TQString &s, bool *ok) const
\sa toLongLong()
*/
-TQString TQLocale::toString(Q_LLONG i) const
+TQString TQLocale::toString(TQ_LLONG i) const
{
return d->longLongToString(i, -1, 10, -1, TQLocalePrivate::ThousandsGroup);
}
@@ -2923,7 +2923,7 @@ TQString TQLocale::toString(Q_LLONG i) const
\sa toULongLong()
*/
-TQString TQLocale::toString(Q_ULLONG i) const
+TQString TQLocale::toString(TQ_ULLONG i) const
{
return d->unsLongLongToString(i, -1, 10, -1, TQLocalePrivate::ThousandsGroup);
}
@@ -3033,7 +3033,7 @@ TQLocale TQLocale::system()
*/
/*!
-\fn TQString TQLocale::toString(Q_LONG i) const
+\fn TQString TQLocale::toString(TQ_LONG i) const
\overload
@@ -3041,7 +3041,7 @@ TQLocale TQLocale::system()
*/
/*!
-\fn TQString TQLocale::toString(Q_ULONG i) const
+\fn TQString TQLocale::toString(TQ_ULONG i) const
\overload
@@ -3075,7 +3075,7 @@ static char digitToCLocale(TQChar zero, TQChar d)
return TQChar(0);
}
-static TQString qulltoa(Q_ULLONG l, int base, const TQLocalePrivate &locale)
+static TQString qulltoa(TQ_ULLONG l, int base, const TQLocalePrivate &locale)
{
TQChar buff[65]; // length of MAX_ULLONG in base 2
TQChar *p = buff + 65;
@@ -3107,7 +3107,7 @@ static TQString qulltoa(Q_ULLONG l, int base, const TQLocalePrivate &locale)
return TQString(p, 65 - (p - buff));
}
-static TQString qlltoa(Q_LLONG l, int base, const TQLocalePrivate &locale)
+static TQString qlltoa(TQ_LLONG l, int base, const TQLocalePrivate &locale)
{
return qulltoa(l < 0 ? -l : l, base, locale);
}
@@ -3368,7 +3368,7 @@ TQString TQLocalePrivate::doubleToString(double d,
return num_str;
}
-TQString TQLocalePrivate::longLongToString(Q_LLONG l, int precision,
+TQString TQLocalePrivate::longLongToString(TQ_LLONG l, int precision,
int base, int width,
unsigned flags) const
{
@@ -3453,7 +3453,7 @@ TQString TQLocalePrivate::longLongToString(Q_LLONG l, int precision,
return num_str;
}
-TQString TQLocalePrivate::unsLongLongToString(Q_ULLONG l, int precision,
+TQString TQLocalePrivate::unsLongLongToString(TQ_ULLONG l, int precision,
int base, int width,
unsigned flags) const
{
@@ -3703,7 +3703,7 @@ double TQLocalePrivate::stringToDouble(TQString num,
return d;
}
-Q_LLONG TQLocalePrivate::stringToLongLong(TQString num, int base,
+TQ_LLONG TQLocalePrivate::stringToLongLong(TQString num, int base,
bool *ok,
GroupSeparatorMode group_sep_mode) const
{
@@ -3716,7 +3716,7 @@ Q_LLONG TQLocalePrivate::stringToLongLong(TQString num, int base,
bool _ok;
const char *endptr;
const char *num_buff = num.latin1();
- Q_LLONG l = qstrtoll(num_buff, &endptr, base, &_ok);
+ TQ_LLONG l = qstrtoll(num_buff, &endptr, base, &_ok);
if (!_ok || *endptr != '\0') {
if (ok != 0)
@@ -3729,7 +3729,7 @@ Q_LLONG TQLocalePrivate::stringToLongLong(TQString num, int base,
return l;
}
-Q_ULLONG TQLocalePrivate::stringToUnsLongLong(TQString num, int base,
+TQ_ULLONG TQLocalePrivate::stringToUnsLongLong(TQString num, int base,
bool *ok,
GroupSeparatorMode group_sep_mode) const
{
@@ -3742,7 +3742,7 @@ Q_ULLONG TQLocalePrivate::stringToUnsLongLong(TQString num, int base,
bool _ok;
const char *endptr;
const char *num_buff = num.latin1();
- Q_ULLONG l = qstrtoull(num_buff, &endptr, base, &_ok);
+ TQ_ULLONG l = qstrtoull(num_buff, &endptr, base, &_ok);
if (!_ok || *endptr != '\0') {
if (ok != 0)
@@ -3792,17 +3792,17 @@ Q_ULLONG TQLocalePrivate::stringToUnsLongLong(TQString num, int base,
// "$FreeBSD: src/lib/libc/stdlib/strtoull.c,v 1.5.2.1 2001/03/02 09:45:20 obrien Exp $";
/*
- * Convert a string to an Q_ULLONG integer.
+ * Convert a string to an TQ_ULLONG integer.
*
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
-static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok)
+static TQ_ULLONG qstrtoull(const char *nptr, const char **endptr, register int base, bool *ok)
{
register const char *s = nptr;
- register Q_ULLONG acc;
+ register TQ_ULLONG acc;
register unsigned char c;
- register Q_ULLONG qbase, cutoff;
+ register TQ_ULLONG qbase, cutoff;
register int neg, any, cutlim;
if (ok != 0)
@@ -3835,8 +3835,8 @@ static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int ba
if (base == 0)
base = c == '0' ? 8 : 10;
qbase = (unsigned)base;
- cutoff = (Q_ULLONG)ULLONG_MAX / qbase;
- cutlim = (Q_ULLONG)ULLONG_MAX % qbase;
+ cutoff = (TQ_ULLONG)ULLONG_MAX / qbase;
+ cutlim = (TQ_ULLONG)ULLONG_MAX % qbase;
for (acc = 0, any = 0;; c = *s++) {
if (!isascii(c))
break;
@@ -3873,17 +3873,17 @@ static Q_ULLONG qstrtoull(const char *nptr, const char **endptr, register int ba
/*
- * Convert a string to a Q_LLONG integer.
+ * Convert a string to a TQ_LLONG integer.
*
* Ignores `locale' stuff. Assumes that the upper and lower case
* alphabets and digits are each contiguous.
*/
-static Q_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok)
+static TQ_LLONG qstrtoll(const char *nptr, const char **endptr, register int base, bool *ok)
{
register const char *s;
- register Q_ULLONG acc;
+ register TQ_ULLONG acc;
register unsigned char c;
- register Q_ULLONG qbase, cutoff;
+ register TQ_ULLONG qbase, cutoff;
register int neg, any, cutlim;
if (ok != 0)
@@ -3934,7 +3934,7 @@ static Q_LLONG qstrtoll(const char *nptr, const char **endptr, register int base
* overflow.
*/
qbase = (unsigned)base;
- cutoff = neg ? (Q_ULLONG)-(LLONG_MIN + LLONG_MAX) + LLONG_MAX
+ cutoff = neg ? (TQ_ULLONG)-(LLONG_MIN + LLONG_MAX) + LLONG_MAX
: LLONG_MAX;
cutlim = cutoff % qbase;
cutoff /= qbase;
@@ -4075,8 +4075,8 @@ __RCSID("$NetBSD: strtod.c,v 1.26 1998/02/03 18:44:21 perry Exp $");
#define VAX
#endif
-#define Long Q_INT32
-#define ULong Q_UINT32
+#define Long TQ_INT32
+#define ULong TQ_UINT32
#define MALLOC malloc
#define CONST const