aboutsummaryrefslogtreecommitdiff
path: root/src/console/vtxprintf.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-10-24 13:06:04 +0000
committerStefan Reinauer <stepan@openbios.org>2009-10-24 13:06:04 +0000
commit52fc6b12cb458a93ba1eeac4082f4e7f574cdafc (patch)
treeb776758d0d9deb8947f46a248a31b33f9f9d1a5b /src/console/vtxprintf.c
parentb53bed15677e8bd97f58f7f5d847f1029ddaa41b (diff)
re-order console output functions, add proper prototypes,
drop claim that our files were blatantly copied, because they have been rewritten a very long time ago. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4837 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/console/vtxprintf.c')
-rw-r--r--src/console/vtxprintf.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/src/console/vtxprintf.c b/src/console/vtxprintf.c
index 72bbac5fb0..b1b53b6a39 100644
--- a/src/console/vtxprintf.c
+++ b/src/console/vtxprintf.c
@@ -7,50 +7,13 @@
#include <stdarg.h>
#include <string.h>
#include <div64.h>
+#include <console/vtxprintf.h>
/* haha, don't need ctype.c */
#define isdigit(c) ((c) >= '0' && (c) <= '9')
#define is_digit isdigit
#define isxdigit(c) (((c) >= '0' && (c) <= '9') || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
-#if 0
-/* We are using number() instead. So this code is obsoleted and should
- * probably go away.
- */
-
-static unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base)
-{
- unsigned long result = 0,value;
-
- if (!base) {
- base = 10;
- if (*cp == '0') {
- base = 8;
- cp++;
- if ((*cp == 'x') && isxdigit(cp[1])) {
- cp++;
- base = 16;
- }
- }
- }
- while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp)
- ? toupper(*cp) : *cp)-'A'+10) < base) {
- result = result*base + value;
- cp++;
- }
- if (endp)
- *endp = (char *)cp;
- return result;
-}
-
-static long simple_strtol(const char *cp,char **endp,unsigned int base)
-{
- if(*cp=='-')
- return -simple_strtoul(cp+1,endp,base);
- return simple_strtoul(cp,endp,base);
-}
-#endif
-
static int skip_atoi(const char **s)
{
int i=0;