Skip to content
Snippets Groups Projects
Commit 290c7a7d authored by Yorhel's avatar Yorhel
Browse files

Renamed ncdu.h to global.h and #included all other header files into that

So we're actually back to having one header file for everything,
except it's now maintainable.
parent 4b6456d0
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,4 @@ bin_PROGRAMS = ncdu
ncdu_SOURCES = browser.c calc.c delete.c exclude.c help.c main.c path.c util.c
noinst_HEADERS = browser.h calc.h delete.h exclude.h help.h ncdu.h path.h util.h
noinst_HEADERS = browser.h calc.h delete.h exclude.h global.h help.h path.h util.h
......@@ -23,12 +23,7 @@
*/
#include "ncdu.h"
#include "browser.h"
#include "util.h"
#include "calc.h"
#include "delete.h"
#include "help.h"
#include "global.h"
#include <string.h>
#include <stdlib.h>
......@@ -418,14 +413,12 @@ int browse_key(int ch) {
nonfo++;
break;
/* refresh */
/* and other stuff */
case 'r':
if(browse_dir != NULL)
calc_init(getpath(browse_dir->parent), browse_dir->parent);
nonfo++;
break;
/* and other stuff */
case 'q':
if(flags & BF_INFO)
nonfo++;
......
......@@ -26,7 +26,7 @@
#ifndef _browser_h
#define _browser_h
#include "ncdu.h"
#include "global.h"
int browse_key(int);
void browse_draw(void);
......
......@@ -23,12 +23,7 @@
*/
#include "ncdu.h"
#include "calc.h"
#include "exclude.h"
#include "util.h"
#include "browser.h"
#include "path.h"
#include "global.h"
#include <string.h>
#include <stdlib.h>
......
......@@ -26,7 +26,7 @@
#ifndef _calc_h
#define _calc_h
#include "ncdu.h"
#include "global.h"
extern char calc_smfs; /* stay on the same filesystem */
......
......@@ -24,10 +24,7 @@
*/
#include "ncdu.h"
#include "util.h"
#include "browser.h"
#include "path.h"
#include "global.h"
#include <string.h>
#include <errno.h>
......
......@@ -26,7 +26,7 @@
#ifndef _delete_h
#define _delete_h
#include "ncdu.h"
#include "global.h"
void delete_process(void);
int delete_key(int);
......
......@@ -23,8 +23,8 @@
*/
#ifndef _ncdu_h
#define _ncdu_h
#ifndef _global_h
#define _global_h
#include "config.h"
#include <stdio.h>
......@@ -84,4 +84,13 @@ extern long update_delay;
int input_handle(int);
/* import all other global functions and variables */
#include "exclude.h"
#include "util.h"
#include "calc.h"
#include "delete.h"
#include "browser.h"
#include "help.h"
#include "path.h"
#endif
......@@ -23,10 +23,7 @@
*/
#include "ncdu.h"
#include "help.h"
#include "browser.h"
#include "util.h"
#include "global.h"
#include <ncurses.h>
#include <string.h>
......
......@@ -26,7 +26,7 @@
#ifndef _help_h
#define _help_h
#include "ncdu.h"
#include "global.h"
int help_key(int);
void help_draw(void);
......
......@@ -23,14 +23,7 @@
*/
#include "ncdu.h"
#include "exclude.h"
#include "util.h"
#include "calc.h"
#include "delete.h"
#include "browser.h"
#include "help.h"
#include "path.h"
#include "global.h"
#include <stdlib.h>
#include <string.h>
......
......@@ -26,7 +26,7 @@
#ifndef _util_h
#define _util_h
#include "ncdu.h"
#include "global.h"
#include <ncurses.h>
/* updated when window is resized */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment