-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLinked_List.h
36 lines (27 loc) · 1.18 KB
/
Linked_List.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/***************************************************/
/* Author : Mahmoud Sayed *
* Date : 18 April 2023 *
* Description : Phone book program. *
* To save information about friends,*
* families, and people. *
* Email : [email protected] *
* *
***************************************************/
#ifndef PHONE_BOOK_LINKED_LIST_H
#define PHONE_BOOK_LINKED_LIST_H
/* =========== Defining the structure of lists and nodes =========== */
typedef struct ListNode {
DATA *dataPtr;
struct ListNode *NextNode;
} lnode_t;
typedef struct List {
lnode_t *first;
lnode_t *last;
}list_t;
/* =========== Function prototypes =========== */
void Linked_List_Init(list_t *List);
void Linked_List_AddNode(list_t *List, DATA *NewData);
int Linked_List_DeleteNode(list_t *List, char firstName[], char lastName[]);
void* Linked_List_FindNode(list_t *List, char firstName[], char lastName[]);
void Linked_List_ListNodes(list_t *List, void (*DisplayFormatFunction) (lnode_t*));
#endif //PHONE_BOOK_LINKED_LIST_H