command help

This commit is contained in:
Linus Dierheimer
2021-03-21 11:18:06 +01:00
parent a848798e97
commit 0d3500c66f
5 changed files with 89 additions and 205 deletions
+1
View File
@@ -20,5 +20,6 @@ void ffPrintKernel(FFinstance* instance)
ffPrintLogoAndKey(instance, "Kernel");
ffStrbufWriteTo(&kernel, stdout);
putchar('\n');
ffStrbufDestroy(&kernel);
}
+23 -23
View File
@@ -13,31 +13,31 @@ void ffPrintLocale(FFinstance* instance)
/* File does not exist */
if (fp == NULL) {
/* Check if LANG exists */
if (getenv("LANG") != NULL)
strcpy(localeCode, getenv("LANG"));
/* Check if LC_ALL exists */
else if (getenv("LC_ALL") != NULL)
strcpy(localeCode, getenv("LC_ALL"));
/* Check if LC_CTYPE exists */
else if (getenv("LC_CTYPE") != NULL)
strcpy(localeCode, getenv("LC_CTYPE"));
/* Check if LC_CTYPE exists */
else if (getenv("LC_CTYPE") != NULL)
strcpy(localeCode, getenv("LC_CTYPE"));
/* Check if LC_MESSAGES exists */
else if (getenv("LC_MESSAGES") != NULL)
strcpy(localeCode, getenv("LC_MESSAGES"));
/* User has broken system */
else
ffPrintError(instance, "Locale", "Locale not found!");
/* /etc/locale.conf exists */
/* Check if LANG exists */
if (getenv("LANG") != NULL)
strcpy(localeCode, getenv("LANG"));
/* Check if LC_ALL exists */
else if (getenv("LC_ALL") != NULL)
strcpy(localeCode, getenv("LC_ALL"));
/* Check if LC_CTYPE exists */
else if (getenv("LC_CTYPE") != NULL)
strcpy(localeCode, getenv("LC_CTYPE"));
/* Check if LC_CTYPE exists */
else if (getenv("LC_CTYPE") != NULL)
strcpy(localeCode, getenv("LC_CTYPE"));
/* Check if LC_MESSAGES exists */
else if (getenv("LC_MESSAGES") != NULL)
strcpy(localeCode, getenv("LC_MESSAGES"));
/* User has broken system */
else
ffPrintError(instance, "Locale", "Locale not found!");
/* /etc/locale.conf exists */
} else {
ffParsePropFile("/etc/locale.conf", "LANG=%[^\n]", localeCode);
}
ffParsePropFile("/etc/locale.conf", "LANG=%[^\n]", localeCode);
/* Free pointer to file */
fclose(fp);
/* Free pointer to file */
fclose(fp);
}
ffPrintLogoAndKey(instance, "Locale");