merge remote into development
This commit is contained in:
commit
a2492aa124
@ -88,6 +88,8 @@ void remove_node(node_t *node)
|
|||||||
|
|
||||||
node_t *get_node(void *pointer)
|
node_t *get_node(void *pointer)
|
||||||
{
|
{
|
||||||
|
if (head == NULL) return NULL; //EMPTY LIST
|
||||||
|
|
||||||
node_t *buffer = head;
|
node_t *buffer = head;
|
||||||
while (buffer -> next != NULL)
|
while (buffer -> next != NULL)
|
||||||
{
|
{
|
||||||
@ -158,6 +160,15 @@ void *why2_fdopen(int file, char *modes)
|
|||||||
return opened;
|
return opened;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void *why2_opendir(char *name)
|
||||||
|
{
|
||||||
|
void *opened = opendir(name);
|
||||||
|
|
||||||
|
push_to_list(opened, OPENDIR);
|
||||||
|
|
||||||
|
return opened;
|
||||||
|
}
|
||||||
|
|
||||||
void why2_deallocate(void *pointer)
|
void why2_deallocate(void *pointer)
|
||||||
{
|
{
|
||||||
//VARIABLES
|
//VARIABLES
|
||||||
|
@ -59,7 +59,7 @@ why2_log_file why2_init_logger(char *directoryPath)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//COUNT HOW MANY LOGS WERE GENERATED THIS DAY
|
//COUNT HOW MANY LOGS WERE GENERATED THIS DAY
|
||||||
dir = opendir(directoryPath);
|
dir = why2_opendir(directoryPath);
|
||||||
while ((entry = readdir(dir)) != NULL)
|
while ((entry = readdir(dir)) != NULL)
|
||||||
{
|
{
|
||||||
if (entry -> d_type == DT_REG)
|
if (entry -> d_type == DT_REG)
|
||||||
@ -101,7 +101,7 @@ why2_log_file why2_init_logger(char *directoryPath)
|
|||||||
why2_deallocate(dateBuffer);
|
why2_deallocate(dateBuffer);
|
||||||
why2_deallocate(latestBuffer);
|
why2_deallocate(latestBuffer);
|
||||||
why2_deallocate(latestFilePath);
|
why2_deallocate(latestFilePath);
|
||||||
closedir(dir);
|
why2_deallocate(dir);
|
||||||
|
|
||||||
why2_reset_memory_identifier();
|
why2_reset_memory_identifier();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user