summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/u8c/end.c1
-rw-r--r--src/u8c/fmt.c6
-rw-r--r--src/u8c/geterr.c4
-rw-r--r--src/u8c/init.c5
-rw-r--r--src/u8c/println.c3
-rw-r--r--src/u8c/stat.h4
-rw-r--r--src/u8c/u32cp.c1
-rw-r--r--src/u8c/u32sz.c5
-rw-r--r--src/u8c/u8dec.c1
-rw-r--r--src/u8c/vfmt.c7
-rw-r--r--src/u8c/vprint.c1
11 files changed, 12 insertions, 26 deletions
diff --git a/src/u8c/end.c b/src/u8c/end.c
index 60ed58d..924540b 100644
--- a/src/u8c/end.c
+++ b/src/u8c/end.c
@@ -19,7 +19,6 @@
# include <stdint.h>
# include <stdlib.h>
# include <u8c/end.h>
-# include <u8c/print.h>
# if defined(u8c_bethrdsafe)
# include <threads.h>
# endif
diff --git a/src/u8c/fmt.c b/src/u8c/fmt.c
index dabf376..ddaaec8 100644
--- a/src/u8c/fmt.c
+++ b/src/u8c/fmt.c
@@ -13,13 +13,11 @@
If not, see <https://www.gnu.org/licenses/>.
*/
-# include <u8c/fmt.h>
-# include <u8c/fmttyp.h>
-# include <u8c/u8enc.h>
-# include <u8c/vfmt.h>
# include <stdarg.h>
# include <stddef.h>
# include <stdint.h>
+# include <u8c/fmt.h>
+# include <u8c/vfmt.h>
uint_least8_t u8c_fmt(size_t * _outsz,uint_least32_t * * _out,uint_least32_t * _in,...) {
va_list args;
va_start(args,_in);
diff --git a/src/u8c/geterr.c b/src/u8c/geterr.c
index 113281e..12b5c14 100644
--- a/src/u8c/geterr.c
+++ b/src/u8c/geterr.c
@@ -15,10 +15,10 @@
*/
# include "err.h"
# include "errlock.h"
+# include <stddef.h>
# include <stdint.h>
-# include <stdlib.h>
-# include <u8c/u32cp.h>
# include <u8c/geterr.h>
+# include <u8c/u32cp.h>
uint_least8_t u8c_geterr(size_t * _sz,uint_least32_t * * _u32) {
# if defined(u8c_bethrdsafe)
mtx_lock(&u8c_errlock);
diff --git a/src/u8c/init.c b/src/u8c/init.c
index f2d171d..e73272e 100644
--- a/src/u8c/init.c
+++ b/src/u8c/init.c
@@ -16,12 +16,9 @@
# include "err.h"
# include "errlock.h"
# include "stat.h"
-# include <assert.h>
+# include <stddef.h>
# include <stdint.h>
-# include <stdlib.h>
-# include <u8c/end.h>
# include <u8c/init.h>
-# include <u8c/SIZE_C.h>
# include <u8c/u32cp.h>
# if defined(u8c_bethrdsafe)
# include <threads.h>
diff --git a/src/u8c/println.c b/src/u8c/println.c
index 1b1830d..5865dfa 100644
--- a/src/u8c/println.c
+++ b/src/u8c/println.c
@@ -14,13 +14,14 @@
If not, see <https://www.gnu.org/licenses/>.
*/
# include "seterr.h"
+# include <assert.h>
# include <stdarg.h>
# include <stdint.h>
# include <stdio.h>
# include <u8c/println.h>
-# include <u8c/SIZE_C.h>
# include <u8c/vprint.h>
uint_least8_t u8c_println(FILE * _fp,uint_least32_t * _msg,...) {
+ assert(_fp != NULL);
va_list args;
va_start(args,_msg);
if(u8c_vprint(_fp,_msg,args)) {
diff --git a/src/u8c/stat.h b/src/u8c/stat.h
index 92b2063..644f345 100644
--- a/src/u8c/stat.h
+++ b/src/u8c/stat.h
@@ -13,8 +13,8 @@
If not, see <https://www.gnu.org/licenses/>.
*/
-# if !defined(u8c_sym_done)
-# define u8c_sym_done
+# if !defined(u8c_sym_stat)
+# define u8c_sym_stat
# include <stdint.h>
extern uint_least8_t u8c_stat;
# endif
diff --git a/src/u8c/u32cp.c b/src/u8c/u32cp.c
index 2462d85..628e57f 100644
--- a/src/u8c/u32cp.c
+++ b/src/u8c/u32cp.c
@@ -15,7 +15,6 @@
*/
# include "seterr.h"
# include <assert.h>
-# include <stddef.h>
# include <stdint.h>
# include <stdlib.h>
# include <u8c/SIZE_C.h>
diff --git a/src/u8c/u32sz.c b/src/u8c/u32sz.c
index 614557c..0d4fd99 100644
--- a/src/u8c/u32sz.c
+++ b/src/u8c/u32sz.c
@@ -13,10 +13,10 @@
If not, see <https://www.gnu.org/licenses/>.
*/
+# include "seterr.h"
# include <assert.h>
# include <stddef.h>
# include <stdint.h>
-# include <stdio.h>
# include <u8c/SIZE_C.h>
# include <u8c/u32sz.h>
uint_least8_t u8c_u32sz(size_t * _sz,uint_least32_t * _u32) {
@@ -24,9 +24,10 @@ uint_least8_t u8c_u32sz(size_t * _sz,uint_least32_t * _u32) {
assert(_u32 != NULL);
for(size_t n = SIZE_C(0x0);n <= SIZE_MAX;n += SIZE_C(0x1)) {
if(_u32[n] == UINT32_C(0x0)) {
- *_sz = n += SIZE_C(0x1);
+ *_sz = n + SIZE_C(0x1);
return UINT8_C(0x0);
}
}
+ u8c_seterr((uint_least32_t[]){UINT32_C(0x75),UINT32_C(0x38),UINT32_C(0x63),UINT32_C(0x5F),UINT32_C(0x75),UINT32_C(0x33),UINT32_C(0x32),UINT32_C(0x73),UINT32_C(0x7A),UINT32_C(0x3A),UINT32_C(0x20),UINT32_C(0x55),UINT32_C(0x6E),UINT32_C(0x74),UINT32_C(0x65),UINT32_C(0x72),UINT32_C(0x6D),UINT32_C(0x69),UINT32_C(0x6E),UINT32_C(0x61),UINT32_C(0x74),UINT32_C(0x65),UINT32_C(0x64),UINT32_C(0x20),UINT32_C(0x69),UINT32_C(0x6E),UINT32_C(0x70),UINT32_C(0x75),UINT32_C(0x74),UINT32_C(0x2E),UINT32_C(0x0),}); /* u8c_u32sz: Unterminated input. */
return UINT8_C(0x1);
}
diff --git a/src/u8c/u8dec.c b/src/u8c/u8dec.c
index fa530ee..2447b6a 100644
--- a/src/u8c/u8dec.c
+++ b/src/u8c/u8dec.c
@@ -17,7 +17,6 @@
# include <assert.h>
# include <stdint.h>
# include <stdlib.h>
-# include <u8c/dbgprint.h>
# include <u8c/u8dec.h>
# include <u8c/SIZE_C.h>
uint_least8_t u8c_u8dec(size_t * _outsz,uint_least32_t * * _out,uint_least8_t * _in) {
diff --git a/src/u8c/vfmt.c b/src/u8c/vfmt.c
index c84aca2..4c00629 100644
--- a/src/u8c/vfmt.c
+++ b/src/u8c/vfmt.c
@@ -13,16 +13,9 @@
If not, see <https://www.gnu.org/licenses/>.
*/
-# include <assert.h>
# include <stdarg.h>
# include <stdint.h>
-# include <stdio.h>
-# include <stdlib.h>
-# include <string.h>
-# include <u8c/fmttyp.h>
# include <u8c/u32cp.h>
-# include <u8c/u8enc.h>
-# include <u8c/SIZE_C.h>
# include <u8c/vfmt.h>
uint_least8_t u8c_vfmt(size_t * _outsz,uint_least32_t * * _out,uint_least32_t * _in,va_list _args) {
/* To be added. */
diff --git a/src/u8c/vprint.c b/src/u8c/vprint.c
index d5241b7..2eb00e0 100644
--- a/src/u8c/vprint.c
+++ b/src/u8c/vprint.c
@@ -19,7 +19,6 @@
# include <stdint.h>
# include <stdio.h>
# include <stdlib.h>
-# include <u8c/col.h>
# include <u8c/u8enc.h>
# include <u8c/SIZE_C.h>
# include <u8c/vfmt.h>