Commit Graph

175 Commits

Author SHA1 Message Date
qorg11 7a60fca519
fix style using clang-format
Closes: #2
2021-06-29 13:19:44 +02:00
qorg11 27a02780f6
whoops 2021-03-15 13:00:53 +01:00
qorg11 0d526968a5
wc shows the total of every file if you pass more than one file 2021-03-15 12:52:40 +01:00
qorg11 6f6e702fbe
Don't take file as stdin if you passed a flag after optind
In good c libraries, the argv[] array is not resorted with the flags
at the beginning, then normal argvs, for example in glibc if you run

./wc file -l -c, argv will be ./wc -l -c file
2021-01-19 13:51:03 +01:00
qorg11 84715bc3d4
fix cat to return error if the read fails 2021-01-14 07:43:51 +01:00
qorg11 470c684c82
Make wc read binary data by using fread() instead of fgetc() 2021-01-02 14:15:42 +01:00
qorg11 554b0b06e4
fix braces styles in wc.c 2021-01-01 23:57:55 +01:00
qorg11 b77c0aff24
* Cleaned code in the recursive thing
* Print errors if any
* Fixed a code copypaste?
2020-12-29 05:13:21 +01:00
qorg11 d266c91f54
* Add recursive directory listing to ls.c
* Now you can actually give it a directory
  This is very ugly code, and it has to be fixed.
2020-12-29 00:23:48 +01:00
qorg11 1edc320acd
fix indentation in date 2020-12-26 04:06:34 +01:00
qorg11 d716f2936b
Add todo to wc 2020-12-26 03:57:32 +01:00
qorg11 a74d57d57f
* Fix segfault in wc.c when fopen() fails 2020-12-26 03:43:17 +01:00
qorg11 e5a8ccd9af
Delete useless blank line 2020-12-25 19:39:41 +01:00
qorg11 6922539f10
Added stat.c
I was really drunk at the moment of writing this, so code can be
*very* better i guess, i'll improve it some other day
have a nice dinner tho
2020-12-24 23:23:36 +01:00
qorg11 97e5f8eeef
Added a bunch of things (mostly indetation), and changelog 2020-12-19 00:38:01 +01:00
qorg11 96d5493476
Fixed stuff in rmdir 2020-12-18 15:05:58 +01:00
qorg11 74047ab07f
proto -l in ls
ls requires *serious* revision since its code is fucking
horrible. i'll see what i do about it (please help)
2020-12-11 18:46:17 +01:00
qorg11 8a477a0cb7
trying EBIN indentation style :-------DDDDDDDDDDDD 2020-12-05 15:41:36 +01:00
qorg11 fbff968b27
wait i'm fucking stupid, lmao, well musl, good luck searching for a file called -<CHAR>, but if it makes you happy, go for it my dude 2020-12-05 15:34:18 +01:00
qorg11 e4192c6155
don't take - as stdin if it is a flag (solves musl getopt() bullshit)
gnu, please add to your FUCKING MANPAGE THAT RESORTING argv IS A
FUCKING EXTENSION OF YOUR SHIT, GODDAMN

jk, love you GNU, but please, i don't use man 3p that often

t. spurdo
2020-12-05 15:26:36 +01:00
qorg11 dc61ade113
sorry, my emacs indentation was retarded 2020-11-30 11:38:31 +01:00
qorg11 342a8857ec
less long line 2020-11-30 11:34:52 +01:00
qorg11 dd949baf1c
Tabs instead of spaces in indentation lol 2020-11-30 11:33:42 +01:00
qorg11 34a3f381ad
added contributing guideliness 2020-11-28 22:33:26 +01:00
qorg11 609309e146
im an idiot 2020-11-28 22:31:01 +01:00
qorg11 36f49ec406
cat: ignore -u and - can be used for stdin 2020-11-28 22:29:41 +01:00
qorg11 8627b3bf15
shit to cat.c read the diff lmao 2020-11-28 22:07:59 +01:00
qorg11 997b2ed44c
https://lainsafe.delegao.moe/files/160545969573108.png 2020-11-15 18:01:54 +01:00
qorg11 cc03664bf1
Cleanup code 2020-11-15 17:52:02 +01:00
qorg11 c322cdd470
%c is better since gnu date gives that by default so take it 2020-11-15 15:35:32 +01:00
qorg11 b0ca1234fd
Added a probably non posix compliant date(1) but it works :DDD 2020-11-15 15:30:59 +01:00
qorg11 8dc1039990
Added the -p flag to ls 2020-11-08 21:52:31 +01:00
qorg11 a43985bfdf
Holy cow, I added comments but I made another commit to k9core! 2020-10-08 11:07:40 +02:00
qorg11 1d78c2ccff
It seems that, somehow, i typed 1 instead of 0 2020-09-09 19:49:02 +02:00
qorg11 8f16928a59
POSIX, I don't really get you sometimes... 2020-09-09 19:47:01 +02:00
qorg11 f4871118a4
Added tee!
It supports all the POSIX flags! (-i and -a)
2020-09-09 19:39:56 +02:00
qorg11 8eed6cca17
added -h flag to chgrp 2020-09-07 21:29:14 +02:00
qorg11 b244eb3037
added chgrp 2020-09-07 17:59:18 +02:00
qorg11 ea00641408
wc prints the filename 2020-08-29 00:20:17 +02:00
qorg11 21718a0a61
Modified the style 2020-08-27 11:18:42 +02:00
qorg11 571b6c73e0
Is this ok, POSIX? 2020-08-24 02:31:35 +02:00
qorg11 98f9bd9e15
Remove useless headers 2020-08-23 19:23:58 +02:00
qorg11 016c4f6a39
Whatever this does lmao 2020-08-23 18:48:44 +02:00
qorg11 20eb8d53d4
cleaned up chmod.c 2020-08-23 12:10:00 +02:00
qorg11 0a5169b490
generic case for uname 2020-08-23 11:02:04 +02:00
qorg11 8cde471f41
what the hell is -m flag posix is literally the same as -c 2020-08-23 11:01:36 +02:00
qorg11 9713636417
Finally fixed wc :D 2020-08-23 10:58:30 +02:00
qorg11 4d96265f95
Improved uname.c 2020-08-22 11:53:59 +02:00
qorg11 d8c6dd6fe8
Modified the readme because this also has util-linux packes 2020-08-22 09:56:17 +02:00
qorg11 7f38565e50
git you're a bit dumb 2020-08-22 09:51:02 +02:00