updated headers

This commit is contained in:
djonker 2023-10-26 19:09:02 +02:00
parent d0783882b6
commit ef35b3c036
1415 changed files with 9507 additions and 8005 deletions

View File

@ -1,12 +1,12 @@
# **************************************************************************** #
# #
# :::::::: #
# Makefile |o_o || | #
# Makefile :+: :+: #
# +:+ #
# By: djonker <marvin@codam.nl> +#+ #
# +#+ #
# Created: 2020/12/19 06:09:46 by djonker #+# #+# #
# Updated: 2023/03/07 05:39:51 by houtworm \___)=(___/ #
# Updated: 2023/10/26 19:00:58 by houtworm ######## odam.nl #
# #
# **************************************************************************** #
@ -56,12 +56,12 @@ $(OBJ): $(SRC)
@printf "\e[1;34mBuilding $@\n\e[0;00m"
@$(CC) $(CFLAGS) -c $(@:obj/%.o=src/%.c) -o $@
$(PSOBJ): $(PSSRC)
$(PSOBJ): $(PSSRC) push_swap.h Makefile
@mkdir -p $(dir $@)
@printf "\e[1;34mBuilding $@\n\e[0;00m"
@$(CC) $(CFLAGS) -c $(@:obj/%.o=src/%.c) -o $@
$(CHOBJ): $(CHSRC)
$(CHOBJ): $(CHSRC) push_swap.h Makefile
@mkdir -p $(dir $@)
@printf "\e[1;34mBuilding $@\n\e[0;00m"
@$(CC) $(CFLAGS) -c $(@:obj/%.o=src/%.c) -o $@

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 */
/* */
/* ************************************************************************** */

8
libft/.gitignore vendored
View File

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

View File

@ -1,18 +1,18 @@
# **************************************************************************** #
# #
# :::::::: #
# Makefile |o_o || | #
# Makefile :+: :+: #
# +:+ #
# By: djonker <marvin@codam.nl> +#+ #
# +#+ #
# Created: 2020/10/27 15:02:02 by djonker #+# #+# #
# Updated: 2023/02/23 15:40:38 by houtworm \___)=(___/ #
# Updated: 2023/10/26 18:29:23 by houtworm ######## odam.nl #
# #
# **************************************************************************** #
NAME =libft.a
CC =gcc
FC =-Wall -Werror -Wextra -fsanitize=address
FC =-Wall -Werror -Wextra# -g -fsanitize=address
FAR =ar -rs
RM =rm -f
SRC =src/ft_atoi.c \
@ -138,7 +138,24 @@ SRC =src/ft_atoi.c \
src/ft_islneg.c \
src/ft_ldeclen.c \
src/ft_isallbyte.c \
src/ft_getpwd.c
src/ft_getuser.c \
src/ft_gethome.c \
src/ft_getpwd.c \
src/ft_vastrjoin.c \
src/ft_vafree.c \
src/ft_intrchr.c \
src/ft_system.c \
src/ft_getpaths.c \
src/ft_getenvval.c \
src/ft_seminit.c \
src/ft_semwait.c \
src/ft_semfree.c \
src/ft_gettimemsdate.c \
src/ft_mkdir.c \
src/ft_rmdir.c \
src/ft_abspathcmd.c \
src/ft_cppbzero.c \
src/ft_cpptostr.c
BSRC =src/ft_lstadd_back.c \
src/ft_lstadd_front.c \
src/ft_lstclear.c \

View File

