From ca3293e0332bbd9fe63d6cd6bc215f048132bd08 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 14 Feb 2009 19:24:40 +0000 Subject: Make fpmath stuff public. Un-inline string->fixed conversion routine. svn path=/trunk/libcss/; revision=6513 --- test/number.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/number.c') diff --git a/test/number.c b/test/number.c index bc5ea52..0140ce9 100644 --- a/test/number.c +++ b/test/number.c @@ -2,7 +2,7 @@ #include #include -#include "libcss/libcss.h" +#include #include "utils/utils.h" @@ -23,7 +23,7 @@ typedef struct line_ctx { static bool handle_line(const char *data, size_t datalen, void *pw); static void run_test(const uint8_t *data, size_t len, const char *exp, size_t explen); -static void print_fixed(char *buf, size_t len, fixed f); +static void print_css_fixed(char *buf, size_t len, css_fixed f); int main(int argc, char **argv) { @@ -112,7 +112,7 @@ void run_test(const uint8_t *data, size_t len, const char *exp, size_t explen) { css_string in = { len, (uint8_t *) data }; size_t consumed; - fixed result; + css_fixed result; char buf[256]; UNUSED(exp); @@ -120,14 +120,14 @@ void run_test(const uint8_t *data, size_t len, const char *exp, size_t explen) result = number_from_css_string(&in, false, &consumed); - print_fixed(buf, sizeof(buf), result); + print_css_fixed(buf, sizeof(buf), result); printf("got: %s expected: %.*s\n", buf, (int) explen, exp); assert(strncmp(buf, exp, explen) == 0); } -void print_fixed(char *buf, size_t len, fixed f) +void print_css_fixed(char *buf, size_t len, css_fixed f) { #define ABS(x) (uint32_t)((x) < 0 ? -(x) : (x)) uint32_t uintpart = FIXTOINT(ABS(f)); -- cgit v1.2.3