[go: up one dir, main page]

Menu

[r1]: / launchmenu / ToUpper.c  Maximize  Restore  History

Download this file

83 lines (69 with data), 3.0 kB

 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*************************************************************************/
/* */
/* StringLib (C) by Gerhard W. Gruber in Vienna 1992 */
/* All rights reserved */
/* */
/*************************************************************************/
/******************************************************************************
*
* PROJECT: LaunchMenu
* $Source: /cvsroot/launchmenu/LaunchMenu/ToUpper.c,v $
* $Revision: 1.3 $
* $Date: 2003/10/15 19:59:27 $
* $Author: lightweave $
* $Name: $
*
* $Log: ToUpper.c,v $
* Revision 1.3 2003/10/15 19:59:27 lightweave
* Fixed a warning about values out of range.
*
* Revision 1.2 2003/10/04 22:01:14 lightweave
* Modifications for compiling the sources under Linux.
*
* Revision 1.1.1.1 2003/10/04 17:13:12 lightweave
* Initial Release to CVS.
*
*
* DESCRIPTION:
*
*****************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "Misc.h"
/**********************************************************************/
/* */
/* FUNCTION: ToUpper(BYTE) */
/* */
/* INPUT: BYTE Byte to convert to uppercase. */
/* */
/* OUTPUT: BYTE Uppercase character */
/* */
/* DESCRIPTION: Converts a character to uppercase and also taks into */
/* account the german umlauts. */
/* */
/**********************************************************************/
BYTE ToUpper(UBYTE b)
{
if(b >= 'a' && b <= 'z')
b += 'A'-'a';
else
switch(b)
{
case 0x94: /* oe */
b = (BYTE)0x99;
break;
case 0x81: /* ue */
b = (BYTE)0x9A;
break;
case 0x84:
b = (BYTE)0x8E;
break;
}
return(b);
}