@ -1,10 +1,33 @@
# Functions
## striteri
void ft_striteri(char *s, void (*f)(unsigned int, char*));
# Libft
Libft is a self written implementation of some of the standard c function.\
It also includes a lot of undocumented functions not in the standard c library.\
Nonetheless the functions have been named somewhat properly and the code should be easy to read.
# Tester
## general
check for -Wall -Werror -Wextra
Think of more edge cases for all functions
## add tests extra
check if function exists in .h and run the tests for that fucntion
---
## Todo
#### Write ft_striteri
`void ft_striteri(char *s, void (*f)(unsigned int, char*));`
---
## Usage
1. Simply clone or download the repository
2. Run `make` in the cloned directory
3. You can include the created libft.a in your own programs
---
## Tester
#### Todo
- Add striteri test
- check for -Wall -Werror -Wextra
- Think of more edge cases for all functions
- Extra functions, check if function exists in .h and run the tests for that fucntion
- putchar 4 should print 0
#### Usage
1. Download test.sh and the tests folder into your own project 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,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* libft.h |o_o || | */
/* libft.h :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/11 16:02:53 by djonker #+# #+# */
/* Updated: 2023/03/05 20:30:31 by houtworm \___)=(___/ */
/* Updated: 2023/10/25 07:05:24 by djonker ######## odam.nl */
/* */
/* ************************************************************************** */
@ -16,6 +16,9 @@
# include <unistd.h>
# include <stdlib.h>
# include <stdarg.h>
# include <fcntl.h>
# include <sys/stat.h>
# include <sys/wait.h>
typedef struct s_list
{
@ -160,5 +163,24 @@ int ft_islneg(long long n);
char *ft_dtoa(long double n);
int ft_isallbyte(char *str, char byte);
char *ft_getpwd(char **envp, int slash);
char *ft_getuser(char **envp);
char *ft_gethome(char **envp);
char *ft_getos(void);
char *ft_gethost(void);
char *ft_vastrjoin(int n, ...);
void ft_vafree(int n, ...);
int ft_intrchr(const char *s, int c);
char *ft_system(char *command, char **envp, char *file);
char **ft_getpaths(char **envp, int i);
char *ft_getenvval(char **envp, char *var);
char *ft_abspathcmd(char **paths, char *command);
void ft_cppbzero(char **cpp);
char *ft_cpptostr(char **cpp);
int ft_seminit(char *file, int number);
int ft_semwait(char *file);
int ft_semfree(char *file);
long long ft_gettimemsdate(char **envp, char *file);
int ft_mkdir(char *dirname, char **envp);
int ft_rmdir(char *dirname, char **envp);
#endif

34
libft/src/ft_abspathcmd.c Normal file
View File

@ -0,0 +1,34 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_abspathcmd.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/03/20 16:39:22 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:55:36 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */
#include "../libft.h"
char *ft_abspathcmd(char **paths, char *cmd)
{
char *absolute;
int i;
i = 0;
if (!paths)
return (cmd);
if (cmd && ft_chrstr('/', cmd))
absolute = ft_strdup(cmd);
else
absolute = ft_strjoin(paths[i], cmd);
while (access(absolute, F_OK) && paths[i] && !ft_chrstr('/', cmd))
{
free(absolute);
i++;
absolute = ft_strjoin(paths[i], cmd);
}
return (absolute);
}

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_around.c :+: :+: :+: */
/* ft_around.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 07:26:00 by djonker #+# #+# */
/* Updated: 2023/02/07 00:42:07 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:55:37 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_arrlen.c :+: :+: :+: */
/* ft_arrlen.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/06 17:38:27 by djonker #+# #+# */
/* Updated: 2023/02/07 00:42:08 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:55:38 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_atodec.c :+: :+: :+: */
/* ft_atodec.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 05:48:34 by djonker #+# #+# */
/* Updated: 2023/02/07 00:42:08 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:55:41 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_atof.c :+: :+: :+: */
/* ft_atof.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 05:48:34 by djonker #+# #+# */
/* Updated: 2023/02/07 00:42:08 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:55:42 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_atoi.c :+: :+: :+: */
/* ft_atoi.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/01 19:08:11 by djonker #+# #+# */
/* Updated: 2023/02/07 00:42:09 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:55:42 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_atol.c :+: :+: :+: */
/* ft_atol.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/01 19:08:11 by djonker #+# #+# */
/* Updated: 2023/02/07 00:36:46 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:55:43 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_atou.c |o_o || | */
/* ft_atou.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/01 19:08:11 by djonker #+# #+# */
/* Updated: 2023/03/05 21:13:18 by houtworm \___)=(___/ */
/* Updated: 2023/10/18 16:55:43 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_bitswap.c :+: :+: :+: */
/* ft_bitswap.c :+: :+: */
/* +:+ */
/* By: djonker <djonker@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2021/05/17 06:29:44 by djonker #+# #+# */
/* Updated: 2023/02/07 00:38:18 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:55:44 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_btoi.c :+: :+: :+: */
/* ft_btoi.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/18 13:44:56 by djonker #+# #+# */
/* Updated: 2023/02/07 00:36:46 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:55:44 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_bzero.c |o_o || | */
/* ft_bzero.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/01 08:35:25 by djonker #+# #+# */
/* Updated: 2023/02/22 02:01:25 by djonker \___)=(___/ */
/* Updated: 2023/10/18 16:55:45 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_calloc.c |o_o || | */
/* ft_calloc.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/01 21:20:32 by djonker #+# #+# */
/* Updated: 2023/02/25 16:18:01 by houtworm \___)=(___/ */
/* Updated: 2023/10/25 05:52:55 by djonker ######## odam.nl */
/* */
/* ************************************************************************** */
@ -25,7 +25,7 @@ void *ft_calloc(size_t count, size_t size)
}
p = malloc(count * size);
if (p == NULL)
return (0x0);
exit(1);
if (p)
{
t = p;

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_chrstr.c :+: :+: :+: */
/* ft_chrstr.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/15 02:30:48 by djonker #+# #+# */
/* Updated: 2023/02/07 00:36:47 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:55:46 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_cntarg.c |o_o || | */
/* +:+ +:+ +:+ */
/* By: houtworm <codam@houtworm.net> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/07 00:38:26 by houtworm #+# #+# */
/* Updated: 2023/02/21 01:43:17 by houtworm \___)=(___/ */
/* :::::::: */
/* ft_cntarg.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/02/07 00:38:26 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:56:12 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* .--. _ */
/* ft_cntchr.c :+: :+: :+: */
/* |:_/ || |_ _ ___ __ */
/* By: djonker <djonker@student.codam.nl> // \ \ __| | | \ \/ / */
/* (| | )|_| |_| |> < */
/* Created: 2021/06/11 17:23:36 by djonker /'\_ _/`\__|\__,_/_/\_\ */
/* Updated: 2023/02/07 00:38:41 by houtworm ### ########.fr */
/* :::::::: */
/* ft_cntchr.c :+: :+: */
/* +:+ */
/* By: djonker <djonker@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2021/06/11 17:23:36 by djonker #+# #+# */
/* Updated: 2023/10/18 16:56:12 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_cntwrd.c :+: :+: :+: */
/* ft_cntwrd.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/21 20:37:04 by djonker #+# #+# */
/* Updated: 2023/02/07 00:38:43 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:13 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_cntwrds.c :+: :+: :+: */
/* ft_cntwrds.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/21 20:37:04 by djonker #+# #+# */
/* Updated: 2023/02/07 00:38:44 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:13 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

25
libft/src/ft_cppbzero.c Normal file
View File

@ -0,0 +1,25 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_cppbzero.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/09/18 12:17:56 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:56:14 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */
#include "../libft.h"
void ft_cppbzero(char **cpp)
{
int i;
i = 0;
while (cpp[i])
{
ft_bzero(cpp[i], ft_strlen(cpp[i]));
i++;
}
}

36
libft/src/ft_cpptostr.c Normal file
View File

@ -0,0 +1,36 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_cpptostr.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/09/18 12:17:01 by houtworm #+# #+# */
/* Updated: 2023/10/19 00:19:29 by djonker ######## odam.nl */
/* */
/* ************************************************************************** */
#include "../libft.h"
char *ft_cpptostr(char **cpp)
{
int i;
char *ret;
char *temp;
char *temp2;
i = 1;
if (cpp[0])
temp2 = ft_strdup(cpp[0]);
while (cpp[i])
{
temp = ft_strjoin(temp2, cpp[i]);
free(temp2);
temp2 = ft_strdup(temp);
free(temp);
i++;
}
ret = ft_strdup(temp2);
free(temp2);
return (ret);
}

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_ddtoi.c :+: :+: :+: */
/* ft_ddtoi.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/31 01:24:28 by djonker #+# #+# */
/* Updated: 2023/02/07 00:38:44 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:15 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_declen.c :+: :+: :+: */
/* ft_declen.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 04:29:09 by djonker #+# #+# */
/* Updated: 2023/02/07 00:38:45 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:15 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_dtoa.c :+: :+: :+: */
/* ft_dtoa.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 03:46:17 by djonker #+# #+# */
/* Updated: 2023/02/07 00:38:46 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:16 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_dtoh.c :+: :+: :+: */
/* ft_dtoh.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/31 02:22:34 by djonker #+# #+# */
/* Updated: 2023/02/07 00:38:47 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:16 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_factor.c :+: :+: :+: */
/* ft_factor.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/01 04:03:20 by djonker #+# #+# */
/* Updated: 2023/02/07 00:38:48 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:25 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_fczero.c :+: :+: :+: */
/* ft_fczero.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 04:29:09 by djonker #+# #+# */
/* Updated: 2023/02/07 00:38:49 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:25 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_flolen.c :+: :+: :+: */
/* ft_flolen.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 04:00:01 by djonker #+# #+# */
/* Updated: 2023/02/07 00:38:50 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:26 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_fnprim.c :+: :+: :+: */
/* ft_fnprim.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/01 04:42:24 by djonker #+# #+# */
/* Updated: 2023/02/07 00:38:50 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:26 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_frearr.c :+: :+: :+: */
/* ft_frearr.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/12/11 21:54:13 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:42 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:27 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_frenarr.c :+: :+: :+: */
/* ft_frenarr.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/12/11 21:54:13 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:47 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:27 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_fround.c :+: :+: :+: */
/* ft_fround.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 07:42:16 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:49 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:28 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_ftoa.c :+: :+: :+: */
/* ft_ftoa.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 03:46:17 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:49 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:28 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_ftoi.c :+: :+: :+: */
/* ft_ftoi.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 21:30:30 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:50 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:56:29 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

34
libft/src/ft_getenvval.c Normal file
View File

@ -0,0 +1,34 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_getenvval.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/02/17 02:40:22 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:56:29 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */
#include "../libft.h"
char *ft_getenvval(char **envp, char *var)
{
char *value;
int i;
char *temp;
temp = ft_strjoin(var, "=");
i = -1;
while (envp[++i])
if (ft_strncmp(envp[i], temp, ft_strlen(temp)) == 0)
break ;
if (!envp[i])
{
free(temp);
return (NULL);
}
value = ft_substr(envp[i], ft_strlen(temp), ft_strlen(envp[i]));
free(temp);
return (value);
}

28
libft/src/ft_gethome.c Normal file
View File

@ -0,0 +1,28 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_gethome.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/02/17 02:40:22 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:56:39 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */
#include "../libft.h"
char *ft_gethome(char **envp)
{
char *home;
int i;
i = -1;
while (envp[++i])
if (ft_strncmp(envp[i], "HOME=", 5) == 0)
break ;
if (!envp[i])
return (NULL);
home = ft_substr(envp[i], 5, ft_strlen(envp[i]));
return (home);
}

27
libft/src/ft_gethost.c Normal file
View File

@ -0,0 +1,27 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_gethost.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/10/09 07:45:51 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:59:03 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */
#include "../../minishell.h"
char *ft_gethost(void)
{
int fd;
char *line;
char *host;
fd = open("/etc/hostname", O_RDONLY);
get_next_line(fd, &line);
host = ft_strdup(line);
free(line);
close(fd);
return (host);
}

60
libft/src/ft_getos.c Normal file
View File

@ -0,0 +1,60 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_getos.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/10/09 07:45:51 by houtworm #+# #+# */
/* Updated: 2023/10/19 00:22:24 by djonker ######## odam.nl */
/* */
/* ************************************************************************** */
#include "../../minishell.h"
char *ft_getosfromline(char *line)
{
int ret;
char *os;
int i;
ret = 0;
i = 0;
while (line[i] != '\"')
i++;
i++;
os = ft_calloc(ft_strlen(line), 8);
while (line[i] != ' ' && line[i] != '\"')
{
os[ret] = line[i];
ret++;
i++;
}
os[ret] = '\0';
return (os);
}
char *ft_getos(void)
{
int fd;
char *line;
int ret;
char *os;
fd = open("/etc/os-release", O_RDONLY);
ret = 1;
while (ret > 0)
{
ret = get_next_line(fd, &line);
if (!ft_strncmp(line, "PRETTY_NAME:", 7))
{
os = ft_getosfromline(line);
free(line);
close(fd);
return (os);
}
free (line);
}
close(fd);
return (NULL);
}

42
libft/src/ft_getpaths.c Normal file
View File

@ -0,0 +1,42 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_getpaths.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/03/20 16:39:22 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:59:06 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */
#include "../libft.h"
char **ft_getpaths(char **envp, int i)
{
char **paths;
char **temp;
char *firsttemp;
i = -1;
while (envp[++i])
if (ft_strncmp(envp[i], "PATH=", 5) == 0)
break ;
if (!envp[i])
return (0);
else
temp = ft_split(envp[i], ':');
if (!temp)
return (0);
paths = ft_calloc(sizeof(char *) * (ft_arrlen(temp) + 1), 1);
firsttemp = ft_substr(temp[0], 5, ft_strlen(temp[0]));
if (!paths || !firsttemp)
return (0);
paths[0] = ft_strjoin(firsttemp, "/");
free(firsttemp);
i = 0;
while (temp[++i])
paths[i] = ft_strjoin(temp[i], "/");
ft_frearr(temp);
return (paths);
}

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* .--. _ */
/* ft_getpwd.c |o_o || | */
/* |:_/ || |_ _ ___ __ */
/* By: houtworm <codam@houtworm.net> // \ \ __| | | \ \/ / */
/* (| | )|_| |_| |> < */
/* Created: 2023/02/17 02:40:22 by houtworm /'\_ _/`\__|\__,_/_/\_\ */
/* Updated: 2023/02/17 02:55:28 by houtworm \___)=(___/ */
/* :::::::: */
/* ft_getpwd.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/02/17 02:40:22 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:59:07 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -0,0 +1,24 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_gettimemsdate.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/10/17 20:10:03 by houtworm #+# #+# */
/* Updated: 2023/10/19 00:04:18 by djonker ######## odam.nl */
/* */
/* ************************************************************************** */
#include "../libft.h"
long long ft_gettimemsdate(char **envp, char *file)
{
char *date;
long long currenttime;
date = ft_system("date +%s%3N", envp, file);
currenttime = ft_atol(date);
free(date);
return (currenttime);
}

28
libft/src/ft_getuser.c Normal file
View File

@ -0,0 +1,28 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_getuser.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/02/17 02:40:22 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:59:09 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */
#include "../libft.h"
char *ft_getuser(char **envp)
{
char *user;
int i;
i = -1;
while (envp[++i])
if (ft_strncmp(envp[i], "USER=", 5) == 0)
break ;
if (!envp[i])
return (NULL);
user = ft_substr(envp[i], 5, ft_strlen(envp[i]));
return (user);
}

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_htod.c :+: :+: :+: */
/* ft_htod.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/31 03:18:45 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:51 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:10 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_htoi.c :+: :+: :+: */
/* ft_htoi.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/31 01:24:28 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:52 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:11 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_iftof.c :+: :+: :+: */
/* ft_iftof.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 22:27:51 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:52 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:12 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_intlen.c :+: :+: :+: */
/* ft_intlen.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/13 02:04:46 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:54 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:14 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

28
libft/src/ft_intrchr.c Normal file
View File

@ -0,0 +1,28 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_intrchr.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/11 16:14:50 by djonker #+# #+# */
/* Updated: 2023/10/18 16:59:15 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */
#include "../libft.h"
int ft_intrchr(const char *s, int c)
{
int i;
if (!s)
return (-1);
i = 0;
while (s[i] != '\0')
i++;
i--;
while (i >= 0 && s[i] != c)
i--;
return (i);
}

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* .--. _ */
/* ft_isallbyte.c |o_o || | */
/* |:_/ || |_ _ ___ __ */
/* By: houtworm <codam@houtworm.net> // \ \ __| | | \ \/ / */
/* (| | )|_| |_| |> < */
/* Created: 2023/02/21 01:43:42 by houtworm /'\_ _/`\__|\__,_/_/\_\ */
/* Updated: 2023/02/21 01:43:44 by houtworm \___)=(___/ */
/* :::::::: */
/* ft_isallbyte.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2023/02/21 01:43:42 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:59:16 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */
@ -14,6 +14,8 @@
int ft_isallbyte(char *str, char byte)
{
if (!str)
return (1);
while (*str == byte)
str++;
if (!*str)

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isalnum.c :+: :+: :+: */
/* ft_isalnum.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/11 15:56:37 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:54 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:16 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isalpha.c :+: :+: :+: */
/* ft_isalpha.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/01 19:10:41 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:55 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:17 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isascii.c :+: :+: :+: */
/* ft_isascii.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/01 19:10:41 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:56 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:18 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isdigit.c :+: :+: :+: */
/* ft_isdigit.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/01 19:10:41 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:56 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:19 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_islneg.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: houtworm <codam@houtworm.net> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/25 11:39:27 by houtworm #+# #+# */
/* Updated: 2023/02/07 00:39:57 by houtworm ### ########.fr */
/* :::::::: */
/* ft_islneg.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2022/12/25 11:39:27 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:59:20 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_islowc.c :+: :+: :+: */
/* ft_islowc.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/04/13 17:57:31 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:58 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:21 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isneg.c :+: :+: :+: */
/* ft_isneg.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 03:38:29 by djonker #+# #+# */
/* Updated: 2023/02/07 00:39:59 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:21 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isodigit.c :+: :+: :+: */
/* ft_isodigit.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/06 17:19:46 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:00 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:22 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isprim.c :+: :+: :+: */
/* ft_isprim.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/01 04:32:30 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:00 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:23 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isprint.c :+: :+: :+: */
/* ft_isprint.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/01 19:10:41 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:01 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:24 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isuppc.c :+: :+: :+: */
/* ft_isuppc.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* +#+ */
/* Created: 2021/04/13 17:57:31 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:02 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:25 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_isxdigit.c :+: :+: :+: */
/* ft_isxdigit.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/06 17:19:46 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:03 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:27 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_itoa.c :+: :+: :+: */
/* ft_itoa.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/12 23:20:24 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:04 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:28 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_itob.c |o_o || | */
/* ft_itob.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/04 04:42:54 by djonker #+# #+# */
/* Updated: 2023/03/07 05:07:51 by houtworm \___)=(___/ */
/* Updated: 2023/10/18 16:59:33 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_itoba.c :+: :+: :+: */
/* ft_itoba.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/04 04:42:54 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:05 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:29 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_itodd.c :+: :+: :+: */
/* ft_itodd.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/31 03:00:29 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:07 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:34 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_itof.c :+: :+: :+: */
/* ft_itof.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/02 22:18:50 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:07 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:35 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_itoh.c |o_o || | */
/* ft_itoh.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/31 03:00:29 by djonker #+# #+# */
/* Updated: 2023/03/05 20:33:06 by houtworm \___)=(___/ */
/* Updated: 2023/10/18 16:59:36 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_itohx.c :+: :+: :+: */
/* ft_itohx.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/31 03:00:29 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:09 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:47 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_itoo.c :+: :+: :+: */
/* ft_itoo.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/01 01:30:17 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:25 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:47 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_itooa.c :+: :+: :+: */
/* ft_itooa.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/01 01:30:17 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:25 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:47 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_itozh.c |o_o || | */
/* ft_itozh.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/31 03:00:29 by djonker #+# #+# */
/* Updated: 2023/03/07 05:15:26 by houtworm \___)=(___/ */
/* Updated: 2023/10/18 16:59:48 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_ldeclen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: houtworm <codam@houtworm.net> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/25 11:30:37 by houtworm #+# #+# */
/* Updated: 2023/02/07 00:40:29 by houtworm ### ########.fr */
/* :::::::: */
/* ft_ldeclen.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2022/12/25 11:30:37 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:59:48 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lftoa.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: houtworm <codam@houtworm.net> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/25 11:38:35 by houtworm #+# #+# */
/* Updated: 2023/02/07 00:40:29 by houtworm ### ########.fr */
/* :::::::: */
/* ft_lftoa.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2022/12/25 11:38:35 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:59:49 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_lftoi.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: houtworm <codam@houtworm.net> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/12/25 11:30:20 by houtworm #+# #+# */
/* Updated: 2023/02/07 00:40:29 by houtworm ### ########.fr */
/* :::::::: */
/* ft_lftoi.c :+: :+: */
/* +:+ */
/* By: houtworm <codam@houtworm.net> +#+ */
/* +#+ */
/* Created: 2022/12/25 11:30:20 by houtworm #+# #+# */
/* Updated: 2023/10/18 16:59:49 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_lincpy.c :+: :+: :+: */
/* ft_lincpy.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/04 21:40:35 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:29 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:50 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_linlcpy.c :+: :+: :+: */
/* ft_linlcpy.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/04 21:40:35 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:30 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:50 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_linlen.c :+: :+: :+: */
/* ft_linlen.c :+: :+: */
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/02/04 15:49:15 by djonker #+# #+# */
/* Updated: 2023/02/07 00:40:30 by houtworm ### ########.fr */
/* Updated: 2023/10/18 16:59:51 by houtworm ######## odam.nl */
/* */
/* ************************************************************************** */

Some files were not shown because too many files have changed in this diff Show More