fixed colours for filepath arguments
This commit is contained in:
1 parent
d256d2b863
commit
55cb861a94
2 files changed
+13
-4
No files matched your search
+2
-2
@@ -11,11 +11,11 @@ const uint32_t permission_colour = 0xD0D0D0;
|
||||
|
||||
#define DATE_STYLE_NUM ( ( int )1 )
|
||||
const style_t date_style[ DATE_STYLE_NUM ] = { style_none };
|
||||
const uint32_t date_colour = 0xBBEEEE;
|
||||
const uint32_t date_colour = 0x808080;
|
||||
|
||||
#define USER_STYLE_NUM ( ( int )1 )
|
||||
const style_t user_style[ USER_STYLE_NUM ] = { style_none };
|
||||
const uint32_t user_colour = 0xEEBBEE;
|
||||
const uint32_t user_colour = 0x748CE0;
|
||||
|
||||
#define TYPE_STYLE_NUM ( ( int )1 )
|
||||
const style_t type_style[ TYPE_STYLE_NUM ] = { style_none };
|
||||
|
||||
+11
-2
@@ -66,15 +66,24 @@ int main( int argc, char** argv )
|
||||
else if ( !S_ISDIR( status.st_mode ) )
|
||||
{
|
||||
char* name = basename( args.path[ n ] );
|
||||
|
||||
directory_entry_t file =
|
||||
{
|
||||
.extension = strrchr( name, '.' ),
|
||||
.stats = status,
|
||||
.type = get_entry_type( status )
|
||||
};
|
||||
strncpy( file.name, name, NAME_MAX );
|
||||
// TODO: fix colours
|
||||
file.extension = strrchr( file.name, '.' );
|
||||
if ( file.extension == file.name )
|
||||
{
|
||||
file.extension = NULL;
|
||||
}
|
||||
else if ( file.extension )
|
||||
{
|
||||
file.extension += 1;
|
||||
}
|
||||
display_entry( &file, &args );
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user