52 karma · joined July 19, 2023
1. `sfd` is now closed. This cost me an extra line of code tho so I had to improvise.
2. `j` was not initially -1 as even empty input contains one "\n" character. But it could go pass value of 0 underflowing the buffer when buffer contained only white space characters (like in case of single "\n"). This was corrected.
3. `h_addr_list[i]` about this one. I'm quite sure I took it from example in one of man pages. Anyway, I replaced it with `memcpy`.
I also tried to use valgrind. This is OFC my first step but I will continue my studies on detecting memory leaks in future projects.
> navigate through the history (when input starts with a digit)
Should be more like: navigate to link from currently displayed page (when input starts with a digit).
> It prints the response to `stdout` and also stores it in the temporary file.
Response is not printed to `stdout` at all. It is only stored in temporary file.
Also the possibility to use first program argument to overwrite the `less` command was ignored.
But overall very good job.
The most unreadable code would be the code that was intentionally obfuscated. Here I at least try to pretend that it is readable in some parts.
Thanks for kind words.
Not to make any excuses, just for the context. I'm a beginner in C programming and I wrote only few small programs. My tooling is basically non existent. I will try to improve tho.
Thanks for suggestion. I will go through code again to see if I can save more space with normal code.
Actually that was my workflow. Each time I managed to write something in simpler way I reverted few tricks.