mirror of https://github.com/MidnightCommander/mc
Minor optimization of show_version() function.
Set "Virtual File System" text item to plural form. Applied i18n to "Data types" text item. Added output of size_t size. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
f0f1a7c7ff
commit
dd74fc504c
|
@ -26,7 +26,6 @@
|
|||
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "lib/global.h"
|
||||
|
@ -115,33 +114,29 @@ static const char *const features[] = {
|
|||
void
|
||||
show_version (void)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
printf (_("GNU Midnight Commander %s\n"), VERSION);
|
||||
|
||||
#ifdef ENABLE_VFS
|
||||
printf (_("Virtual File System:"));
|
||||
for (i = 0; vfs_supported[i]; i++) {
|
||||
if (i == 0)
|
||||
printf (" ");
|
||||
else
|
||||
printf (", ");
|
||||
printf (_("Virtual File Systems:"));
|
||||
for (i = 0; vfs_supported[i] != NULL; i++)
|
||||
printf ("%s %s", i == 0 ? "" : ",", _(vfs_supported[i]));
|
||||
|
||||
printf ("%s", _(vfs_supported[i]));
|
||||
}
|
||||
printf ("\n");
|
||||
#endif /* ENABLE_VFS */
|
||||
|
||||
for (i = 0; features[i]; i++)
|
||||
for (i = 0; features[i] != NULL; i++)
|
||||
printf ("%s", _(features[i]));
|
||||
|
||||
(void)printf("Data types:");
|
||||
(void)printf(_("Data types:"));
|
||||
#define TYPE_INFO(T) \
|
||||
(void)printf(" %s %d", #T, (int) (CHAR_BIT * sizeof(T)))
|
||||
(void)printf(" %s: %d;", #T, (int) (CHAR_BIT * sizeof(T)))
|
||||
TYPE_INFO(char);
|
||||
TYPE_INFO(int);
|
||||
TYPE_INFO(long);
|
||||
TYPE_INFO(void *);
|
||||
TYPE_INFO(size_t);
|
||||
TYPE_INFO(off_t);
|
||||
#undef TYPE_INFO
|
||||
(void)printf("\n");
|
||||
|
|
Loading…
Reference in New Issue