atol实现
来源:互联网 发布:winpe 加载网络 编辑:程序博客网 时间:2024/06/13 22:42
ong __cdecl atol(
const char *nptr
)
{
int c; /* current char */
long total; /* current total */
int sign; /* if '-', then negative, otherwise positive */
/* skip whitespace */
while ( isspace((int)(unsigned char)*nptr) )
++nptr;
c = (int)(unsigned char)*nptr++; sign = c; /* save sign indication */
if (c == '-' || c == '+')
c = (int)(unsigned char)*nptr++; /* skip sign */
total = 0;
while (isdigit(c)) {
total = 10 * total + (c - '0'); /* accumulate digit */
c = (int)(unsigned char)*nptr++; /* get next char */
}
if (sign == '-')
return -total;
else
return total; /* return result, negated if necessary */
}
const char *nptr
)
{
int c; /* current char */
long total; /* current total */
int sign; /* if '-', then negative, otherwise positive */
/* skip whitespace */
while ( isspace((int)(unsigned char)*nptr) )
++nptr;
c = (int)(unsigned char)*nptr++; sign = c; /* save sign indication */
if (c == '-' || c == '+')
c = (int)(unsigned char)*nptr++; /* skip sign */
total = 0;
while (isdigit(c)) {
total = 10 * total + (c - '0'); /* accumulate digit */
c = (int)(unsigned char)*nptr++; /* get next char */
}
if (sign == '-')
return -total;
else
return total; /* return result, negated if necessary */
}
- atol实现
- atol的实现代码
- atoi atol实现
- atol函数简单实现
- atol
- atol
- 自己实现 atol, inet_addr 源代码
- atol(atoi)函数的实现要点
- 【转载整理】atol的实现代码
- atol(atoi)函数的实现要点
- atoi,atol,strtod,strtol,strtoul实现类型转换
- atoi,atol,strtod,strtol,strtoul实现类型转换
- atoi,atol,strtod,strtol,strtoul实现类型转换
- atoi,atol,strtod,strtol,strtoul实现类型转换
- atoi,atol,strtod,strtol,strtoul实现类型转换
- atoi,atol,strtod,strtol,strtoul实现类型转换
- atoi,atol,strtod,strtol,strtoul实现类型转
- atoi,atol,strtod,strtol,strtoul实现类型转换
- FreeBSD/Linux shared library dependency
- 堆和栈的区别
- cocos2d-x开发游戏时,使用Texture packer来合并图片
- android 浏览器插件开发 - 插件库
- Gartner:2011年十大战略性IT技术
- atol实现
- JOJ 1984: A Round Peg in a Ground Hole (判断点在凸多边形内)
- 关于BitmapData画图方法效率的测试和对比
- linux学习笔记(二) linux下发布tomcat应用程序
- Xtreme.Toolkit.Pro v11.2.1汉化方法
- 非递归方式遍历目录及其子目录的文件
- Android---AlarmManager(全局定时器/闹钟)指定时长或以周期形式执行某项操作
- QTP9.2破解方法
- UltraEdit search and replace