📄 seek.c
字号:
void Seek(DBF * dbf_name, char * commond, FILE ** opened_fp)
{
unsigned j = 0;
int tempInt = 0;
int fushu = FALSE;
commond = strtok(commond," ");
commond = strtok(NULL," ");
if (commond == NULL)
{
puts(" 请输入偏移值");
return;
}
if (commond[j] == '-')
{
fushu = TRUE;
j++;
}
for (;j<strlen(commond); j++)
{
if (!isdigit(commond[j]))
{
printf(" 输入错误,%s 改为整型\n",commond);
return;
}
tempInt = tempInt * 10 + (int)commond[j] - 48;
}
if (fushu)
tempInt = 0 - tempInt;
if (dbf_name->dhRecNO + tempInt < 0)
dbf_name->dhRecNO = 0;
else if (dbf_name->dhRecNO + tempInt >= dbf_name->dhRecCount)
dbf_name->dhRecNO = dbf_name->dhRecCount - 1;
else
dbf_name->dhRecNO = dbf_name->dhRecNO + tempInt;
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -