summaryrefslogtreecommitdiff
path: root/dviware/quicspool/libtrw/shift.c
blob: 71372f55d02be4aa749bbdc8759eeb0db2c857b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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);
}