Sync usage with man page.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / util / uppercase.c
blobc9ad48bd16d1f1d6994a7bcfd2713325d52baaaa
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* uppercase 3
6 /* SUMMARY
7 /* map lowercase characters to uppercase
8 /* SYNOPSIS
9 /* #include <stringops.h>
11 /* char *uppercase(buf)
12 /* char *buf;
13 /* DESCRIPTION
14 /* uppercase() replaces lowercase characters in its null-terminated
15 /* input by their uppercase 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 *uppercase(char *string)
38 char *cp;
39 int ch;
41 for (cp = string; (ch = *cp) != 0; cp++)
42 if (ISLOWER(ch))
43 *cp = TOUPPER(ch);
44 return (string);