|
From: <ze...@us...> - 2002-09-02 22:37:52
|
Update of /cvsroot/subtrick/TiTan/src/lib/ansi
In directory usw-pr-cvs1:/tmp/cvs-serv3136
Modified Files:
isxdigit.c isascii.c isalnum.c isalpha.c isdigit.c islower.c
isupper.c
Log Message:
some modification to libs
Index: isxdigit.c
===================================================================
RCS file: /cvsroot/subtrick/TiTan/src/lib/ansi/isxdigit.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** isxdigit.c 2 Sep 2002 07:35:39 -0000 1.1
--- isxdigit.c 2 Sep 2002 22:37:48 -0000 1.2
***************
*** 5,10 ****
* Part Of the clib
*
! * file: isupper.c
! * Date: 31:08:02
* Type: ANSI
* LIB: ctype.h
--- 5,10 ----
* Part Of the clib
*
! * file: isxdigit.c
! * Date: 1:09:02
* Type: ANSI
* LIB: ctype.h
***************
*** 26,30 ****
return 0;
- return 0;
-
}
--- 26,37 ----
return 0;
}
+
+
+ int isdigit (int c)
+ {
+ if (c >= '0' && c <= '9')
+ return 1;
+ else
+ return 0;
+ }
\ No newline at end of file
Index: isascii.c
===================================================================
RCS file: /cvsroot/subtrick/TiTan/src/lib/ansi/isascii.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** isascii.c 2 Sep 2002 07:35:38 -0000 1.1
--- isascii.c 2 Sep 2002 22:37:48 -0000 1.2
***************
*** 5,9 ****
* Part Of the clib
*
! * file: isupper.c
* Date: 31:08:02
* Type: ANSI
--- 5,9 ----
* Part Of the clib
*
! * file: isascii.c
* Date: 31:08:02
* Type: ANSI
***************
*** 19,29 ****
int isascii (int c)
{
! while (c >0)
! {
! if ( c <=127)
! return 1;
! else
! return 0;
! }
! return 0;
}
--- 19,25 ----
int isascii (int c)
{
! if ( c > 0 && c <=127)
! return 1;
! else
! return 0;
}
Index: isalnum.c
===================================================================
RCS file: /cvsroot/subtrick/TiTan/src/lib/ansi/isalnum.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** isalnum.c 2 Sep 2002 07:35:39 -0000 1.1
--- isalnum.c 2 Sep 2002 22:37:48 -0000 1.2
***************
*** 5,9 ****
* Part Of the clib
*
! * file: isupper.c
* Date: 31:08:02
* Type: ANSI
--- 5,9 ----
* Part Of the clib
*
! * file: isalnum.c
* Date: 31:08:02
* Type: ANSI
***************
*** 12,15 ****
--- 12,21 ----
*/
+ /*
+ fucntion the takes 'c' and see if its either
+ alphabet or a digit and return 1 otherwise
+ it return 0
+
+ */
int alnum (int c)
***************
*** 20,22 ****
--- 26,47 ----
return 0;
return 0;
+ }
+
+
+
+ int isalpha (int c)
+ {
+ if ( (c >= 'a' && c <='z') || (c >= 'A' && c <= 'Z') )
+ return 1;
+ else
+ return 0;
+ }
+
+
+ int isdigit (int c)
+ {
+ if (c >= '0' && c <= '9')
+ return 1;
+ else
+ return 0;
}
Index: isalpha.c
===================================================================
RCS file: /cvsroot/subtrick/TiTan/src/lib/ansi/isalpha.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** isalpha.c 30 Aug 2002 19:42:25 -0000 1.1
--- isalpha.c 2 Sep 2002 22:37:48 -0000 1.2
***************
*** 13,16 ****
--- 13,19 ----
*/
+ /* a function the take 'c' and check if its an alphabet it return 1
+ otherwise it return 0 */
+
int isalpha (int c)
{
Index: isdigit.c
===================================================================
RCS file: /cvsroot/subtrick/TiTan/src/lib/ansi/isdigit.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** isdigit.c 30 Aug 2002 19:42:25 -0000 1.1
--- isdigit.c 2 Sep 2002 22:37:48 -0000 1.2
***************
*** 13,17 ****
*/
!
int isdigit (int c)
{
--- 13,19 ----
*/
! /* function that takes 'c' an checks if its a digit it return 1
! otherwise it return 0 */
!
int isdigit (int c)
{
Index: islower.c
===================================================================
RCS file: /cvsroot/subtrick/TiTan/src/lib/ansi/islower.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** islower.c 30 Aug 2002 19:42:25 -0000 1.1
--- islower.c 2 Sep 2002 22:37:48 -0000 1.2
***************
*** 12,15 ****
--- 12,19 ----
*/
+
+ /* function that takes 'c' if its upper case return it else
+ it convert it to lower case */
+
int islower (int c)
{
Index: isupper.c
===================================================================
RCS file: /cvsroot/subtrick/TiTan/src/lib/ansi/isupper.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** isupper.c 30 Aug 2002 19:42:25 -0000 1.1
--- isupper.c 2 Sep 2002 22:37:48 -0000 1.2
***************
*** 13,16 ****
--- 13,20 ----
+ /* function that takes 'c' if its upper case return it else
+ it return 0 */
+
+
int isupper(int c)
{
|