From d1cdb07719e4aa8e60941bbcc7df9ffe7c0f3f2b Mon Sep 17 00:00:00 2001 From: David Given Date: Thu, 21 Jun 2018 23:24:23 +0200 Subject: [PATCH] Realise that the libc core can safely call other libc core functions, even if they're not defined in the core: so putw() can call stdio stuff, for example. So the earlier concept of pureness isn't necessary. Rename accordingly. --- lang/cem/libcc.ansi/build.lua | 22 +++++++++---------- lang/cem/libcc.ansi/core/README.md | 19 ++++++++++++++++ .../libcc.ansi/{pure => core}/ctype/char.tab | 0 .../libcc.ansi/{pure => core}/ctype/genfiles | 0 .../libcc.ansi/{pure => core}/ctype/tolower.c | 0 .../libcc.ansi/{pure => core}/ctype/toupper.c | 0 .../{pure => core}/locale/localeconv.c | 0 .../{pure => core}/locale/setlocale.c | 0 .../cem/libcc.ansi/{pure => core}/math/asin.c | 0 .../cem/libcc.ansi/{pure => core}/math/atan.c | 0 .../libcc.ansi/{pure => core}/math/atan2.c | 0 .../cem/libcc.ansi/{pure => core}/math/ceil.c | 0 lang/cem/libcc.ansi/{pure => core}/math/exp.c | 0 .../cem/libcc.ansi/{pure => core}/math/fabs.c | 0 .../libcc.ansi/{pure => core}/math/floor.c | 0 .../cem/libcc.ansi/{pure => core}/math/fmod.c | 0 .../libcc.ansi/{pure => core}/math/frexp.e | 0 .../libcc.ansi/{pure => core}/math/hugeval.c | 0 .../libcc.ansi/{pure => core}/math/hypot.c | 0 .../libcc.ansi/{pure => core}/math/isnan.c | 0 .../libcc.ansi/{pure => core}/math/ldexp.c | 0 .../{pure => core}/math/localmath.h | 0 lang/cem/libcc.ansi/{pure => core}/math/log.c | 0 .../libcc.ansi/{pure => core}/math/log10.c | 0 .../cem/libcc.ansi/{pure => core}/math/modf.e | 0 lang/cem/libcc.ansi/{pure => core}/math/pow.c | 0 lang/cem/libcc.ansi/{pure => core}/math/sin.c | 0 .../cem/libcc.ansi/{pure => core}/math/sinh.c | 0 .../cem/libcc.ansi/{pure => core}/math/sqrt.c | 0 lang/cem/libcc.ansi/{pure => core}/math/tan.c | 0 .../cem/libcc.ansi/{pure => core}/math/tanh.c | 0 .../libcc.ansi/{pure => core}/setjmp/setjmp.e | 0 .../{pure => core}/setjmp/sigmisc.c | 0 .../libcc.ansi/{pure => core}/stdlib/abs.c | 0 .../libcc.ansi/{pure => core}/stdlib/atoi.c | 0 .../libcc.ansi/{pure => core}/stdlib/atol.c | 0 .../{pure => core}/stdlib/bsearch.c | 0 .../libcc.ansi/{pure => core}/stdlib/div.c | 0 .../libcc.ansi/{pure => core}/stdlib/getenv.c | 0 .../libcc.ansi/{pure => core}/stdlib/labs.c | 0 .../libcc.ansi/{pure => core}/stdlib/ldiv.c | 0 .../libcc.ansi/{pure => core}/stdlib/mblen.c | 0 .../{pure => core}/stdlib/mbstowcs.c | 0 .../libcc.ansi/{pure => core}/stdlib/mbtowc.c | 0 .../libcc.ansi/{pure => core}/stdlib/putenv.c | 0 .../libcc.ansi/{pure => core}/stdlib/qsort.c | 0 .../libcc.ansi/{pure => core}/stdlib/rand.c | 0 .../libcc.ansi/{pure => core}/stdlib/setenv.c | 0 .../libcc.ansi/{pure => core}/stdlib/strtol.c | 0 .../{pure => core}/stdlib/wcstombs.c | 0 .../libcc.ansi/{pure => core}/stdlib/wctomb.c | 0 .../libcc.ansi/{pure => core}/string/memchr.c | 0 .../libcc.ansi/{pure => core}/string/memcmp.c | 0 .../libcc.ansi/{pure => core}/string/memcpy.c | 0 .../{pure => core}/string/memmove.c | 0 .../libcc.ansi/{pure => core}/string/memset.c | 0 .../libcc.ansi/{pure => core}/string/strcat.c | 0 .../libcc.ansi/{pure => core}/string/strchr.c | 0 .../libcc.ansi/{pure => core}/string/strcmp.c | 0 .../{pure => core}/string/strcoll.c | 0 .../libcc.ansi/{pure => core}/string/strcpy.c | 0 .../{pure => core}/string/strcspn.c | 0 .../libcc.ansi/{pure => core}/string/strdup.c | 0 .../libcc.ansi/{pure => core}/string/strlen.c | 0 .../{pure => core}/string/strncat.c | 0 .../{pure => core}/string/strncmp.c | 0 .../{pure => core}/string/strncpy.c | 0 .../{pure => core}/string/strpbrk.c | 0 .../{pure => core}/string/strrchr.c | 0 .../libcc.ansi/{pure => core}/string/strspn.c | 0 .../libcc.ansi/{pure => core}/string/strstr.c | 0 .../libcc.ansi/{pure => core}/string/strtok.c | 0 .../{pure => core}/string/strxfrm.c | 0 lang/cem/libcc.ansi/pure/README.md | 3 --- 74 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 lang/cem/libcc.ansi/core/README.md rename lang/cem/libcc.ansi/{pure => core}/ctype/char.tab (100%) rename lang/cem/libcc.ansi/{pure => core}/ctype/genfiles (100%) rename lang/cem/libcc.ansi/{pure => core}/ctype/tolower.c (100%) rename lang/cem/libcc.ansi/{pure => core}/ctype/toupper.c (100%) rename lang/cem/libcc.ansi/{pure => core}/locale/localeconv.c (100%) rename lang/cem/libcc.ansi/{pure => core}/locale/setlocale.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/asin.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/atan.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/atan2.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/ceil.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/exp.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/fabs.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/floor.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/fmod.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/frexp.e (100%) rename lang/cem/libcc.ansi/{pure => core}/math/hugeval.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/hypot.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/isnan.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/ldexp.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/localmath.h (100%) rename lang/cem/libcc.ansi/{pure => core}/math/log.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/log10.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/modf.e (100%) rename lang/cem/libcc.ansi/{pure => core}/math/pow.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/sin.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/sinh.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/sqrt.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/tan.c (100%) rename lang/cem/libcc.ansi/{pure => core}/math/tanh.c (100%) rename lang/cem/libcc.ansi/{pure => core}/setjmp/setjmp.e (100%) rename lang/cem/libcc.ansi/{pure => core}/setjmp/sigmisc.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/abs.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/atoi.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/atol.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/bsearch.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/div.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/getenv.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/labs.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/ldiv.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/mblen.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/mbstowcs.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/mbtowc.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/putenv.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/qsort.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/rand.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/setenv.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/strtol.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/wcstombs.c (100%) rename lang/cem/libcc.ansi/{pure => core}/stdlib/wctomb.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/memchr.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/memcmp.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/memcpy.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/memmove.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/memset.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strcat.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strchr.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strcmp.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strcoll.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strcpy.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strcspn.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strdup.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strlen.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strncat.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strncmp.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strncpy.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strpbrk.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strrchr.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strspn.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strstr.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strtok.c (100%) rename lang/cem/libcc.ansi/{pure => core}/string/strxfrm.c (100%) delete mode 100644 lang/cem/libcc.ansi/pure/README.md diff --git a/lang/cem/libcc.ansi/build.lua b/lang/cem/libcc.ansi/build.lua index c49bdf0e2..b40ec30ec 100644 --- a/lang/cem/libcc.ansi/build.lua +++ b/lang/cem/libcc.ansi/build.lua @@ -2,12 +2,12 @@ include("plat/build.lua") tabgen { name = "ctype_tab", - srcs = { "./pure/ctype/char.tab" } + srcs = { "./core/ctype/char.tab" } } normalrule { name = "ctype_files", - ins = { "./pure/ctype/genfiles" }, + ins = { "./core/ctype/genfiles" }, outleaves = { "isalnum.c", "isalpha.c", @@ -33,14 +33,14 @@ for _, plat in ipairs(vars.plats) do srcs = { "+ctype_files", "+ctype_tab", - "./pure/string/*.c", - "./pure/stdlib/*.c", - "./pure/locale/*.c", - "./pure/setjmp/*.c", - "./pure/setjmp/*.e", - "./pure/math/*.c", -- hypot.c - "./pure/math/*.e", - "./pure/ctype/*.c", + "./core/string/*.c", + "./core/stdlib/*.c", + "./core/locale/*.c", + "./core/setjmp/*.c", + "./core/setjmp/*.e", + "./core/math/*.c", -- hypot.c + "./core/math/*.e", + "./core/ctype/*.c", "./errno/*.c", "./malloc/*.c", "./misc/environ.c", -- don't build everything here as it's all obsolete @@ -56,7 +56,7 @@ for _, plat in ipairs(vars.plats) do "lang/cem/libcc.ansi/headers+pkg", "plat/"..plat.."/include+pkg", "./malloc/malloc.h", - "./pure/math/localmath.h", + "./core/math/localmath.h", "./stdio/loc_incl.h", "./stdlib/ext_fmt.h", "./time/loc_time.h", diff --git a/lang/cem/libcc.ansi/core/README.md b/lang/cem/libcc.ansi/core/README.md new file mode 100644 index 000000000..48243c8c6 --- /dev/null +++ b/lang/cem/libcc.ansi/core/README.md @@ -0,0 +1,19 @@ +This directory contains the libc core: functions here may depend on other +libc functions _only_ (so, no `unistd.h` stuff). Plats don't get to configure +this, so nothing here should add any overhead if the function isn't linked. + +Examples of what goes here: + + - `strcmp()` --- because it's pure code. + - `setjmp()` --- in EM, it's portable. + - `assert()` --- because it only calls other core functions (`fputs()` + and `abort()`). + +Examples of what doesn't go here: + + - `malloc()` --- because it calls the `unistd.h` function `sbrk()` (and so a + plat might want to swap it out). + - stdio --- because it calls the `unistd.h` functions `read()`, `write()` + etc. + - `signal()` --- because it can't be implemented portably and needs to go + in the plat. diff --git a/lang/cem/libcc.ansi/pure/ctype/char.tab b/lang/cem/libcc.ansi/core/ctype/char.tab similarity index 100% rename from lang/cem/libcc.ansi/pure/ctype/char.tab rename to lang/cem/libcc.ansi/core/ctype/char.tab diff --git a/lang/cem/libcc.ansi/pure/ctype/genfiles b/lang/cem/libcc.ansi/core/ctype/genfiles similarity index 100% rename from lang/cem/libcc.ansi/pure/ctype/genfiles rename to lang/cem/libcc.ansi/core/ctype/genfiles diff --git a/lang/cem/libcc.ansi/pure/ctype/tolower.c b/lang/cem/libcc.ansi/core/ctype/tolower.c similarity index 100% rename from lang/cem/libcc.ansi/pure/ctype/tolower.c rename to lang/cem/libcc.ansi/core/ctype/tolower.c diff --git a/lang/cem/libcc.ansi/pure/ctype/toupper.c b/lang/cem/libcc.ansi/core/ctype/toupper.c similarity index 100% rename from lang/cem/libcc.ansi/pure/ctype/toupper.c rename to lang/cem/libcc.ansi/core/ctype/toupper.c diff --git a/lang/cem/libcc.ansi/pure/locale/localeconv.c b/lang/cem/libcc.ansi/core/locale/localeconv.c similarity index 100% rename from lang/cem/libcc.ansi/pure/locale/localeconv.c rename to lang/cem/libcc.ansi/core/locale/localeconv.c diff --git a/lang/cem/libcc.ansi/pure/locale/setlocale.c b/lang/cem/libcc.ansi/core/locale/setlocale.c similarity index 100% rename from lang/cem/libcc.ansi/pure/locale/setlocale.c rename to lang/cem/libcc.ansi/core/locale/setlocale.c diff --git a/lang/cem/libcc.ansi/pure/math/asin.c b/lang/cem/libcc.ansi/core/math/asin.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/asin.c rename to lang/cem/libcc.ansi/core/math/asin.c diff --git a/lang/cem/libcc.ansi/pure/math/atan.c b/lang/cem/libcc.ansi/core/math/atan.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/atan.c rename to lang/cem/libcc.ansi/core/math/atan.c diff --git a/lang/cem/libcc.ansi/pure/math/atan2.c b/lang/cem/libcc.ansi/core/math/atan2.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/atan2.c rename to lang/cem/libcc.ansi/core/math/atan2.c diff --git a/lang/cem/libcc.ansi/pure/math/ceil.c b/lang/cem/libcc.ansi/core/math/ceil.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/ceil.c rename to lang/cem/libcc.ansi/core/math/ceil.c diff --git a/lang/cem/libcc.ansi/pure/math/exp.c b/lang/cem/libcc.ansi/core/math/exp.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/exp.c rename to lang/cem/libcc.ansi/core/math/exp.c diff --git a/lang/cem/libcc.ansi/pure/math/fabs.c b/lang/cem/libcc.ansi/core/math/fabs.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/fabs.c rename to lang/cem/libcc.ansi/core/math/fabs.c diff --git a/lang/cem/libcc.ansi/pure/math/floor.c b/lang/cem/libcc.ansi/core/math/floor.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/floor.c rename to lang/cem/libcc.ansi/core/math/floor.c diff --git a/lang/cem/libcc.ansi/pure/math/fmod.c b/lang/cem/libcc.ansi/core/math/fmod.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/fmod.c rename to lang/cem/libcc.ansi/core/math/fmod.c diff --git a/lang/cem/libcc.ansi/pure/math/frexp.e b/lang/cem/libcc.ansi/core/math/frexp.e similarity index 100% rename from lang/cem/libcc.ansi/pure/math/frexp.e rename to lang/cem/libcc.ansi/core/math/frexp.e diff --git a/lang/cem/libcc.ansi/pure/math/hugeval.c b/lang/cem/libcc.ansi/core/math/hugeval.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/hugeval.c rename to lang/cem/libcc.ansi/core/math/hugeval.c diff --git a/lang/cem/libcc.ansi/pure/math/hypot.c b/lang/cem/libcc.ansi/core/math/hypot.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/hypot.c rename to lang/cem/libcc.ansi/core/math/hypot.c diff --git a/lang/cem/libcc.ansi/pure/math/isnan.c b/lang/cem/libcc.ansi/core/math/isnan.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/isnan.c rename to lang/cem/libcc.ansi/core/math/isnan.c diff --git a/lang/cem/libcc.ansi/pure/math/ldexp.c b/lang/cem/libcc.ansi/core/math/ldexp.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/ldexp.c rename to lang/cem/libcc.ansi/core/math/ldexp.c diff --git a/lang/cem/libcc.ansi/pure/math/localmath.h b/lang/cem/libcc.ansi/core/math/localmath.h similarity index 100% rename from lang/cem/libcc.ansi/pure/math/localmath.h rename to lang/cem/libcc.ansi/core/math/localmath.h diff --git a/lang/cem/libcc.ansi/pure/math/log.c b/lang/cem/libcc.ansi/core/math/log.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/log.c rename to lang/cem/libcc.ansi/core/math/log.c diff --git a/lang/cem/libcc.ansi/pure/math/log10.c b/lang/cem/libcc.ansi/core/math/log10.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/log10.c rename to lang/cem/libcc.ansi/core/math/log10.c diff --git a/lang/cem/libcc.ansi/pure/math/modf.e b/lang/cem/libcc.ansi/core/math/modf.e similarity index 100% rename from lang/cem/libcc.ansi/pure/math/modf.e rename to lang/cem/libcc.ansi/core/math/modf.e diff --git a/lang/cem/libcc.ansi/pure/math/pow.c b/lang/cem/libcc.ansi/core/math/pow.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/pow.c rename to lang/cem/libcc.ansi/core/math/pow.c diff --git a/lang/cem/libcc.ansi/pure/math/sin.c b/lang/cem/libcc.ansi/core/math/sin.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/sin.c rename to lang/cem/libcc.ansi/core/math/sin.c diff --git a/lang/cem/libcc.ansi/pure/math/sinh.c b/lang/cem/libcc.ansi/core/math/sinh.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/sinh.c rename to lang/cem/libcc.ansi/core/math/sinh.c diff --git a/lang/cem/libcc.ansi/pure/math/sqrt.c b/lang/cem/libcc.ansi/core/math/sqrt.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/sqrt.c rename to lang/cem/libcc.ansi/core/math/sqrt.c diff --git a/lang/cem/libcc.ansi/pure/math/tan.c b/lang/cem/libcc.ansi/core/math/tan.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/tan.c rename to lang/cem/libcc.ansi/core/math/tan.c diff --git a/lang/cem/libcc.ansi/pure/math/tanh.c b/lang/cem/libcc.ansi/core/math/tanh.c similarity index 100% rename from lang/cem/libcc.ansi/pure/math/tanh.c rename to lang/cem/libcc.ansi/core/math/tanh.c diff --git a/lang/cem/libcc.ansi/pure/setjmp/setjmp.e b/lang/cem/libcc.ansi/core/setjmp/setjmp.e similarity index 100% rename from lang/cem/libcc.ansi/pure/setjmp/setjmp.e rename to lang/cem/libcc.ansi/core/setjmp/setjmp.e diff --git a/lang/cem/libcc.ansi/pure/setjmp/sigmisc.c b/lang/cem/libcc.ansi/core/setjmp/sigmisc.c similarity index 100% rename from lang/cem/libcc.ansi/pure/setjmp/sigmisc.c rename to lang/cem/libcc.ansi/core/setjmp/sigmisc.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/abs.c b/lang/cem/libcc.ansi/core/stdlib/abs.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/abs.c rename to lang/cem/libcc.ansi/core/stdlib/abs.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/atoi.c b/lang/cem/libcc.ansi/core/stdlib/atoi.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/atoi.c rename to lang/cem/libcc.ansi/core/stdlib/atoi.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/atol.c b/lang/cem/libcc.ansi/core/stdlib/atol.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/atol.c rename to lang/cem/libcc.ansi/core/stdlib/atol.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/bsearch.c b/lang/cem/libcc.ansi/core/stdlib/bsearch.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/bsearch.c rename to lang/cem/libcc.ansi/core/stdlib/bsearch.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/div.c b/lang/cem/libcc.ansi/core/stdlib/div.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/div.c rename to lang/cem/libcc.ansi/core/stdlib/div.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/getenv.c b/lang/cem/libcc.ansi/core/stdlib/getenv.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/getenv.c rename to lang/cem/libcc.ansi/core/stdlib/getenv.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/labs.c b/lang/cem/libcc.ansi/core/stdlib/labs.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/labs.c rename to lang/cem/libcc.ansi/core/stdlib/labs.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/ldiv.c b/lang/cem/libcc.ansi/core/stdlib/ldiv.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/ldiv.c rename to lang/cem/libcc.ansi/core/stdlib/ldiv.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/mblen.c b/lang/cem/libcc.ansi/core/stdlib/mblen.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/mblen.c rename to lang/cem/libcc.ansi/core/stdlib/mblen.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/mbstowcs.c b/lang/cem/libcc.ansi/core/stdlib/mbstowcs.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/mbstowcs.c rename to lang/cem/libcc.ansi/core/stdlib/mbstowcs.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/mbtowc.c b/lang/cem/libcc.ansi/core/stdlib/mbtowc.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/mbtowc.c rename to lang/cem/libcc.ansi/core/stdlib/mbtowc.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/putenv.c b/lang/cem/libcc.ansi/core/stdlib/putenv.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/putenv.c rename to lang/cem/libcc.ansi/core/stdlib/putenv.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/qsort.c b/lang/cem/libcc.ansi/core/stdlib/qsort.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/qsort.c rename to lang/cem/libcc.ansi/core/stdlib/qsort.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/rand.c b/lang/cem/libcc.ansi/core/stdlib/rand.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/rand.c rename to lang/cem/libcc.ansi/core/stdlib/rand.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/setenv.c b/lang/cem/libcc.ansi/core/stdlib/setenv.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/setenv.c rename to lang/cem/libcc.ansi/core/stdlib/setenv.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/strtol.c b/lang/cem/libcc.ansi/core/stdlib/strtol.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/strtol.c rename to lang/cem/libcc.ansi/core/stdlib/strtol.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/wcstombs.c b/lang/cem/libcc.ansi/core/stdlib/wcstombs.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/wcstombs.c rename to lang/cem/libcc.ansi/core/stdlib/wcstombs.c diff --git a/lang/cem/libcc.ansi/pure/stdlib/wctomb.c b/lang/cem/libcc.ansi/core/stdlib/wctomb.c similarity index 100% rename from lang/cem/libcc.ansi/pure/stdlib/wctomb.c rename to lang/cem/libcc.ansi/core/stdlib/wctomb.c diff --git a/lang/cem/libcc.ansi/pure/string/memchr.c b/lang/cem/libcc.ansi/core/string/memchr.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/memchr.c rename to lang/cem/libcc.ansi/core/string/memchr.c diff --git a/lang/cem/libcc.ansi/pure/string/memcmp.c b/lang/cem/libcc.ansi/core/string/memcmp.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/memcmp.c rename to lang/cem/libcc.ansi/core/string/memcmp.c diff --git a/lang/cem/libcc.ansi/pure/string/memcpy.c b/lang/cem/libcc.ansi/core/string/memcpy.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/memcpy.c rename to lang/cem/libcc.ansi/core/string/memcpy.c diff --git a/lang/cem/libcc.ansi/pure/string/memmove.c b/lang/cem/libcc.ansi/core/string/memmove.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/memmove.c rename to lang/cem/libcc.ansi/core/string/memmove.c diff --git a/lang/cem/libcc.ansi/pure/string/memset.c b/lang/cem/libcc.ansi/core/string/memset.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/memset.c rename to lang/cem/libcc.ansi/core/string/memset.c diff --git a/lang/cem/libcc.ansi/pure/string/strcat.c b/lang/cem/libcc.ansi/core/string/strcat.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strcat.c rename to lang/cem/libcc.ansi/core/string/strcat.c diff --git a/lang/cem/libcc.ansi/pure/string/strchr.c b/lang/cem/libcc.ansi/core/string/strchr.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strchr.c rename to lang/cem/libcc.ansi/core/string/strchr.c diff --git a/lang/cem/libcc.ansi/pure/string/strcmp.c b/lang/cem/libcc.ansi/core/string/strcmp.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strcmp.c rename to lang/cem/libcc.ansi/core/string/strcmp.c diff --git a/lang/cem/libcc.ansi/pure/string/strcoll.c b/lang/cem/libcc.ansi/core/string/strcoll.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strcoll.c rename to lang/cem/libcc.ansi/core/string/strcoll.c diff --git a/lang/cem/libcc.ansi/pure/string/strcpy.c b/lang/cem/libcc.ansi/core/string/strcpy.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strcpy.c rename to lang/cem/libcc.ansi/core/string/strcpy.c diff --git a/lang/cem/libcc.ansi/pure/string/strcspn.c b/lang/cem/libcc.ansi/core/string/strcspn.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strcspn.c rename to lang/cem/libcc.ansi/core/string/strcspn.c diff --git a/lang/cem/libcc.ansi/pure/string/strdup.c b/lang/cem/libcc.ansi/core/string/strdup.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strdup.c rename to lang/cem/libcc.ansi/core/string/strdup.c diff --git a/lang/cem/libcc.ansi/pure/string/strlen.c b/lang/cem/libcc.ansi/core/string/strlen.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strlen.c rename to lang/cem/libcc.ansi/core/string/strlen.c diff --git a/lang/cem/libcc.ansi/pure/string/strncat.c b/lang/cem/libcc.ansi/core/string/strncat.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strncat.c rename to lang/cem/libcc.ansi/core/string/strncat.c diff --git a/lang/cem/libcc.ansi/pure/string/strncmp.c b/lang/cem/libcc.ansi/core/string/strncmp.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strncmp.c rename to lang/cem/libcc.ansi/core/string/strncmp.c diff --git a/lang/cem/libcc.ansi/pure/string/strncpy.c b/lang/cem/libcc.ansi/core/string/strncpy.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strncpy.c rename to lang/cem/libcc.ansi/core/string/strncpy.c diff --git a/lang/cem/libcc.ansi/pure/string/strpbrk.c b/lang/cem/libcc.ansi/core/string/strpbrk.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strpbrk.c rename to lang/cem/libcc.ansi/core/string/strpbrk.c diff --git a/lang/cem/libcc.ansi/pure/string/strrchr.c b/lang/cem/libcc.ansi/core/string/strrchr.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strrchr.c rename to lang/cem/libcc.ansi/core/string/strrchr.c diff --git a/lang/cem/libcc.ansi/pure/string/strspn.c b/lang/cem/libcc.ansi/core/string/strspn.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strspn.c rename to lang/cem/libcc.ansi/core/string/strspn.c diff --git a/lang/cem/libcc.ansi/pure/string/strstr.c b/lang/cem/libcc.ansi/core/string/strstr.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strstr.c rename to lang/cem/libcc.ansi/core/string/strstr.c diff --git a/lang/cem/libcc.ansi/pure/string/strtok.c b/lang/cem/libcc.ansi/core/string/strtok.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strtok.c rename to lang/cem/libcc.ansi/core/string/strtok.c diff --git a/lang/cem/libcc.ansi/pure/string/strxfrm.c b/lang/cem/libcc.ansi/core/string/strxfrm.c similarity index 100% rename from lang/cem/libcc.ansi/pure/string/strxfrm.c rename to lang/cem/libcc.ansi/core/string/strxfrm.c diff --git a/lang/cem/libcc.ansi/pure/README.md b/lang/cem/libcc.ansi/pure/README.md deleted file mode 100644 index 484205837..000000000 --- a/lang/cem/libcc.ansi/pure/README.md +++ /dev/null @@ -1,3 +0,0 @@ -This directory contains _only_ pure-code libc functions with no dependencies -on anything other than other pure functions (for example: strcmp, div). There -should be no reason why any platform won't want these in its libc.