diff --git a/libc/Makefile b/libc/Makefile
index 9c58b077..340991bd 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -20,60 +20,63 @@ FREEOBJS=\
assert/_assert.o \
aux/c++.o \
aux/op-new.o \
-clearerr.o \
ctype/ctype.o \
dirent/alphasort.o \
dirent/dir.o \
dirent/versionsort.o \
errno/errno.o \
fabs.o \
-fbufsize.o \
-fclose.o \
-fdeletefile.o \
-feof.o \
-ferror.o \
-fflush.o \
-fflush_stop_reading.o \
-fflush_stop_writing.o \
-fgetc.o \
-fgets.o \
-flbf.o \
-flushlbf.o \
-fnewfile.o \
-format.o \
-fpending.o \
-fpurge.o \
-fputc.o \
-fputs.o \
-freadable.o \
-freading.o \
-fread.o \
-fregister.o \
-fresetfile.o \
-fscanf.o \
-fseek.o \
-fseeko.o \
-fsetdefaultbuf.o \
-fseterr.o \
-fsetlocking.o \
-fshutdown.o \
-ftell.o \
-ftello.o \
-fwritable.o \
-fwrite.o \
-fwriting.o \
-getdelim.o \
-getline.o \
-rewind.o \
-setbuf.o \
-setvbuf.o \
signal/sigaddset.o \
signal/sigdelset.o \
signal/sigemptyset.o \
signal/sigfillset.o \
signal/sigismember.o \
-sprint.o \
-sscanf.o \
+stdio/clearerr.o \
+stdio/fbufsize.o \
+stdio/fclose.o \
+stdio/fdeletefile.o \
+stdio/feof.o \
+stdio/ferror.o \
+stdio/fflush.o \
+stdio/fflush_stop_reading.o \
+stdio/fflush_stop_writing.o \
+stdio/fgetc.o \
+stdio/fgets.o \
+stdio/flbf.o \
+stdio/flushlbf.o \
+stdio/fnewfile.o \
+stdio/format.o \
+stdio/fpending.o \
+stdio/fpurge.o \
+stdio/fputc.o \
+stdio/fputs.o \
+stdio/freadable.o \
+stdio/freading.o \
+stdio/fread.o \
+stdio/fregister.o \
+stdio/fresetfile.o \
+stdio/fscanf.o \
+stdio/fseek.o \
+stdio/fseeko.o \
+stdio/fsetdefaultbuf.o \
+stdio/fseterr.o \
+stdio/fsetlocking.o \
+stdio/fshutdown.o \
+stdio/ftell.o \
+stdio/ftello.o \
+stdio/fwritable.o \
+stdio/fwrite.o \
+stdio/fwriting.o \
+stdio/getdelim.o \
+stdio/getline.o \
+stdio/rewind.o \
+stdio/setbuf.o \
+stdio/setvbuf.o \
+stdio/sprint.o \
+stdio/sscanf.o \
+stdio/ungetc.o \
+stdio/vfscanf.o \
+stdio/vsscanf.o \
stdlib/abort.o \
stdlib/abs.o \
stdlib/atof.o \
@@ -138,9 +141,6 @@ time/mktime.o \
timespec/timespec.o \
time/strftime.o \
time/timegm.o \
-ungetc.o \
-vfscanf.o \
-vsscanf.o \
wchar/mbrlen.o \
wchar/mbrtowc.o \
wchar/mbsrtowcs.o \
@@ -175,17 +175,10 @@ dirent/fddir-sortix.o \
dirent/scandir.o \
dlfcn/dlfcn.o \
error/errorprint.o \
-fcloseall.o \
fcntl/creat.o \
fcntl/fcntl.o \
fcntl/openat.o \
fcntl/open.o \
-fdio.o \
-fgetpos.o \
-fileno.o \
-fpipe.o \
-freopen.o \
-fsetpos.o \
fsmarshall/fsm_bootstraprootfd.o \
fsmarshall/fsm_closechannel.o \
fsmarshall/fsm_closeserver.o \
@@ -194,7 +187,6 @@ fsmarshall/fsm_listen.o \
fsmarshall/fsm_mkserver.o \
fsmarshall/fsm_recv.o \
fsmarshall/fsm_send.o \
-getc.o \
grp/grent.o \
init.o \
libgen/basename.o \
@@ -225,15 +217,7 @@ netdb/setprotoent.o \
netdb/setservent.o \
poll/poll.o \
poll/ppoll.o \
-popen.o \
-print.o \
-putc.o \
pwd/pwent.o \
-removeat.o \
-remove.o \
-renameat.o \
-rename.o \
-scanf.o \
signal/kill.o \
signal/psignal.o \
signal/raise.o \
@@ -243,7 +227,26 @@ signal/SIG_ERR.o \
signal/SIG_IGN.o \
signal/signal.o \
signal/sigprocmask.o \
-stdio.o \
+stdio/fcloseall.o \
+stdio/fdio.o \
+stdio/fgetpos.o \
+stdio/fileno.o \
+stdio/fpipe.o \
+stdio/freopen.o \
+stdio/fsetpos.o \
+stdio/getc.o \
+stdio/popen.o \
+stdio/print.o \
+stdio/putc.o \
+stdio/removeat.o \
+stdio/remove.o \
+stdio/renameat.o \
+stdio/rename.o \
+stdio/scanf.o \
+stdio/stdio.o \
+stdio/tmpfile.o \
+stdio/tmpnam.o \
+stdio/vscanf.o \
stdlib/canonicalize_file_name_at.o \
stdlib/canonicalize_file_name.o \
stdlib/env.o \
@@ -322,8 +325,6 @@ time/timer_getoverrun.o \
time/timer_gettime.o \
time/timer_settime.o \
time/times.o \
-tmpfile.o \
-tmpnam.o \
unistd/access.o \
unistd/alarmns.o \
unistd/alarm.o \
@@ -399,7 +400,6 @@ unistd/unlink.o \
unistd/usleep.o \
unistd/write.o \
utime/utime.o \
-vscanf.o \
OBJS=\
$(FREEOBJS) \
diff --git a/libc/sortix/stdio/.gitignore b/libc/sortix/stdio/.gitignore
new file mode 100644
index 00000000..e69de29b
diff --git a/libc/clearerr.cpp b/libc/stdio/clearerr.cpp
similarity index 97%
rename from libc/clearerr.cpp
rename to libc/stdio/clearerr.cpp
index 78cdcd38..7065c2e7 100644
--- a/libc/clearerr.cpp
+++ b/libc/stdio/clearerr.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- clearerr.cpp
+ stdio/clearerr.cpp
Clears the error condition on a FILE.
*******************************************************************************/
diff --git a/libc/fbufsize.cpp b/libc/stdio/fbufsize.cpp
similarity index 97%
rename from libc/fbufsize.cpp
rename to libc/stdio/fbufsize.cpp
index ff5efa41..9c959094 100644
--- a/libc/fbufsize.cpp
+++ b/libc/stdio/fbufsize.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fbufsize.cpp
+ stdio/fbufsize.cpp
Returns the size of the FILE's buffer.
*******************************************************************************/
diff --git a/libc/fclose.cpp b/libc/stdio/fclose.cpp
similarity index 98%
rename from libc/fclose.cpp
rename to libc/stdio/fclose.cpp
index c8733a92..bb5ab92c 100644
--- a/libc/fclose.cpp
+++ b/libc/stdio/fclose.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fclose.cpp
+ stdio/fclose.cpp
Closes and flushes a FILE.
*******************************************************************************/
diff --git a/libc/fcloseall.cpp b/libc/stdio/fcloseall.cpp
similarity index 97%
rename from libc/fcloseall.cpp
rename to libc/stdio/fcloseall.cpp
index 3c4487ba..3a17626a 100644
--- a/libc/fcloseall.cpp
+++ b/libc/stdio/fcloseall.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fcloseall.cpp
+ stdio/fcloseall.cpp
Closes and flushes all open registered files.
*******************************************************************************/
diff --git a/libc/fdeletefile.cpp b/libc/stdio/fdeletefile.cpp
similarity index 97%
rename from libc/fdeletefile.cpp
rename to libc/stdio/fdeletefile.cpp
index cf14b440..e37fec9e 100644
--- a/libc/fdeletefile.cpp
+++ b/libc/stdio/fdeletefile.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fdeletefile.cpp
+ stdio/fdeletefile.cpp
Deallocator for things returned by fnewfile after being shut down.
*******************************************************************************/
diff --git a/libc/fdio.c b/libc/stdio/fdio.c
similarity index 99%
rename from libc/fdio.c
rename to libc/stdio/fdio.c
index 8b77b41d..25942502 100644
--- a/libc/fdio.c
+++ b/libc/stdio/fdio.c
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fdio.c
+ stdio/fdio.c
Handles the file descriptor backend for the FILE* API.
*******************************************************************************/
diff --git a/libc/fdio.h b/libc/stdio/fdio.h
similarity index 95%
rename from libc/fdio.h
rename to libc/stdio/fdio.h
index caa0a3d5..fc571ecb 100644
--- a/libc/fdio.h
+++ b/libc/stdio/fdio.h
@@ -17,13 +17,13 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fdio.h
+ stdio/fdio.h
Handles the file descriptor backend for the FILE* API.
*******************************************************************************/
-#ifndef _FDIO_H
-#define _FDIO_H 1
+#ifndef STDIO_FDIO_H
+#define STDIO_FDIO_H 1
#include
diff --git a/libc/feof.cpp b/libc/stdio/feof.cpp
similarity index 98%
rename from libc/feof.cpp
rename to libc/stdio/feof.cpp
index c35a7b18..2985fca7 100644
--- a/libc/feof.cpp
+++ b/libc/stdio/feof.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- feof.cpp
+ stdio/feof.cpp
Returns whether the end of file condition is set on a FILE.
*******************************************************************************/
diff --git a/libc/ferror.cpp b/libc/stdio/ferror.cpp
similarity index 98%
rename from libc/ferror.cpp
rename to libc/stdio/ferror.cpp
index 7da97ec6..31c9ebdc 100644
--- a/libc/ferror.cpp
+++ b/libc/stdio/ferror.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- ferror.cpp
+ stdio/ferror.cpp
Returns whether the error condition is set on a FILE.
*******************************************************************************/
diff --git a/libc/fflush.cpp b/libc/stdio/fflush.cpp
similarity index 98%
rename from libc/fflush.cpp
rename to libc/stdio/fflush.cpp
index be01133f..4d58bff8 100644
--- a/libc/fflush.cpp
+++ b/libc/stdio/fflush.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fflush.cpp
+ stdio/fflush.cpp
Flushes a FILE.
*******************************************************************************/
diff --git a/libc/fflush_stop_reading.cpp b/libc/stdio/fflush_stop_reading.cpp
similarity index 98%
rename from libc/fflush_stop_reading.cpp
rename to libc/stdio/fflush_stop_reading.cpp
index 812da966..1c71dea9 100644
--- a/libc/fflush_stop_reading.cpp
+++ b/libc/stdio/fflush_stop_reading.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fflush_stop_reading.cpp
+ stdio/fflush_stop_reading.cpp
Resets the FILE to a consistent state so it is ready for writing.
*******************************************************************************/
diff --git a/libc/fflush_stop_writing.cpp b/libc/stdio/fflush_stop_writing.cpp
similarity index 97%
rename from libc/fflush_stop_writing.cpp
rename to libc/stdio/fflush_stop_writing.cpp
index 0e0c7cce..baf924da 100644
--- a/libc/fflush_stop_writing.cpp
+++ b/libc/stdio/fflush_stop_writing.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fflush_stop_writing.cpp
+ stdio/fflush_stop_writing.cpp
Resets the FILE to a consistent state so it is ready for reading.
*******************************************************************************/
diff --git a/libc/fgetc.cpp b/libc/stdio/fgetc.cpp
similarity index 99%
rename from libc/fgetc.cpp
rename to libc/stdio/fgetc.cpp
index bb9cfe9d..8313a16d 100644
--- a/libc/fgetc.cpp
+++ b/libc/stdio/fgetc.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fgetc.cpp
+ stdio/fgetc.cpp
Reads a single character from a FILE.
*******************************************************************************/
diff --git a/libc/fgetpos.cpp b/libc/stdio/fgetpos.cpp
similarity index 98%
rename from libc/fgetpos.cpp
rename to libc/stdio/fgetpos.cpp
index e53e71ae..903fdbb0 100644
--- a/libc/fgetpos.cpp
+++ b/libc/stdio/fgetpos.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fgetpos.cpp
+ stdio/fgetpos.cpp
Get current file position information.
*******************************************************************************/
diff --git a/libc/fgets.cpp b/libc/stdio/fgets.cpp
similarity index 98%
rename from libc/fgets.cpp
rename to libc/stdio/fgets.cpp
index 869cbd58..6005083c 100644
--- a/libc/fgets.cpp
+++ b/libc/stdio/fgets.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fgets.cpp
+ stdio/fgets.cpp
Reads a string from a FILE.
*******************************************************************************/
diff --git a/libc/fileno.cpp b/libc/stdio/fileno.cpp
similarity index 98%
rename from libc/fileno.cpp
rename to libc/stdio/fileno.cpp
index 3c5d163a..51ce3162 100644
--- a/libc/fileno.cpp
+++ b/libc/stdio/fileno.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fileno.cpp
+ stdio/fileno.cpp
Returns the underlying file descriptor of a FILE if applicable.
*******************************************************************************/
diff --git a/libc/flbf.cpp b/libc/stdio/flbf.cpp
similarity index 98%
rename from libc/flbf.cpp
rename to libc/stdio/flbf.cpp
index 6cd5bed2..548fe27e 100644
--- a/libc/flbf.cpp
+++ b/libc/stdio/flbf.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- flbf.cpp
+ stdio/flbf.cpp
Returns whether a FILE is line buffered.
*******************************************************************************/
diff --git a/libc/flushlbf.cpp b/libc/stdio/flushlbf.cpp
similarity index 98%
rename from libc/flushlbf.cpp
rename to libc/stdio/flushlbf.cpp
index 8407d5ee..6e5b5d60 100644
--- a/libc/flushlbf.cpp
+++ b/libc/stdio/flushlbf.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- flushlbf.cpp
+ stdio/flushlbf.cpp
Flushes all line buffered registered files.
*******************************************************************************/
diff --git a/libc/fnewfile.cpp b/libc/stdio/fnewfile.cpp
similarity index 98%
rename from libc/fnewfile.cpp
rename to libc/stdio/fnewfile.cpp
index 3887a732..6a09c971 100644
--- a/libc/fnewfile.cpp
+++ b/libc/stdio/fnewfile.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fnewfile.cpp
+ stdio/fnewfile.cpp
Allocates and initializes a simple FILE object ready for construction.
*******************************************************************************/
diff --git a/libc/format.cpp b/libc/stdio/format.cpp
similarity index 99%
rename from libc/format.cpp
rename to libc/stdio/format.cpp
index 243166ce..5b04ce28 100644
--- a/libc/format.cpp
+++ b/libc/stdio/format.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- format.cpp
+ stdio/format.cpp
Provides printf formatting functions that uses callbacks.
*******************************************************************************/
diff --git a/libc/fpending.cpp b/libc/stdio/fpending.cpp
similarity index 97%
rename from libc/fpending.cpp
rename to libc/stdio/fpending.cpp
index 7df05be0..c7ae251e 100644
--- a/libc/fpending.cpp
+++ b/libc/stdio/fpending.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fpending.cpp
+ stdio/fpending.cpp
Returns the number of bytes pending in the output buffer.
*******************************************************************************/
diff --git a/libc/fpipe.cpp b/libc/stdio/fpipe.cpp
similarity index 98%
rename from libc/fpipe.cpp
rename to libc/stdio/fpipe.cpp
index 8878042f..82bab483 100644
--- a/libc/fpipe.cpp
+++ b/libc/stdio/fpipe.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fpipe.cpp
+ stdio/fpipe.cpp
Provides pipe(2) through the FILE interface.
*******************************************************************************/
diff --git a/libc/fpurge.cpp b/libc/stdio/fpurge.cpp
similarity index 98%
rename from libc/fpurge.cpp
rename to libc/stdio/fpurge.cpp
index c6b2be46..4b7a47df 100644
--- a/libc/fpurge.cpp
+++ b/libc/stdio/fpurge.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fpurge.cpp
+ stdio/fpurge.cpp
Discards all contents in the FILE's buffer.
*******************************************************************************/
diff --git a/libc/fputc.cpp b/libc/stdio/fputc.cpp
similarity index 98%
rename from libc/fputc.cpp
rename to libc/stdio/fputc.cpp
index 026f77e5..ab43d52e 100644
--- a/libc/fputc.cpp
+++ b/libc/stdio/fputc.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fputc.cpp
+ stdio/fputc.cpp
Writes a character to a FILE.
*******************************************************************************/
diff --git a/libc/fputs.cpp b/libc/stdio/fputs.cpp
similarity index 98%
rename from libc/fputs.cpp
rename to libc/stdio/fputs.cpp
index af928415..c06f4d41 100644
--- a/libc/fputs.cpp
+++ b/libc/stdio/fputs.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fputs.cpp
+ stdio/fputs.cpp
Writes a string to a FILE.
*******************************************************************************/
diff --git a/libc/fread.cpp b/libc/stdio/fread.cpp
similarity index 98%
rename from libc/fread.cpp
rename to libc/stdio/fread.cpp
index 07f59ee5..6fd7c494 100644
--- a/libc/fread.cpp
+++ b/libc/stdio/fread.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fread.cpp
+ stdio/fread.cpp
Reads data from a FILE.
*******************************************************************************/
diff --git a/libc/freadable.cpp b/libc/stdio/freadable.cpp
similarity index 97%
rename from libc/freadable.cpp
rename to libc/stdio/freadable.cpp
index db964785..52e72894 100644
--- a/libc/freadable.cpp
+++ b/libc/stdio/freadable.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- freadable.cpp
+ stdio/freadable.cpp
Returns whether this FILE can be read from.
*******************************************************************************/
diff --git a/libc/freading.cpp b/libc/stdio/freading.cpp
similarity index 98%
rename from libc/freading.cpp
rename to libc/stdio/freading.cpp
index 91ae5497..b09d7cec 100644
--- a/libc/freading.cpp
+++ b/libc/stdio/freading.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- freading.cpp
+ stdio/freading.cpp
Returns whether the last operation was a read or FILE is read only.
*******************************************************************************/
diff --git a/libc/fregister.cpp b/libc/stdio/fregister.cpp
similarity index 98%
rename from libc/fregister.cpp
rename to libc/stdio/fregister.cpp
index b8b4bd62..e302acfe 100644
--- a/libc/fregister.cpp
+++ b/libc/stdio/fregister.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fregister.cpp
+ stdio/fregister.cpp
Registers a FILE in the global list of open FILES, which allows the standard
library to close and flush all open files upon program exit.
diff --git a/libc/freopen.cpp b/libc/stdio/freopen.cpp
similarity index 98%
rename from libc/freopen.cpp
rename to libc/stdio/freopen.cpp
index d74e1d36..b6967288 100644
--- a/libc/freopen.cpp
+++ b/libc/stdio/freopen.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- freopen.cpp
+ stdio/freopen.cpp
Changes the file with which a FILE is associated.
*******************************************************************************/
diff --git a/libc/fresetfile.cpp b/libc/stdio/fresetfile.cpp
similarity index 98%
rename from libc/fresetfile.cpp
rename to libc/stdio/fresetfile.cpp
index 6ee9adf2..50fe0925 100644
--- a/libc/fresetfile.cpp
+++ b/libc/stdio/fresetfile.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fresetfile.cpp
+ stdio/fresetfile.cpp
After a FILE has been shut down, returns all fields to their default state.
*******************************************************************************/
diff --git a/libc/fscanf.cpp b/libc/stdio/fscanf.cpp
similarity index 98%
rename from libc/fscanf.cpp
rename to libc/stdio/fscanf.cpp
index e3b6f05e..a3dc4215 100644
--- a/libc/fscanf.cpp
+++ b/libc/stdio/fscanf.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fscanf.cpp
+ stdio/fscanf.cpp
Input format conversion.
*******************************************************************************/
diff --git a/libc/fseek.cpp b/libc/stdio/fseek.cpp
similarity index 98%
rename from libc/fseek.cpp
rename to libc/stdio/fseek.cpp
index fd0b1536..3a45de6c 100644
--- a/libc/fseek.cpp
+++ b/libc/stdio/fseek.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fseek.cpp
+ stdio/fseek.cpp
Changes the current offset in a FILE.
*******************************************************************************/
diff --git a/libc/fseeko.cpp b/libc/stdio/fseeko.cpp
similarity index 98%
rename from libc/fseeko.cpp
rename to libc/stdio/fseeko.cpp
index ee1534e0..4655755e 100644
--- a/libc/fseeko.cpp
+++ b/libc/stdio/fseeko.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fseeko.cpp
+ stdio/fseeko.cpp
Changes the current offset in a FILE.
*******************************************************************************/
diff --git a/libc/fsetdefaultbuf.cpp b/libc/stdio/fsetdefaultbuf.cpp
similarity index 98%
rename from libc/fsetdefaultbuf.cpp
rename to libc/stdio/fsetdefaultbuf.cpp
index dc146ce4..f438a60f 100644
--- a/libc/fsetdefaultbuf.cpp
+++ b/libc/stdio/fsetdefaultbuf.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fsetdefaultbuf.cpp
+ stdio/fsetdefaultbuf.cpp
Sets up default buffering semantics for a FILE.
*******************************************************************************/
diff --git a/libc/fseterr.cpp b/libc/stdio/fseterr.cpp
similarity index 98%
rename from libc/fseterr.cpp
rename to libc/stdio/fseterr.cpp
index 6108ab3d..af13ed68 100644
--- a/libc/fseterr.cpp
+++ b/libc/stdio/fseterr.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fseterr.cpp
+ stdio/fseterr.cpp
Sets the error condition bit on a FILE.
*******************************************************************************/
diff --git a/libc/fsetlocking.cpp b/libc/stdio/fsetlocking.cpp
similarity index 98%
rename from libc/fsetlocking.cpp
rename to libc/stdio/fsetlocking.cpp
index 77cdb74a..e0c97bb3 100644
--- a/libc/fsetlocking.cpp
+++ b/libc/stdio/fsetlocking.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fsetlocking.cpp
+ stdio/fsetlocking.cpp
Sets the desired locking semantics on a FILE.
*******************************************************************************/
diff --git a/libc/fsetpos.cpp b/libc/stdio/fsetpos.cpp
similarity index 98%
rename from libc/fsetpos.cpp
rename to libc/stdio/fsetpos.cpp
index 37525f66..d613958d 100644
--- a/libc/fsetpos.cpp
+++ b/libc/stdio/fsetpos.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fsetpos.cpp
+ stdio/fsetpos.cpp
Set current file position.
*******************************************************************************/
diff --git a/libc/fshutdown.cpp b/libc/stdio/fshutdown.cpp
similarity index 98%
rename from libc/fshutdown.cpp
rename to libc/stdio/fshutdown.cpp
index b87b5214..d1467ce9 100644
--- a/libc/fshutdown.cpp
+++ b/libc/stdio/fshutdown.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fshutdown.cpp
+ stdio/fshutdown.cpp
Uninstalls the backend from a FILE so another can be reinstalled.
*******************************************************************************/
diff --git a/libc/ftell.cpp b/libc/stdio/ftell.cpp
similarity index 98%
rename from libc/ftell.cpp
rename to libc/stdio/ftell.cpp
index e447a0c7..678ddb53 100644
--- a/libc/ftell.cpp
+++ b/libc/stdio/ftell.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- ftell.cpp
+ stdio/ftell.cpp
Returns the current offset of a FILE.
*******************************************************************************/
diff --git a/libc/ftello.cpp b/libc/stdio/ftello.cpp
similarity index 98%
rename from libc/ftello.cpp
rename to libc/stdio/ftello.cpp
index f349de1d..688798c7 100644
--- a/libc/ftello.cpp
+++ b/libc/stdio/ftello.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- ftello.cpp
+ stdio/ftello.cpp
Returns the current offset of a FILE.
*******************************************************************************/
diff --git a/libc/fwritable.cpp b/libc/stdio/fwritable.cpp
similarity index 97%
rename from libc/fwritable.cpp
rename to libc/stdio/fwritable.cpp
index b4c1439d..3b639ab6 100644
--- a/libc/fwritable.cpp
+++ b/libc/stdio/fwritable.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fwritable.cpp
+ stdio/fwritable.cpp
Returns whether this FILE can be written to.
*******************************************************************************/
diff --git a/libc/fwrite.cpp b/libc/stdio/fwrite.cpp
similarity index 98%
rename from libc/fwrite.cpp
rename to libc/stdio/fwrite.cpp
index 3433632d..4150f4a1 100644
--- a/libc/fwrite.cpp
+++ b/libc/stdio/fwrite.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fwrite.cpp
+ stdio/fwrite.cpp
Writes data to a FILE.
*******************************************************************************/
diff --git a/libc/fwriting.cpp b/libc/stdio/fwriting.cpp
similarity index 98%
rename from libc/fwriting.cpp
rename to libc/stdio/fwriting.cpp
index fbd7bd4f..af16d441 100644
--- a/libc/fwriting.cpp
+++ b/libc/stdio/fwriting.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fwriting.cpp
+ stdio/fwriting.cpp
Returns whether the last operation was a write or FILE is write only.
*******************************************************************************/
diff --git a/libc/getc.cpp b/libc/stdio/getc.cpp
similarity index 98%
rename from libc/getc.cpp
rename to libc/stdio/getc.cpp
index 125f6a54..289ada86 100644
--- a/libc/getc.cpp
+++ b/libc/stdio/getc.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- getc.cpp
+ stdio/getc.cpp
Reads a single character from a FILE.
*******************************************************************************/
diff --git a/libc/getdelim.cpp b/libc/stdio/getdelim.cpp
similarity index 98%
rename from libc/getdelim.cpp
rename to libc/stdio/getdelim.cpp
index f18c943c..37a934e4 100644
--- a/libc/getdelim.cpp
+++ b/libc/stdio/getdelim.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- getdelim.cpp
+ stdio/getdelim.cpp
Delimited string input.
*******************************************************************************/
diff --git a/libc/getline.cpp b/libc/stdio/getline.cpp
similarity index 98%
rename from libc/getline.cpp
rename to libc/stdio/getline.cpp
index 2b3b0a29..637020c9 100644
--- a/libc/getline.cpp
+++ b/libc/stdio/getline.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- getline.cpp
+ stdio/getline.cpp
Reads a line from a FILE.
*******************************************************************************/
diff --git a/libc/popen.cpp b/libc/stdio/popen.cpp
similarity index 99%
rename from libc/popen.cpp
rename to libc/stdio/popen.cpp
index 04f7b6ce..1b8f0596 100644
--- a/libc/popen.cpp
+++ b/libc/stdio/popen.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- popen.cpp
+ stdio/popen.cpp
Pipe stream to or from a process.
*******************************************************************************/
diff --git a/libc/print.cpp b/libc/stdio/print.cpp
similarity index 98%
rename from libc/print.cpp
rename to libc/stdio/print.cpp
index 40c2b32d..3fb32e97 100644
--- a/libc/print.cpp
+++ b/libc/stdio/print.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- print.cpp
+ stdio/print.cpp
Provides the stubs for the printf family of functions.
*******************************************************************************/
diff --git a/libc/putc.cpp b/libc/stdio/putc.cpp
similarity index 98%
rename from libc/putc.cpp
rename to libc/stdio/putc.cpp
index be8c7dd3..b0792e67 100644
--- a/libc/putc.cpp
+++ b/libc/stdio/putc.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- putc.cpp
+ stdio/putc.cpp
Writes a character to a FILE.
*******************************************************************************/
diff --git a/libc/remove.cpp b/libc/stdio/remove.cpp
similarity index 98%
rename from libc/remove.cpp
rename to libc/stdio/remove.cpp
index 44877f78..9c505b12 100644
--- a/libc/remove.cpp
+++ b/libc/stdio/remove.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- remove.cpp
+ stdio/remove.cpp
Remove a file or directory.
*******************************************************************************/
diff --git a/libc/removeat.cpp b/libc/stdio/removeat.cpp
similarity index 98%
rename from libc/removeat.cpp
rename to libc/stdio/removeat.cpp
index 60cf87d3..24cd851d 100644
--- a/libc/removeat.cpp
+++ b/libc/stdio/removeat.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- removeat.cpp
+ stdio/removeat.cpp
Remove a file or directory.
*******************************************************************************/
diff --git a/libc/rename.cpp b/libc/stdio/rename.cpp
similarity index 98%
rename from libc/rename.cpp
rename to libc/stdio/rename.cpp
index 1572923f..085507f8 100644
--- a/libc/rename.cpp
+++ b/libc/stdio/rename.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- rename.cpp
+ stdio/rename.cpp
Moves a directory entry within the same file system.
*******************************************************************************/
diff --git a/libc/renameat.cpp b/libc/stdio/renameat.cpp
similarity index 98%
rename from libc/renameat.cpp
rename to libc/stdio/renameat.cpp
index fa7c1fee..e9e1dcc9 100644
--- a/libc/renameat.cpp
+++ b/libc/stdio/renameat.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- renameat.cpp
+ stdio/renameat.cpp
Moves a directory entry within the same file system.
*******************************************************************************/
diff --git a/libc/rewind.cpp b/libc/stdio/rewind.cpp
similarity index 98%
rename from libc/rewind.cpp
rename to libc/stdio/rewind.cpp
index e9225b4e..8c8aa352 100644
--- a/libc/rewind.cpp
+++ b/libc/stdio/rewind.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- rewind.cpp
+ stdio/rewind.cpp
Sets the offset of a FILE to the start and clears any error condition.
*******************************************************************************/
diff --git a/libc/scanf.cpp b/libc/stdio/scanf.cpp
similarity index 98%
rename from libc/scanf.cpp
rename to libc/stdio/scanf.cpp
index 558ea14d..2facd6c9 100644
--- a/libc/scanf.cpp
+++ b/libc/stdio/scanf.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- scanf.cpp
+ stdio/scanf.cpp
Input format conversion.
*******************************************************************************/
diff --git a/libc/setbuf.cpp b/libc/stdio/setbuf.cpp
similarity index 98%
rename from libc/setbuf.cpp
rename to libc/stdio/setbuf.cpp
index d20f9447..25c6778d 100644
--- a/libc/setbuf.cpp
+++ b/libc/stdio/setbuf.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- setbuf.cpp
+ stdio/setbuf.cpp
Sets up buffering semantics for a FILE.
*******************************************************************************/
diff --git a/libc/setvbuf.cpp b/libc/stdio/setvbuf.cpp
similarity index 98%
rename from libc/setvbuf.cpp
rename to libc/stdio/setvbuf.cpp
index 075566d2..b25896dd 100644
--- a/libc/setvbuf.cpp
+++ b/libc/stdio/setvbuf.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- setvbuf.cpp
+ stdio/setvbuf.cpp
Sets up buffering semantics for a FILE.
*******************************************************************************/
diff --git a/libc/sprint.cpp b/libc/stdio/sprint.cpp
similarity index 99%
rename from libc/sprint.cpp
rename to libc/stdio/sprint.cpp
index 2639c825..fc517a9c 100644
--- a/libc/sprint.cpp
+++ b/libc/stdio/sprint.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- sprint.cpp
+ stdio/sprint.cpp
Provides the stubs for the sprintf family of functions.
*******************************************************************************/
diff --git a/libc/sscanf.cpp b/libc/stdio/sscanf.cpp
similarity index 98%
rename from libc/sscanf.cpp
rename to libc/stdio/sscanf.cpp
index e3f49b66..f74aa03f 100644
--- a/libc/sscanf.cpp
+++ b/libc/stdio/sscanf.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- sscanf.cpp
+ stdio/sscanf.cpp
Input format conversion.
*******************************************************************************/
diff --git a/libc/stdio.c b/libc/stdio/stdio.c
similarity index 99%
rename from libc/stdio.c
rename to libc/stdio/stdio.c
index 59d55dc7..1a12b6f9 100644
--- a/libc/stdio.c
+++ b/libc/stdio/stdio.c
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- stdio.c
+ stdio/stdio.c
Sets up stdin, stdout, stderr.
*******************************************************************************/
diff --git a/libc/tmpfile.cpp b/libc/stdio/tmpfile.cpp
similarity index 98%
rename from libc/tmpfile.cpp
rename to libc/stdio/tmpfile.cpp
index 749e7d49..71505e2a 100644
--- a/libc/tmpfile.cpp
+++ b/libc/stdio/tmpfile.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- tmpfile.cpp
+ stdio/tmpfile.cpp
Opens an unnamed temporary file.
*******************************************************************************/
diff --git a/libc/tmpnam.cpp b/libc/stdio/tmpnam.cpp
similarity index 98%
rename from libc/tmpnam.cpp
rename to libc/stdio/tmpnam.cpp
index cbea7d72..2b336f40 100644
--- a/libc/tmpnam.cpp
+++ b/libc/stdio/tmpnam.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- tmpnam.cpp
+ stdio/tmpnam.cpp
Create path names for temporary files.
*******************************************************************************/
diff --git a/libc/ungetc.cpp b/libc/stdio/ungetc.cpp
similarity index 98%
rename from libc/ungetc.cpp
rename to libc/stdio/ungetc.cpp
index 3314fa8d..f58ab390 100644
--- a/libc/ungetc.cpp
+++ b/libc/stdio/ungetc.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- ungetc.cpp
+ stdio/ungetc.cpp
Inserts data in front of the current read queue, allowing applications to
peek the incoming data and pretend they didn't.
diff --git a/libc/vfscanf.cpp b/libc/stdio/vfscanf.cpp
similarity index 99%
rename from libc/vfscanf.cpp
rename to libc/stdio/vfscanf.cpp
index d65e58a5..6c614b20 100644
--- a/libc/vfscanf.cpp
+++ b/libc/stdio/vfscanf.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- vfscanf.cpp
+ stdio/vfscanf.cpp
Input format conversion.
*******************************************************************************/
diff --git a/libc/vscanf.cpp b/libc/stdio/vscanf.cpp
similarity index 98%
rename from libc/vscanf.cpp
rename to libc/stdio/vscanf.cpp
index d60f9964..d3a6eb96 100644
--- a/libc/vscanf.cpp
+++ b/libc/stdio/vscanf.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- vscanf.cpp
+ stdio/vscanf.cpp
Input format conversion.
*******************************************************************************/
diff --git a/libc/vsscanf.cpp b/libc/stdio/vsscanf.cpp
similarity index 98%
rename from libc/vsscanf.cpp
rename to libc/stdio/vsscanf.cpp
index d71096fe..49ef305c 100644
--- a/libc/vsscanf.cpp
+++ b/libc/stdio/vsscanf.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- vsscanf.cpp
+ stdio/vsscanf.cpp
Input format conversion.
*******************************************************************************/