summaryrefslogtreecommitdiff
path: root/base/str.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2005-12-23 13:32:31 -0500
committerSteve Reinhardt <stever@eecs.umich.edu>2005-12-23 13:32:31 -0500
commit0cdcb08d908bc20f614dd164f8e43287406e81a3 (patch)
treeba6da1e59f9ca5c67c9aa067f374c77129722a52 /base/str.cc
parent627f540e3119e09747005e208daa8153b22d9967 (diff)
downloadgem5-0cdcb08d908bc20f614dd164f8e43287406e81a3.tar.xz
Change base/intmath.{cc,hh} to follow m5 style.
arch/alpha/alpha_tru64_process.cc: base/intmath.hh: base/statistics.cc: base/str.cc: cpu/o3/btb.cc: sim/process.cc: sim/syscall_emul.hh: Rename intmath.hh functions to follow m5 style (RoundUp -> roundUp, etc.). base/intmath.cc: Rename intmath.hh functions to follow m5 style (RoundUp -> roundUp, etc.). Also reindent code in m5 style. --HG-- extra : convert_revision : 57b853002bc3c9911e122599d9062b41a06d8e6a
Diffstat (limited to 'base/str.cc')
-rw-r--r--base/str.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/base/str.cc b/base/str.cc
index 15f44dad2..5f7f50286 100644
--- a/base/str.cc
+++ b/base/str.cc
@@ -142,7 +142,7 @@ __to_number(string value, T &retval)
int i = 0;
char c = value[i];
- if (!IsDec(c)) {
+ if (!isDec(c)) {
if (c == '-' && sign)
negative = true;
else
@@ -161,7 +161,7 @@ __to_number(string value, T &retval)
if (sign && negative)
return false;
- if (!IsOct(c)) {
+ if (!isOct(c)) {
if (c == 'X' || c == 'x') {
hex = true;
oct = false;
@@ -170,7 +170,7 @@ __to_number(string value, T &retval)
}
else
retval += c - '0';
- } else if (!IsDec(c))
+ } else if (!isDec(c))
goto multiply;
else {
if (sign && negative && c == '0')
@@ -190,18 +190,18 @@ __to_number(string value, T &retval)
for (i = 2; i <= last ; i++) {
c = value[i];
- if (!IsHex(c))
+ if (!isHex(c))
return false;
if (retval > hexmax) return false;
retval *= 16;
- retval += Hex2Int(c);
+ retval += hex2Int(c);
}
return true;
} else if (oct) {
for (i = 2; i <= last ; i++) {
c = value[i];
- if (!IsOct(c))
+ if (!isOct(c))
return false;
if (retval > octmax) return false;
@@ -213,7 +213,7 @@ __to_number(string value, T &retval)
for (i = 2; i < last ; i++) {
c = value[i];
- if (!IsDec(c))
+ if (!isDec(c))
goto multiply;
if (retval > decmax) return false;
@@ -226,7 +226,7 @@ __to_number(string value, T &retval)
}
c = value[last];
- if (IsDec(c)) {
+ if (isDec(c)) {
if (retval > decmax) return false;
bool atmax = retval == decmax;
@@ -274,7 +274,7 @@ __to_number(string value, T &retval)
mult = 0;
for (i++; i <= last; i++) {
c = value[i];
- if (!IsDec(c))
+ if (!isDec(c))
return false;
mult *= 10;