I want to use atoi function in my program, but I found it not working.
#include <ctype.h>
int value;
value=atoi(buf);
char buf points to “1000” or something like, terminated by \0. I have checked it.
But the value evaluates always to zero. I have tried strtol(), but I get the same error.
- My ADS (ARM Developer Suit) is v1.2 (s3c2440). I can find the libs in armlib path (c_t_xx.l).
- I use
axddebug mode, so I can trace my code. I found"bl, so I think asm code linked right.
__rt_ctype_table"
Please give any advice to fix this issue.
ARM might have a problem with string functions, you haven’t mentioned whether it returns a value and it’s incorrect (i heard it’s a bug and it’s better you should write the function on your own) or there is no value at all.
anyway look at the arm article about it i think it’s the solution – ARM article about string functions