1: /* trimcpy.c - strip [lt]wsp and replace newlines with spaces */
   2: 
   3: #include "../h/mh.h"
   4: #include <ctype.h>
   5: #include <stdio.h>
   6: 
   7: 
   8: char *trimcpy (cp)
   9: register char *cp;
  10: {
  11:     register char  *sp;
  12: 
  13:     while (isspace (*cp))
  14:     cp++;
  15:     for (sp = cp + strlen (cp) - 1; sp >= cp; sp--)
  16:     if (isspace (*sp))
  17:         *sp = NULL;
  18:     else
  19:         break;
  20:     for (sp = cp; *sp; sp++)
  21:     if (isspace (*sp))
  22:         *sp = ' ';
  23: 
  24:     return getcpy (cp);
  25: }

Defined functions

trimcpy defined in line 8; used 3 times
Last modified: 1985-11-06
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1003
Valid CSS Valid XHTML 1.0 Strict