两个小函数,表达什么意思?
1.
void xitoa(int n, char s[])
{
int i,sign;
if((sign=n)<0)
n=-n;
i=0;
do{
s[i++]=n % 10 + '0';
} while((n /= 10) > 0);
if (sign < 0)
s[i++]= '-';
s[i] = '\0';
reverse(s);
}
2.
int xatoi_intel(ibuf, start, size)
unsigned char *ibuf;
int start, size;
{
int i;
int itmp;
int val;
val = 0;
for(i=size-1; i>=0; i--) {
itmp = (int) ibuf[start + i];
itmp <<= 8 * i;
val += itmp;
}
return val;
}