Postfix3.3.1
uppercase.c
[詳解]
1 /*++
2 /* NAME
3 /* uppercase 3
4 /* SUMMARY
5 /* map lowercase characters to uppercase
6 /* SYNOPSIS
7 /* #include <stringops.h>
8 /*
9 /* char *uppercase(buf)
10 /* char *buf;
11 /* DESCRIPTION
12 /* uppercase() replaces lowercase characters in its null-terminated
13 /* input by their uppercase equivalent.
14 /* LICENSE
15 /* .ad
16 /* .fi
17 /* The Secure Mailer license must be distributed with this software.
18 /* AUTHOR(S)
19 /* Wietse Venema
20 /* IBM T.J. Watson Research
21 /* P.O. Box 704
22 /* Yorktown Heights, NY 10598, USA
23 /*--*/
24 
25 /* System library. */
26 
27 #include "sys_defs.h"
28 #include <ctype.h>
29 
30 /* Utility library. */
31 
32 #include "stringops.h"
33 
34 char *uppercase(char *string)
35 {
36  char *cp;
37  int ch;
38 
39  for (cp = string; (ch = *cp) != 0; cp++)
40  if (ISLOWER(ch))
41  *cp = TOUPPER(ch);
42  return (string);
43 }
char * uppercase(char *string)
Definition: uppercase.c:34
#define ISLOWER(c)
Definition: sys_defs.h:1750
#define TOUPPER(c)
Definition: sys_defs.h:1756