Skip to content
Snippets Groups Projects
Commit b2b43689 authored by yorhel's avatar yorhel
Browse files

Preperations for the export feature: re-ordered the file flags and removed...

Preperations for the export feature: re-ordered the file flags and removed FF_OTHER (which is the same as \!(FF_DIR | FF_FILE))

git-svn-id: svn://blicky.net/ncdu/trunk@16 ce56bc8d-f834-0410-b703-f827bd498a76
parent 62f1293b
No related branches found
No related tags found
No related merge requests found
...@@ -227,7 +227,8 @@ void drawBrowser(int change) { ...@@ -227,7 +227,8 @@ void drawBrowser(int change) {
n->flags & FF_ERR ? '!' : n->flags & FF_ERR ? '!' :
n->flags & FF_SERR ? '.' : n->flags & FF_SERR ? '.' :
n->flags & FF_OTHFS ? '>' : n->flags & FF_OTHFS ? '>' :
n->flags & FF_OTHER ? '@' : !(n->flags & FF_FILE
|| n->flags & FF_DIR) ? '@' :
n->flags & FF_DIR n->flags & FF_DIR
&& n->sub == NULL ? 'e' : && n->sub == NULL ? 'e' :
' ' ; ' ' ;
......
...@@ -313,8 +313,7 @@ int calcDir(struct dir *dest, char *path) { ...@@ -313,8 +313,7 @@ int calcDir(struct dir *dest, char *path) {
if(!(d->flags & FF_EXL)) if(!(d->flags & FF_EXL))
for(t = dest; t != NULL; t = t->parent) for(t = dest; t != NULL; t = t->parent)
t->dirs++; t->dirs++;
} else }
d->flags |= FF_OTHER;
/* count the size */ /* count the size */
if(!(d->flags & FF_EXL || d->flags & FF_OTHFS)) { if(!(d->flags & FF_EXL || d->flags & FF_OTHFS)) {
......
...@@ -80,15 +80,14 @@ ...@@ -80,15 +80,14 @@
* G L O B A L F L A G S * G L O B A L F L A G S
*/ */
/* File Flags (struct dir -> flags) */ /* File Flags (struct dir -> flags) */
#define FF_DIR 1 #define FF_DIR 0x01
#define FF_FILE 2 #define FF_FILE 0x02
#define FF_OTHER 4 #define FF_ERR 0x04 /* error while reading this item */
#define FF_ERR 8 #define FF_OTHFS 0x08 /* excluded because it was an other filesystem */
#define FF_OTHFS 16 #define FF_EXL 0x10 /* excluded using exlude patterns */
#define FF_SERR 32 /* error in subdirectory */ #define FF_SERR 0x20 /* error in subdirectory */
#define FF_BSEL 64 /* selected */ #define FF_BSEL 0x40 /* selected */
#define FF_EXL 128 /* excluded using exlude patterns */ #define FF_PAR 0x80 /* reference to parent directory (hack) */
#define FF_PAR 256 /* reference to parent directory (hack) */
/* Settings Flags (int sflags) */ /* Settings Flags (int sflags) */
#define SF_SMFS 1 /* same filesystem */ #define SF_SMFS 1 /* same filesystem */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment