]> git.mdlowis.com Git - proto/rc.git/commitdiff
moved writall to print.c and removed system.c
authorMichael D. Lowis <mike.lowis@gentex.com>
Wed, 15 Mar 2017 12:52:39 +0000 (08:52 -0400)
committerMichael D. Lowis <mike.lowis@gentex.com>
Wed, 15 Mar 2017 12:52:39 +0000 (08:52 -0400)
Makefile
print.c
system.c [deleted file]

index f9df45913b6a8d9dd72d693b2971c9c4e95b59c5..f584a26cf652e72702ba599353e3d9d64422a826 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 CC = c99
 CPPFLAGS = -I.
 CCCMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
-RCOBJS = builtins.o except.o exec.o fn.o footobar.o glob.o glom.o hash.o heredoc.o input.o lex.o list.o main.o match.o nalloc.o open.o y.tab.o print.o redir.o signal.o status.o tree.o utils.o var.o wait.o walk.o which.o sigmsgs.o system.o
+RCOBJS = builtins.o except.o exec.o fn.o footobar.o glob.o glom.o hash.o heredoc.o input.o lex.o list.o main.o match.o nalloc.o open.o y.tab.o print.o redir.o signal.o status.o tree.o utils.o var.o wait.o walk.o which.o sigmsgs.o
 
 all: rc
 
diff --git a/print.c b/print.c
index 6ab045510ff0c7c9a53237e2002dc7b845d29ca7..f948f43bbbeeb1de8e3415304d3e24479d53f000 100644 (file)
--- a/print.c
+++ b/print.c
@@ -364,3 +364,12 @@ extern char *nprint(const char *fmt,...) {
        va_end(format.args);
        return result;
 }
+
+extern void writeall(int fd, char *buf, size_t remain) {
+       int i;
+
+       for (i = 0; remain > 0; buf += i, remain -= i)
+               if ((i = write(fd, buf, remain)) <= 0)
+                       break; /* abort silently on errors in write() */
+       sigchk();
+}
\ No newline at end of file
diff --git a/system.c b/system.c
deleted file mode 100644 (file)
index edc0e0f..0000000
--- a/system.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "rc.h"
-
-extern void writeall(int fd, char *buf, size_t remain) {
-       int i;
-
-       for (i = 0; remain > 0; buf += i, remain -= i)
-               if ((i = write(fd, buf, remain)) <= 0)
-                       break; /* abort silently on errors in write() */
-       sigchk();
-}