From d59f8b10dc6f5de4335f9ca2af325506ef929d77 Mon Sep 17 00:00:00 2001 From: Slava Pestov <slava@slava-pestovs-macbook-pro.local> Date: Mon, 1 Dec 2008 18:08:39 -0600 Subject: [PATCH 1/2] Fix printing of negative fixnums in FEP --- vm/os-unix.h | 1 + vm/os-windows.h | 8 ++++---- vm/utilities.c | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/vm/os-unix.h b/vm/os-unix.h index 97b1b39129..b2a1735fd7 100755 --- a/vm/os-unix.h +++ b/vm/os-unix.h @@ -23,6 +23,7 @@ typedef char F_SYMBOL; #define STRNCMP strncmp #define STRDUP strdup +#define FIXNUM_FORMAT "%ld" #define CELL_FORMAT "%lu" #define CELL_HEX_FORMAT "%lx" diff --git a/vm/os-windows.h b/vm/os-windows.h index b12d677af2..af9b75bca5 100755 --- a/vm/os-windows.h +++ b/vm/os-windows.h @@ -20,13 +20,13 @@ typedef wchar_t F_CHAR; #define STRNCMP wcsncmp #define STRDUP _wcsdup +#define FIXNUM_FORMAT "%Id" +#define CELL_FORMAT "%lu" +#define CELL_HEX_FORMAT "%Ix" + #ifdef WIN64 - #define CELL_FORMAT "%Iu" - #define CELL_HEX_FORMAT "%Ix" #define CELL_HEX_PAD_FORMAT "%016Ix" #else - #define CELL_FORMAT "%lu" - #define CELL_HEX_FORMAT "%lx" #define CELL_HEX_PAD_FORMAT "%08lx" #endif diff --git a/vm/utilities.c b/vm/utilities.c index 35fc7ad087..d97b540884 100755 --- a/vm/utilities.c +++ b/vm/utilities.c @@ -44,7 +44,7 @@ void print_cell_hex_pad(CELL x) void print_fixnum(F_FIXNUM x) { - printf(CELL_FORMAT,x); + printf(FIXNUM_FORMAT,x); } CELL read_cell_hex(void) From 9e4dfda8cdfabaf8b655934528c45344d24dc989 Mon Sep 17 00:00:00 2001 From: Slava Pestov <slava@slava-pestovs-macbook-pro.local> Date: Mon, 1 Dec 2008 18:08:48 -0600 Subject: [PATCH 2/2] Fix help lint --- core/vocabs/loader/loader-docs.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/vocabs/loader/loader-docs.factor b/core/vocabs/loader/loader-docs.factor index bc57c48a62..ce3b5ea024 100644 --- a/core/vocabs/loader/loader-docs.factor +++ b/core/vocabs/loader/loader-docs.factor @@ -66,7 +66,7 @@ HELP: vocab-roots { $var-description "A sequence of pathname strings to search for vocabularies." } ; HELP: add-vocab-root -{ $values { "path" "a pathname string" } } +{ $values { "root" "a pathname string" } } { $description "Adds a directory pathname to the list of vocabulary roots." } { $see-also "factor-roots" } ;