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 --- 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 ++++++++++++++ 10 files changed, 84 insertions(+), 84 deletions(-) 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 (limited to 'src/stddef') 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) +*/ -- cgit v1.2.1