[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9703: atoi -> strto(u)l
From: |
Markus Gothe |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9703: atoi -> strto(u)l |
Date: |
Tue, 09 Sep 2008 06:07:37 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9703
committer: Markus Gothe <address@hidden>
branch nick: gnash
timestamp: Tue 2008-09-09 06:07:37 +0200
message:
atoi -> strto(u)l
modified:
extensions/mysql/mysql_table.cpp
gui/Player.cpp
libbase/GC.cpp
libcore/movie_root.cpp
testsuite/misc-ming.all/action_execution_order_test8.c
=== modified file 'extensions/mysql/mysql_table.cpp'
--- a/extensions/mysql/mysql_table.cpp 2008-01-21 23:29:08 +0000
+++ b/extensions/mysql/mysql_table.cpp 2008-09-09 04:07:37 +0000
@@ -61,7 +61,7 @@
case MYSQL_TYPE_TINY:
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_INT24:
-
val.set_int(atoi(row[j]));
+
val.set_int(stroul(row[j], NULL, 0));
break;
case MYSQL_TYPE_DECIMAL:
@@ -69,7 +69,7 @@
case MYSQL_TYPE_FLOAT:
case MYSQL_TYPE_DOUBLE:
case MYSQL_TYPE_LONGLONG:
-
val.set_double(atof(row[j]));
+
val.set_double(strtod(row[j], NULL));
break;
case MYSQL_TYPE_NULL:
@@ -114,7 +114,7 @@
if ( get_member_default(name, val) == false )
{
// hack
- int idx = atoi(name.c_str());
+ int idx = strtoul(name.c_str(), NULL, 0);
if (idx >=0 && idx < size())
{
*val = m_data[idx];
=== modified file 'gui/Player.cpp'
--- a/gui/Player.cpp 2008-09-04 18:03:23 +0000
+++ b/gui/Player.cpp 2008-09-09 04:07:37 +0000
@@ -620,7 +620,7 @@
if (noCaseCompare(args, "true")) _gui->allowScale(true);
else
{
- if ( atoi(args.c_str()) ) _gui->allowScale(true);
+ if (strtol(args.c_str(), NULL, 0)) _gui->allowScale(true);
else _gui->allowScale(false);
}
return;
=== modified file 'libbase/GC.cpp'
--- a/libbase/GC.cpp 2008-08-07 10:02:35 +0000
+++ b/libbase/GC.cpp 2008-09-09 04:07:37 +0000
@@ -43,7 +43,7 @@
char *gcgap = std::getenv("GNASH_GC_TRIGGER_THRESHOLD");
if ( gcgap )
{
- unsigned int gap = atoi(gcgap);
+ unsigned int gap = strtoul(gcgap, NULL, 0);
_singleton->maxNewCollectablesCount = gap;
}
return *_singleton;
=== modified file 'libcore/movie_root.cpp'
--- a/libcore/movie_root.cpp 2008-09-04 12:09:34 +0000
+++ b/libcore/movie_root.cpp 2008-09-09 04:07:37 +0000
@@ -2072,7 +2072,7 @@
if ( target.compare(0, 6, "_level") == 0 &&
target.find_first_not_of("0123456789", 7) == std::string::npos )
{
- unsigned int levelno = atoi(target.c_str()+6);
+ unsigned int levelno = strtoul(target.c_str()+6, NULL, 0);
log_debug(_("processLoadMovieRequest: Testing _level loading (level
%u)"), levelno);
loadLevel(levelno, url);
return;
@@ -2131,7 +2131,7 @@
}
if ( name.find_first_not_of("0123456789", 7) != std::string::npos ) return
false;
- levelno = atoi(name.c_str()+6); // getting 0 here for "_level" is intentional
+ levelno = strtoul(name.c_str()+6, NULL, 0); // getting 0 here for "_level"
is intentional
return true;
}
=== modified file 'testsuite/misc-ming.all/action_execution_order_test8.c'
--- a/testsuite/misc-ming.all/action_execution_order_test8.c 2007-10-01
09:03:24 +0000
+++ b/testsuite/misc-ming.all/action_execution_order_test8.c 2008-09-09
04:07:37 +0000
@@ -55,18 +55,18 @@
int
-main(int argc, char** argv)
+main(int argc, char *argv[])
{
SWFMovie mo;
SWFMovieClip mc1, mc2, dejagnuclip;
SWFDisplayItem it1, it2;
int outputVersion = DEF_OUTPUT_VERSION;
- const char *srcdir=".";
- if ( argc>1 )
+ const char *srcdir = ".";
+ if (argc > 1)
{
- srcdir=argv[1];
- if ( argc>2 ) outputVersion = atoi(argv[2]);
+ srcdir = argv[1];
+ if (argc > 2) outputVersion = strtol(argv[2], NULL, 0);
}
else
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9703: atoi -> strto(u)l,
Markus Gothe <=