mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-14 17:58:40 -09:00
help.c: Mention "F" flag + make the flag list scrollable
This commit is contained in:
parent
bff5da3547
commit
1c4d191193
1 changed files with 23 additions and 19 deletions
42
src/help.c
42
src/help.c
|
|
@ -57,6 +57,19 @@ static const char *keys[KEYS*2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#define FLAGS 9
|
||||||
|
static const char *flags[FLAGS*2] = {
|
||||||
|
"!", "An error occurred while reading this directory",
|
||||||
|
".", "An error occurred while reading a subdirectory",
|
||||||
|
"<", "File or directory is excluded from the statistics",
|
||||||
|
"e", "Empty directory",
|
||||||
|
">", "Directory was on another filesystem",
|
||||||
|
"@", "This is not a file nor a dir (symlink, socket, ...)",
|
||||||
|
"^", "Excluded Linux pseudo-filesystem",
|
||||||
|
"H", "Same file was already counted (hard link)",
|
||||||
|
"F", "Excluded firmlink",
|
||||||
|
};
|
||||||
|
|
||||||
void help_draw() {
|
void help_draw() {
|
||||||
int i, line;
|
int i, line;
|
||||||
|
|
||||||
|
|
@ -90,24 +103,15 @@ void help_draw() {
|
||||||
ncaddstr(2, 3, "X [size] [graph] [file or directory]");
|
ncaddstr(2, 3, "X [size] [graph] [file or directory]");
|
||||||
attroff(A_BOLD);
|
attroff(A_BOLD);
|
||||||
ncaddstr(3, 4, "The X is only present in the following cases:");
|
ncaddstr(3, 4, "The X is only present in the following cases:");
|
||||||
uic_set(UIC_FLAG);
|
line = 4;
|
||||||
ncaddch( 5, 4, '!');
|
for(i=start*2; i<start*2+14; i+=2) {
|
||||||
ncaddch( 6, 4, '.');
|
uic_set(UIC_FLAG);
|
||||||
ncaddch( 7, 4, '<');
|
ncaddstr(++line, 4, flags[i]);
|
||||||
ncaddch( 8, 4, '>');
|
uic_set(UIC_DEFAULT);
|
||||||
ncaddch( 9, 4, '^');
|
ncaddstr(line, 7, flags[i+1]);
|
||||||
ncaddch(10, 4, '@');
|
}
|
||||||
ncaddch(11, 4, 'H');
|
if(start != FLAGS-7)
|
||||||
ncaddch(12, 4, 'e');
|
ncaddstr(12, 25, "-- more --");
|
||||||
uic_set(UIC_DEFAULT);
|
|
||||||
ncaddstr( 5, 7, "An error occurred while reading this directory");
|
|
||||||
ncaddstr( 6, 7, "An error occurred while reading a subdirectory");
|
|
||||||
ncaddstr( 7, 7, "File or directory is excluded from the statistics");
|
|
||||||
ncaddstr( 8, 7, "Directory was on another filesystem");
|
|
||||||
ncaddstr( 9, 7, "Excluded Linux pseudo-filesystem");
|
|
||||||
ncaddstr(10, 7, "This is not a file nor a dir (symlink, socket, ...)");
|
|
||||||
ncaddstr(11, 7, "Same file was already counted (hard link)");
|
|
||||||
ncaddstr(12, 7, "Empty directory");
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
/* Indeed, too much spare time */
|
/* Indeed, too much spare time */
|
||||||
|
|
@ -184,7 +188,7 @@ int help_key(int ch) {
|
||||||
case KEY_DOWN:
|
case KEY_DOWN:
|
||||||
case ' ':
|
case ' ':
|
||||||
case 'j':
|
case 'j':
|
||||||
if(start < KEYS-10)
|
if((page == 1 && start < KEYS-10) || (page == 2 && start < FLAGS-7))
|
||||||
start++;
|
start++;
|
||||||
break;
|
break;
|
||||||
case KEY_UP:
|
case KEY_UP:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue