-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathlists.h
More file actions
33 lines (29 loc) · 726 Bytes
/
lists.h
File metadata and controls
33 lines (29 loc) · 726 Bytes
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
#ifndef HOLBERTON_H
#define HOLBERTON_H
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/**
* struct list_s - singly linked list
* @str: string - (malloc'ed string)
* @len: length of the string
* @next: points to the next node
*
* Description: singly linked list node structure
* for Holberton project
*/
typedef struct list_s
{
char *str;
unsigned int len;
struct list_s *next;
} list_t;
int _putchar(char c);
int _strlen(const char *str);
size_t print_list(const list_t *h);
size_t list_len(const list_t *h);
list_t *add_node(list_t **head, const char *str);
list_t *add_node_end(list_t **head, const char *str);
void free_list(list_t *head);
void first(void) __attribute__ ((constructor));
#endif