Skip to content

Commit

Permalink
Merge pull request #54 from nakira974/branches/dev
Browse files Browse the repository at this point in the history
Branches/dev
  • Loading branch information
nakira974 authored Mar 12, 2024
2 parents 3e4405c + 9b61e5f commit 9742523
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
2 changes: 1 addition & 1 deletion headers/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CLinkedList *array_toCList(void **array);
* @param array Array to be converted to set
* @return Converted array to set
*/
Set* array_toSet(void **array, bool(*equals) (const void* value1, const void * value2));
struct Set* array_toSet(void **array, bool(*equals) (const void* value1, const void * value2));

#ifdef __cplusplus
}
Expand Down
9 changes: 3 additions & 6 deletions headers/clist.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ extern "C" {
#include <stdlib.h>
#include <memory.h>
#include <stdbool.h>
#include "list.h"
#include "dlist.h"

#endif


Expand Down Expand Up @@ -139,21 +136,21 @@ void ** clist_toArray(CLinkedList *list);
* @param list List to be converted to set
* @return Converted list to set
*/
Set* clist_toSet(LinkedList *list, bool(*equals) (const void* value1, const void * value2));
struct Set* clist_toSet(struct LinkedList *list, bool(*equals) (const void* value1, const void * value2));

/**
* @brief Convert the given circular list into a list
* @param list List to be converted to list
* @return Converted circular list to list
*/
LinkedList *clist_toList(CLinkedList *list);
struct LinkedList *clist_toList(CLinkedList *list);

/**
* @brief Convert the given circular list into a double linked list
* @param list List to be converted to a double linked list
* @return Converted circular list to double linked list
*/
DLinkedList *clist_toDList(CLinkedList *list);
struct DLinkedList *clist_toDList(CLinkedList *list);

/* ----- MACRO C++ COMPATIBILITY -----*/
#ifdef __cplusplus
Expand Down
8 changes: 4 additions & 4 deletions headers/dlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ extern "C" {
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "clist.h"

#endif

#include "clist.h"


/**
* @brief Data structure definition for a double chained linked list generic element
Expand Down Expand Up @@ -157,14 +157,14 @@ void** dlist_toArray(DLinkedList *list);
* @param list List to be converted to set
* @return Converted list to set
*/
Set* dlist_toSet(LinkedList *list, bool(*equals) (const void* value1, const void * value2));
struct Set* dlist_toSet(struct LinkedList *list, bool(*equals) (const void* value1, const void * value2));

/**
* @brief Convert the double linked list into a list
* @param list List to be converted to list
* @return Converted double linked list to list
*/
LinkedList *dlist_toList(DLinkedList *list);
struct LinkedList *dlist_toList(DLinkedList *list);

/**
* @brief Convert the double linked list into a circular list
Expand Down
2 changes: 1 addition & 1 deletion headers/lhtbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void** ohtbl_toArray(LinkedHashTable *hashTable);
* @param hashTable Hash table to be converted to list
* @return Converted hash table to list
*/
DLinkedList *lhtbl_toList(LinkedHashTable *hashTable);
struct DLinkedList *lhtbl_toList(LinkedHashTable *hashTable);
#ifdef __cplusplus
}
#endif
Expand Down
11 changes: 3 additions & 8 deletions headers/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@ extern "C" {
#else
#include <stdlib.h>
#include <stdbool.h>
#include "clist.h"
#include "set.h"

#endif


/**
* @brief Data structure definition for a simple chained linked list generic element
*/
Expand Down Expand Up @@ -140,22 +135,22 @@ void** list_toArray(LinkedList *list);
* @param list List to be converted to set
* @return Converted list to set
*/
Set* list_toSet(LinkedList *list, bool(*equals) (const void* value1, const void * value2));
struct Set* list_toSet(LinkedList *list, bool(*equals) (const void* value1, const void * value2));


/**
* @brief Convert the given list into a double linked list
* @param list List to be converted to a double linked list
* @return Converted list to double linked list
*/
DLinkedList *list_toDList(LinkedList *list);
struct DLinkedList *list_toDList(LinkedList *list);

/**
* @brief Convert the given list into a circular list
* @param list List to be converted to a circular list
* @return Converted list to circular list
*/
CLinkedList *list_toCList(LinkedList *list);
struct CLinkedList *list_toCList(LinkedList *list);

/* ----- MACRO C++ COMPATIBILITY -----*/
#ifdef __cplusplus
Expand Down

0 comments on commit 9742523

Please sign in to comment.