How to make library generic?

This commit is contained in:
2024-02-05 00:45:30 +05:30
parent dee48d5d1b
commit 19e67acd4c
26 changed files with 1547 additions and 0 deletions

41
ProgrammableLib/dll.h Normal file
View File

@@ -0,0 +1,41 @@
/*
* =====================================================================================
*
* Filename: dll.h
*
* Description:
*
* Version: 1.0
* Created: 05/02/24 12:08:34 AM IST
* Revision: none
* Compiler: gcc
*
* Author: YOUR NAME (),
* Organization:
*
* =====================================================================================
*/
/*Header file for Doubly Linked List*/
typedef struct dll_node_{
void *data;
struct dll_node_ *left;
struct dll_node_ *right;
} dll_node_t;
typedef struct dll_{
dll_node_t *head;
} dll_t;
/* Public Function declaration to create and return
* a new empty doubly linked list*/
dll_t *
get_new_dll();
/* Public Function declaration to add the appication
* data to DLL*/
int
add_data_to_dll(dll_t *dll, void *appn_data);