implemented style for pdfs

This commit is contained in:
root committed 2026-10-21 20:28:33 +02:00
1 parent 46bf3c23c3
commit 8772d10c4c
2 files changed
+21 -6

No files matched your search

+13 -2
View File
@@ -20,6 +20,7 @@ void display_permissions( const char* const permissions, bool no_colour );
bool compare_makefile( const directory_entry_t* const entry );
bool compare_archives( const directory_entry_t* const entry );
bool compare_sources( const directory_entry_t* const entry );
bool compare_pdf( const directory_entry_t* const entry );
static void size_to_string(
const directory_entry_t* const entry,
char* file_size,
@@ -293,10 +294,15 @@ void set_file_style( const directory_entry_t* const entry )
format_set_style( &source_style[ 0 ], SRC_STYLE_NUM );
format_set_colour( source_colour );
}
else if ( compare_pdf( entry ) )
{
format_set_style( &pdf_style[ 0 ], PDF_STYLE_NUM );
format_set_colour( pdf_colour );
}
else
{
format_set_style( &others_style[ 0 ], OTH_STYLE_NUM );
format_set_colour( others_colour );
format_set_style( &regular_style[ 0 ], REG_STYLE_NUM );
format_set_colour( regular_colour );
}
}
@@ -331,6 +337,11 @@ bool compare_sources( const directory_entry_t* const entry )
|| 0 == compare_strings( entry->extension, "rs", 3, true );
}
bool compare_pdf( const directory_entry_t* const entry )
{
return 0 == compare_strings( entry->extension, "pdf", 4, true );
}
void size_to_string(
const directory_entry_t* const entry,
char* file_size,