Rev 1619 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2 | pj | 1 | /* Project: OSLib |
2 | * Description: The OS Construction Kit |
||
3 | * Date: 1.6.2000 |
||
4 | * Idea by: Luca Abeni & Gerardo Lamastra |
||
5 | * |
||
6 | * OSLib is an SO project aimed at developing a common, easy-to-use |
||
7 | * low-level infrastructure for developing OS kernels and Embedded |
||
8 | * Applications; it partially derives from the HARTIK project but it |
||
9 | * currently is independently developed. |
||
10 | * |
||
11 | * OSLib is distributed under GPL License, and some of its code has |
||
12 | * been derived from the Linux kernel source; also some important |
||
13 | * ideas come from studying the DJGPP go32 extender. |
||
14 | * |
||
15 | * We acknowledge the Linux Community, Free Software Foundation, |
||
16 | * D.J. Delorie and all the other developers who believe in the |
||
17 | * freedom of software and ideas. |
||
18 | * |
||
19 | * For legalese, check out the included GPL license. |
||
20 | */ |
||
21 | |||
1621 | fabio | 22 | #include <arch/ctype.h> |
23 | #include <arch/i386/string.h> |
||
2 | pj | 24 | |
25 | FILE(strbase); |
||
26 | |||
27 | int isalnum(char c) |
||
28 | { |
||
29 | return (isalpha(c) || isdigit(c)); |
||
30 | } |
||
31 | |||
32 | int isalpha(char c) |
||
33 | { |
||
34 | if ((c >= 'A' && c <= 'z')) |
||
35 | return(1); |
||
36 | else return(0); |
||
37 | } |
||
38 | |||
39 | int iscntrl(char c) |
||
40 | { |
||
41 | if (c < '0') { |
||
42 | return 1; |
||
43 | } else { |
||
44 | return 0; |
||
45 | } |
||
46 | } |
||
47 | |||
48 | |||
49 | int islower(char c) |
||
50 | { |
||
51 | if ((c >= 'a' && c <= 'z')) |
||
52 | return(1); |
||
53 | else return(0); |
||
54 | } |
||
55 | |||
56 | int isspace(char c) |
||
57 | { |
||
58 | if ((c >= 0x09 && c <= 0x0d) || (c == 0x20)) return(1); |
||
59 | return(0); |
||
60 | } |
||
61 | |||
62 | int isupper(char c) |
||
63 | { |
||
64 | if ((c >= 'A' && c <= 'Z')) |
||
65 | return(1); |
||
66 | else return(0); |
||
67 | } |
||
68 | |||
69 | char toupper(char c) |
||
70 | { |
||
71 | if (c >= 'a' && c <= 'z') return(c-'a'+'A'); |
||
72 | else return(c); |
||
73 | } |
||
74 | |||
75 | char tolower(char c) |
||
76 | { |
||
77 | if (c >= 'A' && c <= 'Z') return(c-'A'+'a'); |
||
78 | else return(c); |
||
79 | } |