You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
372 B
C++
25 lines
372 B
C++
|
|
|
|
int iRet;
|
|
int iNum = 0;
|
|
int iLen = 0;
|
|
for (;;)
|
|
{
|
|
if (iNum > 10)
|
|
{
|
|
return -1;
|
|
}
|
|
|
|
iRet = write(fp, p1 + len, (strlen(p1) - len);
|
|
if (iRet < 0)
|
|
{
|
|
return -2;
|
|
}
|
|
if ((iRet = write(fp, p1 + len, (strlen(p1) - len))) == 0) //if((n=write(fp, p1+len, 3)) == 0)
|
|
{ //strlen(p1) = 21
|
|
|
|
return 0;
|
|
}
|
|
iLen += iRet;
|
|
}
|