aboutsummaryrefslogtreecommitdiff
path: root/jerry-libc
diff options
context:
space:
mode:
authorRuben Ayrapetyan <r.ayrapetyan@samsung.com>2015-07-03 02:17:14 +0300
committerRuben Ayrapetyan <r.ayrapetyan@samsung.com>2015-07-20 15:47:19 +0300
commit7b3042fdc9cfd9f9196d8d13af9b1bf339928dab (patch)
treecfe92da9f16806443eb1606aa416bd75ddf07c37 /jerry-libc
parentbcedc901cda5227a374ad530f67f754d44b12949 (diff)
Remove usage of isalpha, isdigit, isxdigit, isspace in the whole engine except implementation of JSON built-in, moving the functions to JSON built-in's module.
JerryScript-DCO-1.0-Signed-off-by: Ruben Ayrapetyan r.ayrapetyan@samsung.com
Diffstat (limited to 'jerry-libc')
-rw-r--r--jerry-libc/include/ctype.h7
-rw-r--r--jerry-libc/jerry-libc.c60
2 files changed, 0 insertions, 67 deletions
diff --git a/jerry-libc/include/ctype.h b/jerry-libc/include/ctype.h
index c7d196b8..74990899 100644
--- a/jerry-libc/include/ctype.h
+++ b/jerry-libc/include/ctype.h
@@ -22,11 +22,4 @@
# define EXTERN_C
#endif /* !__cplusplus */
-extern EXTERN_C int isxdigit (int c);
-extern EXTERN_C int isalpha (int c);
-extern EXTERN_C int isdigit (int c);
-extern EXTERN_C int islower (int c);
-extern EXTERN_C int isspace (int c);
-extern EXTERN_C int isupper (int c);
-
#endif /* !JERRY_LIBC_CTYPE_H */
diff --git a/jerry-libc/jerry-libc.c b/jerry-libc/jerry-libc.c
index 16ccd320..4db3063c 100644
--- a/jerry-libc/jerry-libc.c
+++ b/jerry-libc/jerry-libc.c
@@ -272,66 +272,6 @@ strlen (const char *s)
return i;
}
-/** Checks for white-space characters. In the "C" and "POSIX" locales, these are: space,
- form-feed ('\f'), newline ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab ('\v'). */
-int
-isspace (int c)
-{
- switch (c)
- {
- case ' ':
- case '\f':
- case '\n':
- case '\r':
- case '\t':
- case '\v':
- {
- return 1;
- }
- default:
- {
- return 0;
- }
- }
-}
-
-/** Checks for an uppercase letter. */
-int
-isupper (int c)
-{
- return c >= 'A' && c <= 'Z';
-}
-
-/** Checks for an lowercase letter. */
-int
-islower (int c)
-{
- return c >= 'a' && c <= 'z';
-}
-
-/** Checks for an alphabetic character.
- In the standard "C" locale, it is equivalent to (isupper (c) || islower (c)). */
-int
-isalpha (int c)
-{
- return isupper (c) || islower (c);
-}
-
-/** Checks for a digit (0 through 9). */
-int
-isdigit (int c)
-{
- return c >= '0' && c <= '9';
-}
-
-/** checks for a hexadecimal digits, that is, one of
- 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F. */
-int
-isxdigit (int c)
-{
- return isdigit (c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
-}
-
/**
* Generate pseudo-random integer
*