summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/lib
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-03-07 20:42:17 +0100
committerHarald Welte <laforge@gnumonks.org>2010-03-07 20:56:12 +0100
commit97c8b6f33b1a00ed1c138070ca14faaa6f71cfc6 (patch)
treeb8951a27ae92d4924e8cca7599eafb777143e2af /src/target/firmware/lib
parent5f3ead20158d059d022a11e121861e14bd0674df (diff)
start to use libosmocore within the firmware
* remove linuxlist.h copy and use osmocore * don't put 'struct gsm_time' into l1ctl packets * include rx_level and snr for each burst in l1ctl * properly build libosmocore.a for target * move gsmtime functions into libosmocore * move ctype.h to standard location
Diffstat (limited to 'src/target/firmware/lib')
-rw-r--r--src/target/firmware/lib/ctype.c2
-rw-r--r--src/target/firmware/lib/string.c2
-rw-r--r--src/target/firmware/lib/vsprintf.c48
3 files changed, 26 insertions, 26 deletions
diff --git a/src/target/firmware/lib/ctype.c b/src/target/firmware/lib/ctype.c
index 6ec51cc2..f3732140 100644
--- a/src/target/firmware/lib/ctype.c
+++ b/src/target/firmware/lib/ctype.c
@@ -4,7 +4,7 @@
* Copyright (C) 1991, 1992 Linus Torvalds
*/
-#include <asm/ctype.h>
+#include <ctype.h>
unsigned char _ctype[] = {
_C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */
diff --git a/src/target/firmware/lib/string.c b/src/target/firmware/lib/string.c
index 437373bd..97036528 100644
--- a/src/target/firmware/lib/string.c
+++ b/src/target/firmware/lib/string.c
@@ -21,7 +21,7 @@
#include <sys/types.h>
#include <string.h>
-#include <asm/ctype.h>
+#include <ctype.h>
#ifndef __HAVE_ARCH_STRNLEN
diff --git a/src/target/firmware/lib/vsprintf.c b/src/target/firmware/lib/vsprintf.c
index 81057e4d..80e8c1ad 100644
--- a/src/target/firmware/lib/vsprintf.c
+++ b/src/target/firmware/lib/vsprintf.c
@@ -21,17 +21,17 @@
#include <stdarg.h>
#include <sys/types.h>
#include <string.h>
-#include <asm/ctype.h>
+#include <ctype.h>
#include <asm/div64.h>
/**
- * simple_strtoul - convert a string to an unsigned long
+ * strtoul - convert a string to an unsigned long
* @cp: The start of the string
* @endp: A pointer to the end of the parsed string will be placed here
* @base: The number base to use
*/
-unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
+unsigned long strtoul(const char *cp,char **endp,unsigned int base)
{
unsigned long result = 0,value;
@@ -61,26 +61,26 @@ unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
/**
- * simple_strtol - convert a string to a signed long
+ * strtol - convert a string to a signed long
* @cp: The start of the string
* @endp: A pointer to the end of the parsed string will be placed here
* @base: The number base to use
*/
-long simple_strtol(const char *cp,char **endp,unsigned int base)
+long strtol(const char *cp,char **endp,unsigned int base)
{
if(*cp=='-')
- return -simple_strtoul(cp+1,endp,base);
- return simple_strtoul(cp,endp,base);
+ return -strtoul(cp+1,endp,base);
+ return strtoul(cp,endp,base);
}
/**
- * simple_strtoull - convert a string to an unsigned long long
+ * strtoull - convert a string to an unsigned long long
* @cp: The start of the string
* @endp: A pointer to the end of the parsed string will be placed here
* @base: The number base to use
*/
-unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base)
+unsigned long long strtoull(const char *cp,char **endp,unsigned int base)
{
unsigned long long result = 0,value;
@@ -110,16 +110,16 @@ unsigned long long simple_strtoull(const char *cp,char **endp,unsigned int base)
/**
- * simple_strtoll - convert a string to a signed long long
+ * strtoll - convert a string to a signed long long
* @cp: The start of the string
* @endp: A pointer to the end of the parsed string will be placed here
* @base: The number base to use
*/
-long long simple_strtoll(const char *cp,char **endp,unsigned int base)
+long long strtoll(const char *cp,char **endp,unsigned int base)
{
if(*cp=='-')
- return -simple_strtoull(cp+1,endp,base);
- return simple_strtoull(cp,endp,base);
+ return -strtoull(cp+1,endp,base);
+ return strtoull(cp,endp,base);
}
static int skip_atoi(const char **s)
@@ -753,53 +753,53 @@ int vsscanf(const char * buf, const char * fmt, va_list args)
case 'H': /* that's 'hh' in format */
if (is_sign) {
signed char *s = (signed char *) va_arg(args,signed char *);
- *s = (signed char) simple_strtol(str,&next,base);
+ *s = (signed char) strtol(str,&next,base);
} else {
unsigned char *s = (unsigned char *) va_arg(args, unsigned char *);
- *s = (unsigned char) simple_strtoul(str, &next, base);
+ *s = (unsigned char) strtoul(str, &next, base);
}
break;
case 'h':
if (is_sign) {
short *s = (short *) va_arg(args,short *);
- *s = (short) simple_strtol(str,&next,base);
+ *s = (short) strtol(str,&next,base);
} else {
unsigned short *s = (unsigned short *) va_arg(args, unsigned short *);
- *s = (unsigned short) simple_strtoul(str, &next, base);
+ *s = (unsigned short) strtoul(str, &next, base);
}
break;
case 'l':
if (is_sign) {
long *l = (long *) va_arg(args,long *);
- *l = simple_strtol(str,&next,base);
+ *l = strtol(str,&next,base);
} else {
unsigned long *l = (unsigned long*) va_arg(args,unsigned long*);
- *l = simple_strtoul(str,&next,base);
+ *l = strtoul(str,&next,base);
}
break;
case 'L':
if (is_sign) {
long long *l = (long long*) va_arg(args,long long *);
- *l = simple_strtoll(str,&next,base);
+ *l = strtoll(str,&next,base);
} else {
unsigned long long *l = (unsigned long long*) va_arg(args,unsigned long long*);
- *l = simple_strtoull(str,&next,base);
+ *l = strtoull(str,&next,base);
}
break;
case 'Z':
case 'z':
{
size_t *s = (size_t*) va_arg(args,size_t*);
- *s = (size_t) simple_strtoul(str,&next,base);
+ *s = (size_t) strtoul(str,&next,base);
}
break;
default:
if (is_sign) {
int *i = (int *) va_arg(args, int*);
- *i = (int) simple_strtol(str,&next,base);
+ *i = (int) strtol(str,&next,base);
} else {
unsigned int *i = (unsigned int*) va_arg(args, unsigned int*);
- *i = (unsigned int) simple_strtoul(str,&next,base);
+ *i = (unsigned int) strtoul(str,&next,base);
}
break;
}