updated headers

This commit is contained in:
djonker 2023-10-26 18:58:33 +02:00
parent 2c4dbe102d
commit 8046561c71
28 changed files with 145 additions and 132 deletions

View File

@ -1,8 +0,0 @@
*.pdf
*.o
*.a
LICENSE
obj
tests/tmp
.git
.ccls-cache

View File

@ -1,12 +1,12 @@
# **************************************************************************** #
# #
# .--. _ #
# Makefile |o_o || | #
# Makefile :+: :+: #
# |:_/ || |_ _ ___ __ #
# By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / #
# (| | )|_| |_| |> < #
# Created: 2021/05/27 01:24:02 by djonker /'\_ _/`\__|\__,_/_/\_\ #
# Updated: 2023/02/20 20:37:06 by houtworm \___)=(___/ #
# Updated: 2023/10/26 18:00:26 by houtworm ######## odam.nl #
# #
# **************************************************************************** #
@ -33,7 +33,7 @@ fclean: clean
re: fclean all
$(OBJ): $(SRC)
$(OBJ): $(SRC) get_next_line.h Makefile
@mkdir -p $(dir $@)
@printf "\e[1;34mBuilding $@\n\e[0;00m"
@$(CC) $(CFLAGS) -c $(@:obj/%.o=src/%.c) -o $@

22
getnextline/Readme.md Normal file
View File

