refactor: change project structure
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#ifndef CWS_COLORS_H
|
||||
#define CWS_COLORS_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* ANSI color escape sequences */
|
||||
#define RED "\033[31m"
|
||||
#define GREEN "\033[32m"
|
||||
|
||||
16
include/utils/hash_utils.h
Normal file
16
include/utils/hash_utils.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef CWS_HASH_UTILS_H
|
||||
#define CWS_HASH_UTILS_H
|
||||
|
||||
unsigned int my_str_hash_fn(const void *key);
|
||||
|
||||
bool my_str_equal_fn(const void *a, const void *b);
|
||||
|
||||
void my_str_free_fn(void *value);
|
||||
|
||||
unsigned int my_int_hash_fn(const void *key);
|
||||
|
||||
bool my_int_equal_fn(const void *a, const void *b);
|
||||
|
||||
void my_int_free_key_fn(void *key);
|
||||
|
||||
#endif
|
||||
@@ -33,13 +33,4 @@ cws_server_ret cws_fd_set_nonblocking(int sockfd);
|
||||
|
||||
void cws_utils_get_client_ip(struct sockaddr_storage *sa, char *ip);
|
||||
|
||||
/* Functions used for hash maps */
|
||||
unsigned int my_str_hash_fn(const void *key);
|
||||
bool my_str_equal_fn(const void *a, const void *b);
|
||||
void my_str_free_fn(void *value);
|
||||
|
||||
unsigned int my_int_hash_fn(const void *key);
|
||||
bool my_int_equal_fn(const void *a, const void *b);
|
||||
void my_int_free_key_fn(void *key);
|
||||
|
||||
#endif
|
||||
@@ -1,10 +0,0 @@
|
||||
#ifndef CWS_SOCKET_H
|
||||
#define CWS_SOCKET_H
|
||||
|
||||
#include <myclib/mystring.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
ssize_t cws_read_data(int sockfd, string_s *str);
|
||||
ssize_t cws_send_data(int sockfd, char *buffer, int len, int flags);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user