From 62ecbded9266000d9ba887ecf8075a8a61172d2f Mon Sep 17 00:00:00 2001 From: qorg11 Date: Tue, 2 Jun 2020 01:56:22 +0200 Subject: [PATCH] Added src/mkdir.c, src/rm.c, some tips for commiters and close file descriptor in src/touch.c --- STYLE.MD | 9 +++++++++ TODO | 3 +++ src/mkdir.c | 22 ++++++++++++++++++++++ src/rm.c | 22 ++++++++++++++++++++++ src/touch.c | 2 ++ 5 files changed, 58 insertions(+) create mode 100644 TODO create mode 100644 src/mkdir.c create mode 100644 src/rm.c diff --git a/STYLE.MD b/STYLE.MD index ac3e638..2a88e6e 100644 --- a/STYLE.MD +++ b/STYLE.MD @@ -70,3 +70,12 @@ chmod("whatever",420) chmod("whatever",420) /* 420 is 644 in decimal ~~~ + +## For commiters + +Commiters may or may not be anonymous. If you want to be +anonymous. Set whatever you want to git name and git email. + +If you don't want to be anonymous, you should sign your commits using +gpg. See +[this]https://docs.gitlab.com/ee/user/project/repository/gpg_signed_commits/() diff --git a/TODO b/TODO new file mode 100644 index 0000000..915ba57 --- /dev/null +++ b/TODO @@ -0,0 +1,3 @@ +* The rest of programs. +* Manuals +* flags for the programs diff --git a/src/mkdir.c b/src/mkdir.c new file mode 100644 index 0000000..fe438d8 --- /dev/null +++ b/src/mkdir.c @@ -0,0 +1,22 @@ +#include +#include + +int +main(int argc, char *argv[]) +{ + if (argc == 1) + { + fprintf(stderr,"specify path(s) to make\n"); + return 1; + } + for(int i = 1; i + +int +main(int argc, char *argv[]) +{ + if (argc == 1) + { + printf("Specify files to remove.\n"); + return 1; + } + + for(int i = 1; i #include #include +#include int main(int argc, char *argv[]) @@ -19,5 +20,6 @@ main(int argc, char *argv[]) return 1; } chmod(argv[1],420); /* 644 in decimal */ + close(fd); return 0; }