From b200366f27276d725e7325c00d20380a31d6f274 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Fri, 13 Apr 2018 08:18:19 +0200 Subject: [PATCH] mes: Unify mlibc-gcc and mes builds. * make.scm (bin.gcc): Remove stray slash. * src/mes.c: Unify mlibc-gcc and mes builds. (gc_init_cells): (gc_init_news): (bload_env): * src/reader.c (reader_read_character): (reader_read_string): --- make.scm | 2 +- src/mes.c | 10 +++++----- src/reader.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/make.scm b/make.scm index 3580d43b..fc51f1f7 100755 --- a/make.scm +++ b/make.scm @@ -443,7 +443,7 @@ exec ${GUILE-guile} --no-auto-compile -L . -L guile -C . -C guile -s "$0" ${1+"$ (add-target (bin.gcc "src/mes.c" #:libc libc-gcc.mlibc-o #:dependencies mes-snarf-targets #:defines `(,(string-append "VERSION=\"" %version "\"") - ,(string-append "MODULEDIR=\"" (string-append %prefix (if (string-null? %prefix) "" "/") "/" %moduledir "/") "\"") + ,(string-append "MODULEDIR=\"" (string-append %prefix (if (string-null? %prefix) "" "/") %moduledir "/") "\"") ,(string-append "PREFIX=\"" %prefix "\"")) #:includes '("src"))) diff --git a/src/mes.c b/src/mes.c index 9186056f..77b7d63d 100644 --- a/src/mes.c +++ b/src/mes.c @@ -25,7 +25,7 @@ #include int ARENA_SIZE = 20000000; // 32B: 100 MiB, 64b: 200 MiB -#if __MESC__ +#if 1 //__MESC__ int MAX_ARENA_SIZE = 172100000; // 32b: ~ 2GiB #else int MAX_ARENA_SIZE = 200000000; // 32b: 2.3GiB, 64b: 4.6GiB @@ -1521,7 +1521,7 @@ gc_init_cells () ///((internal)) TYPE (0) = TVECTOR; LENGTH (0) = 1000; VECTOR (0) = 0; -#if __MESC__ +#if 0 //__MESC__ g_cells += sizeof (struct scm); #else g_cells++; @@ -1534,7 +1534,7 @@ gc_init_cells () ///((internal)) SCM gc_init_news () ///((internal)) { -#if __MESC__ +#if 0 //__MESC__ char *p = g_cells; p -= sizeof (struct scm); p += ARENA_SIZE * sizeof (struct scm); @@ -1546,7 +1546,7 @@ gc_init_news () ///((internal)) NTYPE (0) = TVECTOR; NLENGTH (0) = 1000; NVECTOR (0) = 0; -#if __MESC__ +#if 0 //__MESC__ g_news += sizeof (struct scm); #else g_news++; @@ -1750,7 +1750,7 @@ load_env (SCM a) ///((internal)) SCM bload_env (SCM a) ///((internal)) { -#if __MESC__ +#if 1 //__MESC__ char *mo = "mes/read-0-32.mo"; g_stdin = open ("module/mes/read-0-32.mo", O_RDONLY); char *read0 = MODULEDIR "mes/read-0-32.mo"; diff --git a/src/reader.c b/src/reader.c index 51875e29..e27cdd77 100644 --- a/src/reader.c +++ b/src/reader.c @@ -282,7 +282,7 @@ reader_read_character () else if (!strcmp (buf, "newline")) c = '\n'; else if (!strcmp (buf, "vtab")) c = '\v'; else if (!strcmp (buf, "page")) c = '\f'; -#if __MESC__ +#if 1 //__MESC__ //Nyacc bug else if (!strcmp (buf, "return")) c = 13; else if (!strcmp (buf, "esc")) c = 27; @@ -298,7 +298,7 @@ reader_read_character () else if (!strcmp (buf, "ht")) c = '\t'; else if (!strcmp (buf, "vt")) c = '\v'; -#if __MESC__ +#if 1 //__MESC__ //Nyacc bug else if (!strcmp (buf, "cr")) c = 13; #else @@ -390,7 +390,7 @@ reader_read_string () buf[i++] = '\t'; } } -#if !__MESC__ +#if 0 // !__MESC__ else if (c == EOF) assert (!"EOF in string"); #endif