From 3624ef3e18fa074ed7fadb11da68f61896dd67d3 Mon Sep 17 00:00:00 2001 From: louie Date: Tue, 29 Dec 2020 14:36:38 -0800 Subject: Removed unnecessary headers --- Makefile | 12 ++++++------ draw.c | 3 --- include/draw.h | 3 +++ include/draw_extend.h | 6 ------ include/read_cfg.h | 15 ++++++--------- include/read_cfg_extend.h | 12 ------------ read_cfg.c | 1 - unix/draw.c | 2 -- unix/read_cfg.c | 1 - windows/draw.c | 2 -- windows/read_cfg.c | 1 - 11 files changed, 15 insertions(+), 43 deletions(-) delete mode 100644 include/draw_extend.h delete mode 100644 include/read_cfg_extend.h diff --git a/Makefile b/Makefile index 46ca905..119160d 100644 --- a/Makefile +++ b/Makefile @@ -9,21 +9,21 @@ ifeq ($(OS),Windows_NT) $(NAME): draw.o read_cfg.o group.o entry.o windows/draw.o windows/read_cfg.o $(CC) -o $(NAME) draw.o read_cfg.o group.o entry.o windows/draw.o windows/read_cfg.o $(LIBS) -windows/draw.o: windows/draw.c include/draw.h include/draw_extend.h -windows/read_cfg.o: windows/read_cfg.c include/read_cfg.h include/read_cfg_extend.h +windows/draw.o: windows/draw.c include/draw.h +windows/read_cfg.o: windows/read_cfg.c include/read_cfg.h else $(NAME): draw.o read_cfg.o group.o entry.o unix/draw.o unix/read_cfg.o $(CC) -o $(NAME) draw.o read_cfg.o group.o entry.o unix/draw.o unix/read_cfg.o $(LIBS) -unix/draw.o: unix/draw.c include/draw.h include/draw_extend.h -unix/read_cfg.o: unix/read_cfg.c include/read_cfg.h include/read_cfg_extend.h +unix/draw.o: unix/draw.c include/draw.h +unix/read_cfg.o: unix/read_cfg.c include/read_cfg.h endif -draw.o: draw.c include/draw.h include/draw_extend.h include/entry.h include/group.h include/read_cfg.h include/read_cfg_extend.h -read_cfg.o: read_cfg.c include/entry.h include/group.h include/read_cfg_extend.h +draw.o: draw.c include/draw.h include/entry.h include/group.h include/read_cfg.h +read_cfg.o: read_cfg.c include/entry.h include/group.h group.o: group.c include/entry.h include/group.h include/read_cfg.h entry.o: entry.c include/entry.h include/group.h include/read_cfg.h diff --git a/draw.c b/draw.c index dd0eb89..b2f5074 100644 --- a/draw.c +++ b/draw.c @@ -10,13 +10,10 @@ #include #endif -//*_extend.h headers handle differences in os (i.e. windows vs unix) #include "include/draw.h" -#include "include/draw_extend.h" #include "include/entry.h" #include "include/group.h" #include "include/read_cfg.h" -#include "include/read_cfg_extend.h" #define MAX_LEN 6 #define GAP_SIZE 1 #define WIDTH (getmaxx(stdscr)) //width of the entire term diff --git a/include/draw.h b/include/draw.h index 275b8bb..0a6baba 100644 --- a/include/draw.h +++ b/include/draw.h @@ -12,4 +12,7 @@ extern struct entry **e; char *get_launch(); +//functions that differ between os +void launch(); + #endif diff --git a/include/draw_extend.h b/include/draw_extend.h deleted file mode 100644 index 6876512..0000000 --- a/include/draw_extend.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef DRAW_EXTEND_H -#define DRAW_EXTEND_H - -void launch(); - -#endif diff --git a/include/read_cfg.h b/include/read_cfg.h index abb31cc..6b0c276 100644 --- a/include/read_cfg.h +++ b/include/read_cfg.h @@ -4,23 +4,20 @@ #define BUF_LEN 1024 void cfg_interp(char *path); - bool get_sort(); - bool get_case_sensitivity(); - void refer_to_doc(); - void addme(char *path, char *group, bool force, char *name); - int search_ch(char *str, char c); - int search_last_ch(char *str, char c); - int wild_cmp(char *wild, char *literal); - char *strip_quotes(char *str); - void error_mes(int ln, char *message); +//functions that differ by os +extern char sep; +char *find_config(); +void mkconfig_wizard(); +void handle_fname(char *path, char *group, bool recurs, bool force, char *name, int ln); + #endif diff --git a/include/read_cfg_extend.h b/include/read_cfg_extend.h deleted file mode 100644 index 3c9cb24..0000000 --- a/include/read_cfg_extend.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef READ_CFG_EXTEND_H -#define READ_CFG_EXTEND_H - -extern char sep; - -char *find_config(); - -void mkconfig_wizard(); - -void handle_fname(char *path, char *group, bool recurs, bool force, char *name, int ln); - -#endif diff --git a/read_cfg.c b/read_cfg.c index 0213800..61ddce1 100644 --- a/read_cfg.c +++ b/read_cfg.c @@ -15,7 +15,6 @@ #include "include/entry.h" #include "include/group.h" #include "include/read_cfg.h" -#include "include/read_cfg_extend.h" #define MAX_ARGS 5 #define OPTION_CNT 14 diff --git a/unix/draw.c b/unix/draw.c index 1037b4e..ae7f758 100644 --- a/unix/draw.c +++ b/unix/draw.c @@ -1,9 +1,7 @@ -#include #include #include #include "../include/draw.h" -#include "../include/draw_extend.h" void launch(){ char full_command[BUF_LEN]; diff --git a/unix/read_cfg.c b/unix/read_cfg.c index b7fe45b..3da4b4d 100644 --- a/unix/read_cfg.c +++ b/unix/read_cfg.c @@ -10,7 +10,6 @@ #include "../include/read_cfg.h" #include "../include/entry.h" -#include "../include/read_cfg_extend.h" char sep = '/'; diff --git a/windows/draw.c b/windows/draw.c index b264a6b..9769208 100644 --- a/windows/draw.c +++ b/windows/draw.c @@ -1,9 +1,7 @@ -#include #include #include #include "../include/draw.h" -#include "../include/draw_extend.h" #include "../include/entry.h" #include "../include/group.h" diff --git a/windows/read_cfg.c b/windows/read_cfg.c index 70e4515..7cb98cc 100644 --- a/windows/read_cfg.c +++ b/windows/read_cfg.c @@ -10,7 +10,6 @@ #include "../include/entry.h" #include "../include/read_cfg.h" -#include "../include/read_cfg_extend.h" char sep = '\\'; -- cgit