summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nonstd/io-internal.ref2
-rw-r--r--src/stdio/fflush.c3
-rw-r--r--src/stdio/fopen.c7
-rw-r--r--src/stdio/fprintf.c1
-rw-r--r--src/stdio/fscanf.c1
-rw-r--r--src/stdio/printf.c1
-rw-r--r--src/stdio/rename.c1
-rw-r--r--src/stdio/scanf.c1
-rw-r--r--src/stdio/sprintf.c1
-rw-r--r--src/stdio/sscanf.c1
-rw-r--r--src/stdio/vfprintf.c1
-rw-r--r--src/stdio/vprintf.c1
-rw-r--r--src/stdio/vsprintf.c1
13 files changed, 6 insertions, 16 deletions
diff --git a/src/nonstd/io-internal.ref b/src/nonstd/io-internal.ref
new file mode 100644
index 00000000..4c06d2f9
--- /dev/null
+++ b/src/nonstd/io-internal.ref
@@ -0,0 +1,2 @@
+#include <nonstd/io.h>
+REFERENCE(<nonstd/internal.h>)
diff --git a/src/stdio/fflush.c b/src/stdio/fflush.c
index c7514d10..c4b5ad58 100644
--- a/src/stdio/fflush.c
+++ b/src/stdio/fflush.c
@@ -1,6 +1,5 @@
#include <stdio.h>
#include "nonstd/io.h"
-#include "nonstd/internal.h"
/** flush buffered writes **/
int fflush(FILE *stream)
@@ -8,7 +7,7 @@ int fflush(FILE *stream)
flockfile(stream);
if (stream == NULL) {
FILE *p;
- for (p = __libc(FILE_TAIL); p != NULL; p = p->prev) {
+ for (p = __libc(FILE_STREAMS); p != NULL; p = p->prev) {
fflush(p);
}
}
diff --git a/src/stdio/fopen.c b/src/stdio/fopen.c
index 935885d9..5a0d5eae 100644
--- a/src/stdio/fopen.c
+++ b/src/stdio/fopen.c
@@ -1,6 +1,5 @@
#include <stdio.h>
#include "stdlib.h"
-#include "nonstd/internal.h"
#include "nonstd/io.h"
/** open a file stream **/
@@ -13,12 +12,12 @@ FILE * fopen(const char * restrict filename, const char * restrict mode)
return NULL;
}
- if (__libc(FILE_TAIL)) {
- f->prev = __libc(FILE_TAIL);
+ if (__libc(FILE_STREAMS)) {
+ f->prev = __libc(FILE_STREAMS);
f->prev->next = f;
}
- /* __libc(FILE_TAIL) = f; */
+ /* __libc(FILE_STREAMS) = f; */
/*
RETURN_SUCCESS(a pointer to the new file stream);
diff --git a/src/stdio/fprintf.c b/src/stdio/fprintf.c
index 053277d7..e6651076 100644
--- a/src/stdio/fprintf.c
+++ b/src/stdio/fprintf.c
@@ -1,7 +1,6 @@
#include <stdio.h>
#include "stdarg.h"
#include "nonstd/io.h"
-#include "nonstd/internal.h"
/** write formatted output to a file stream **/
int fprintf(FILE * restrict stream, const char * restrict format, ...)
diff --git a/src/stdio/fscanf.c b/src/stdio/fscanf.c
index adbb753c..9e027cf5 100644
--- a/src/stdio/fscanf.c
+++ b/src/stdio/fscanf.c
@@ -1,6 +1,5 @@
#include <stdio.h>
#include "stdarg.h"
-#include "nonstd/internal.h"
#include "nonstd/io.h"
/** read formatted input from a file stream **/
diff --git a/src/stdio/printf.c b/src/stdio/printf.c
index 57684158..0a95fbeb 100644
--- a/src/stdio/printf.c
+++ b/src/stdio/printf.c
@@ -1,6 +1,5 @@
#include <stdio.h>
#include "stdarg.h"
-#include "nonstd/internal.h"
#include "nonstd/io.h"
/** write formatted output **/
diff --git a/src/stdio/rename.c b/src/stdio/rename.c
index 10ad7283..068cd73d 100644
--- a/src/stdio/rename.c
+++ b/src/stdio/rename.c
@@ -1,7 +1,6 @@
#include <stdio.h>
#include "errno.h"
#include "nonstd/syscall.h"
-#include "nonstd/internal.h"
/** rename a file **/
int rename(const char *old, const char *new)
diff --git a/src/stdio/scanf.c b/src/stdio/scanf.c
index 5fbe51ec..cc392373 100644
--- a/src/stdio/scanf.c
+++ b/src/stdio/scanf.c
@@ -1,6 +1,5 @@
#include <stdio.h>
#include "stdarg.h"
-#include "nonstd/internal.h"
#include "nonstd/io.h"
/** read formatted input **/
diff --git a/src/stdio/sprintf.c b/src/stdio/sprintf.c
index babd4ba3..2872331a 100644
--- a/src/stdio/sprintf.c
+++ b/src/stdio/sprintf.c
@@ -1,7 +1,6 @@
#include <stdio.h>
#include "stdarg.h"
#include "nonstd/io.h"
-#include "nonstd/internal.h"
/** write formatted output to a string **/
int sprintf(char * restrict s, const char * restrict format, ...)
diff --git a/src/stdio/sscanf.c b/src/stdio/sscanf.c
index f6637476..02939338 100644
--- a/src/stdio/sscanf.c
+++ b/src/stdio/sscanf.c
@@ -1,7 +1,6 @@
#include <stdio.h>
#include "stdarg.h"
#include "nonstd/io.h"
-#include "nonstd/internal.h"
/** read formatted input from a string **/
int sscanf(const char * restrict s, const char * restrict format, ...)
diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c
index c6a35edc..450d1383 100644
--- a/src/stdio/vfprintf.c
+++ b/src/stdio/vfprintf.c
@@ -1,7 +1,6 @@
#include <stdio.h>
#include "stdarg.h"
#include "nonstd/io.h"
-#include "nonstd/internal.h"
/** write formatted output to a file stream **/
int vfprintf(FILE * restrict stream, const char * restrict format, va_list arg)
diff --git a/src/stdio/vprintf.c b/src/stdio/vprintf.c
index eb9b4d30..29c1b062 100644
--- a/src/stdio/vprintf.c
+++ b/src/stdio/vprintf.c
@@ -1,7 +1,6 @@
#include <stdio.h>
#include "stdarg.h"
#include "nonstd/io.h"
-#include "nonstd/internal.h"
/** write formatted output **/
int vprintf(const char * restrict format, va_list arg)
diff --git a/src/stdio/vsprintf.c b/src/stdio/vsprintf.c
index 4a6ec2b8..43caff52 100644
--- a/src/stdio/vsprintf.c
+++ b/src/stdio/vsprintf.c
@@ -1,7 +1,6 @@
#include <stdio.h>
#include "stdarg.h"
#include "nonstd/io.h"
-#include "nonstd/internal.h"
/** write formatted output to a string **/
int vsprintf(char *s, const char *format, va_list arg)