diff options
Diffstat (limited to 'dviware/quicspool/libtrw/shift.c')
-rw-r--r-- | dviware/quicspool/libtrw/shift.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/dviware/quicspool/libtrw/shift.c b/dviware/quicspool/libtrw/shift.c new file mode 100644 index 0000000000..71372f55d0 --- /dev/null +++ b/dviware/quicspool/libtrw/shift.c @@ -0,0 +1,39 @@ +static char *rcs = "$Header: shift.c,v 1.1 88/01/15 12:56:32 simpson Rel $"; +/* +$Log: shift.c,v $ + * Revision 1.1 88/01/15 12:56:32 simpson + * initial release + * + * Revision 0.1 87/12/11 17:14:10 simpson + * beta test + * +*/ +#include <ctype.h> + +/* + * Downshifts a string in place. + */ +char *string_downshift(s) +char *s; +{ + + register char *x = s; + for (; *x; x++) + if (isupper(*x)) + *x = tolower(*x); + return(s); +} + +/* + * Upshifts a string in place. + */ +char *string_upshift(s) +char *s; +{ + + register char *x = s; + for (; *x; x++) + if (islower(*x)) + *x = toupper(*x); + return(s); +} |