1/* $NetBSD$ */ 2 3/*++ 4/* NAME 5/* uppercase 3 6/* SUMMARY 7/* map lowercase characters to uppercase 8/* SYNOPSIS 9/* #include <stringops.h> 10/* 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/*--*/ 26 27/* System library. */ 28 29#include "sys_defs.h" 30#include <ctype.h> 31 32/* Utility library. */ 33 34#include "stringops.h" 35 36char *uppercase(char *string) 37{ 38 char *cp; 39 int ch; 40 41 for (cp = string; (ch = *cp) != 0; cp++) 42 if (ISLOWER(ch)) 43 *cp = TOUPPER(ch); 44 return (string); 45} 46