From 77d0069e522400b63c2182fcc5f852718e4e6f2c Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sun, 16 Aug 2020 14:11:32 -0400 Subject: rename files that should never be compiled on their own to .h --- mk/_POSIX_C_SOURCE.d | 9 --- mk/_XOPEN_SOURCE.d | 9 --- mk/_XOPEN_SOURCE_EXTENDED.d | 9 --- mk/all.mk | 4 -- mk/jmp_buf.d | 9 --- src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.c | 0 src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.h | 0 src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.c | 5 -- src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.h | 5 ++ src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.c | 0 src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.h | 0 .../_XOPEN_SOURCE_EXTENDED.c | 0 .../_XOPEN_SOURCE_EXTENDED.h | 0 src/__PREDEFINED_MACROS__/__DATE__.c | 12 ---- src/__PREDEFINED_MACROS__/__DATE__.h | 12 ++++ src/__PREDEFINED_MACROS__/__FILE__.c | 14 ----- src/__PREDEFINED_MACROS__/__FILE__.h | 14 +++++ src/__PREDEFINED_MACROS__/__LINE__.c | 14 ----- src/__PREDEFINED_MACROS__/__LINE__.h | 14 +++++ src/__PREDEFINED_MACROS__/__STDC_HOSTED__.c | 10 ---- src/__PREDEFINED_MACROS__/__STDC_HOSTED__.h | 10 ++++ .../__STDC_IEC_559_COMPLEX__.c | 10 ---- .../__STDC_IEC_559_COMPLEX__.h | 10 ++++ src/__PREDEFINED_MACROS__/__STDC_IEC_559__.c | 10 ---- src/__PREDEFINED_MACROS__/__STDC_IEC_559__.h | 10 ++++ src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.c | 13 ----- src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.h | 13 +++++ src/__PREDEFINED_MACROS__/__STDC_VERSION__.c | 13 ----- src/__PREDEFINED_MACROS__/__STDC_VERSION__.h | 13 +++++ src/__PREDEFINED_MACROS__/__STDC__.c | 14 ----- src/__PREDEFINED_MACROS__/__STDC__.h | 14 +++++ src/__PREDEFINED_MACROS__/__TIME__.c | 12 ---- src/__PREDEFINED_MACROS__/__TIME__.h | 12 ++++ src/assert/NDEBUG.c | 14 ----- src/assert/NDEBUG.h | 14 +++++ src/assert/assert.c | 38 ------------- src/assert/assert.h | 38 +++++++++++++ src/errno/EDOM.c | 12 ---- src/errno/EDOM.h | 12 ++++ src/errno/ERANGE.c | 11 ---- src/errno/ERANGE.h | 11 ++++ src/errno/errno.c | 19 ------- src/errno/errno.h | 19 +++++++ src/locale/LC_ALL.c | 12 ---- src/locale/LC_ALL.h | 12 ++++ src/locale/LC_COLLATE.c | 12 ---- src/locale/LC_COLLATE.h | 12 ++++ src/locale/LC_CTYPE.c | 13 ----- src/locale/LC_CTYPE.h | 13 +++++ src/locale/LC_MONETARY.c | 12 ---- src/locale/LC_MONETARY.h | 12 ++++ src/locale/LC_NUMERIC.c | 13 ----- src/locale/LC_NUMERIC.h | 13 +++++ src/locale/LC_TIME.c | 12 ---- src/locale/LC_TIME.h | 12 ++++ src/locale/struct_lconv.c | 65 ---------------------- src/locale/struct_lconv.h | 65 ++++++++++++++++++++++ src/math/HUGE_VAL.c | 12 ---- src/math/HUGE_VAL.h | 12 ++++ src/setjmp/jmp_buf.c | 13 ----- src/setjmp/jmp_buf.h | 13 +++++ src/signal/SIGABRT.c | 14 ----- src/signal/SIGABRT.h | 14 +++++ src/signal/SIGFPE.c | 12 ---- src/signal/SIGFPE.h | 12 ++++ src/signal/SIGILL.c | 12 ---- src/signal/SIGINT.h | 12 ++++ src/signal/SIGSEGV.c | 12 ---- src/signal/SIGSEGV.h | 12 ++++ src/signal/SIGTERM.c | 13 ----- src/signal/SIGTERM.h | 13 +++++ src/signal/SIG_DFL.c | 12 ---- src/signal/SIG_DFL.h | 12 ++++ src/signal/SIG_ERR.c | 12 ---- src/signal/SIG_ERR.h | 12 ++++ src/signal/SIG_IGN.c | 12 ---- src/signal/SIG_IGN.h | 12 ++++ src/signal/sig_atomic_t.c | 12 ---- src/signal/sig_atomic_t.h | 12 ++++ src/stdarg/va_arg.c | 21 ------- src/stdarg/va_arg.h | 21 +++++++ src/stdarg/va_end.c | 16 ------ src/stdarg/va_end.h | 16 ++++++ src/stdarg/va_list.c | 12 ---- src/stdarg/va_list.h | 12 ++++ src/stdarg/va_start.c | 21 ------- src/stdarg/va_start.h | 21 +++++++ src/stddef/NULL.c | 14 ----- src/stddef/NULL.h | 14 +++++ src/stddef/offsetof.c | 14 ----- src/stddef/offsetof.h | 14 +++++ src/stddef/ptrdiff_t.c | 21 ------- src/stddef/ptrdiff_t.h | 21 +++++++ src/stddef/size_t.c | 21 ------- src/stddef/size_t.h | 21 +++++++ src/stddef/wchar_t.c | 14 ----- src/stddef/wchar_t.h | 14 +++++ src/stdio/BUFSIZ.c | 12 ---- src/stdio/BUFSIZ.h | 12 ++++ src/stdio/EOF.c | 12 ---- src/stdio/EOF.h | 12 ++++ src/stdio/FILE.c | 16 ------ src/stdio/FILE.h | 16 ++++++ src/stdio/FILENAME_MAX.c | 12 ---- src/stdio/FILENAME_MAX.h | 12 ++++ src/stdio/FOPEN_MAX.c | 13 ----- src/stdio/FOPEN_MAX.h | 13 +++++ src/stdio/L_tmpnam.c | 11 ---- src/stdio/L_tmpnam.h | 11 ++++ src/stdio/SEEK_CUR.c | 12 ---- src/stdio/SEEK_CUR.h | 12 ++++ src/stdio/SEEK_END.c | 12 ---- src/stdio/SEEK_END.h | 12 ++++ src/stdio/SEEK_SET.c | 12 ---- src/stdio/SEEK_SET.h | 12 ++++ src/stdio/TMP_MAX.c | 12 ---- src/stdio/TMP_MAX.h | 12 ++++ src/stdio/_IOFBF.c | 12 ---- src/stdio/_IOFBF.h | 12 ++++ src/stdio/_IOLBF.c | 12 ---- src/stdio/_IOLBF.h | 12 ++++ src/stdio/_IONBF.c | 12 ---- src/stdio/_IONBF.h | 12 ++++ src/stdio/fpos_t.c | 13 ----- src/stdio/fpos_t.h | 13 +++++ src/stdio/stderr.c | 11 ---- src/stdio/stderr.h | 11 ++++ src/stdio/stdin.c | 11 ---- src/stdio/stdin.h | 11 ++++ src/stdio/stdout.c | 11 ---- src/stdio/stdout.h | 11 ++++ src/stdlib/EXIT_FAILURE.c | 13 ----- src/stdlib/EXIT_FAILURE.h | 13 +++++ src/stdlib/EXIT_SUCCESS.c | 13 ----- src/stdlib/EXIT_SUCCESS.h | 13 +++++ src/stdlib/MB_CUR_MAX.c | 13 ----- src/stdlib/MB_CUR_MAX.h | 13 +++++ src/stdlib/RAND_MAX.c | 12 ---- src/stdlib/RAND_MAX.h | 12 ++++ src/stdlib/div_t.c | 15 ----- src/stdlib/div_t.h | 15 +++++ src/stdlib/ldiv_t.c | 15 ----- src/stdlib/ldiv_t.h | 15 +++++ src/time/CLOCKS_PER_SEC.c | 11 ---- src/time/CLOCKS_PER_SEC.h | 11 ++++ src/time/clock_t.c | 13 ----- src/time/clock_t.h | 13 +++++ src/time/struct_tm.c | 21 ------- src/time/struct_tm.h | 21 +++++++ src/time/time_t.c | 13 ----- src/time/time_t.h | 13 +++++ 151 files changed, 995 insertions(+), 1035 deletions(-) delete mode 100644 mk/_POSIX_C_SOURCE.d delete mode 100644 mk/_XOPEN_SOURCE.d delete mode 100644 mk/_XOPEN_SOURCE_EXTENDED.d delete mode 100644 mk/jmp_buf.d delete mode 100644 src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.c create mode 100644 src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.h delete mode 100644 src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.c create mode 100644 src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.h delete mode 100644 src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.c create mode 100644 src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.h delete mode 100644 src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE_EXTENDED.c create mode 100644 src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE_EXTENDED.h delete mode 100644 src/__PREDEFINED_MACROS__/__DATE__.c create mode 100644 src/__PREDEFINED_MACROS__/__DATE__.h delete mode 100644 src/__PREDEFINED_MACROS__/__FILE__.c create mode 100644 src/__PREDEFINED_MACROS__/__FILE__.h delete mode 100644 src/__PREDEFINED_MACROS__/__LINE__.c create mode 100644 src/__PREDEFINED_MACROS__/__LINE__.h delete mode 100644 src/__PREDEFINED_MACROS__/__STDC_HOSTED__.c create mode 100644 src/__PREDEFINED_MACROS__/__STDC_HOSTED__.h delete mode 100644 src/__PREDEFINED_MACROS__/__STDC_IEC_559_COMPLEX__.c create mode 100644 src/__PREDEFINED_MACROS__/__STDC_IEC_559_COMPLEX__.h delete mode 100644 src/__PREDEFINED_MACROS__/__STDC_IEC_559__.c create mode 100644 src/__PREDEFINED_MACROS__/__STDC_IEC_559__.h delete mode 100644 src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.c create mode 100644 src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.h delete mode 100644 src/__PREDEFINED_MACROS__/__STDC_VERSION__.c create mode 100644 src/__PREDEFINED_MACROS__/__STDC_VERSION__.h delete mode 100644 src/__PREDEFINED_MACROS__/__STDC__.c create mode 100644 src/__PREDEFINED_MACROS__/__STDC__.h delete mode 100644 src/__PREDEFINED_MACROS__/__TIME__.c create mode 100644 src/__PREDEFINED_MACROS__/__TIME__.h delete mode 100644 src/assert/NDEBUG.c create mode 100644 src/assert/NDEBUG.h delete mode 100644 src/assert/assert.c create mode 100644 src/assert/assert.h delete mode 100644 src/errno/EDOM.c create mode 100644 src/errno/EDOM.h delete mode 100644 src/errno/ERANGE.c create mode 100644 src/errno/ERANGE.h delete mode 100644 src/errno/errno.c create mode 100644 src/errno/errno.h delete mode 100644 src/locale/LC_ALL.c create mode 100644 src/locale/LC_ALL.h delete mode 100644 src/locale/LC_COLLATE.c create mode 100644 src/locale/LC_COLLATE.h delete mode 100644 src/locale/LC_CTYPE.c create mode 100644 src/locale/LC_CTYPE.h delete mode 100644 src/locale/LC_MONETARY.c create mode 100644 src/locale/LC_MONETARY.h delete mode 100644 src/locale/LC_NUMERIC.c create mode 100644 src/locale/LC_NUMERIC.h delete mode 100644 src/locale/LC_TIME.c create mode 100644 src/locale/LC_TIME.h delete mode 100644 src/locale/struct_lconv.c create mode 100644 src/locale/struct_lconv.h delete mode 100644 src/math/HUGE_VAL.c create mode 100644 src/math/HUGE_VAL.h delete mode 100644 src/setjmp/jmp_buf.c create mode 100644 src/setjmp/jmp_buf.h delete mode 100644 src/signal/SIGABRT.c create mode 100644 src/signal/SIGABRT.h delete mode 100644 src/signal/SIGFPE.c create mode 100644 src/signal/SIGFPE.h delete mode 100644 src/signal/SIGILL.c create mode 100644 src/signal/SIGINT.h delete mode 100644 src/signal/SIGSEGV.c create mode 100644 src/signal/SIGSEGV.h delete mode 100644 src/signal/SIGTERM.c create mode 100644 src/signal/SIGTERM.h delete mode 100644 src/signal/SIG_DFL.c create mode 100644 src/signal/SIG_DFL.h delete mode 100644 src/signal/SIG_ERR.c create mode 100644 src/signal/SIG_ERR.h delete mode 100644 src/signal/SIG_IGN.c create mode 100644 src/signal/SIG_IGN.h delete mode 100644 src/signal/sig_atomic_t.c create mode 100644 src/signal/sig_atomic_t.h delete mode 100644 src/stdarg/va_arg.c create mode 100644 src/stdarg/va_arg.h delete mode 100644 src/stdarg/va_end.c create mode 100644 src/stdarg/va_end.h delete mode 100644 src/stdarg/va_list.c create mode 100644 src/stdarg/va_list.h delete mode 100644 src/stdarg/va_start.c create mode 100644 src/stdarg/va_start.h delete mode 100644 src/stddef/NULL.c create mode 100644 src/stddef/NULL.h delete mode 100644 src/stddef/offsetof.c create mode 100644 src/stddef/offsetof.h delete mode 100644 src/stddef/ptrdiff_t.c create mode 100644 src/stddef/ptrdiff_t.h delete mode 100644 src/stddef/size_t.c create mode 100644 src/stddef/size_t.h delete mode 100644 src/stddef/wchar_t.c create mode 100644 src/stddef/wchar_t.h delete mode 100644 src/stdio/BUFSIZ.c create mode 100644 src/stdio/BUFSIZ.h delete mode 100644 src/stdio/EOF.c create mode 100644 src/stdio/EOF.h delete mode 100644 src/stdio/FILE.c create mode 100644 src/stdio/FILE.h delete mode 100644 src/stdio/FILENAME_MAX.c create mode 100644 src/stdio/FILENAME_MAX.h delete mode 100644 src/stdio/FOPEN_MAX.c create mode 100644 src/stdio/FOPEN_MAX.h delete mode 100644 src/stdio/L_tmpnam.c create mode 100644 src/stdio/L_tmpnam.h delete mode 100644 src/stdio/SEEK_CUR.c create mode 100644 src/stdio/SEEK_CUR.h delete mode 100644 src/stdio/SEEK_END.c create mode 100644 src/stdio/SEEK_END.h delete mode 100644 src/stdio/SEEK_SET.c create mode 100644 src/stdio/SEEK_SET.h delete mode 100644 src/stdio/TMP_MAX.c create mode 100644 src/stdio/TMP_MAX.h delete mode 100644 src/stdio/_IOFBF.c create mode 100644 src/stdio/_IOFBF.h delete mode 100644 src/stdio/_IOLBF.c create mode 100644 src/stdio/_IOLBF.h delete mode 100644 src/stdio/_IONBF.c create mode 100644 src/stdio/_IONBF.h delete mode 100644 src/stdio/fpos_t.c create mode 100644 src/stdio/fpos_t.h delete mode 100644 src/stdio/stderr.c create mode 100644 src/stdio/stderr.h delete mode 100644 src/stdio/stdin.c create mode 100644 src/stdio/stdin.h delete mode 100644 src/stdio/stdout.c create mode 100644 src/stdio/stdout.h delete mode 100644 src/stdlib/EXIT_FAILURE.c create mode 100644 src/stdlib/EXIT_FAILURE.h delete mode 100644 src/stdlib/EXIT_SUCCESS.c create mode 100644 src/stdlib/EXIT_SUCCESS.h delete mode 100644 src/stdlib/MB_CUR_MAX.c create mode 100644 src/stdlib/MB_CUR_MAX.h delete mode 100644 src/stdlib/RAND_MAX.c create mode 100644 src/stdlib/RAND_MAX.h delete mode 100644 src/stdlib/div_t.c create mode 100644 src/stdlib/div_t.h delete mode 100644 src/stdlib/ldiv_t.c create mode 100644 src/stdlib/ldiv_t.h delete mode 100644 src/time/CLOCKS_PER_SEC.c create mode 100644 src/time/CLOCKS_PER_SEC.h delete mode 100644 src/time/clock_t.c create mode 100644 src/time/clock_t.h delete mode 100644 src/time/struct_tm.c create mode 100644 src/time/struct_tm.h delete mode 100644 src/time/time_t.c create mode 100644 src/time/time_t.h diff --git a/mk/_POSIX_C_SOURCE.d b/mk/_POSIX_C_SOURCE.d deleted file mode 100644 index 76cf739c..00000000 --- a/mk/_POSIX_C_SOURCE.d +++ /dev/null @@ -1,9 +0,0 @@ -libc_C.0: libc.a(_POSIX_C_SOURCE.o) -libc.a(_POSIX_C_SOURCE.o): $(OBJDIR)/_POSIX_C_SOURCE.o - @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$% - -$(OBJDIR)/_POSIX_C_SOURCE.o: src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.c -$(OBJDIR)/_POSIX_C_SOURCE.o: - @echo " [CC] $@" - @mkdir -p $(@D) - @$(CC) -c -o $@ $(CFLAGS) src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.c diff --git a/mk/_XOPEN_SOURCE.d b/mk/_XOPEN_SOURCE.d deleted file mode 100644 index 803b302d..00000000 --- a/mk/_XOPEN_SOURCE.d +++ /dev/null @@ -1,9 +0,0 @@ -libc_C.0: libc.a(_XOPEN_SOURCE.o) -libc.a(_XOPEN_SOURCE.o): $(OBJDIR)/_XOPEN_SOURCE.o - @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$% - -$(OBJDIR)/_XOPEN_SOURCE.o: src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.c -$(OBJDIR)/_XOPEN_SOURCE.o: - @echo " [CC] $@" - @mkdir -p $(@D) - @$(CC) -c -o $@ $(CFLAGS) src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.c diff --git a/mk/_XOPEN_SOURCE_EXTENDED.d b/mk/_XOPEN_SOURCE_EXTENDED.d deleted file mode 100644 index 06087555..00000000 --- a/mk/_XOPEN_SOURCE_EXTENDED.d +++ /dev/null @@ -1,9 +0,0 @@ -libc_C.0: libc.a(_XOPEN_SOURCE_EXTENDED.o) -libc.a(_XOPEN_SOURCE_EXTENDED.o): $(OBJDIR)/_XOPEN_SOURCE_EXTENDED.o - @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$% - -$(OBJDIR)/_XOPEN_SOURCE_EXTENDED.o: src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE_EXTENDED.c -$(OBJDIR)/_XOPEN_SOURCE_EXTENDED.o: - @echo " [CC] $@" - @mkdir -p $(@D) - @$(CC) -c -o $@ $(CFLAGS) src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE_EXTENDED.c diff --git a/mk/all.mk b/mk/all.mk index 6124cf79..48c45a39 100644 --- a/mk/all.mk +++ b/mk/all.mk @@ -69,7 +69,6 @@ include mk/_setjmp.d include mk/sigsetjmp.d include mk/siglongjmp.d include mk/longjmp.d -include mk/jmp_buf.d include mk/bzero.d include mk/index.d include mk/bcmp.d @@ -108,9 +107,6 @@ include mk/dbm_close.d include mk/dbm_fetch.d include mk/dbm_open.d include mk/dbm_clearerr.d -include mk/_XOPEN_SOURCE_EXTENDED.d -include mk/_XOPEN_SOURCE.d -include mk/_POSIX_C_SOURCE.d include mk/regcomp.d include mk/regexec.d include mk/regfree.d diff --git a/mk/jmp_buf.d b/mk/jmp_buf.d deleted file mode 100644 index f2dade7e..00000000 --- a/mk/jmp_buf.d +++ /dev/null @@ -1,9 +0,0 @@ -libc_C.1: libc.a(jmp_buf.o) -libc.a(jmp_buf.o): $(OBJDIR)/jmp_buf.o - @$(AR) $(ARFLAGS) $@ $(OBJDIR)/$% - -$(OBJDIR)/jmp_buf.o: src/setjmp/jmp_buf.c -$(OBJDIR)/jmp_buf.o: - @echo " [CC] $@" - @mkdir -p $(@D) - @$(CC) -c -o $@ $(CFLAGS) src/setjmp/jmp_buf.c diff --git a/src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.c b/src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.c deleted file mode 100644 index e69de29b..00000000 diff --git a/src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.h b/src/__FEATURE_TEST_MACROS__/_POSIX_C_SOURCE.h new file mode 100644 index 00000000..e69de29b diff --git a/src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.c b/src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.c deleted file mode 100644 index b594f3d9..00000000 --- a/src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.c +++ /dev/null @@ -1,5 +0,0 @@ -#define _POSIX_SOURCE /** feature test macro **/ -/* -FTM(POSIX.1-1988) -POSIX(1) -*/ diff --git a/src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.h b/src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.h new file mode 100644 index 00000000..b594f3d9 --- /dev/null +++ b/src/__FEATURE_TEST_MACROS__/_POSIX_SOURCE.h @@ -0,0 +1,5 @@ +#define _POSIX_SOURCE /** feature test macro **/ +/* +FTM(POSIX.1-1988) +POSIX(1) +*/ diff --git a/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.c b/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.c deleted file mode 100644 index e69de29b..00000000 diff --git a/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.h b/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE.h new file mode 100644 index 00000000..e69de29b diff --git a/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE_EXTENDED.c b/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE_EXTENDED.c deleted file mode 100644 index e69de29b..00000000 diff --git a/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE_EXTENDED.h b/src/__FEATURE_TEST_MACROS__/_XOPEN_SOURCE_EXTENDED.h new file mode 100644 index 00000000..e69de29b diff --git a/src/__PREDEFINED_MACROS__/__DATE__.c b/src/__PREDEFINED_MACROS__/__DATE__.c deleted file mode 100644 index 14e40fcb..00000000 --- a/src/__PREDEFINED_MACROS__/__DATE__.c +++ /dev/null @@ -1,12 +0,0 @@ -#define __DATE__ /** date of compilation **/ - -/*** -is automatically defined by the compiler as the date of program -compilation, in the format DEFINITION("Mmm dd yyyy"). -***/ - -/* -VALUE_TYPE(string literal) -VALUE_FIXED(VAR("date-of-compilation")) -STDC(1) -*/ diff --git a/src/__PREDEFINED_MACROS__/__DATE__.h b/src/__PREDEFINED_MACROS__/__DATE__.h new file mode 100644 index 00000000..14e40fcb --- /dev/null +++ b/src/__PREDEFINED_MACROS__/__DATE__.h @@ -0,0 +1,12 @@ +#define __DATE__ /** date of compilation **/ + +/*** +is automatically defined by the compiler as the date of program +compilation, in the format DEFINITION("Mmm dd yyyy"). +***/ + +/* +VALUE_TYPE(string literal) +VALUE_FIXED(VAR("date-of-compilation")) +STDC(1) +*/ diff --git a/src/__PREDEFINED_MACROS__/__FILE__.c b/src/__PREDEFINED_MACROS__/__FILE__.c deleted file mode 100644 index 257ae89b..00000000 --- a/src/__PREDEFINED_MACROS__/__FILE__.c +++ /dev/null @@ -1,14 +0,0 @@ -#define __FILE__ /** source file name **/ - -/*** -is automatically defined by the compiler as the file name of the -current source file being compiled as a character string literal. - -THIS() can be changed using PPDIR(line). -***/ - -/* -VALUE_TYPE(string literal) -VALUE_FIXED(VAR(the current file name)) -STDC(1) -*/ diff --git a/src/__PREDEFINED_MACROS__/__FILE__.h b/src/__PREDEFINED_MACROS__/__FILE__.h new file mode 100644 index 00000000..257ae89b --- /dev/null +++ b/src/__PREDEFINED_MACROS__/__FILE__.h @@ -0,0 +1,14 @@ +#define __FILE__ /** source file name **/ + +/*** +is automatically defined by the compiler as the file name of the +current source file being compiled as a character string literal. + +THIS() can be changed using PPDIR(line). +***/ + +/* +VALUE_TYPE(string literal) +VALUE_FIXED(VAR(the current file name)) +STDC(1) +*/ diff --git a/src/__PREDEFINED_MACROS__/__LINE__.c b/src/__PREDEFINED_MACROS__/__LINE__.c deleted file mode 100644 index c6acb1b1..00000000 --- a/src/__PREDEFINED_MACROS__/__LINE__.c +++ /dev/null @@ -1,14 +0,0 @@ -#define __LINE__ /** source file line number **/ - -/*** -is automatically defined by the compiler as the current logical source -line in the source file being compiled. - -THIS() can be changed during compilation using PPDIR(line). -***/ - -/* -VALUE_TYPE(TYPE(int)) -VALUE_FIXED(VAR(the current line number)) -STDC(1) -*/ diff --git a/src/__PREDEFINED_MACROS__/__LINE__.h b/src/__PREDEFINED_MACROS__/__LINE__.h new file mode 100644 index 00000000..c6acb1b1 --- /dev/null +++ b/src/__PREDEFINED_MACROS__/__LINE__.h @@ -0,0 +1,14 @@ +#define __LINE__ /** source file line number **/ + +/*** +is automatically defined by the compiler as the current logical source +line in the source file being compiled. + +THIS() can be changed during compilation using PPDIR(line). +***/ + +/* +VALUE_TYPE(TYPE(int)) +VALUE_FIXED(VAR(the current line number)) +STDC(1) +*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC_HOSTED__.c b/src/__PREDEFINED_MACROS__/__STDC_HOSTED__.c deleted file mode 100644 index 48fe28b7..00000000 --- a/src/__PREDEFINED_MACROS__/__STDC_HOSTED__.c +++ /dev/null @@ -1,10 +0,0 @@ -#define __STDC_HOSTED__ /** hosted or free-standing implementation **/ - -/*** -is defined to the integer constant CONST(1) if the implementation -is hosted, CONST(0) otherwise. -***/ - -/* -STDC(199901) -*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC_HOSTED__.h b/src/__PREDEFINED_MACROS__/__STDC_HOSTED__.h new file mode 100644 index 00000000..48fe28b7 --- /dev/null +++ b/src/__PREDEFINED_MACROS__/__STDC_HOSTED__.h @@ -0,0 +1,10 @@ +#define __STDC_HOSTED__ /** hosted or free-standing implementation **/ + +/*** +is defined to the integer constant CONST(1) if the implementation +is hosted, CONST(0) otherwise. +***/ + +/* +STDC(199901) +*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC_IEC_559_COMPLEX__.c b/src/__PREDEFINED_MACROS__/__STDC_IEC_559_COMPLEX__.c deleted file mode 100644 index a8d1f810..00000000 --- a/src/__PREDEFINED_MACROS__/__STDC_IEC_559_COMPLEX__.c +++ /dev/null @@ -1,10 +0,0 @@ -#define __STDC_IEC_559_COMPLEX__ /** IEC 60559 complex arithmetic **/ - -/*** -is defined to CONST(1) if the implementation conforms to Annex G -of ISO/IEC 9899 (IEC 60559 complex arithmetic). -***/ - -/* -STDC(199901) -*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC_IEC_559_COMPLEX__.h b/src/__PREDEFINED_MACROS__/__STDC_IEC_559_COMPLEX__.h new file mode 100644 index 00000000..a8d1f810 --- /dev/null +++ b/src/__PREDEFINED_MACROS__/__STDC_IEC_559_COMPLEX__.h @@ -0,0 +1,10 @@ +#define __STDC_IEC_559_COMPLEX__ /** IEC 60559 complex arithmetic **/ + +/*** +is defined to CONST(1) if the implementation conforms to Annex G +of ISO/IEC 9899 (IEC 60559 complex arithmetic). +***/ + +/* +STDC(199901) +*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC_IEC_559__.c b/src/__PREDEFINED_MACROS__/__STDC_IEC_559__.c deleted file mode 100644 index bdc441c4..00000000 --- a/src/__PREDEFINED_MACROS__/__STDC_IEC_559__.c +++ /dev/null @@ -1,10 +0,0 @@ -#define __STDC_IEC_559__ /** IEC 60559 floating-point arithmetic **/ - -/*** -is defined to CONST(1) if the implementation conforms to Annex G -of ISO/IEC 9899 (IEC 60559 floating-point arithmetic). -***/ - -/* -STDC(199901) -*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC_IEC_559__.h b/src/__PREDEFINED_MACROS__/__STDC_IEC_559__.h new file mode 100644 index 00000000..bdc441c4 --- /dev/null +++ b/src/__PREDEFINED_MACROS__/__STDC_IEC_559__.h @@ -0,0 +1,10 @@ +#define __STDC_IEC_559__ /** IEC 60559 floating-point arithmetic **/ + +/*** +is defined to CONST(1) if the implementation conforms to Annex G +of ISO/IEC 9899 (IEC 60559 floating-point arithmetic). +***/ + +/* +STDC(199901) +*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.c b/src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.c deleted file mode 100644 index 3379c855..00000000 --- a/src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.c +++ /dev/null @@ -1,13 +0,0 @@ -#define __STDC_ISO_10646__ /** supported UCS version **/ - -/*** -is defined if TYPE(wchar_t) represents characters encoded -in conformance with ISO/IEC 10646. In this case, THIS() is -defined as an integer CONST(yyyymmL), where CONST(yyyy) -represents the year and CONST(mm) the month of the supported -version of ISO/IEC 10646. -***/ - -/* -STDC(199901) -*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.h b/src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.h new file mode 100644 index 00000000..3379c855 --- /dev/null +++ b/src/__PREDEFINED_MACROS__/__STDC_ISO_10646__.h @@ -0,0 +1,13 @@ +#define __STDC_ISO_10646__ /** supported UCS version **/ + +/*** +is defined if TYPE(wchar_t) represents characters encoded +in conformance with ISO/IEC 10646. In this case, THIS() is +defined as an integer CONST(yyyymmL), where CONST(yyyy) +represents the year and CONST(mm) the month of the supported +version of ISO/IEC 10646. +***/ + +/* +STDC(199901) +*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC_VERSION__.c b/src/__PREDEFINED_MACROS__/__STDC_VERSION__.c deleted file mode 100644 index 56a23d90..00000000 --- a/src/__PREDEFINED_MACROS__/__STDC_VERSION__.c +++ /dev/null @@ -1,13 +0,0 @@ -#define __STDC_VERSION__ /** supported C standard **/ - -/*** -declares the supported version of ISO/IEC 9899. If THIS() is not defined, -the implementation only supports ISO/IEC 9899:1990, without AMD1. -***/ - -/* -VALUE_SELECT(`199409L', `ISO/IEC 9899:1990 AMD1') -VALUE_SELECT(`199901L', `ISO/IEC 9899:1999') -VALUE_SELECT(`201112L', `ISO/IEC 9899:2011') -STDC(199409) -*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC_VERSION__.h b/src/__PREDEFINED_MACROS__/__STDC_VERSION__.h new file mode 100644 index 00000000..56a23d90 --- /dev/null +++ b/src/__PREDEFINED_MACROS__/__STDC_VERSION__.h @@ -0,0 +1,13 @@ +#define __STDC_VERSION__ /** supported C standard **/ + +/*** +declares the supported version of ISO/IEC 9899. If THIS() is not defined, +the implementation only supports ISO/IEC 9899:1990, without AMD1. +***/ + +/* +VALUE_SELECT(`199409L', `ISO/IEC 9899:1990 AMD1') +VALUE_SELECT(`199901L', `ISO/IEC 9899:1999') +VALUE_SELECT(`201112L', `ISO/IEC 9899:2011') +STDC(199409) +*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC__.c b/src/__PREDEFINED_MACROS__/__STDC__.c deleted file mode 100644 index 5bcfe7aa..00000000 --- a/src/__PREDEFINED_MACROS__/__STDC__.c +++ /dev/null @@ -1,14 +0,0 @@ -#define __STDC__ (1) - -/** standard C support **/ - -/*** -is automatically defined by the compiler to indicate that it supports -some version of ISO/IEC 9899. -***/ - -/* -VALUE_TYPE(TYPE(int)) -VALUE_FIXED(1) -STDC(1) -*/ diff --git a/src/__PREDEFINED_MACROS__/__STDC__.h b/src/__PREDEFINED_MACROS__/__STDC__.h new file mode 100644 index 00000000..5bcfe7aa --- /dev/null +++ b/src/__PREDEFINED_MACROS__/__STDC__.h @@ -0,0 +1,14 @@ +#define __STDC__ (1) + +/** standard C support **/ + +/*** +is automatically defined by the compiler to indicate that it supports +some version of ISO/IEC 9899. +***/ + +/* +VALUE_TYPE(TYPE(int)) +VALUE_FIXED(1) +STDC(1) +*/ diff --git a/src/__PREDEFINED_MACROS__/__TIME__.c b/src/__PREDEFINED_MACROS__/__TIME__.c deleted file mode 100644 index 472e42c0..00000000 --- a/src/__PREDEFINED_MACROS__/__TIME__.c +++ /dev/null @@ -1,12 +0,0 @@ -#define __TIME__ /** time of compilation **/ - -/*** -is automatically defined by the compiler as the time of compilation -in the format DEFINITION("hh:mm:ss"). -***/ - -/* -VALUE_TYPE(string literal) -VALUE_FIXED(VAR("time of compilation")) -STDC(1) -*/ diff --git a/src/__PREDEFINED_MACROS__/__TIME__.h b/src/__PREDEFINED_MACROS__/__TIME__.h new file mode 100644 index 00000000..472e42c0 --- /dev/null +++ b/src/__PREDEFINED_MACROS__/__TIME__.h @@ -0,0 +1,12 @@ +#define __TIME__ /** time of compilation **/ + +/*** +is automatically defined by the compiler as the time of compilation +in the format DEFINITION("hh:mm:ss"). +***/ + +/* +VALUE_TYPE(string literal) +VALUE_FIXED(VAR("time of compilation")) +STDC(1) +*/ diff --git a/src/assert/NDEBUG.c b/src/assert/NDEBUG.c deleted file mode 100644 index b09e73ce..00000000 --- a/src/assert/NDEBUG.c +++ /dev/null @@ -1,14 +0,0 @@ -/* #undef NDEBUG */ - -#define NDEBUG /** control program diagnostics **/ - -/*** -THIS() is not defined by the compiler or any header. If it is defined -by the programmer before including HEADER(assert.h), it causes -FUNCTION(assert) to be a void statement. Otherwise, FUNCTION(assert) has -its normal behavior. -***/ - -/* -STDC(1) -*/ diff --git a/src/assert/NDEBUG.h b/src/assert/NDEBUG.h new file mode 100644 index 00000000..b09e73ce --- /dev/null +++ b/src/assert/NDEBUG.h @@ -0,0 +1,14 @@ +/* #undef NDEBUG */ + +#define NDEBUG /** control program diagnostics **/ + +/*** +THIS() is not defined by the compiler or any header. If it is defined +by the programmer before including HEADER(assert.h), it causes +FUNCTION(assert) to be a void statement. Otherwise, FUNCTION(assert) has +its normal behavior. +***/ + +/* +STDC(1) +*/ diff --git a/src/assert/assert.c b/src/assert/assert.c deleted file mode 100644 index d49d9800..00000000 --- a/src/assert/assert.c +++ /dev/null @@ -1,38 +0,0 @@ -#undef assert - -#ifdef NDEBUG -# define assert(__exp) ((void)0) -#else -# if __STDC_VERSION__ < 199901L -# define __func__ ((char*)0) -# endif -# define assert(__exp) \ - ((void)((__exp) || \ - (__assert(#__exp, __FILE__, __LINE__, __func__), 0))) -#endif - -/* in c89 - void assert(int expression); */ -/* in c99 - void assert(/scalar/ expression); */ - -/** insert program diagnostics **/ - -/*** -adds mandatory checks to programs. If ARGUMENT(expression) is false, -FUNCTION(assert) prints a diagnostic message to IDENTIFIER(stderr). The -message includes the text of the failed assertion as well as the file name and -line number of the source where the assertion failed. Compilers supporting -std(C99) or higher will also include the name of the function in which the -assertion failed. After printing the diagnostic message, THIS() -causes abnormal program termination by calling FUNCTION(abort). - -If the macro IDENTIFIER(NDEBUG) is defined, THIS() is -defined as DEFINITION(((void)0)). -***/ - -/* -PROTOTYPE(void assert(int expression);) -IMPLEMENTATION(The format of the diagnostic message, TODO: document this here) -UNDEFINED(The THIS() macro is suppressed) -UNDEFINED(ARGUMENT(expression) does not have a scalar type) -STDC(1) -*/ diff --git a/src/assert/assert.h b/src/assert/assert.h new file mode 100644 index 00000000..d49d9800 --- /dev/null +++ b/src/assert/assert.h @@ -0,0 +1,38 @@ +#undef assert + +#ifdef NDEBUG +# define assert(__exp) ((void)0) +#else +# if __STDC_VERSION__ < 199901L +# define __func__ ((char*)0) +# endif +# define assert(__exp) \ + ((void)((__exp) || \ + (__assert(#__exp, __FILE__, __LINE__, __func__), 0))) +#endif + +/* in c89 - void assert(int expression); */ +/* in c99 - void assert(/scalar/ expression); */ + +/** insert program diagnostics **/ + +/*** +adds mandatory checks to programs. If ARGUMENT(expression) is false, +FUNCTION(assert) prints a diagnostic message to IDENTIFIER(stderr). The +message includes the text of the failed assertion as well as the file name and +line number of the source where the assertion failed. Compilers supporting +std(C99) or higher will also include the name of the function in which the +assertion failed. After printing the diagnostic message, THIS() +causes abnormal program termination by calling FUNCTION(abort). + +If the macro IDENTIFIER(NDEBUG) is defined, THIS() is +defined as DEFINITION(((void)0)). +***/ + +/* +PROTOTYPE(void assert(int expression);) +IMPLEMENTATION(The format of the diagnostic message, TODO: document this here) +UNDEFINED(The THIS() macro is suppressed) +UNDEFINED(ARGUMENT(expression) does not have a scalar type) +STDC(1) +*/ diff --git a/src/errno/EDOM.c b/src/errno/EDOM.c deleted file mode 100644 index ea1999d7..00000000 --- a/src/errno/EDOM.c +++ /dev/null @@ -1,12 +0,0 @@ -#define EDOM (1) - -/** domain error **/ - -/*** -is used to indicate that an argument supplied to a function is outside the -defined input domain. -***/ - -/* -STDC(1) -*/ diff --git a/src/errno/EDOM.h b/src/errno/EDOM.h new file mode 100644 index 00000000..ea1999d7 --- /dev/null +++ b/src/errno/EDOM.h @@ -0,0 +1,12 @@ +#define EDOM (1) + +/** domain error **/ + +/*** +is used to indicate that an argument supplied to a function is outside the +defined input domain. +***/ + +/* +STDC(1) +*/ diff --git a/src/errno/ERANGE.c b/src/errno/ERANGE.c deleted file mode 100644 index c6fb0bdf..00000000 --- a/src/errno/ERANGE.c +++ /dev/null @@ -1,11 +0,0 @@ -#define ERANGE (2) - -/** out of range **/ - -/*** -is used to indicated that the result of an operation is too large or too small. -***/ - -/* -STDC(1) -*/ diff --git a/src/errno/ERANGE.h b/src/errno/ERANGE.h new file mode 100644 index 00000000..c6fb0bdf --- /dev/null +++ b/src/errno/ERANGE.h @@ -0,0 +1,11 @@ +#define ERANGE (2) + +/** out of range **/ + +/*** +is used to indicated that the result of an operation is too large or too small. +***/ + +/* +STDC(1) +*/ diff --git a/src/errno/errno.c b/src/errno/errno.c deleted file mode 100644 index c0f379c5..00000000 --- a/src/errno/errno.c +++ /dev/null @@ -1,19 +0,0 @@ -#define errno (*__errno()) - -/** get system errors **/ - -/*** -is a modifiable lvalue of type TYPE(int) which is used to -indicate errors in standard library functions. It may be a macro or an -identifier with external linkage. It is initialized to 0 at program start, -but no function in the standard library will set it to 0. Library functions -may set it to a non-zero value if its use is not documented in their -description. -***/ - -/* -UNSPECIFIED(Whether THIS() is declared as a macro or an identifier with external linkage (C89, C95, and C99 only)) -UNDEFINED(A macro definition of THIS() is suppressed) -UNDEFINED(A program defines an identifier named THIS()) -STDC(1) -*/ diff --git a/src/errno/errno.h b/src/errno/errno.h new file mode 100644 index 00000000..c0f379c5 --- /dev/null +++ b/src/errno/errno.h @@ -0,0 +1,19 @@ +#define errno (*__errno()) + +/** get system errors **/ + +/*** +is a modifiable lvalue of type TYPE(int) which is used to +indicate errors in standard library functions. It may be a macro or an +identifier with external linkage. It is initialized to 0 at program start, +but no function in the standard library will set it to 0. Library functions +may set it to a non-zero value if its use is not documented in their +description. +***/ + +/* +UNSPECIFIED(Whether THIS() is declared as a macro or an identifier with external linkage (C89, C95, and C99 only)) +UNDEFINED(A macro definition of THIS() is suppressed) +UNDEFINED(A program defines an identifier named THIS()) +STDC(1) +*/ diff --git a/src/locale/LC_ALL.c b/src/locale/LC_ALL.c deleted file mode 100644 index 12702e1a..00000000 --- a/src/locale/LC_ALL.c +++ /dev/null @@ -1,12 +0,0 @@ -#define LC_ALL (0) - -/** all locale categories **/ - -/*** -is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate -on all categories of the current locale. -***/ - -/* -STDC(1) -*/ diff --git a/src/locale/LC_ALL.h b/src/locale/LC_ALL.h new file mode 100644 index 00000000..12702e1a --- /dev/null +++ b/src/locale/LC_ALL.h @@ -0,0 +1,12 @@ +#define LC_ALL (0) + +/** all locale categories **/ + +/*** +is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate +on all categories of the current locale. +***/ + +/* +STDC(1) +*/ diff --git a/src/locale/LC_COLLATE.c b/src/locale/LC_COLLATE.c deleted file mode 100644 index ea46b97f..00000000 --- a/src/locale/LC_COLLATE.c +++ /dev/null @@ -1,12 +0,0 @@ -#define LC_COLLATE (1) - -/** locale collation category **/ - -/*** -is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate -on the portion of the locale that affects sorting and collating strings. -***/ - -/* -STDC(1) -*/ diff --git a/src/locale/LC_COLLATE.h b/src/locale/LC_COLLATE.h new file mode 100644 index 00000000..ea46b97f --- /dev/null +++ b/src/locale/LC_COLLATE.h @@ -0,0 +1,12 @@ +#define LC_COLLATE (1) + +/** locale collation category **/ + +/*** +is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate +on the portion of the locale that affects sorting and collating strings. +***/ + +/* +STDC(1) +*/ diff --git a/src/locale/LC_CTYPE.c b/src/locale/LC_CTYPE.c deleted file mode 100644 index cfe07f22..00000000 --- a/src/locale/LC_CTYPE.c +++ /dev/null @@ -1,13 +0,0 @@ -#define LC_CTYPE (2) - -/** locale character handling category **/ - -/*** -is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate -on the portion of the locale that affects classifying and transforming -individual characters. -***/ - -/* -STDC(1) -*/ diff --git a/src/locale/LC_CTYPE.h b/src/locale/LC_CTYPE.h new file mode 100644 index 00000000..cfe07f22 --- /dev/null +++ b/src/locale/LC_CTYPE.h @@ -0,0 +1,13 @@ +#define LC_CTYPE (2) + +/** locale character handling category **/ + +/*** +is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate +on the portion of the locale that affects classifying and transforming +individual characters. +***/ + +/* +STDC(1) +*/ diff --git a/src/locale/LC_MONETARY.c b/src/locale/LC_MONETARY.c deleted file mode 100644 index 82b5ca1c..00000000 --- a/src/locale/LC_MONETARY.c +++ /dev/null @@ -1,12 +0,0 @@ -#define LC_MONETARY (3) - -/** locale monetary formatting category **/ - -/*** -is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate -on the portion of the locale that affects formatting monetary values. -***/ - -/* -STDC(1) -*/ diff --git a/src/locale/LC_MONETARY.h b/src/locale/LC_MONETARY.h new file mode 100644 index 00000000..82b5ca1c --- /dev/null +++ b/src/locale/LC_MONETARY.h @@ -0,0 +1,12 @@ +#define LC_MONETARY (3) + +/** locale monetary formatting category **/ + +/*** +is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate +on the portion of the locale that affects formatting monetary values. +***/ + +/* +STDC(1) +*/ diff --git a/src/locale/LC_NUMERIC.c b/src/locale/LC_NUMERIC.c deleted file mode 100644 index 1c874956..00000000 --- a/src/locale/LC_NUMERIC.c +++ /dev/null @@ -1,13 +0,0 @@ -#define LC_NUMERIC (4) - -/** locale number formatting category **/ - -/*** -is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate -on the portion of the locale that affects formatting numeric values, except -for monetary values. -***/ - -/* -STDC(1) -*/ diff --git a/src/locale/LC_NUMERIC.h b/src/locale/LC_NUMERIC.h new file mode 100644 index 00000000..1c874956 --- /dev/null +++ b/src/locale/LC_NUMERIC.h @@ -0,0 +1,13 @@ +#define LC_NUMERIC (4) + +/** locale number formatting category **/ + +/*** +is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate +on the portion of the locale that affects formatting numeric values, except +for monetary values. +***/ + +/* +STDC(1) +*/ diff --git a/src/locale/LC_TIME.c b/src/locale/LC_TIME.c deleted file mode 100644 index f97a70a8..00000000 --- a/src/locale/LC_TIME.c +++ /dev/null @@ -1,12 +0,0 @@ -#define LC_TIME (5) - -/** locale time formatting category **/ - -/*** -is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate -on the portion of the locale that affects formatting date and time values. -***/ - -/* -STDC(1) -*/ diff --git a/src/locale/LC_TIME.h b/src/locale/LC_TIME.h new file mode 100644 index 00000000..f97a70a8 --- /dev/null +++ b/src/locale/LC_TIME.h @@ -0,0 +1,12 @@ +#define LC_TIME (5) + +/** locale time formatting category **/ + +/*** +is used as the ARGUMENT(category) in a call to FUNCTION(setlocale) to operate +on the portion of the locale that affects formatting date and time values. +***/ + +/* +STDC(1) +*/ diff --git a/src/locale/struct_lconv.c b/src/locale/struct_lconv.c deleted file mode 100644 index 561c59c2..00000000 --- a/src/locale/struct_lconv.c +++ /dev/null @@ -1,65 +0,0 @@ -struct lconv { - /** The character that separates the whole and decimal portions of non-monetary values **/ - char *decimal_point; /* "." */ - /** The character that separates groups of digits in the whole portion of non-monetary values **/ - char *thousands_sep; /* "" */ - /** A string indicating how to group digits of monetary values */ - char *grouping; /* "" */ - /** The three character ISO 4217 currency symbol of the current locale, followed by a fourth separating character **/ - char *int_curr_symbol; /* "" */ - /** The locale currency symbol in the current locale **/ - char *currency_symbol; /* "" */ - /** The character used for decimal points in monetary values **/ - char *mon_decimal_point; /* "" */ - /** The character separating digit groups in monetary values **/ - char *mon_thousands_sep; /* "" */ - /** A string indicating how to group digits in monetary values **/ - char *mon_grouping; /* "" */ - /** A string to indicate positive monetary values **/ - char *positive_sign; /* "" */ - /** A string to indicate negative monetary values **/ - char *negative_sign; /* "" */ - /** The number of digits after the decimal point in international monetary values **/ - char int_frac_digits; /* CHAR_MAX */ - /** The number of digits after the decimal point in monetary values **/ - char frac_digits; /* CHAR_MAX */ - /** Whether field(currency_symbol) precedes (1) or follows (0) positive monetary values **/ - char p_cs_precedes; /* CHAR_MAX */ - /** Whether field(currency_symbol) is (1) or is not (0) separated from positive monetary values by a space **/ - char p_sep_by_space; /* CHAR_MAX */ - /** Whether field(currency_symbol) precedes (1) or follows (0) negative monetary values **/ - char n_cs_precedes; /* CHAR_MAX */ - /** Whether field(currency_symbol) is (1) or is not(0) separated from negative monetary values by a space **/ - char n_sep_by_space; /* CHAR_MAX */ - /** The position of field(positive_sign) for positive monetary values **/ - char p_sign_posn; /* CHAR_MAX */ - /** The position of field(positive_sign) for negative monetary values **/ - char n_sign_posn; /* CHAR_MAX */ - #if __STDC_VERSION__ >= 199901L - /** Whether field(currency_symbol) precedes (1) or follows (0) positive international monetary values **/ - char int_p_cs_precedes; /* CHAR_MAX */ - /** Whether field(currency_symbol) is (1) or is not (0) separated from positive international monetary values by a space **/ - char int_p_sep_by_space; /* CHAR_MAX */ - /** Whether field(currency_symbol) precedes (1) or follows (0) negative international monetary values **/ - char int_n_cs_precedes; /* CHAR_MAX */ - /** Whether field(currency_symbol) is (1) or is not(0) separated from negative international monetary values by a space **/ - char int_n_sep_by_space; /* CHAR_MAX */ - /** The position of field(positive_sign) for positive international monetary values **/ - char int_p_sign_posn; /* CHAR_MAX */ - /** The position of field(positive_sign) for negative international monetary values **/ - char int_n_sign_posn; /* CHAR_MAX */ - #else - char __int_p_cs_precedes; - char __int_p_sep_by_space; - char __int_n_cs_precedes; - char __int_n_sep_by_space; - char __int_p_sign_posn; - char __int_n_sign_posn; - #endif -}; - -/* values specified in comments are for the "C" locale */ - -/* -STDC(1) -*/ diff --git a/src/locale/struct_lconv.h b/src/locale/struct_lconv.h new file mode 100644 index 00000000..561c59c2 --- /dev/null +++ b/src/locale/struct_lconv.h @@ -0,0 +1,65 @@ +struct lconv { + /** The character that separates the whole and decimal portions of non-monetary values **/ + char *decimal_point; /* "." */ + /** The character that separates groups of digits in the whole portion of non-monetary values **/ + char *thousands_sep; /* "" */ + /** A string indicating how to group digits of monetary values */ + char *grouping; /* "" */ + /** The three character ISO 4217 currency symbol of the current locale, followed by a fourth separating character **/ + char *int_curr_symbol; /* "" */ + /** The locale currency symbol in the current locale **/ + char *currency_symbol; /* "" */ + /** The character used for decimal points in monetary values **/ + char *mon_decimal_point; /* "" */ + /** The character separating digit groups in monetary values **/ + char *mon_thousands_sep; /* "" */ + /** A string indicating how to group digits in monetary values **/ + char *mon_grouping; /* "" */ + /** A string to indicate positive monetary values **/ + char *positive_sign; /* "" */ + /** A string to indicate negative monetary values **/ + char *negative_sign; /* "" */ + /** The number of digits after the decimal point in international monetary values **/ + char int_frac_digits; /* CHAR_MAX */ + /** The number of digits after the decimal point in monetary values **/ + char frac_digits; /* CHAR_MAX */ + /** Whether field(currency_symbol) precedes (1) or follows (0) positive monetary values **/ + char p_cs_precedes; /* CHAR_MAX */ + /** Whether field(currency_symbol) is (1) or is not (0) separated from positive monetary values by a space **/ + char p_sep_by_space; /* CHAR_MAX */ + /** Whether field(currency_symbol) precedes (1) or follows (0) negative monetary values **/ + char n_cs_precedes; /* CHAR_MAX */ + /** Whether field(currency_symbol) is (1) or is not(0) separated from negative monetary values by a space **/ + char n_sep_by_space; /* CHAR_MAX */ + /** The position of field(positive_sign) for positive monetary values **/ + char p_sign_posn; /* CHAR_MAX */ + /** The position of field(positive_sign) for negative monetary values **/ + char n_sign_posn; /* CHAR_MAX */ + #if __STDC_VERSION__ >= 199901L + /** Whether field(currency_symbol) precedes (1) or follows (0) positive international monetary values **/ + char int_p_cs_precedes; /* CHAR_MAX */ + /** Whether field(currency_symbol) is (1) or is not (0) separated from positive international monetary values by a space **/ + char int_p_sep_by_space; /* CHAR_MAX */ + /** Whether field(currency_symbol) precedes (1) or follows (0) negative international monetary values **/ + char int_n_cs_precedes; /* CHAR_MAX */ + /** Whether field(currency_symbol) is (1) or is not(0) separated from negative international monetary values by a space **/ + char int_n_sep_by_space; /* CHAR_MAX */ + /** The position of field(positive_sign) for positive international monetary values **/ + char int_p_sign_posn; /* CHAR_MAX */ + /** The position of field(positive_sign) for negative international monetary values **/ + char int_n_sign_posn; /* CHAR_MAX */ + #else + char __int_p_cs_precedes; + char __int_p_sep_by_space; + char __int_n_cs_precedes; + char __int_n_sep_by_space; + char __int_p_sign_posn; + char __int_n_sign_posn; + #endif +}; + +/* values specified in comments are for the "C" locale */ + +/* +STDC(1) +*/ diff --git a/src/math/HUGE_VAL.c b/src/math/HUGE_VAL.c deleted file mode 100644 index 04d6da01..00000000 --- a/src/math/HUGE_VAL.c +++ /dev/null @@ -1,12 +0,0 @@ -#define HUGE_VAL (1.0) /* TODO: massive positive double */ - -/** a huge value **/ - -/*** -is a large positive TYPE(double), not necessarily representable as a -TYPE(float). It is used as a sentinel value by several functions in the -standard library. -***/ -/* -STDC(1) -*/ diff --git a/src/math/HUGE_VAL.h b/src/math/HUGE_VAL.h new file mode 100644 index 00000000..04d6da01 --- /dev/null +++ b/src/math/HUGE_VAL.h @@ -0,0 +1,12 @@ +#define HUGE_VAL (1.0) /* TODO: massive positive double */ + +/** a huge value **/ + +/*** +is a large positive TYPE(double), not necessarily representable as a +TYPE(float). It is used as a sentinel value by several functions in the +standard library. +***/ +/* +STDC(1) +*/ diff --git a/src/setjmp/jmp_buf.c b/src/setjmp/jmp_buf.c deleted file mode 100644 index 5654ebba..00000000 --- a/src/setjmp/jmp_buf.c +++ /dev/null @@ -1,13 +0,0 @@ -typedef unsigned long int jmp_buf[32]; - -/** program environment **/ - -/*** -is used to hold all the information needed to restore a a calling -environment. -***/ - -/* -TYPEDEF(an array type) -STDC(1) -*/ diff --git a/src/setjmp/jmp_buf.h b/src/setjmp/jmp_buf.h new file mode 100644 index 00000000..5654ebba --- /dev/null +++ b/src/setjmp/jmp_buf.h @@ -0,0 +1,13 @@ +typedef unsigned long int jmp_buf[32]; + +/** program environment **/ + +/*** +is used to hold all the information needed to restore a a calling +environment. +***/ + +/* +TYPEDEF(an array type) +STDC(1) +*/ diff --git a/src/signal/SIGABRT.c b/src/signal/SIGABRT.c deleted file mode 100644 index 918a1f5d..00000000 --- a/src/signal/SIGABRT.c +++ /dev/null @@ -1,14 +0,0 @@ -#define SIGABRT (6) - -/** abnormal termination **/ - -/*** -is a signal indicating that the program is being terminated abnormally, -such as when FUNCTION(abort) is called. -***/ - -/* Value selected to match requirements for COMMAND(kill) and COMMAND(trap). */ - -/* -STDC(1) -*/ diff --git a/src/signal/SIGABRT.h b/src/signal/SIGABRT.h new file mode 100644 index 00000000..918a1f5d --- /dev/null +++ b/src/signal/SIGABRT.h @@ -0,0 +1,14 @@ +#define SIGABRT (6) + +/** abnormal termination **/ + +/*** +is a signal indicating that the program is being terminated abnormally, +such as when FUNCTION(abort) is called. +***/ + +/* Value selected to match requirements for COMMAND(kill) and COMMAND(trap). */ + +/* +STDC(1) +*/ diff --git a/src/signal/SIGFPE.c b/src/signal/SIGFPE.c deleted file mode 100644 index b4d56e09..00000000 --- a/src/signal/SIGFPE.c +++ /dev/null @@ -1,12 +0,0 @@ -#define SIGFPE (4) - -/** floating point exception **/ - -/*** -is a signal that indicates an error resulting from invalid arithmetic -operations, such as division by zero or overflows. -***/ - -/* -STDC(1) -*/ diff --git a/src/signal/SIGFPE.h b/src/signal/SIGFPE.h new file mode 100644 index 00000000..b4d56e09 --- /dev/null +++ b/src/signal/SIGFPE.h @@ -0,0 +1,12 @@ +#define SIGFPE (4) + +/** floating point exception **/ + +/*** +is a signal that indicates an error resulting from invalid arithmetic +operations, such as division by zero or overflows. +***/ + +/* +STDC(1) +*/ diff --git a/src/signal/SIGILL.c b/src/signal/SIGILL.c deleted file mode 100644 index b1ae8219..00000000 --- a/src/signal/SIGILL.c +++ /dev/null @@ -1,12 +0,0 @@ -#define SIGILL (5) - -/** illegal instruction **/ - -/*** -is a signal indicating that the program has attempted to execute an illegal -or improperly formed instruction. -***/ - -/* -STDC(1) -*/ diff --git a/src/signal/SIGINT.h b/src/signal/SIGINT.h new file mode 100644 index 00000000..b1ae8219 --- /dev/null +++ b/src/signal/SIGINT.h @@ -0,0 +1,12 @@ +#define SIGILL (5) + +/** illegal instruction **/ + +/*** +is a signal indicating that the program has attempted to execute an illegal +or improperly formed instruction. +***/ + +/* +STDC(1) +*/ diff --git a/src/signal/SIGSEGV.c b/src/signal/SIGSEGV.c deleted file mode 100644 index dfb5adf1..00000000 --- a/src/signal/SIGSEGV.c +++ /dev/null @@ -1,12 +0,0 @@ -#define SIGSEGV (7) - -/** segmentation fault **/ - -/*** -is a signal that indicates the program is attempting to access an invalid -memory address. -***/ - -/* -STDC(1) -*/ diff --git a/src/signal/SIGSEGV.h b/src/signal/SIGSEGV.h new file mode 100644 index 00000000..dfb5adf1 --- /dev/null +++ b/src/signal/SIGSEGV.h @@ -0,0 +1,12 @@ +#define SIGSEGV (7) + +/** segmentation fault **/ + +/*** +is a signal that indicates the program is attempting to access an invalid +memory address. +***/ + +/* +STDC(1) +*/ diff --git a/src/signal/SIGTERM.c b/src/signal/SIGTERM.c deleted file mode 100644 index 4e475279..00000000 --- a/src/signal/SIGTERM.c +++ /dev/null @@ -1,13 +0,0 @@ -#define SIGTERM (15) - -/** terminate **/ - -/*** -is a signal indicating that the system is requesting the program to terminate. -***/ - -/* Value selected to match requirements for COMMAND(kill) and COMMAND(trap). */ - -/* -STDC(1) -*/ diff --git a/src/signal/SIGTERM.h b/src/signal/SIGTERM.h new file mode 100644 index 00000000..4e475279 --- /dev/null +++ b/src/signal/SIGTERM.h @@ -0,0 +1,13 @@ +#define SIGTERM (15) + +/** terminate **/ + +/*** +is a signal indicating that the system is requesting the program to terminate. +***/ + +/* Value selected to match requirements for COMMAND(kill) and COMMAND(trap). */ + +/* +STDC(1) +*/ diff --git a/src/signal/SIG_DFL.c b/src/signal/SIG_DFL.c deleted file mode 100644 index e067921a..00000000 --- a/src/signal/SIG_DFL.c +++ /dev/null @@ -1,12 +0,0 @@ -#define SIG_DFL ((void(*)(int))-1) - -/** default signal action **/ - -/*** -is used as the ARGUMENT(func) argument to FUNCTION(signal) to indicate that -the default signal action should occur. -***/ - -/* -STDC(1) -*/ diff --git a/src/signal/SIG_DFL.h b/src/signal/SIG_DFL.h new file mode 100644 index 00000000..e067921a --- /dev/null +++ b/src/signal/SIG_DFL.h @@ -0,0 +1,12 @@ +#define SIG_DFL ((void(*)(int))-1) + +/** default signal action **/ + +/*** +is used as the ARGUMENT(func) argument to FUNCTION(signal) to indicate that +the default signal action should occur. +***/ + +/* +STDC(1) +*/ diff --git a/src/signal/SIG_ERR.c b/src/signal/SIG_ERR.c deleted file mode 100644 index 62690293..00000000 --- a/src/signal/SIG_ERR.c +++ /dev/null @@ -1,12 +0,0 @@ -#define SIG_ERR ((void(*)(int))-2) - -/** error setting signal handler **/ - -/*** -is a sentinal value returned by FUNCTION(signal) to indicate that an error -occurred. -***/ - -/* -STDC(1) -*/ diff --git a/src/signal/SIG_ERR.h b/src/signal/SIG_ERR.h new file mode 100644 index 00000000..62690293 --- /dev/null +++ b/src/signal/SIG_ERR.h @@ -0,0 +1,12 @@ +#define SIG_ERR ((void(*)(int))-2) + +/** error setting signal handler **/ + +/*** +is a sentinal value returned by FUNCTION(signal) to indicate that an error +occurred. +***/ + +/* +STDC(1) +*/ diff --git a/src/signal/SIG_IGN.c b/src/signal/SIG_IGN.c deleted file mode 100644 index ad229f0d..00000000 --- a/src/signal/SIG_IGN.c +++ /dev/null @@ -1,12 +0,0 @@ -#define SIG_IGN ((void(*)(int))-3) - -/** ignore signal **/ - -/*** -can be used as the ARGUMENT(func) argument in a call to FUNCTION(signal) to -ignore the specified signal. -***/ - -/* -STDC(1) -*/ diff --git a/src/signal/SIG_IGN.h b/src/signal/SIG_IGN.h new file mode 100644 index 00000000..ad229f0d --- /dev/null +++ b/src/signal/SIG_IGN.h @@ -0,0 +1,12 @@ +#define SIG_IGN ((void(*)(int))-3) + +/** ignore signal **/ + +/*** +can be used as the ARGUMENT(func) argument in a call to FUNCTION(signal) to +ignore the specified signal. +***/ + +/* +STDC(1) +*/ diff --git a/src/signal/sig_atomic_t.c b/src/signal/sig_atomic_t.c deleted file mode 100644 index c881018c..00000000 --- a/src/signal/sig_atomic_t.c +++ /dev/null @@ -1,12 +0,0 @@ -typedef volatile int sig_atomic_t; - -/** non-interruptible type **/ - -/*** -is a type of object that can be used atomically even in the presence of interrupts. -***/ - -/* -TYPEDEF(integer) -STDC(1) -*/ diff --git a/src/signal/sig_atomic_t.h b/src/signal/sig_atomic_t.h new file mode 100644 index 00000000..c881018c --- /dev/null +++ b/src/signal/sig_atomic_t.h @@ -0,0 +1,12 @@ +typedef volatile int sig_atomic_t; + +/** non-interruptible type **/ + +/*** +is a type of object that can be used atomically even in the presence of interrupts. +***/ + +/* +TYPEDEF(integer) +STDC(1) +*/ diff --git a/src/stdarg/va_arg.c b/src/stdarg/va_arg.c deleted file mode 100644 index 79584b2b..00000000 --- a/src/stdarg/va_arg.c +++ /dev/null @@ -1,21 +0,0 @@ -#define va_arg(__ap, __type) __builtin_va_arg(__ap, __type) - -/** get an unnamed parameter **/ - -/*** -retrieves the next unnamed parameter for use. The ARGUMENT(ap) parameter must -be first initialized with a call to FUNCTION(va_start). Each successive call to -FUNCTION(va_arg) evaluates the next argument as an object of type ARGUMENT(type) -and returns that value, modifying ARGUMENT(ap) for use in the next call to -FUNCTION(va_arg). -***/ - -/* -PROTOTYPE(TYPE(VAR(type)) va_arg(va_list ap, TYPE(VAR(type)));) - -UNDEFINED(There is no next argument) -UNDEFINED(The next argument is not compatible with TYPE(ARGUMENT(type))) -RETURN_SUCCESS(an object of TYPE(ARGUMENT(type)) which is the next unnamed function parameter) - -STDC(1) -*/ diff --git a/src/stdarg/va_arg.h b/src/stdarg/va_arg.h new file mode 100644 index 00000000..79584b2b --- /dev/null +++ b/src/stdarg/va_arg.h @@ -0,0 +1,21 @@ +#define va_arg(__ap, __type) __builtin_va_arg(__ap, __type) + +/** get an unnamed parameter **/ + +/*** +retrieves the next unnamed parameter for use. The ARGUMENT(ap) parameter must +be first initialized with a call to FUNCTION(va_start). Each successive call to +FUNCTION(va_arg) evaluates the next argument as an object of type ARGUMENT(type) +and returns that value, modifying ARGUMENT(ap) for use in the next call to +FUNCTION(va_arg). +***/ + +/* +PROTOTYPE(TYPE(VAR(type)) va_arg(va_list ap, TYPE(VAR(type)));) + +UNDEFINED(There is no next argument) +UNDEFINED(The next argument is not compatible with TYPE(ARGUMENT(type))) +RETURN_SUCCESS(an object of TYPE(ARGUMENT(type)) which is the next unnamed function parameter) + +STDC(1) +*/ diff --git a/src/stdarg/va_end.c b/src/stdarg/va_end.c deleted file mode 100644 index 62e585ae..00000000 --- a/src/stdarg/va_end.c +++ /dev/null @@ -1,16 +0,0 @@ -#define va_end(__ap) __builtin_va_end(__ap) - -/** end processing unnamed arguments **/ - -/*** -stops processing unnamed arguments that were previously begun with a call to -FUNCTION(va_start) so that the enclosing function may return normally. -***/ - -/* -PROTOTYPE(void va_end(va_list ap);) -UNDEFINED(ARGUMENT(ap) was not initialized by FUNCTION(va_start)) -UNDEFINED(THIS() is not called in the same function as FUNCTION(va_start)) - -STDC(1) -*/ diff --git a/src/stdarg/va_end.h b/src/stdarg/va_end.h new file mode 100644 index 00000000..62e585ae --- /dev/null +++ b/src/stdarg/va_end.h @@ -0,0 +1,16 @@ +#define va_end(__ap) __builtin_va_end(__ap) + +/** end processing unnamed arguments **/ + +/*** +stops processing unnamed arguments that were previously begun with a call to +FUNCTION(va_start) so that the enclosing function may return normally. +***/ + +/* +PROTOTYPE(void va_end(va_list ap);) +UNDEFINED(ARGUMENT(ap) was not initialized by FUNCTION(va_start)) +UNDEFINED(THIS() is not called in the same function as FUNCTION(va_start)) + +STDC(1) +*/ diff --git a/src/stdarg/va_list.c b/src/stdarg/va_list.c deleted file mode 100644 index 3f1e1110..00000000 --- a/src/stdarg/va_list.c +++ /dev/null @@ -1,12 +0,0 @@ -typedef __builtin_va_list va_list; - -/** variable length argument list **/ - -/*** -holds the information necessary for making calls to FUNCTION(va_start), -FUNCTION(va_copy), FUNCTION(va_arg), and FUNCTION(va_end). -***/ - -/* -STDC(1) -*/ diff --git a/src/stdarg/va_list.h b/src/stdarg/va_list.h new file mode 100644 index 00000000..3f1e1110 --- /dev/null +++ b/src/stdarg/va_list.h @@ -0,0 +1,12 @@ +typedef __builtin_va_list va_list; + +/** variable length argument list **/ + +/*** +holds the information necessary for making calls to FUNCTION(va_start), +FUNCTION(va_copy), FUNCTION(va_arg), and FUNCTION(va_end). +***/ + +/* +STDC(1) +*/ diff --git a/src/stdarg/va_start.c b/src/stdarg/va_start.c deleted file mode 100644 index 2f08ee9a..00000000 --- a/src/stdarg/va_start.c +++ /dev/null @@ -1,21 +0,0 @@ -#define va_start(__ap, __parmN) __builtin_va_start(__ap, __parmN) - -/** begin processing unnamed arguments **/ - -/*** -prepares unnamed arguments for use. It initializes ARGUMENT(ap) with the the -first argument after the argument named by ARGUMENT(parmN). The argument named -by ARGUMENT(parmN) must be the final named argument to function (i.e. the -argument just prior to LITERAL(`, ...')). -***/ - -/* -PROTOTYPE(void va_start(va_list ap, VAR(parmN));) - -UNDEFINED(ARGUMENT(parmN) is declared TYPE(register)) -UNDEFINED(ARGUMENT(parmN) is a function pointer) -UNDEFINED(ARGUMENT(parmN) is an array type) -UNDEFINED(ARGUMENT(parmN) is a type not compatible with default argument promotions) - -STDC(1) -*/ diff --git a/src/stdarg/va_start.h b/src/stdarg/va_start.h new file mode 100644 index 00000000..2f08ee9a --- /dev/null +++ b/src/stdarg/va_start.h @@ -0,0 +1,21 @@ +#define va_start(__ap, __parmN) __builtin_va_start(__ap, __parmN) + +/** begin processing unnamed arguments **/ + +/*** +prepares unnamed arguments for use. It initializes ARGUMENT(ap) with the the +first argument after the argument named by ARGUMENT(parmN). The argument named +by ARGUMENT(parmN) must be the final named argument to function (i.e. the +argument just prior to LITERAL(`, ...')). +***/ + +/* +PROTOTYPE(void va_start(va_list ap, VAR(parmN));) + +UNDEFINED(ARGUMENT(parmN) is declared TYPE(register)) +UNDEFINED(ARGUMENT(parmN) is a function pointer) +UNDEFINED(ARGUMENT(parmN) is an array type) +UNDEFINED(ARGUMENT(parmN) is a type not compatible with default argument promotions) + +STDC(1) +*/ diff --git a/src/stddef/NULL.c b/src/stddef/NULL.c deleted file mode 100644 index d93bff2f..00000000 --- a/src/stddef/NULL.c +++ /dev/null @@ -1,14 +0,0 @@ -#define NULL ((void*)0) - -/** null pointer **/ - -/*** -is an invalid pointer. It is used as a sentinel value in many standard -library functions. -***/ - -/* -UNDEFINED(Dereferencing THIS()) -IMPLEMENTATION(The value of THIS(), DEFINITION((void*)0)) -STDC(1) -*/ diff --git a/src/stddef/NULL.h b/src/stddef/NULL.h new file mode 100644 index 00000000..d93bff2f --- /dev/null +++ b/src/stddef/NULL.h @@ -0,0 +1,14 @@ +#define NULL ((void*)0) + +/** null pointer **/ + +/*** +is an invalid pointer. It is used as a sentinel value in many standard +library functions. +***/ + +/* +UNDEFINED(Dereferencing THIS()) +IMPLEMENTATION(The value of THIS(), DEFINITION((void*)0)) +STDC(1) +*/ diff --git a/src/stddef/offsetof.c b/src/stddef/offsetof.c deleted file mode 100644 index 2b0d158e..00000000 --- a/src/stddef/offsetof.c +++ /dev/null @@ -1,14 +0,0 @@ -#define offsetof(__type, __member) ((size_t)((void*)&(((__type*)0)->__member))) - -/** get offset of a structure member **/ - -/*** -determines the offset, in bytes, of a specified field in a TYPE(struct). -***/ - -/* -PROTOTYPE(size_t offsetof(type, member);) -RETURN_SUCCESS(the offset of ARGUMENT(member) in ARGUMENT(type)) -UNDEFINED(ARGUMENT(member) is a bit-field) -STDC(1) -*/ diff --git a/src/stddef/offsetof.h b/src/stddef/offsetof.h new file mode 100644 index 00000000..2b0d158e --- /dev/null +++ b/src/stddef/offsetof.h @@ -0,0 +1,14 @@ +#define offsetof(__type, __member) ((size_t)((void*)&(((__type*)0)->__member))) + +/** get offset of a structure member **/ + +/*** +determines the offset, in bytes, of a specified field in a TYPE(struct). +***/ + +/* +PROTOTYPE(size_t offsetof(type, member);) +RETURN_SUCCESS(the offset of ARGUMENT(member) in ARGUMENT(type)) +UNDEFINED(ARGUMENT(member) is a bit-field) +STDC(1) +*/ diff --git a/src/stddef/ptrdiff_t.c b/src/stddef/ptrdiff_t.c deleted file mode 100644 index c591915a..00000000 --- a/src/stddef/ptrdiff_t.c +++ /dev/null @@ -1,21 +0,0 @@ -#ifdef __LLP64__ -# if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199909L -typedef __int64 ptrdiff_t; -# else -typedef long long int ptrdiff_t; -# endif -#else -typedef long int ptrdiff_t; -#endif - -/** pointer arithmetic type **/ - -/*** -is a signed integral type which results when subtracting one pointer -from another. -***/ - -/* -TYPEDEF(signed integer) -STDC(1) -*/ diff --git a/src/stddef/ptrdiff_t.h b/src/stddef/ptrdiff_t.h new file mode 100644 index 00000000..c591915a --- /dev/null +++ b/src/stddef/ptrdiff_t.h @@ -0,0 +1,21 @@ +#ifdef __LLP64__ +# if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199909L +typedef __int64 ptrdiff_t; +# else +typedef long long int ptrdiff_t; +# endif +#else +typedef long int ptrdiff_t; +#endif + +/** pointer arithmetic type **/ + +/*** +is a signed integral type which results when subtracting one pointer +from another. +***/ + +/* +TYPEDEF(signed integer) +STDC(1) +*/ diff --git a/src/stddef/size_t.c b/src/stddef/size_t.c deleted file mode 100644 index 6ec3e04a..00000000 --- a/src/stddef/size_t.c +++ /dev/null @@ -1,21 +0,0 @@ -#ifdef __LLP64__ -# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199909L -typedef unsigned __int64 size_t; -# else -typedef unsigned long long int size_t; -# endif -#else -typedef unsigned long int size_t; -#endif - -/** memory size type **/ - -/*** -is an unsigned integer type that is the result of using the -OPERATOR(sizeof) operator. -***/ - -/* -TYPEDEF(unsigned integer) -STDC(1) -*/ diff --git a/src/stddef/size_t.h b/src/stddef/size_t.h new file mode 100644 index 00000000..6ec3e04a --- /dev/null +++ b/src/stddef/size_t.h @@ -0,0 +1,21 @@ +#ifdef __LLP64__ +# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199909L +typedef unsigned __int64 size_t; +# else +typedef unsigned long long int size_t; +# endif +#else +typedef unsigned long int size_t; +#endif + +/** memory size type **/ + +/*** +is an unsigned integer type that is the result of using the +OPERATOR(sizeof) operator. +***/ + +/* +TYPEDEF(unsigned integer) +STDC(1) +*/ diff --git a/src/stddef/wchar_t.c b/src/stddef/wchar_t.c deleted file mode 100644 index eae2d067..00000000 --- a/src/stddef/wchar_t.c +++ /dev/null @@ -1,14 +0,0 @@ -typedef int wchar_t; - -/** wide character type **/ - -/*** -is an integer type used to represent wide characters. Using a THIS(), -every character in the current locale can be represented by a single variable. -The null character will always have the value LITERAL(0). -***/ - -/* -TYPEDEF(integer) -STDC(1) -*/ diff --git a/src/stddef/wchar_t.h b/src/stddef/wchar_t.h new file mode 100644 index 00000000..eae2d067 --- /dev/null +++ b/src/stddef/wchar_t.h @@ -0,0 +1,14 @@ +typedef int wchar_t; + +/** wide character type **/ + +/*** +is an integer type used to represent wide characters. Using a THIS(), +every character in the current locale can be represented by a single variable. +The null character will always have the value LITERAL(0). +***/ + +/* +TYPEDEF(integer) +STDC(1) +*/ diff --git a/src/stdio/BUFSIZ.c b/src/stdio/BUFSIZ.c deleted file mode 100644 index c59a3851..00000000 --- a/src/stdio/BUFSIZ.c +++ /dev/null @@ -1,12 +0,0 @@ -#define BUFSIZ (4096) - -/** default buffer size **/ - -/*** -is the buffer size used when buffering is adjusted with FUNCTION(setbuf). -***/ - -/* -VALUE_MIN(256) -STDC(1) -*/ diff --git a/src/stdio/BUFSIZ.h b/src/stdio/BUFSIZ.h new file mode 100644 index 00000000..c59a3851 --- /dev/null +++ b/src/stdio/BUFSIZ.h @@ -0,0 +1,12 @@ +#define BUFSIZ (4096) + +/** default buffer size **/ + +/*** +is the buffer size used when buffering is adjusted with FUNCTION(setbuf). +***/ + +/* +VALUE_MIN(256) +STDC(1) +*/ diff --git a/src/stdio/EOF.c b/src/stdio/EOF.c deleted file mode 100644 index 2cf3ce60..00000000 --- a/src/stdio/EOF.c +++ /dev/null @@ -1,12 +0,0 @@ -#define EOF (-1) - -/** end-of-file **/ - -/*** -is a sentinal value used to indicated that a TYPEDEF(FILE) stream has reached -the end of file. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/EOF.h b/src/stdio/EOF.h new file mode 100644 index 00000000..2cf3ce60 --- /dev/null +++ b/src/stdio/EOF.h @@ -0,0 +1,12 @@ +#define EOF (-1) + +/** end-of-file **/ + +/*** +is a sentinal value used to indicated that a TYPEDEF(FILE) stream has reached +the end of file. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/FILE.c b/src/stdio/FILE.c deleted file mode 100644 index d3a29447..00000000 --- a/src/stdio/FILE.c +++ /dev/null @@ -1,16 +0,0 @@ -typedef struct __FILE - FILE; - -/** buffered I/O stream **/ - -/*** -is used to hold information about buffered input and output streams. The -structure holds information including the current file position indicator, -a pointer to its buffer, an error indicator, and an end-of-file indicator. -No standard defines the members of THIS(). User programs should not attempt -to access or modify its members directly. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/FILE.h b/src/stdio/FILE.h new file mode 100644 index 00000000..d3a29447 --- /dev/null +++ b/src/stdio/FILE.h @@ -0,0 +1,16 @@ +typedef struct __FILE + FILE; + +/** buffered I/O stream **/ + +/*** +is used to hold information about buffered input and output streams. The +structure holds information including the current file position indicator, +a pointer to its buffer, an error indicator, and an end-of-file indicator. +No standard defines the members of THIS(). User programs should not attempt +to access or modify its members directly. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/FILENAME_MAX.c b/src/stdio/FILENAME_MAX.c deleted file mode 100644 index 1bb13b85..00000000 --- a/src/stdio/FILENAME_MAX.c +++ /dev/null @@ -1,12 +0,0 @@ -#define FILENAME_MAX (255) - -/** maximum filename length **/ - -/*** -is size of the longest array of TYPE(char) that the implementation guarantees -can be used as a file name. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/FILENAME_MAX.h b/src/stdio/FILENAME_MAX.h new file mode 100644 index 00000000..1bb13b85 --- /dev/null +++ b/src/stdio/FILENAME_MAX.h @@ -0,0 +1,12 @@ +#define FILENAME_MAX (255) + +/** maximum filename length **/ + +/*** +is size of the longest array of TYPE(char) that the implementation guarantees +can be used as a file name. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/FOPEN_MAX.c b/src/stdio/FOPEN_MAX.c deleted file mode 100644 index 548db477..00000000 --- a/src/stdio/FOPEN_MAX.c +++ /dev/null @@ -1,13 +0,0 @@ -#define FOPEN_MAX (8) - -/** maximum open FILE streams **/ - -/*** -is the minimum number of TYPEDEF(FILE) streams that the implementation -guarantees can be opened at the same time. -***/ - -/* -VALUE_MIN(8) -STDC(1) -*/ diff --git a/src/stdio/FOPEN_MAX.h b/src/stdio/FOPEN_MAX.h new file mode 100644 index 00000000..548db477 --- /dev/null +++ b/src/stdio/FOPEN_MAX.h @@ -0,0 +1,13 @@ +#define FOPEN_MAX (8) + +/** maximum open FILE streams **/ + +/*** +is the minimum number of TYPEDEF(FILE) streams that the implementation +guarantees can be opened at the same time. +***/ + +/* +VALUE_MIN(8) +STDC(1) +*/ diff --git a/src/stdio/L_tmpnam.c b/src/stdio/L_tmpnam.c deleted file mode 100644 index 8467199a..00000000 --- a/src/stdio/L_tmpnam.c +++ /dev/null @@ -1,11 +0,0 @@ -#define L_tmpnam (255) - -/** temporary file name length **/ - -/*** -is the maximum length of a temporary filename returned by FUNCTION(tmpnam). -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/L_tmpnam.h b/src/stdio/L_tmpnam.h new file mode 100644 index 00000000..8467199a --- /dev/null +++ b/src/stdio/L_tmpnam.h @@ -0,0 +1,11 @@ +#define L_tmpnam (255) + +/** temporary file name length **/ + +/*** +is the maximum length of a temporary filename returned by FUNCTION(tmpnam). +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/SEEK_CUR.c b/src/stdio/SEEK_CUR.c deleted file mode 100644 index efa117f8..00000000 --- a/src/stdio/SEEK_CUR.c +++ /dev/null @@ -1,12 +0,0 @@ -#define SEEK_CUR (1) - -/** seek forward **/ - -/*** -is used as the ARGUMENT(whence) argument to FUNCTION(fseek) to indicate that -seeking should begin at the current file position and move forward. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/SEEK_CUR.h b/src/stdio/SEEK_CUR.h new file mode 100644 index 00000000..efa117f8 --- /dev/null +++ b/src/stdio/SEEK_CUR.h @@ -0,0 +1,12 @@ +#define SEEK_CUR (1) + +/** seek forward **/ + +/*** +is used as the ARGUMENT(whence) argument to FUNCTION(fseek) to indicate that +seeking should begin at the current file position and move forward. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/SEEK_END.c b/src/stdio/SEEK_END.c deleted file mode 100644 index 15a56439..00000000 --- a/src/stdio/SEEK_END.c +++ /dev/null @@ -1,12 +0,0 @@ -#define SEEK_END (2) - -/** seek from end **/ - -/*** -is used as the ARGUMENT(whence) argument to FUNCTION(fseek) to indicate that -seeking should begin at the end of the file and move backward. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/SEEK_END.h b/src/stdio/SEEK_END.h new file mode 100644 index 00000000..15a56439 --- /dev/null +++ b/src/stdio/SEEK_END.h @@ -0,0 +1,12 @@ +#define SEEK_END (2) + +/** seek from end **/ + +/*** +is used as the ARGUMENT(whence) argument to FUNCTION(fseek) to indicate that +seeking should begin at the end of the file and move backward. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/SEEK_SET.c b/src/stdio/SEEK_SET.c deleted file mode 100644 index d9ce4b88..00000000 --- a/src/stdio/SEEK_SET.c +++ /dev/null @@ -1,12 +0,0 @@ -#define SEEK_SET (3) - -/** seek from beginning **/ - -/*** -is used as the ARGUMENT(whence) argument to FUNCTION(fseek) to indicate that -seeking should begin at the start of the file and move forward. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/SEEK_SET.h b/src/stdio/SEEK_SET.h new file mode 100644 index 00000000..d9ce4b88 --- /dev/null +++ b/src/stdio/SEEK_SET.h @@ -0,0 +1,12 @@ +#define SEEK_SET (3) + +/** seek from beginning **/ + +/*** +is used as the ARGUMENT(whence) argument to FUNCTION(fseek) to indicate that +seeking should begin at the start of the file and move forward. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/TMP_MAX.c b/src/stdio/TMP_MAX.c deleted file mode 100644 index 8cedfc60..00000000 --- a/src/stdio/TMP_MAX.c +++ /dev/null @@ -1,12 +0,0 @@ -#define TMP_MAX (10000) - -/** maximum temporary file names **/ - -/*** -is the minimum number of unique file names FUNCTION(tmpnam) is guaranteed to -be able to generate. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/TMP_MAX.h b/src/stdio/TMP_MAX.h new file mode 100644 index 00000000..8cedfc60 --- /dev/null +++ b/src/stdio/TMP_MAX.h @@ -0,0 +1,12 @@ +#define TMP_MAX (10000) + +/** maximum temporary file names **/ + +/*** +is the minimum number of unique file names FUNCTION(tmpnam) is guaranteed to +be able to generate. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/_IOFBF.c b/src/stdio/_IOFBF.c deleted file mode 100644 index 3f0714ff..00000000 --- a/src/stdio/_IOFBF.c +++ /dev/null @@ -1,12 +0,0 @@ -#define _IOFBF (1) - -/** full buffering **/ - -/*** -is used as the ARGUMENT(mode) in calls to FUNCTION(setvbuf) to indicate that -a stream should be fully buffered. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/_IOFBF.h b/src/stdio/_IOFBF.h new file mode 100644 index 00000000..3f0714ff --- /dev/null +++ b/src/stdio/_IOFBF.h @@ -0,0 +1,12 @@ +#define _IOFBF (1) + +/** full buffering **/ + +/*** +is used as the ARGUMENT(mode) in calls to FUNCTION(setvbuf) to indicate that +a stream should be fully buffered. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/_IOLBF.c b/src/stdio/_IOLBF.c deleted file mode 100644 index e11fe4fc..00000000 --- a/src/stdio/_IOLBF.c +++ /dev/null @@ -1,12 +0,0 @@ -#define _IOLBF (2) - -/** line buffering **/ - -/*** -is used as the ARGUMENT(mode) in calls to FUNCTION(setvbuf) to indicate that -a stream should be line buffered. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/_IOLBF.h b/src/stdio/_IOLBF.h new file mode 100644 index 00000000..e11fe4fc --- /dev/null +++ b/src/stdio/_IOLBF.h @@ -0,0 +1,12 @@ +#define _IOLBF (2) + +/** line buffering **/ + +/*** +is used as the ARGUMENT(mode) in calls to FUNCTION(setvbuf) to indicate that +a stream should be line buffered. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/_IONBF.c b/src/stdio/_IONBF.c deleted file mode 100644 index 215bf26b..00000000 --- a/src/stdio/_IONBF.c +++ /dev/null @@ -1,12 +0,0 @@ -#define _IONBF (3) - -/** no buffering **/ - -/*** -is used as the ARGUMENT(mode) in calls to FUNCTION(setvbuf) to indicate that -a stream should be unbuffered. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/_IONBF.h b/src/stdio/_IONBF.h new file mode 100644 index 00000000..215bf26b --- /dev/null +++ b/src/stdio/_IONBF.h @@ -0,0 +1,12 @@ +#define _IONBF (3) + +/** no buffering **/ + +/*** +is used as the ARGUMENT(mode) in calls to FUNCTION(setvbuf) to indicate that +a stream should be unbuffered. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/fpos_t.c b/src/stdio/fpos_t.c deleted file mode 100644 index fe55a7af..00000000 --- a/src/stdio/fpos_t.c +++ /dev/null @@ -1,13 +0,0 @@ -typedef struct __fpos_t * - fpos_t; - -/** file position **/ - -/*** -is used to record information about individual positions within a TYPEDEF(FILE) -stream. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/fpos_t.h b/src/stdio/fpos_t.h new file mode 100644 index 00000000..fe55a7af --- /dev/null +++ b/src/stdio/fpos_t.h @@ -0,0 +1,13 @@ +typedef struct __fpos_t * + fpos_t; + +/** file position **/ + +/*** +is used to record information about individual positions within a TYPEDEF(FILE) +stream. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/stderr.c b/src/stdio/stderr.c deleted file mode 100644 index 8ec8a9aa..00000000 --- a/src/stdio/stderr.c +++ /dev/null @@ -1,11 +0,0 @@ -#define stderr __stderr - -/** standard error **/ - -/*** -is the standard error stream. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/stderr.h b/src/stdio/stderr.h new file mode 100644 index 00000000..8ec8a9aa --- /dev/null +++ b/src/stdio/stderr.h @@ -0,0 +1,11 @@ +#define stderr __stderr + +/** standard error **/ + +/*** +is the standard error stream. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/stdin.c b/src/stdio/stdin.c deleted file mode 100644 index 5fb14c70..00000000 --- a/src/stdio/stdin.c +++ /dev/null @@ -1,11 +0,0 @@ -#define stdin __stdin - -/** standard input **/ - -/*** -is the standard input stream. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/stdin.h b/src/stdio/stdin.h new file mode 100644 index 00000000..5fb14c70 --- /dev/null +++ b/src/stdio/stdin.h @@ -0,0 +1,11 @@ +#define stdin __stdin + +/** standard input **/ + +/*** +is the standard input stream. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdio/stdout.c b/src/stdio/stdout.c deleted file mode 100644 index 7c62dfa0..00000000 --- a/src/stdio/stdout.c +++ /dev/null @@ -1,11 +0,0 @@ -#define stdout __stdout - -/** standard output **/ - -/*** -is the standard output stream. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdio/stdout.h b/src/stdio/stdout.h new file mode 100644 index 00000000..7c62dfa0 --- /dev/null +++ b/src/stdio/stdout.h @@ -0,0 +1,11 @@ +#define stdout __stdout + +/** standard output **/ + +/*** +is the standard output stream. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdlib/EXIT_FAILURE.c b/src/stdlib/EXIT_FAILURE.c deleted file mode 100644 index 14d28dc0..00000000 --- a/src/stdlib/EXIT_FAILURE.c +++ /dev/null @@ -1,13 +0,0 @@ -#define EXIT_FAILURE (1) - -/** unsuccessful program termination **/ - -/*** -is used as the ARGUMENT(status) argument to FUNCTION(exit) or FUNCTION(_Exit), -or the return value from FUNCTION(main), to indicate that the program is -exiting unsuccessfully. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdlib/EXIT_FAILURE.h b/src/stdlib/EXIT_FAILURE.h new file mode 100644 index 00000000..14d28dc0 --- /dev/null +++ b/src/stdlib/EXIT_FAILURE.h @@ -0,0 +1,13 @@ +#define EXIT_FAILURE (1) + +/** unsuccessful program termination **/ + +/*** +is used as the ARGUMENT(status) argument to FUNCTION(exit) or FUNCTION(_Exit), +or the return value from FUNCTION(main), to indicate that the program is +exiting unsuccessfully. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdlib/EXIT_SUCCESS.c b/src/stdlib/EXIT_SUCCESS.c deleted file mode 100644 index 3b0bc2fa..00000000 --- a/src/stdlib/EXIT_SUCCESS.c +++ /dev/null @@ -1,13 +0,0 @@ -#define EXIT_SUCCESS (0) - -/** successful program termination **/ - -/*** -is used as the ARGUMENT(status) argument to FUNCTION(exit) or FUNCTION(_Exit), -or the return value from FUNCTION(main), to indicate that the program is -exiting successfully. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdlib/EXIT_SUCCESS.h b/src/stdlib/EXIT_SUCCESS.h new file mode 100644 index 00000000..3b0bc2fa --- /dev/null +++ b/src/stdlib/EXIT_SUCCESS.h @@ -0,0 +1,13 @@ +#define EXIT_SUCCESS (0) + +/** successful program termination **/ + +/*** +is used as the ARGUMENT(status) argument to FUNCTION(exit) or FUNCTION(_Exit), +or the return value from FUNCTION(main), to indicate that the program is +exiting successfully. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdlib/MB_CUR_MAX.c b/src/stdlib/MB_CUR_MAX.c deleted file mode 100644 index 1b833ba4..00000000 --- a/src/stdlib/MB_CUR_MAX.c +++ /dev/null @@ -1,13 +0,0 @@ -#define MB_CUR_MAX (4) - -/** current longest multibyte character **/ - -/*** -is the maximum number of bytes required to store any character in the current -multibyte character set as specified by CONSTANT(LC_CTYPE). -***/ - -/* -VALUE_MAX(CONSTANT(MB_LEN_MAX)) -STDC(1) -*/ diff --git a/src/stdlib/MB_CUR_MAX.h b/src/stdlib/MB_CUR_MAX.h new file mode 100644 index 00000000..1b833ba4 --- /dev/null +++ b/src/stdlib/MB_CUR_MAX.h @@ -0,0 +1,13 @@ +#define MB_CUR_MAX (4) + +/** current longest multibyte character **/ + +/*** +is the maximum number of bytes required to store any character in the current +multibyte character set as specified by CONSTANT(LC_CTYPE). +***/ + +/* +VALUE_MAX(CONSTANT(MB_LEN_MAX)) +STDC(1) +*/ diff --git a/src/stdlib/RAND_MAX.c b/src/stdlib/RAND_MAX.c deleted file mode 100644 index 08b432e5..00000000 --- a/src/stdlib/RAND_MAX.c +++ /dev/null @@ -1,12 +0,0 @@ -#define RAND_MAX (32767) - -/** random number range **/ - -/*** -is the maximum value returned by FUNCTION(rand). -***/ - -/* -VALUE_MIN(32767) -STDC(1) -*/ diff --git a/src/stdlib/RAND_MAX.h b/src/stdlib/RAND_MAX.h new file mode 100644 index 00000000..08b432e5 --- /dev/null +++ b/src/stdlib/RAND_MAX.h @@ -0,0 +1,12 @@ +#define RAND_MAX (32767) + +/** random number range **/ + +/*** +is the maximum value returned by FUNCTION(rand). +***/ + +/* +VALUE_MIN(32767) +STDC(1) +*/ diff --git a/src/stdlib/div_t.c b/src/stdlib/div_t.c deleted file mode 100644 index 7d17ddf2..00000000 --- a/src/stdlib/div_t.c +++ /dev/null @@ -1,15 +0,0 @@ -typedef struct { - int quot; - int rem; -} div_t; - -/** quotient and remainder **/ - -/*** -is the type returned by FUNCTION(div) to hold both the quotient and remainder -of an integer division. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdlib/div_t.h b/src/stdlib/div_t.h new file mode 100644 index 00000000..7d17ddf2 --- /dev/null +++ b/src/stdlib/div_t.h @@ -0,0 +1,15 @@ +typedef struct { + int quot; + int rem; +} div_t; + +/** quotient and remainder **/ + +/*** +is the type returned by FUNCTION(div) to hold both the quotient and remainder +of an integer division. +***/ + +/* +STDC(1) +*/ diff --git a/src/stdlib/ldiv_t.c b/src/stdlib/ldiv_t.c deleted file mode 100644 index 0dac2bb0..00000000 --- a/src/stdlib/ldiv_t.c +++ /dev/null @@ -1,15 +0,0 @@ -typedef struct { - long int quot; - long int rem; -} ldiv_t; - -/** long quotient and remainder **/ - -/*** -is the type returned by FUNCTION(ldiv) to hold both the quotient and remainder -of an integer division. -***/ - -/* -STDC(1) -*/ diff --git a/src/stdlib/ldiv_t.h b/src/stdlib/ldiv_t.h new file mode 100644 index 00000000..0dac2bb0 --- /dev/null +++ b/src/stdlib/ldiv_t.h @@ -0,0 +1,15 @@ +typedef struct { + long int quot; + long int rem; +} ldiv_t; + +/** long quotient and remainder **/ + +/*** +is the type returned by FUNCTION(ldiv) to hold both the quotient and remainder +of an integer division. +***/ + +/* +STDC(1) +*/ diff --git a/src/time/CLOCKS_PER_SEC.c b/src/time/CLOCKS_PER_SEC.c deleted file mode 100644 index e8e8350d..00000000 --- a/src/time/CLOCKS_PER_SEC.c +++ /dev/null @@ -1,11 +0,0 @@ -#define CLOCKS_PER_SEC ((clock_t)1000000) - -/** clock ticks per second **/ - -/*** -is the number of clock ticks per second returned by FUNCTION(clock). -***/ - -/* -STDC(1) -*/ diff --git a/src/time/CLOCKS_PER_SEC.h b/src/time/CLOCKS_PER_SEC.h new file mode 100644 index 00000000..e8e8350d --- /dev/null +++ b/src/time/CLOCKS_PER_SEC.h @@ -0,0 +1,11 @@ +#define CLOCKS_PER_SEC ((clock_t)1000000) + +/** clock ticks per second **/ + +/*** +is the number of clock ticks per second returned by FUNCTION(clock). +***/ + +/* +STDC(1) +*/ diff --git a/src/time/clock_t.c b/src/time/clock_t.c deleted file mode 100644 index d6e5d966..00000000 --- a/src/time/clock_t.c +++ /dev/null @@ -1,13 +0,0 @@ -typedef long int - clock_t; - -/** clock ticks **/ - -/*** -is an arithmetic type representing clock ticks. -***/ - -/* -DEFINED_TYPE(an arithmetic type) -STDC(1) -*/ diff --git a/src/time/clock_t.h b/src/time/clock_t.h new file mode 100644 index 00000000..d6e5d966 --- /dev/null +++ b/src/time/clock_t.h @@ -0,0 +1,13 @@ +typedef long int + clock_t; + +/** clock ticks **/ + +/*** +is an arithmetic type representing clock ticks. +***/ + +/* +DEFINED_TYPE(an arithmetic type) +STDC(1) +*/ diff --git a/src/time/struct_tm.c b/src/time/struct_tm.c deleted file mode 100644 index e7f0376f..00000000 --- a/src/time/struct_tm.c +++ /dev/null @@ -1,21 +0,0 @@ -struct tm { - int tm_sec; /* Seconds [0,60] */ - int tm_min; /* Minutes [0, 59] */ - int tm_hour; /* Hour [0,23] */ - int tm_mday; /* Day of the month [1,31] */ - int tm_mon; /* Month of the year [0,11] */ - int tm_year; /* Years since 1900 */ - int tm_wday; /* Day of the week [0,6] (Sunday = 0) */ - int tm_yday; /* Day of the year [0,365] */ - int tm_isdst; /* Daylight Saving Time flag */ -}; - -/** broken-down time **/ - -/*** -is used to represent time broken down into its individual components. -***/ - -/* -STDC(1) -*/ diff --git a/src/time/struct_tm.h b/src/time/struct_tm.h new file mode 100644 index 00000000..e7f0376f --- /dev/null +++ b/src/time/struct_tm.h @@ -0,0 +1,21 @@ +struct tm { + int tm_sec; /* Seconds [0,60] */ + int tm_min; /* Minutes [0, 59] */ + int tm_hour; /* Hour [0,23] */ + int tm_mday; /* Day of the month [1,31] */ + int tm_mon; /* Month of the year [0,11] */ + int tm_year; /* Years since 1900 */ + int tm_wday; /* Day of the week [0,6] (Sunday = 0) */ + int tm_yday; /* Day of the year [0,365] */ + int tm_isdst; /* Daylight Saving Time flag */ +}; + +/** broken-down time **/ + +/*** +is used to represent time broken down into its individual components. +***/ + +/* +STDC(1) +*/ diff --git a/src/time/time_t.c b/src/time/time_t.c deleted file mode 100644 index 58cf3fb0..00000000 --- a/src/time/time_t.c +++ /dev/null @@ -1,13 +0,0 @@ -typedef long int - time_t; - -/** time representation **/ - -/*** -is used for representing time. -***/ - -/* -DEFINED_TYPE(an arithmetic type) -STDC(1) -*/ diff --git a/src/time/time_t.h b/src/time/time_t.h new file mode 100644 index 00000000..58cf3fb0 --- /dev/null +++ b/src/time/time_t.h @@ -0,0 +1,13 @@ +typedef long int + time_t; + +/** time representation **/ + +/*** +is used for representing time. +***/ + +/* +DEFINED_TYPE(an arithmetic type) +STDC(1) +*/ -- cgit v1.2.1