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
Этот коммит содержится в:
родитель
62f1293b89
Коммит
b2b43689f0
@ -227,7 +227,8 @@ void drawBrowser(int change) {
|
||||
n->flags & FF_ERR ? '!' :
|
||||
n->flags & FF_SERR ? '.' :
|
||||
n->flags & FF_OTHFS ? '>' :
|
||||
n->flags & FF_OTHER ? '@' :
|
||||
!(n->flags & FF_FILE
|
||||
|| n->flags & FF_DIR) ? '@' :
|
||||
n->flags & FF_DIR
|
||||
&& n->sub == NULL ? 'e' :
|
||||
' ' ;
|
||||
|
@ -313,8 +313,7 @@ int calcDir(struct dir *dest, char *path) {
|
||||
if(!(d->flags & FF_EXL))
|
||||
for(t = dest; t != NULL; t = t->parent)
|
||||
t->dirs++;
|
||||
} else
|
||||
d->flags |= FF_OTHER;
|
||||
}
|
||||
|
||||
/* count the size */
|
||||
if(!(d->flags & FF_EXL || d->flags & FF_OTHFS)) {
|
||||
|
17
src/ncdu.h
17
src/ncdu.h
@ -80,15 +80,14 @@
|
||||
* G L O B A L F L A G S
|
||||
*/
|
||||
/* File Flags (struct dir -> flags) */
|
||||
#define FF_DIR 1
|
||||
#define FF_FILE 2
|
||||
#define FF_OTHER 4
|
||||
#define FF_ERR 8
|
||||
#define FF_OTHFS 16
|
||||
#define FF_SERR 32 /* error in subdirectory */
|
||||
#define FF_BSEL 64 /* selected */
|
||||
#define FF_EXL 128 /* excluded using exlude patterns */
|
||||
#define FF_PAR 256 /* reference to parent directory (hack) */
|
||||
#define FF_DIR 0x01
|
||||
#define FF_FILE 0x02
|
||||
#define FF_ERR 0x04 /* error while reading this item */
|
||||
#define FF_OTHFS 0x08 /* excluded because it was an other filesystem */
|
||||
#define FF_EXL 0x10 /* excluded using exlude patterns */
|
||||
#define FF_SERR 0x20 /* error in subdirectory */
|
||||
#define FF_BSEL 0x40 /* selected */
|
||||
#define FF_PAR 0x80 /* reference to parent directory (hack) */
|
||||
|
||||
/* Settings Flags (int sflags) */
|
||||
#define SF_SMFS 1 /* same filesystem */
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user