restrict function,该如何处理
restrict function
这是某一个函数的代码,头一个实现大小写转化,我没有用什么被禁用的函数为什么会出现Restrict function的错误呢?
void low_01(char *str)
{
char *p;
for(p = str; p < str+strlen(str);p++)
{
if(*p >= 'A' && *p <= 'Z')
*p = *p+32;
}
}
int replace(char *source, char *s1,char *s2, int flag)
{
char temp[250]={};
int i, j, x, y, num, lenso, len1, len2;
int count[250], mark[250];
char copy[250][250]={};
char so_cpy[250], s1_cpy[250];
lenso = strlen(source);
len1 = strlen(s1);
len2 = strlen(s2);
for(i=0;i < 202;i++)
mark[i] = 10086;
if(flag == 1)
{
num = 0;
y = 0;
for(j = 0; j < lenso -(len1 - 1);j++)
{
x=0;
count[j] = 0;
for(i = j; i < j+len1;i++)
{
copy[j][x] = source[i];
if(copy[j][x] == s1[x])
count[j]+=1;
x+=1;
}
if(count[j] == len1)
{
mark[y] = j;
y++;
num+=1;
}
}
mark[y+1] = 10086;
x=y=0;
for(i = 0;i < 250;i++)
{
if(i == mark[x])
{
strcat(temp,s2);
i = i + len1-1;
y = y + len2;
x++;
}
else
{
temp[y] = source[i];
y = y + 1;
}
}
strcpy(source,temp);
return num;
}
if(flag == 0)
{
strcpy(so_cpy,source);
strcpy(s1_cpy,s1);
low_01(so_cpy);
low_01(s1_cpy);
num = 0;
y = 0;
for(j = 0; j < lenso -(len1 - 1);j++)
{
x=0;
count[j] = 0;
for(i = j; i < j+len1;i++)
{
copy[j][x] = so_cpy[i];
if(copy[j][x] == s1_cpy[x])
count[j]+=1;
x+=1;
}
if(count[j] == len1)
这是某一个函数的代码,头一个实现大小写转化,我没有用什么被禁用的函数为什么会出现Restrict function的错误呢?
void low_01(char *str)
{
char *p;
for(p = str; p < str+strlen(str);p++)
{
if(*p >= 'A' && *p <= 'Z')
*p = *p+32;
}
}
int replace(char *source, char *s1,char *s2, int flag)
{
char temp[250]={};
int i, j, x, y, num, lenso, len1, len2;
int count[250], mark[250];
char copy[250][250]={};
char so_cpy[250], s1_cpy[250];
lenso = strlen(source);
len1 = strlen(s1);
len2 = strlen(s2);
for(i=0;i < 202;i++)
mark[i] = 10086;
if(flag == 1)
{
num = 0;
y = 0;
for(j = 0; j < lenso -(len1 - 1);j++)
{
x=0;
count[j] = 0;
for(i = j; i < j+len1;i++)
{
copy[j][x] = source[i];
if(copy[j][x] == s1[x])
count[j]+=1;
x+=1;
}
if(count[j] == len1)
{
mark[y] = j;
y++;
num+=1;
}
}
mark[y+1] = 10086;
x=y=0;
for(i = 0;i < 250;i++)
{
if(i == mark[x])
{
strcat(temp,s2);
i = i + len1-1;
y = y + len2;
x++;
}
else
{
temp[y] = source[i];
y = y + 1;
}
}
strcpy(source,temp);
return num;
}
if(flag == 0)
{
strcpy(so_cpy,source);
strcpy(s1_cpy,s1);
low_01(so_cpy);
low_01(s1_cpy);
num = 0;
y = 0;
for(j = 0; j < lenso -(len1 - 1);j++)
{
x=0;
count[j] = 0;
for(i = j; i < j+len1;i++)
{
copy[j][x] = so_cpy[i];
if(copy[j][x] == s1_cpy[x])
count[j]+=1;
x+=1;
}
if(count[j] == len1)