From 9d5481e83a2525766957479d9acdb12dc4626ea2 Mon Sep 17 00:00:00 2001 From: saloniamatteo Date: Sat, 20 Mar 2021 11:24:35 +0100 Subject: [PATCH] Sane indentation: use tabs instead of spaces --- src/modules/locale.c | 56 ++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/modules/locale.c b/src/modules/locale.c index 7a3fa04d8..5ac34f6a2 100644 --- a/src/modules/locale.c +++ b/src/modules/locale.c @@ -2,17 +2,17 @@ void ffPrintLocale(FFinstance* instance) { - if(ffPrintCachedValue(instance, "Locale")) - return; + if(ffPrintCachedValue(instance, "Locale")) + return; - char localeCode[256]; + char localeCode[256]; - /* Try to open /etc/locale.conf in read-only mode */ - FILE *fp; - fp = fopen("/etc/locale.conf", "r"); + /* Try to open /etc/locale.conf in read-only mode */ + FILE *fp; + fp = fopen("/etc/locale.conf", "r"); - /* File does not exist */ - if (fp == NULL) { + /* File does not exist */ + if (fp == NULL) { /* Check if LANG exists */ if (getenv("LANG") != NULL) strcpy(localeCode, getenv("LANG")); @@ -31,31 +31,31 @@ void ffPrintLocale(FFinstance* instance) /* User has broken system */ else ffPrintError(instance, "Locale", "Locale not found!"); - /* /etc/locale.conf exists */ - } else { + /* /etc/locale.conf exists */ + } else { ffParsePropFile("/etc/locale.conf", "LANG=%[^\n]", localeCode); - } + } - /* Free pointer to file */ - fclose(fp); + /* Free pointer to file */ + fclose(fp); - ffPrintLogoAndKey(instance, "Locale"); + ffPrintLogoAndKey(instance, "Locale"); - FFstrbuf locale; - ffStrbufInit(&locale); + FFstrbuf locale; + ffStrbufInit(&locale); - if(ffStrbufIsEmpty(&instance->config.localeFormat)) - { - ffStrbufSetS(&locale, localeCode); - } - else - { - ffParseFormatString(&locale, &instance->config.localeFormat, 1, - (FFformatarg){FF_FORMAT_ARG_TYPE_STRING, localeCode} - ); - } + if(ffStrbufIsEmpty(&instance->config.localeFormat)) + { + ffStrbufSetS(&locale, localeCode); + } + else + { + ffParseFormatString(&locale, &instance->config.localeFormat, 1, + (FFformatarg){FF_FORMAT_ARG_TYPE_STRING, localeCode} + ); + } - ffPrintAndSaveCachedValue(instance, "Locale", locale.chars); - ffStrbufDestroy(&locale); + ffPrintAndSaveCachedValue(instance, "Locale", locale.chars); + ffStrbufDestroy(&locale); }