Commit a147d903 authored by Vitaly Lipatov's avatar Vitaly Lipatov

use uni_atoi instead atoi

parent bccb45a7
......@@ -649,12 +649,12 @@ int alarm(string args, UniversalInterface &ui)
if(separateArgs(args,arg))
{
UniSetTypes::MessageCode code = atoi(arg.c_str());
UniSetTypes::MessageCode code = uni_atoi(arg);
UniSetTypes::MessageCode cause(UniSetTypes::DefaultMessageCode);
if(separateArgs(args,arg))
{
cause = atoi(arg.c_str());
cause = uni_atoi(arg);
}
else
{
......
......@@ -65,7 +65,7 @@ int main( int argc, char **argv )
break;
case 't':
tout = atoi(optarg);
tout = uni_atoi(optarg);
break;
case 'a':
......@@ -81,7 +81,7 @@ int main( int argc, char **argv )
break;
case 'c':
replyVal = atoi(optarg);
replyVal = uni_atoi(optarg);
break;
case '?':
......
......@@ -142,7 +142,7 @@ int main( int argc, char **argv )
reg = ModbusRTU::str2mbData(argv[optind]);
if( checkArg(optind+1,argc,argv) )
count = atoi(argv[optind+1]);
count = uni_atoi(argv[optind+1]);
break;
case 'f':
......@@ -196,7 +196,7 @@ int main( int argc, char **argv )
break;
case 't':
tout = atoi(optarg);
tout = uni_atoi(optarg);
break;
case 'a':
......
......@@ -64,7 +64,7 @@ int main( int argc, char **argv )
break;
case 't':
tout = atoi(optarg);
tout = uni_atoi(optarg);
break;
case 'a':
......
......@@ -58,11 +58,11 @@ int main( int argc, char **argv )
break;
case 'p':
port = atoi(optarg);
port = uni_atoi(optarg);
break;
case 't':
tout = atoi(optarg);
tout = uni_atoi(optarg);
break;
case 'a':
......
......@@ -108,7 +108,7 @@ int main( int argc, char **argv )
reg = ModbusRTU::str2mbData(argv[optind]);
if( optind+1<argc && (argv[optind+1])[0]!='-' )
count = atoi(argv[optind+1]);
count = uni_atoi(argv[optind+1]);
break;
case 'f':
......@@ -151,11 +151,11 @@ int main( int argc, char **argv )
break;
case 'p':
port = atoi(optarg);
port = uni_atoi(optarg);
break;
case 't':
tout = atoi(optarg);
tout = uni_atoi(optarg);
break;
case 'a':
......
......@@ -102,44 +102,44 @@ int main(int argc, char* argv[])
return 0;
case 'r':
chan = atoi(optarg);
case 'r':
chan = uni_atoi(optarg);
break;
case 'd':
case 'd':
dev = optarg;
break;
case 's':
subdev = atoi(optarg);
case 's':
subdev = uni_atoi(optarg);
break;
case 'x':
range = atoi(optarg);
case 'x':
range = uni_atoi(optarg);
break;
case 'a':
aref = atoi(optarg);
case 'a':
aref = uni_atoi(optarg);
break;
case 'o':
openFileXml=optarg;
openFileXml = optarg;
break;
case 'f':
saveFileXml=optarg;
saveFileXml = optarg;
break;
case 'n':
nodeXml=optarg;
nodeXml = optarg;
break;
case 'i':
sort_rise=atoi(optarg);
sort_rise = uni_atoi(optarg);
break;
case 'c':
sort_cal=atoi(optarg);
sort_cal = uni_atoi(optarg);
break;
case '?':
......
......@@ -1886,7 +1886,7 @@ void RTUExchange::updateMTR( RegMap::iterator& rit )
else
{
MTR::T4 t(r->mbval);
IOBase::processingAsAI( &(*it),atoi(t.sval.c_str()), shm, force );
IOBase::processingAsAI( &(*it), uni_atoi(t.sval), shm, force );
}
continue;
}
......
......@@ -59,7 +59,7 @@ int main( int argc, char **argv )
break;
case 't':
tout = atoi(optarg);
tout = uni_atoi(optarg);
break;
case 'q':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment