projects
/
anna.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Message statistics
[anna.git]
/
source
/
core
/
functions.cpp
diff --git
a/source/core/functions.cpp
b/source/core/functions.cpp
index
6a660df
..
f75902d
100644
(file)
--- a/
source/core/functions.cpp
+++ b/
source/core/functions.cpp
@@
-94,13
+94,12
@@
throw() {
string functions::asString(const S64 number)
throw() {
char aux [24];
string functions::asString(const S64 number)
throw() {
char aux [24];
- sprintf(aux, "%lld", number);
-
/*
#ifdef __anna64__
+
//
sprintf(aux, "%lld", number);
+ #ifdef __anna64__
sprintf (aux, "%ld", number);
#else
sprintf (aux, "%lld", number);
#endif
sprintf (aux, "%ld", number);
#else
sprintf (aux, "%lld", number);
#endif
- */
return string(aux);
}
return string(aux);
}
@@
-114,14
+113,12
@@
throw() {
string functions::asString(const U64 number)
throw() {
char aux [16];
string functions::asString(const U64 number)
throw() {
char aux [16];
- sprintf(aux, "%llu", number);
- /*
+ //sprintf(aux, "%llu", number);
#ifdef __anna64__
sprintf (aux, "%lu", number);
#else
sprintf (aux, "%llu", number);
#endif
#ifdef __anna64__
sprintf (aux, "%lu", number);
#else
sprintf (aux, "%llu", number);
#endif
- */
return string(aux);
}
return string(aux);
}
@@
-171,14
+168,12
@@
throw() {
string functions::asHexString(const S64 number)
throw() {
char aux [32];
string functions::asHexString(const S64 number)
throw() {
char aux [32];
- sprintf(aux, "0x%llx", number);
- /*
+ //sprintf(aux, "0x%llx", number);
#ifdef __anna64__
sprintf (aux, "0x%lx", number);
#else
sprintf (aux, "0x%llx", number);
#endif
#ifdef __anna64__
sprintf (aux, "0x%lx", number);
#else
sprintf (aux, "0x%llx", number);
#endif
- */
return string(aux);
}
return string(aux);
}
@@
-310,14
+305,12
@@
throw(RuntimeException) {
S64 functions::asInteger64(const char* str)
throw() {
S64 number = 0;
S64 functions::asInteger64(const char* str)
throw() {
S64 number = 0;
- sscanf(str, "%lld", &number);
- /*
+ //sscanf(str, "%lld", &number);
#ifdef __anna64__
sscanf (str, "%ld", &number);
#else
sscanf (str, "%lld", &number);
#endif
#ifdef __anna64__
sscanf (str, "%ld", &number);
#else
sscanf (str, "%lld", &number);
#endif
- */
return number;
}
return number;
}
@@
-416,8
+409,8
@@
throw() {
int r = -1; // r will be lg(v)
unsigned int t, tt; // temporaries
int r = -1; // r will be lg(v)
unsigned int t, tt; // temporaries
- if(
tt = v >> 16
) {
- r = (
t = tt >> 8
) ? 24 + LogTable256[t] : 16 + LogTable256[tt];
+ if(
(tt = v >> 16)
) {
+ r = (
(t = tt >> 8)
) ? 24 + LogTable256[t] : 16 + LogTable256[tt];
} else {
r = (t = v >> 8) ? 8 + LogTable256[t] : LogTable256[v];
}
} else {
r = (t = v >> 8) ? 8 + LogTable256[t] : LogTable256[v];
}