Added all of the MH sources, including RCS files, in
[mmh] / docs / historical / mh-6.8.5 / sbr / RCS / trimcpy.c,v
1 head    1.3;
2 access;
3 symbols;
4 locks; strict;
5 comment @ * @;
6
7
8 1.3
9 date    92.12.15.00.20.22;      author jromine; state Exp;
10 branches;
11 next    1.2;
12
13 1.2
14 date    92.01.31.21.58.26;      author jromine; state Exp;
15 branches;
16 next    1.1;
17
18 1.1
19 date    92.01.31.21.57.47;      author jromine; state Exp;
20 branches;
21 next    ;
22
23
24 desc
25 @@
26
27
28 1.3
29 log
30 @endif sugar
31 @
32 text
33 @/* trimcpy.c - strip [lt]wsp and replace newlines with spaces */
34 #ifndef       lint
35 static char ident[] = "@@(#)$Id: trimcpy.c,v 1.2 1992/01/31 21:58:26 jromine Exp jromine $";
36 #endif  /*        lint */
37
38
39 #include "../h/mh.h"
40 #include <ctype.h>
41 #include <stdio.h>
42
43
44 char *trimcpy (cp)
45 register char *cp;
46 {
47     register char  *sp;
48
49     while (isspace (*cp))
50         cp++;
51     for (sp = cp + strlen (cp) - 1; sp >= cp; sp--)
52         if (isspace (*sp))
53             *sp = 0;
54         else
55             break;
56     for (sp = cp; *sp; sp++)
57         if (isspace (*sp))
58             *sp = ' ';
59
60     return getcpy (cp);
61 }
62 @
63
64
65 1.2
66 log
67 @kerberos
68 @
69 text
70 @d3 2
71 a4 2
72 static char ident[] = "@@(#)$Id$";
73 #endif        lint
74 @
75
76
77 1.1
78 log
79 @Initial revision
80 @
81 text
82 @d2 3
83 d6 1
84 d21 1
85 a21 1
86             *sp = NULL;
87 @