Sync usage with man page.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / util / lowercase.c
blob71b4dd4344d148bcb2754378688d68cf2e18c131
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* lowercase 3
6 /* SUMMARY
7 /* map uppercase characters to lowercase
8 /* SYNOPSIS
9 /* #include <stringops.h>
11 /* char *lowercase(buf)
12 /* char *buf;
13 /* DESCRIPTION
14 /* lowercase() replaces uppercase characters in its null-terminated
15 /* input by their lowercase equivalent.
16 /* LICENSE
17 /* .ad
18 /* .fi
19 /* The Secure Mailer license must be distributed with this software.
20 /* AUTHOR(S)
21 /* Wietse Venema
22 /* IBM T.J. Watson Research
23 /* P.O. Box 704
24 /* Yorktown Heights, NY 10598, USA
25 /*--*/
27 /* System library. */
29 #include "sys_defs.h"
30 #include <ctype.h>
32 /* Utility library. */
34 #include "stringops.h"
36 char *lowercase(char *string)
38 char *cp;
39 int ch;
41 for (cp = string; (ch = *cp) != 0; cp++)
42 if (ISUPPER(ch))
43 *cp = TOLOWER(ch);
44 return (string);