summaryrefslogtreecommitdiff
path: root/entry.c
diff options
context:
space:
mode:
Diffstat (limited to 'entry.c')
-rw-r--r--entry.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/entry.c b/entry.c
index c47b5d7..7431b64 100644
--- a/entry.c
+++ b/entry.c
@@ -1,5 +1,6 @@
#include <assert.h>
#include <dirent.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -11,22 +12,24 @@
typedef struct entry{
char name[BUF_LEN];
char path[BUF_LEN];
+ bool path_force;
struct entry *next;
} ENTRY;
-ENTRY *create_entry(char *new_name, char *new_path);
+ENTRY *create_entry(char *new_name, char *new_path, bool force);
ENTRY *entry_add_last(ENTRY *tail, ENTRY *add);
ENTRY **get_entries(ENTRY *head, int count);
char *get_ename(ENTRY *e);
char *get_epath(ENTRY *e);
-ENTRY *create_entry(char *new_name, char *new_path){
+ENTRY *create_entry(char *new_name, char *new_path, bool force){
ENTRY *new;
new = malloc(sizeof(ENTRY));
strcpy(new->name, new_name);
strcpy(new->path, new_path);
+ new->path_force = force;
new->next = NULL;
return new;
@@ -66,6 +69,11 @@ char *get_epath(ENTRY *e){
return e->path;
}
+bool get_eforce(ENTRY *e){
+ assert(e != NULL);
+ return e->path_force;
+}
+
void entry_debug(ENTRY *trav){
while(trav != NULL){