diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2020-02-23 16:30:07 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2020-02-23 18:05:56 -0800 |
| commit | 78e7a7b59d33d1da36b286e3751606a5cea17206 (patch) | |
| tree | d92e38b75425a0ffcb7329789788f32f06813450 /bb.h | |
| parent | 8820fda592b3d382d6d7814fbbb13b51fb33b822 (diff) | |
Working version of pulling columns into their own file.
Diffstat (limited to 'bb.h')
| -rw-r--r-- | bb.h | 20 |
1 files changed, 2 insertions, 18 deletions
@@ -97,11 +97,6 @@ typedef struct { char *description; } binding_t; -typedef struct { - int width; - const char *name; -} column_t; - typedef enum { COL_NONE = 0, COL_NAME = 'n', @@ -181,24 +176,11 @@ typedef struct proc_s { static binding_t bindings[MAX_BINDINGS]; -// Column widths and titles: -static const column_t columns[] = { - ['*'] = {2, "*"}, - ['a'] = {18, " Accessed"}, - ['c'] = {18, " Created"}, - ['m'] = {18, " Modified"}, - ['n'] = {40, "Name"}, - ['p'] = {5, "Permissions"}, - ['r'] = {2, "Random"}, - ['s'] = {9, " Size"}, -}; - // Functions void bb_browse(bb_t *bb, const char *initial_path); static void check_cmdfile(bb_t *bb); static void cleanup(void); static void cleanup_and_raise(int sig); -static const char* color_of(mode_t mode); #ifdef __APPLE__ static int compare_files(void *v, const void *v1, const void *v2); #else @@ -340,4 +322,6 @@ static const char *runstartup = " fi;\n" "done\n"; +#include "columns.h" + // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1 |
