aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ht/ft_htdelone.c2
-rw-r--r--src/ht/ft_htdestroy.c2
-rw-r--r--src/ht/ft_htentry_new.c2
-rw-r--r--src/ht/ft_htget.c5
-rw-r--r--src/ht/ft_hthash.c2
-rw-r--r--src/ht/ft_htiter.c14
-rw-r--r--src/ht/ft_htnew.c2
-rw-r--r--src/ht/ft_htset.c7
-rw-r--r--src/lst/ft_lstdelone.c2
-rw-r--r--src/lst/ft_lstdestroy.c2
-rw-r--r--src/lst/ft_lstiter.c2
-rw-r--r--src/lst/ft_lstlast.c2
-rw-r--r--src/lst/ft_lstmap.c2
-rw-r--r--src/lst/ft_lstnew.c2
-rw-r--r--src/lst/ft_lstpop_front.c2
-rw-r--r--src/lst/ft_lstpush_back.c2
-rw-r--r--src/lst/ft_lstpush_front.c2
-rw-r--r--src/lst/ft_lstremove_if.c2
-rw-r--r--src/lst/ft_lstreverse.c2
-rw-r--r--src/lst/ft_lstreverse_ret.c2
-rw-r--r--src/lst/ft_lstsize.c2
-rw-r--r--src/lst/ft_lstsort.c2
-rw-r--r--src/lst/ft_lstsorted_merge.c2
-rw-r--r--src/str/ft_atoi.c2
-rw-r--r--src/str/ft_strjoin3.c20
25 files changed, 60 insertions, 28 deletions
diff --git a/src/ht/ft_htdelone.c b/src/ht/ft_htdelone.c
index 3672b23..7374a44 100644
--- a/src/ht/ft_htdelone.c
+++ b/src/ht/ft_htdelone.c
@@ -13,7 +13,7 @@
#include "libft.h"
#include "libft_ht.h"
-/**
+/*
** \brief Delete one hash table entry
** \param key Key of entry to delete
** \param del Function to destroy the entry
diff --git a/src/ht/ft_htdestroy.c b/src/ht/ft_htdestroy.c
index ef4b257..ff362d2 100644
--- a/src/ht/ft_htdestroy.c
+++ b/src/ht/ft_htdestroy.c
@@ -13,7 +13,7 @@
#include "libft.h"
#include "libft_ht.h"
-/**
+/*
** \brief Destroy an hash table.
** \param del Function to delete each entry
** \warning The del function HAS to free the key
diff --git a/src/ht/ft_htentry_new.c b/src/ht/ft_htentry_new.c
index 03c0980..12a1159 100644
--- a/src/ht/ft_htentry_new.c
+++ b/src/ht/ft_htentry_new.c
@@ -13,7 +13,7 @@
#include "libft.h"
#include "libft_ht.h"
-/**
+/*
** \brief Create a new hash table key/value pair.
** \param key Hash entry string key (always duplicated)
** \return Content or NULL if an allocation failed.
diff --git a/src/ht/ft_htget.c b/src/ht/ft_htget.c
index 6b5df48..a6383fe 100644
--- a/src/ht/ft_htget.c
+++ b/src/ht/ft_htget.c
@@ -6,14 +6,14 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/01/30 08:33:21 by cacharle #+# #+# */
-/* Updated: 2020/02/28 12:21:09 by cacharle ### ########.fr */
+/* Updated: 2020/04/01 18:02:57 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include "libft_ht.h"
-/**
+/*
** \brief Retrieve a value with a key
** \param ht Hash table where key is searched
** \param key Searched key
@@ -22,7 +22,6 @@
void *ft_htget(t_ftht *ht, char *key)
{
-
t_ftht_digest digest;
t_ftlst *found;
diff --git a/src/ht/ft_hthash.c b/src/ht/ft_hthash.c
index 2670e31..3369d24 100644
--- a/src/ht/ft_hthash.c
+++ b/src/ht/ft_hthash.c
@@ -12,7 +12,7 @@
#include "libft_ht.h"
-/**
+/*
** \brief Hash a string
** \param ht So that the index is in the hash table bound
** \param key String to hash
diff --git a/src/ht/ft_htiter.c b/src/ht/ft_htiter.c
index e5ab2eb..b854993 100644
--- a/src/ht/ft_htiter.c
+++ b/src/ht/ft_htiter.c
@@ -1,6 +1,18 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_htiter.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/04/01 18:02:24 by charles #+# #+# */
+/* Updated: 2020/04/01 18:02:32 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
#include "libft_ht.h"
-/**
+/*
** \brief Iterate over entry of hash table
** \param ht Iterated hash table
** \param f Function applied to each entry
diff --git a/src/ht/ft_htnew.c b/src/ht/ft_htnew.c
index e28b544..e5335d2 100644
--- a/src/ht/ft_htnew.c
+++ b/src/ht/ft_htnew.c
@@ -13,7 +13,7 @@
#include "libft.h"
#include "libft_ht.h"
-/**
+/*
** \brief Create a new hash table.
** \param size Size of the underlying array of linked list (buckets)
** \return Created hash table or NULL is an allocation failed
diff --git a/src/ht/ft_htset.c b/src/ht/ft_htset.c
index 9738c14..68d3752 100644
--- a/src/ht/ft_htset.c
+++ b/src/ht/ft_htset.c
@@ -6,16 +6,17 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/01/30 08:41:52 by cacharle #+# #+# */
-/* Updated: 2020/02/28 12:11:00 by cacharle ### ########.fr */
+/* Updated: 2020/04/01 18:02:12 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include "libft_ht.h"
-/**
+/*
** \brief Create/Update a entry in hash table.
-** \note If `key` already exist in `ht`, only updates the list node content.
+** \note If `key` already exist in `ht`
+** only updates the list node content.
** Else create a new list node in addition the list content.
** \param ht Hash table where the entry is modified
** \param key Key of the new entry
diff --git a/src/lst/ft_lstdelone.c b/src/lst/ft_lstdelone.c
index 40e25cd..3dfbbbb 100644
--- a/src/lst/ft_lstdelone.c
+++ b/src/lst/ft_lstdelone.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Delete list node
** \param del Delete function for node's data
*/
diff --git a/src/lst/ft_lstdestroy.c b/src/lst/ft_lstdestroy.c
index 5e55f04..35da2a5 100644
--- a/src/lst/ft_lstdestroy.c
+++ b/src/lst/ft_lstdestroy.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Destroy a list and set his pointer to NULL
** \param del Delete Function for data of each node
*/
diff --git a/src/lst/ft_lstiter.c b/src/lst/ft_lstiter.c
index 39d870b..e46b507 100644
--- a/src/lst/ft_lstiter.c
+++ b/src/lst/ft_lstiter.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Iterate of list
** \param f Funtion applied to data of each node
*/
diff --git a/src/lst/ft_lstlast.c b/src/lst/ft_lstlast.c
index 12fdeee..97b853d 100644
--- a/src/lst/ft_lstlast.c
+++ b/src/lst/ft_lstlast.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Last node
** \return List's last node
*/
diff --git a/src/lst/ft_lstmap.c b/src/lst/ft_lstmap.c
index bf96892..3182bb0 100644
--- a/src/lst/ft_lstmap.c
+++ b/src/lst/ft_lstmap.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Clone a list and map a function to each node data
** \param lst Origin list
** \param f Function applied to each node's data
diff --git a/src/lst/ft_lstnew.c b/src/lst/ft_lstnew.c
index 41c8153..1616b71 100644
--- a/src/lst/ft_lstnew.c
+++ b/src/lst/ft_lstnew.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Create a list node
** \param data Pointer to data of node
*/
diff --git a/src/lst/ft_lstpop_front.c b/src/lst/ft_lstpop_front.c
index 798bf83..a61350a 100644
--- a/src/lst/ft_lstpop_front.c
+++ b/src/lst/ft_lstpop_front.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Delete head node and replace it with next node
** \param del Delete function for node data
*/
diff --git a/src/lst/ft_lstpush_back.c b/src/lst/ft_lstpush_back.c
index 372c18c..1dca078 100644
--- a/src/lst/ft_lstpush_back.c
+++ b/src/lst/ft_lstpush_back.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Push new node to the list end
** \param new Pushed node
*/
diff --git a/src/lst/ft_lstpush_front.c b/src/lst/ft_lstpush_front.c
index c17a586..85df649 100644
--- a/src/lst/ft_lstpush_front.c
+++ b/src/lst/ft_lstpush_front.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Push node to list front
** \param new Pushed node
*/
diff --git a/src/lst/ft_lstremove_if.c b/src/lst/ft_lstremove_if.c
index fdac710..4070355 100644
--- a/src/lst/ft_lstremove_if.c
+++ b/src/lst/ft_lstremove_if.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Remove node on some condition
** \param cmp Comparison function, return 0 if equal
** \param ref Reference data passed has the first arg of `cmp`
diff --git a/src/lst/ft_lstreverse.c b/src/lst/ft_lstreverse.c
index fd5259b..7c2778d 100644
--- a/src/lst/ft_lstreverse.c
+++ b/src/lst/ft_lstreverse.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Reverse a list
*/
diff --git a/src/lst/ft_lstreverse_ret.c b/src/lst/ft_lstreverse_ret.c
index 259af9e..36c0c5c 100644
--- a/src/lst/ft_lstreverse_ret.c
+++ b/src/lst/ft_lstreverse_ret.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Reverse list
** \return Pointer to reversed list
*/
diff --git a/src/lst/ft_lstsize.c b/src/lst/ft_lstsize.c
index 6a92b99..3c6956b 100644
--- a/src/lst/ft_lstsize.c
+++ b/src/lst/ft_lstsize.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief List size
** \return Number of node in list
*/
diff --git a/src/lst/ft_lstsort.c b/src/lst/ft_lstsort.c
index fbd046a..9945a0f 100644
--- a/src/lst/ft_lstsort.c
+++ b/src/lst/ft_lstsort.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Sort list
** \param cmp Comparison function, <0 if less, 0 if equal, >0 if greater
** \note Use merge sort algorithm
diff --git a/src/lst/ft_lstsorted_merge.c b/src/lst/ft_lstsorted_merge.c
index 0cd5721..995785f 100644
--- a/src/lst/ft_lstsorted_merge.c
+++ b/src/lst/ft_lstsorted_merge.c
@@ -12,7 +12,7 @@
#include "libft_lst.h"
-/**
+/*
** \brief Merge sorted lists, the new list is also sorted
** \param l1 First list
** \param l2 Second list
diff --git a/src/str/ft_atoi.c b/src/str/ft_atoi.c
index 1b9bfc4..d6fa5bb 100644
--- a/src/str/ft_atoi.c
+++ b/src/str/ft_atoi.c
@@ -12,7 +12,7 @@
#include "libft.h"
-/**
+/*
** Convert a string to an int
*/
diff --git a/src/str/ft_strjoin3.c b/src/str/ft_strjoin3.c
index 69de060..e5e5530 100644
--- a/src/str/ft_strjoin3.c
+++ b/src/str/ft_strjoin3.c
@@ -1,5 +1,25 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_strjoin3.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2020/04/01 18:00:49 by charles #+# #+# */
+/* Updated: 2020/04/01 18:01:43 by charles ### ########.fr */
+/* */
+/* ************************************************************************** */
+
#include "libft.h"
+/*
+** \brief Join 3 strings in a new malloc'd one
+** \param s1 String 1
+** \param s2 String 2
+** \param s3 String 3
+** \return The joined string
+*/
+
char *ft_strjoin3(char const *s1, char const *s2, char const *s3)
{
char *joined;