minor modification of strtolower(), and implement strtoupper()

This commit is contained in:
rlar 2010-11-04 20:01:46 +00:00
parent 3afbeb53e2
commit 2cdd98715a
3 changed files with 22 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2010-11-04 Robert Larice
* src/misc/string.c ,
* src/misc/stringutil.h :
minor modification of strtolower(), and implement strtoupper()
2010-11-04 Robert Larice
* src/frontend/plotting/x11.c :
minor rewrite, fix a minor bug in the x11 zoom-in function

View File

@ -132,10 +132,22 @@ void
strtolower(char *str)
{
if (str)
while (*str) {
*str = tolower(*str);
str++;
}
while (*str) {
if(isupper(*str))
*str = (char) tolower(*str);
str++;
}
}
void
strtoupper(char *str)
{
if (str)
while (*str) {
if(islower(*str))
*str = (char) toupper(*str);
str++;
}
}
#ifdef CIDER

View File

@ -18,6 +18,7 @@ int scannum(char *str);
int cieq(register char *p, register char *s);
int ciprefix(register char *p, register char *s);
void strtolower(char *str);
void strtoupper(char *str);
char * stripWhiteSpacesInsideParens(char *str);
char * gettok(char **s);
char * gettok_instance(char **);