commit 21718a0a616767b51b2a1e039b877ed706d466ef
parent 571b6c73e02c889cdae599724ee73a082f2d384d
Author: qorg11 <qorg@vxempire.xyz>
Date: Thu, 27 Aug 2020 11:18:42 +0200
Modified the style
Diffstat:
3 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/STYLE.org b/STYLE.org
@@ -55,19 +55,25 @@
loop are OK.
#+BEGIN_SRC C
- int fd;
- if((fd = open("file", O_CREAT)) == -1) /* Don't do this */
- {
- /* Whatever */
- }
+ int fd;
+ if((fd = open("file", O_CREAT)) == -1) /* Don't do this */
+ {
+ /* Whatever */
+ }
- /* Do this instead */
+ /* Do this instead */
+
+ int fd = open("file", O_CREAT);
+ if(fd == -1)
+ {
+ /* Whatever */
+ }
+ /* Or this */
+ if(open("file",O_CREAT) == -1)
+ {
+ /* Whatever */
+
- int fd = open("file", O_CREAT);
- if(fd == -1)
- {
- /* Whatever */
- }
#+END_SRC
** Do not include .c files
diff --git a/src/Makefile b/src/Makefile
@@ -3,7 +3,7 @@
CC = cc
compile:
- $(CC) -c *.c
+ $(CC) -c *.c nouserland/*.c
$(CC) -o bin/cat cat.o
$(CC) -o bin/chmod chmod.o
$(CC) -o bin/chown chown.o
@@ -22,7 +22,7 @@ compile:
$(CC) -o bin/longname logname.o
$(CC) -o bin/ls ls.o
$(CC) -o bin/mkdir mkdir.o
- $(CC) -o bin/mount mount.o
+ $(CC) -o bin/mount nouserland/mount.o
$(CC) -o bin/mv mv.o
$(CC) -o bin/nproc nproc.o
$(CC) -o bin/pwd pwd.o
@@ -34,12 +34,12 @@ compile:
$(CC) -o bin/touch touch.o
$(CC) -o bin/true true.o
$(CC) -o bin/tty tty.o
- $(CC) -o bin/umount umount.o
+ $(CC) -o bin/umount nouserland/umount.o
$(CC) -o bin/unlink unlink.o
$(CC) -o bin/wc wc.o
$(CC) -o bin/whoami whoami.o
$(CC) -o bin/yes yes.o
-
+ $(CC) -o bin/uname uname.o
clean:
rm *.o
diff --git a/src/bin/useless_but_usefull_file b/src/bin/useless_but_usefull_file