1. int del_substr(char *str, char const *substr)  
  2. {  
  3.     char *strstr1=str;  
  4.     int sublength=strlen(substr);  
  5.  
  6.     if(*str1!='\0' && *substr!='\0')  
  7.     {  
  8.         while (*substr!='\0')  
  9.         {  
  10.             char const *sub=substr;  
  11.             while (*str1!='\0')  
  12.             {  
  13.                 if (*sub==*str1)  
  14.                 {  
  15.                     sub++;  
  16.                     str1++;  
  17.                 }  
  18.                 else{  
  19.                     sub=substr;  
  20.                     str1++;  
  21.                 }  
  22.                 if (*sub=='\0'){  
  23.                       
  24.                     while (*str1!='\0')  
  25.                     {  
  26.                         *(str1-sublength)=*str1;  
  27.                         str1++;  
  28.                     }  
  29.                     *(str1-sublength)='\0';  
  30.                     return 1;  
  31.                 }  
  32.             }  
  33.             if (*str1=='\0') return 0;  
  34.         }         
  35.     }else return 0;  
  36.  
  37.