/*****************************************************************************/ /* */ /* UNIT: NTL0_uppercase (Level 0 library routine) */ /* */ /* Author: Nikola Stojanovic */ /* */ /* Revision: 27 JUN 94 Version 1.0 */ /* */ /* Function: */ /* */ /* Procedure converts the received string into all uppercase letters */ /* (all non-letter characters remain same as they were). Procedure is */ /* "destructive", i.e. it converts characters in the original buffer and */ /* loses the old contents (original string with lowercase letters, if any) */ /* */ /*****************************************************************************/ #include "ntl0.h" /*****************************************************************************/ void NTL0_uppercase (char *str) { char *scanpos; scanpos = str; while (*scanpos != '\0') { if ((*scanpos >= 'a') && (*scanpos <= 'z')) *scanpos = *scanpos - 'a' + 'A'; scanpos++; } }