mirror of
https://github.com/Hizenberg469/Bit-Share.git
synced 2026-04-20 00:52:24 +03:00
update
This commit is contained in:
8
include/b_list.h
Normal file
8
include/b_list.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef B_LIST
|
||||
#define B_LIST
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
14
include/b_string.h
Normal file
14
include/b_string.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef B_STRING
|
||||
#define B_STRING
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
typedef struct b_string_{
|
||||
size_t len;
|
||||
unsigned char str[];
|
||||
}b_string_t;
|
||||
|
||||
b_string_t *alloc_b_string(size_t len, const char* str);
|
||||
void free_b_string(b_string_t *b_str);
|
||||
|
||||
#endif
|
||||
6
include/bencode.h
Normal file
6
include/bencode.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef BENCODE_H
|
||||
#define BENCODE_H
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
20
include/log.h
Normal file
20
include/log.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#ifndef B_LOG
|
||||
#define B_LOG
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
typedef enum{
|
||||
DEBUG_LOG,
|
||||
INFO_LOG,
|
||||
WARNING_LOG,
|
||||
ERROR_LOG,
|
||||
NO_LOG
|
||||
}log_type_t;
|
||||
|
||||
#define DEFAULT_LOG_TYPE INFO_LOG
|
||||
|
||||
void log_set_type(log_type_t typ);
|
||||
void log_set_logfile(FILE *f);
|
||||
void log_printf(log_type_t typ, const char *fmt, ...);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user