aboutsummaryrefslogtreecommitdiff
path: root/core/head.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* treewide: readd copyrightsFerass El Hafidi2023-04-101-0/+4
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/*: Return errprint.Ferass El Hafidi2023-03-041-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/head: Properly handle standard inputFerass El Hafidi2023-03-041-12/+9
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/head: Fix a tiny typo (that introduced a bug) and a segmentation faultFerass El Hafidi2023-03-031-2/+2
| | | | | | | | | | | | | | | | | | | | Those bugs were basically introduced by typos... First bug --------- `head` was checking if argc was less than 2, which is incorrect because after getopt() is ran, argc would be equal to 1 if ran this way: $ head file As such, it would read standard input, then the file, which is a bug. Second bug ---------- The file got closed after the first line was read. When trying to read the (now closed) file it returns a segmentation fault. Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* all: use SPDX identifiers and add a new MAINTAINERS file.Ferass El Hafidi2023-02-161-29/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/common.*: Move them somewhere else so they can be used by non-POSIX utilsFerass El Hafidi2023-01-111-3/+3
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* core/: Properly use getopt()Ferass El Hafidi2023-01-111-2/+2
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* Makefiles: Remove useless `echo`es and don't compile in a subdirectoryFerass El Hafidi2023-01-071-1/+1
| | | | Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
* *: Update Copyright dateFerass 'Vitali64' EL HAFIDI2023-01-051-1/+1
| | | | Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* (happy new year!) sh: Fix compiler errors && core/: Move print_usage to ↵Ferass 'Vitali64' EL HAFIDI2023-01-051-19/+16
| | | | | | common.h and add errprint() Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* core/, Makefile, box: Get rid of version.h and use -DVERSION in CFLAGS instead.Ferass 'Vitali64' EL HAFIDI2022-12-251-6/+1
| | | | Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* Makefile: Add more utilities in CORE && core/: Use one single function for ↵Ferass 'Vitali64' EL HAFIDI2022-12-041-10/+5
| | | | | | printing usage. Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* Relicense fases core under the 3BSD && Convert all manpages to scdoc && Link ↵Ferass 'Vitali64' EL HAFIDI2022-11-101-12/+23
| | | | | | to the new mailing list Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* core/all: Add compile time on the help textFerass 'Vitali64' EL HAFIDI2022-08-141-2/+8
| | | | Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* core/*: Put the main function at the top and other functions at the bottomFerass 'Vitali64' EL HAFIDI2022-07-221-9/+10
| | | | Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* core/*: reformat help textFerass 'Vitali64' EL HAFIDI2022-07-191-3/+3
| | | | Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* core/: rewrite headFerass 'Vitali64' EL HAFIDI2022-07-151-33/+42
| | | | Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>
* organise repoFerass 'Vitali64' EL HAFIDI2022-06-301-0/+65
Signed-off-by: Ferass 'Vitali64' EL HAFIDI <vitali64pmemail@protonmail.com>