Modules: return bool to indicate whether the detection is succeeded

This commit is contained in:
李通洲
2025-08-18 13:38:30 +08:00
parent a9aaa36b2c
commit 3b5e9c74d6
147 changed files with 869 additions and 538 deletions
+3 -1
View File
@@ -33,7 +33,7 @@ static inline uint32_t getWcsWidth(const FFstrbuf* mbstr, wchar_t* wstr, mbstate
return result > 0 ? (uint32_t) result : mbstr->length;
}
void ffPrintSeparator(FFSeparatorOptions* options)
bool ffPrintSeparator(FFSeparatorOptions* options)
{
ffLogoPrintLine();
@@ -111,6 +111,8 @@ void ffPrintSeparator(FFSeparatorOptions* options)
if(options->outputColor.length && !instance.config.display.pipe)
fputs(FASTFETCH_TEXT_MODIFIER_RESET, stdout);
putchar('\n');
return true;
}
void ffParseSeparatorJsonObject(FFSeparatorOptions* options, yyjson_val* module)
+1 -1
View File
@@ -4,7 +4,7 @@
#define FF_SEPARATOR_MODULE_NAME "Separator"
void ffPrintSeparator(FFSeparatorOptions* options);
bool ffPrintSeparator(FFSeparatorOptions* options);
void ffInitSeparatorOptions(FFSeparatorOptions* options);
void ffDestroySeparatorOptions(FFSeparatorOptions* options);