@ -0,0 +1,22 @@
# Project Name
Get Next Line is a very handy function that keeps feeding you the next line of a file descriptor
---
## Todo
#### Remove the struct for some extra speed
---
## Usage
1. Simply clone or download the repository
2. Run `make` in the cloned directory
3. You can include the get_next_line.a into your own programs
---
## Tester
#### Usage
1. Download test.sh and the tests folder to your GNL directory
2. Make the file executable `chmod +x test.sh`
3. Run `./test.sh` to start the test
---
[This project is part of the studies at 42](https://42.fr/en/homepage/)

View File

@ -1,19 +1,18 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* get_next_line.h |o_o || | */
/* get_next_line.h :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2020/12/19 06:09:11 by djonker #+# #+# */
/* Updated: 2021/05/27 03:41:54 by djonker \___)=(___/ */
/* Created: 2023/10/26 18:51:25 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:51:26 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */
#ifndef GET_NEXT_LINE_H
# define GET_NEXT_LINE_H
# include "get_next_line.h"
# include <unistd.h>
# include <stdlib.h>
# include <fcntl.h>

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* get_next_line.c |o_o || | */
/* get_next_line.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/03/15 22:51:05 by djonker #+# #+# */
/* Updated: 2023/02/20 20:32:05 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:52:17 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:52:18 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* get_next_line_utils.c :+: :+: :+: */
/* get_next_line_utils.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/04/05 07:45:24 by djonker #+# #+# */
/* Updated: 2023/02/07 00:54:10 by houtworm ### ########.fr */
/* Created: 2023/10/26 18:52:21 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:52:21 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -6,7 +6,7 @@
# By: houtworm <codam@houtworm.net> // \ \ __| | | \ \/ / #
# (| | )|_| |_| |> < #
# Created: 2023/02/20 12:46:46 by houtworm /'\_ _/`\__|\__,_/_/\_\ #
# Updated: 2023/03/06 09:04:17 by houtworm \___)=(___/ #
# Updated: 2023/03/11 08:07:29 by houtworm \___)=(___/ #
# #
# **************************************************************************** #
@ -25,7 +25,7 @@ then
else
printf "\n\e[1;31mInstall Valgrind for extra Memory Checking\e[0;00m\n"
fi
HEADLOC=$(find ./ -name '*line.h' | grep -v tests)
HEADLOC=$(find ./ -name '*line.h' | grep -v tests | grep -v ccls)
mkdir -p tests/tmp
cp $HEADLOC tests/tmp/get_next_line.h
if [ $1 == "old" ]
@ -163,7 +163,7 @@ relinkcheck()
# Test 1
printf "\e[1;36mTest 1 Checking all source with Norminette\e[0;00m\n"
norminette $(find ./ -name '*.[ch]' | grep -v ./tests/) > tests/tmp/norm
norminette $(find ./ -name '*.[ch]' | grep -v ./tests/ | grep -v ccls) > tests/tmp/norm
if [ $? -eq 1 ]
then
printf "\e[1;31mYour shit is not norm!\e[0;00m\n"

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* maina.c |o_o || | */
/* maina.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/02/21 00:36:49 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:52:45 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:52:45 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* mainb.c |o_o || | */
/* mainb.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/02/21 00:36:03 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:52:48 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:52:48 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* mainc.c |o_o || | */
/* mainc.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/02/21 00:35:58 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:52:50 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:52:51 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* maind.c |o_o || | */
/* maind.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/02/21 00:35:54 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:52:53 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:52:54 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* maine.c |o_o || | */
/* maine.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/02/23 15:00:31 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:52:56 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:52:56 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* mainf.c |o_o || | */
/* mainf.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/02/21 00:35:34 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:52:59 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:52:59 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* maing.c |o_o || | */
/* maing.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/03/01 01:41:42 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:53:02 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:53:02 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* maina.c |o_o || | */
/* maina.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/02/21 00:42:59 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:53:05 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:53:05 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* mainb.c |o_o || | */
/* mainb.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/02/21 00:43:10 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:53:08 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:53:08 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* mainc.c |o_o || | */
/* mainc.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/02/21 00:43:21 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:53:10 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:53:11 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* maind.c |o_o || | */
/* maind.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/03/01 01:24:29 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:53:14 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:53:14 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* maine.c |o_o || | */
/* maine.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/02/23 15:00:34 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:53:18 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:53:18 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* mainf.c |o_o || | */
/* mainf.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/02/21 00:44:00 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:53:21 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:53:22 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* maing.c |o_o || | */
/* maing.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2021/02/15 03:43:05 by djonker #+# #+# */
/* Updated: 2023/03/01 01:39:22 by houtworm \___)=(___/ */
/* Created: 2023/10/26 18:53:24 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:53:25 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

14
pipex.h
View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* .--. _ */
/* pipex.h |o_o || | */
/* |:_/ || |_ _ ___ __ */
/* By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / */
/* (| | )|_| |_| |> < */
/* Created: 2023/02/02 12:37:09 by djonker /'\_ _/`\__|\__,_/_/\_\ */
/* Updated: 2023/02/19 14:00:14 by djonker \___)=(___/ */
/* :::::::: */
/* pipex.h :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/10/26 18:58:10 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:58:10 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* .--. _ */
/* error.c |o_o || | */
/* |:_/ || |_ _ ___ __ */
/* By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / */
/* (| | )|_| |_| |> < */
/* Created: 2023/02/05 11:07:41 by djonker /'\_ _/`\__|\__,_/_/\_\ */
/* Updated: 2023/02/25 00:56:39 by houtworm \___)=(___/ */
/* :::::::: */
/* error.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/10/26 18:57:30 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:57:30 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* .--. _ */
/* init.c |o_o || | */
/* |:_/ || |_ _ ___ __ */
/* By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / */
/* (| | )|_| |_| |> < */
/* Created: 2023/02/02 13:04:43 by djonker /'\_ _/`\__|\__,_/_/\_\ */
/* Updated: 2023/02/19 18:20:54 by djonker \___)=(___/ */
/* :::::::: */
/* init.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/10/26 18:57:33 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:57:33 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* .--. _ */
/* pipex.c |o_o || | */
/* |:_/ || |_ _ ___ __ */
/* By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / */
/* (| | )|_| |_| |> < */
/* Created: 2023/02/02 12:37:01 by djonker /'\_ _/`\__|\__,_/_/\_\ */
/* Updated: 2023/02/25 02:42:42 by houtworm \___)=(___/ */
/* :::::::: */
/* pipex.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/10/26 18:57:36 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:57:40 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* .--. _ */
/* error.c |o_o || | */
/* |:_/ || |_ _ ___ __ */
/* By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / */
/* (| | )|_| |_| |> < */
/* Created: 2023/02/05 11:07:41 by djonker /'\_ _/`\__|\__,_/_/\_\ */
/* Updated: 2023/02/25 01:00:25 by houtworm \___)=(___/ */
/* :::::::: */
/* error.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/10/26 18:57:44 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:57:44 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* .--. _ */
/* init.c |o_o || | */
/* |:_/ || |_ _ ___ __ */
/* By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / */
/* (| | )|_| |_| |> < */
/* Created: 2023/02/02 13:04:43 by djonker /'\_ _/`\__|\__,_/_/\_\ */
/* Updated: 2023/02/17 16:12:06 by houtworm \___)=(___/ */
/* :::::::: */
/* init.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/10/26 18:57:47 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:57:47 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* .--. _ */
/* pipex.c |o_o || | */
/* |:_/ || |_ _ ___ __ */
/* By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / */
/* (| | )|_| |_| |> < */
/* Created: 2023/02/02 12:37:01 by djonker /'\_ _/`\__|\__,_/_/\_\ */
/* Updated: 2023/02/25 02:43:12 by houtworm \___)=(___/ */
/* :::::::: */
/* pipex.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/10/26 18:57:50 by houtworm #+# #+# */
/* Updated: 2023/10/26 18:57:50 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */