On Mon, 2 May 2022 01:40:39 +0800
Kang-Che Sung <[email protected]> wrote:

> Hi Roger,
> 
> May I suggest you add an option to draw the tree lines using ASCII
> characters only, and make the Unicode support optional at build time?
> 
> I just feel uncomfortable when I see source code containing embedded UTF-8
> characters and the strings have no ASCII alternative.
> 
> The DOS tree command has the "/a" option. You know what I mean.
> 
> Thank you.

Hi,
something like ?:

#ifdef CONFIG_TREE_ASCII_ONLY
#define PREFIX_CHILD "|- "
#define PREFIX_LAST_CHILD "|_ "
#define PREFIX_GRAND_CHILD "|  "
#define PREFIX_LAST_GRAND_CHILD "   "
#else
#define PREFIX_CHILD "├── "
#define PREFIX_LAST_CHILD "└── "
#define PREFIX_GRAND_CHILD "│   "
#define PREFIX_LAST_GRAND_CHILD "    "
#endif

Ciao,
Tito

> On Sunday, May 1, 2022, Roger Knecht <[email protected]> wrote:
> > Add new applet which resembles the MS-DOS tree program to list
> directories and files in a tree structure.
> >
> > function                                             old     new   delta
> > tree_print                                             -     388    +388
> > .rodata                                            95678   95767     +89
> > tree_main                                              -      73     +73
> > tree_print_prefix                                      -      28     +28
> > packed_usage                                       34417   34429     +12
> > globals                                                -       8      +8
> > applet_main                                         3192    3200      +8
> > applet_names                                        2747    2752      +5
> >
> ------------------------------------------------------------------------------
> > (add/remove: 5/0 grow/shrink: 4/0 up/down: 611/0)             Total: 611
> bytes
> >
> > Signed-off-by: Roger Knecht <[email protected]>
> > ---
> > Changelog:
> >
> > V4:
> > - Rephrase commit message
> > - Updated bloatcheck to latest master
> >
> > V3:
> > - Fixed symlink handling
> > - Handle multiple directories in command line arguments
> > - Extended tests for symlink and multiple directories
> > - Reduced size by using libbb functions
> >
> > V2:
> > - Fixed tree help text
> > - Reduced size by 644 bytes
> >

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to