mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Got rid of the FF_PAR hack
git-svn-id: svn://blicky.net/ncdu/trunk@35 ce56bc8d-f834-0410-b703-f827bd498a76
This commit is contained in:
parent
9e2eb51ef4
commit
a4480b9523
2 changed files with 2 additions and 4 deletions
|
|
@ -135,7 +135,7 @@ char *graph(off_t max, off_t size) {
|
||||||
|
|
||||||
|
|
||||||
#define exlhid(x) if(bflags & BF_HIDE && (\
|
#define exlhid(x) if(bflags & BF_HIDE && (\
|
||||||
(!(x->flags & FF_PAR) && (x->name[0] == '.' || x->name[strlen(x->name)-1] == '~'))\
|
(x != &ref && (x->name[0] == '.' || x->name[strlen(x->name)-1] == '~'))\
|
||||||
|| x->flags & FF_EXL)\
|
|| x->flags & FF_EXL)\
|
||||||
) { i--; continue; }
|
) { i--; continue; }
|
||||||
|
|
||||||
|
|
@ -183,7 +183,6 @@ void drawBrowser(int change) {
|
||||||
/* add reference to parent dir */
|
/* add reference to parent dir */
|
||||||
memset(&ref, 0, sizeof(struct dir));
|
memset(&ref, 0, sizeof(struct dir));
|
||||||
if(bcur->parent->parent) {
|
if(bcur->parent->parent) {
|
||||||
ref.flags |= FF_PAR;
|
|
||||||
ref.name = "..";
|
ref.name = "..";
|
||||||
ref.next = bcur;
|
ref.next = bcur;
|
||||||
ref.parent = bcur->parent;
|
ref.parent = bcur->parent;
|
||||||
|
|
@ -242,7 +241,7 @@ void drawBrowser(int change) {
|
||||||
attron(A_REVERSE);
|
attron(A_REVERSE);
|
||||||
|
|
||||||
/* reference to parent dir has a different format */
|
/* reference to parent dir has a different format */
|
||||||
if(n->flags & FF_PAR) {
|
if(n == &ref) {
|
||||||
mvhline(i+2, 0, ' ', wincols);
|
mvhline(i+2, 0, ' ', wincols);
|
||||||
o = bgraph == 0 ? 11 :
|
o = bgraph == 0 ? 11 :
|
||||||
bgraph == 1 ? 23 :
|
bgraph == 1 ? 23 :
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,6 @@
|
||||||
#define FF_EXL 0x10 /* excluded using exlude patterns */
|
#define FF_EXL 0x10 /* excluded using exlude patterns */
|
||||||
#define FF_SERR 0x20 /* error in subdirectory */
|
#define FF_SERR 0x20 /* error in subdirectory */
|
||||||
#define FF_BSEL 0x40 /* selected */
|
#define FF_BSEL 0x40 /* selected */
|
||||||
#define FF_PAR 0x80 /* reference to parent directory (hack - only used in browser.c) */
|
|
||||||
|
|
||||||
/* Settings Flags (int sflags) */
|
/* Settings Flags (int sflags) */
|
||||||
#define SF_SMFS 0x01 /* same filesystem */
|
#define SF_SMFS 0x01 /* same filesystem */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue