home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / compiler / small_c / cb / sources / catsub.c < prev    next >
Encoding:
Text File  |  1985-07-22  |  512 b   |  25 lines

  1.  
  2. /*
  3. ** catsub.c -- add replacement text to end of new
  4. */
  5. catsub(lin, from, to, sub, new, k, maxnew)
  6.   char lin[], new[], sub[];
  7.   int from, to, *k, maxnew; {
  8.  
  9.   int i, j;
  10.   i=0;
  11.   while(sub[i]!=NULL) {
  12.     if(sub[i]==DITCODE) {
  13.       j=from;
  14.       while(j < to) addset(lin[j++], new, k, maxnew);
  15.       }
  16.     else addset(sub[i], new, k, maxnew);
  17.     ++i;
  18.     }
  19.   }
  20. /
  21.   if(addset(NULL, sub, &j, MAXPAT)==NO) return ERR; /** no room **/
  22.   return i;
  23.   }
  24. AT], sub[MAXPAT];
  25. char arg[MAXARG];