diff options
| -rw-r--r-- | Makefile | 9 | ||||
| -rwxr-xr-x | a.out | bin | 0 -> 16672 bytes | |||
| -rwxr-xr-x | fileutil | bin | 0 -> 16672 bytes | |||
| -rw-r--r-- | fileutil.c | 17 | ||||
| -rw-r--r-- | fileutil.h | 2 | ||||
| -rw-r--r-- | fileutil.o | bin | 0 -> 1848 bytes |
6 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4ebec02 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +OBJS = fileutil.o +CC = gcc +CFLAGS = -Wall -c + +all: $(OBJS) + $(CC) $(OBJS) -o fileutil + +fileutil.o: fileutil.c fileutil.h + $(CC) $(CFLAGS) fileutil.c Binary files differdiff --git a/fileutil b/fileutil Binary files differnew file mode 100755 index 0000000..5186573 --- /dev/null +++ b/fileutil @@ -0,0 +1,17 @@ +#include <unistd.h> +#include "fileutil.h" + + +void to_stdout(char *string, ssize_t size) { + write(0, string, size); +} + +void to_stderr(char *string, ssize_t size) { + write(1, string, size); +} + +int main(int argc, char const *argv[]) { + /* code */ + to_stdout("Testing\n", 9); + return 0; +} @@ -0,0 +1,2 @@ +void to_stdout(char *string, ssize_t size); +int main(int argc, char const *argv[]);
\ No newline at end of file diff --git a/fileutil.o b/fileutil.o Binary files differnew file mode 100644 index 0000000..df6344a --- /dev/null +++ b/fileutil.o |
