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

  1.  
  2. /*
  3. ** getwrd.c -- get non-blank word from in[i] into out, incr i
  4. */
  5. getwrd(in, i, out) char in[], out[]; int *i; {
  6.   char c;  int j;
  7.   while(isspace(in[*i])) ++*i;
  8.   j=0;
  9.   while(c=in[*i]) {
  10.     if(isspace(c)) break;
  11.     out[j++]=c;
  12.     ++*i;
  13.     }
  14.   out[j]=NULL;
  15.   return j;
  16.   }
  17.