Browse Source

Single source for lub/ctype

Serj Kalichev 8 years ago
parent
commit
4492bbd4b6

+ 35 - 0
lub/ctype/ctype.c

@@ -0,0 +1,35 @@
+/*
+ * ctype.c
+ */
+#include "lub/ctype.h"
+#include <ctype.h>
+
+/*--------------------------------------------------------- */
+bool_t lub_ctype_isdigit(char c)
+{
+	unsigned char tmp = (unsigned char)c;
+	return isdigit(tmp) ? BOOL_TRUE : BOOL_FALSE;
+}
+
+/*--------------------------------------------------------- */
+bool_t lub_ctype_isspace(char c)
+{
+	unsigned char tmp = (unsigned char)c;
+	return isspace(tmp) ? BOOL_TRUE : BOOL_FALSE;
+}
+
+/*--------------------------------------------------------- */
+char lub_ctype_tolower(char c)
+{
+	unsigned char tmp = (unsigned char)c;
+	return tolower(tmp);
+}
+
+/*--------------------------------------------------------- */
+char lub_ctype_toupper(char c)
+{
+	unsigned char tmp = (unsigned char)c;
+	return toupper(tmp);
+}
+
+/*--------------------------------------------------------- */

+ 0 - 14
lub/ctype/ctype_isdigit.c

@@ -1,14 +0,0 @@
-/*
- * ctype_isdigit.c
- */
-#include "lub/ctype.h"
-#include <ctype.h>
-
-/*--------------------------------------------------------- */
-bool_t lub_ctype_isdigit(char c)
-{
-	unsigned char tmp = (unsigned char)c;
-	return isdigit(tmp) ? BOOL_TRUE : BOOL_FALSE;
-}
-
-/*--------------------------------------------------------- */

+ 0 - 14
lub/ctype/ctype_isspace.c

@@ -1,14 +0,0 @@
-/*
- * ctype_isspace.c
- */
-#include "lub/ctype.h"
-#include <ctype.h>
-
-/*--------------------------------------------------------- */
-bool_t lub_ctype_isspace(char c)
-{
-	unsigned char tmp = (unsigned char)c;
-	return isspace(tmp) ? BOOL_TRUE : BOOL_FALSE;
-}
-
-/*--------------------------------------------------------- */

+ 0 - 14
lub/ctype/ctype_tolower.c

@@ -1,14 +0,0 @@
-/*
- * ctype_tolower.c
- */
-#include "lub/ctype.h"
-#include <ctype.h>
-
-/*--------------------------------------------------------- */
-char lub_ctype_tolower(char c)
-{
-	unsigned char tmp = (unsigned char)c;
-	return tolower(tmp);
-}
-
-/*--------------------------------------------------------- */

+ 0 - 14
lub/ctype/ctype_toupper.c

@@ -1,14 +0,0 @@
-/*
- * ctype_toupper.c
- */
-#include "lub/ctype.h"
-#include <ctype.h>
-
-/*--------------------------------------------------------- */
-char lub_ctype_toupper(char c)
-{
-	unsigned char tmp = (unsigned char)c;
-	return toupper(tmp);
-}
-
-/*--------------------------------------------------------- */

+ 1 - 4
lub/ctype/module.am

@@ -1,5 +1,2 @@
-liblub_la_SOURCES +=	lub/ctype/ctype_isspace.c	\
-			lub/ctype/ctype_isdigit.c	\
-			lub/ctype/ctype_toupper.c	\
-			lub/ctype/ctype_tolower.c
+liblub_la_SOURCES += lub/ctype/ctype.c