dosutils: add Novell-style paging to FLAG tools and SLIST

- add a shared DOS pager helper for long tool output
- page FLAG wildcard output with the Novell continue prompt
- fix FLAGDIR current-directory handling for "." and volume root
- add FLAGDIR wildcard directory listing support
- page FLAGDIR wildcard output like Novell FLAGDIR
- keep FLAGDIR display formatting aligned with Novell output
- make SLIST /CONTINUE enable continuous output
- keep SLIST bindery scanning compatible with ncpfs behavior
- preserve SLIST NET_ADDRESS display and default server marking
This commit is contained in:
Mario Fetka
2026-05-24 15:51:38 +02:00
parent f940d2d88e
commit fc97eb8d25
5 changed files with 304 additions and 42 deletions

29
tools.c
View File

@@ -328,7 +328,7 @@ int putglobenv(char *option)
}
search=nextp;
}
/* nicht gefunden , nun eintragen, falls m<EFBFBD>glich */
/* nicht gefunden , nun eintragen, falls m�glich */
if (*(equal+1) && optionlen < maxenvsize - aktenvsize) {
strcpy(search, option);
*(search+optionlen+1) = '\0'; /* letzter Eintrag '\0' nicht vergessen */
@@ -339,3 +339,30 @@ int putglobenv(char *option)
return(-1);
}
int tool_page_line(int *line_count, int *continuous)
{
int ch;
if (!line_count || !continuous)
return(0);
if (*continuous)
return(0);
(*line_count)++;
if (*line_count < 24)
return(0);
fprintf(stdout, "Press any key to continue ('C' for continue)");
fflush(stdout);
ch = getch();
fprintf(stdout, "\n");
if (ch == 'c' || ch == 'C')
*continuous = 1;
*line_count = 0;
return(0);
}