null
- C 97.5%
- Makefile 2.5%
|
Old Man Programmer
22a2e26820
Version 2.1.0 (12/26/2022)
This is a bit bigger release, due to not realizing that gitlab/github was not sending me email and ice+tree@mama.indstate.edu was broken. This has been fixed and I think I have gone through most all of the outstanding issues that were submitted over the last few months. Note to those that are sending me git merge requests: because I distribute this in multiple ways and places, and I tend to manually go over patches and often re-work them in any event, I will not likely ever directly accept any merge requests. I will still use the patch information from them for inclusion into the code, so you are more than welcome to still submit such merges. - Add support for --info and --gitignore for the --fromfile option. (Suggested by Piotr Andruszkow) - Add options --infofile and --gitfile to load .info and .gitignore files explicitly. Each implies --info or --gitignore respectively. - Add NULL guard for json_printinfo() and xml_printinfo() (and fix ftype printing for XML) (Kenta Arai) - Fix getcharset() to not return a getenv() pointer (fix for ENV34-C issue.) (Kenta Arai) - Another attempt at fixing extraneous /'s in HTML URLs/output. (Sebastian Rose) - Fixed XML output (Dave Rice) - Remove the (very outdated) French version of the manpage. Look to localization projects such as Debian's 'manpages-l10n' for localized translations. (hmartink) - Add support for the NO_COLOR environment variable (https://no-color.org/). Equivalent to the -n option (can be still be overridden with -C). (Timm Fitschen) - Removed many C99isms to enable compiling on C90 compilers with fewer warnings. (Sith Wijesinghe and Matthew Sessions) It should not be necessary to avoid using a standard that is old enough to drink, furthermore it is all but impossible to remove the remaining warnings and have modern features like compound literals. In the meantime I've added -std=c11 to the default CFLAGS for Linux and will likely not worry about C90 compatibility going forward unless there is some other reason for it. - Added a helper function for long command line arguments to clean up option processing (and fixes the processing for a few of the options such as --timefmt= (наб?).) - Added --hintro and --houtro options to select files to use as the HTML intro and outro. Use /dev/null or an empty file to eliminate them entirely. This should make it much easier to create your own custom CSS or embed one or more trees into a web page. - Defer printing the version until the character set is known so we can use the linedraw copyright symbol. - Revert change to the error code to not return an error (code 2) when attempting to list a non-directory that actually exists. Tree will still return an error when attempting to list a non-existing directory/file. - Added option --fflinks which will process symbolic link information from a file generated with 'tree -if --noreport' when using --fromfile. (Suggested by Chentao Credungtao) - Updated the totals reporting code to also include in the total the file or directory that is being listed. This should make a correct report when doing something like 'tree *'. |
||
|---|---|---|
| doc | Version 2.1.0 (12/26/2022) | |
| CHANGES | Version 2.1.0 (12/26/2022) | |
| color.c | Version 2.1.0 (12/26/2022) | |
| file.c | Version 2.1.0 (12/26/2022) | |
| filter.c | Version 2.1.0 (12/26/2022) | |
| hash.c | Version 2.0.3 (08/26/2022) | |
| html.c | Version 2.1.0 (12/26/2022) | |
| info.c | Version 2.1.0 (12/26/2022) | |
| INSTALL | Version 1.8.0 (11/16/2018) | |
| json.c | Version 2.1.0 (12/26/2022) | |
| LICENSE | Version 1.5.0 | |
| list.c | Version 2.1.0 (12/26/2022) | |
| Makefile | Version 2.1.0 (12/26/2022) | |
| README | Version 2.1.0 (12/26/2022) | |
| strverscmp.c | Version 2.0.0 (12/21/2021) | |
| TODO | Version 2.0.0 (12/21/2021) | |
| tree.c | Version 2.1.0 (12/26/2022) | |
| tree.h | Version 2.1.0 (12/26/2022) | |
| tree.lsm | Version 2.1.0 (12/26/2022) | |
| unix.c | Version 2.0.3 (08/26/2022) | |
| xml.c | Version 2.1.0 (12/26/2022) | |
Please read the INSTALL file for installation instructions, particularly if you are installing on a non-Linux machine. This is a handy little utility to display a tree view of directories that I wrote some time ago and just added color support to. I've decided that since no one else has done something similar I would go ahead and release it, even though it's barely a 1st year CS student hack. I've found it damn handy to peruse a directory tree though, especially when someone is trying to hide something from you. The main distribution site for tree is here: http://oldmanprogrammer.net/code.php?src=tree Backup GIT sites are: https://gitlab.com/OldManProgrammer/unix-tree https://github.com/Old-Man-Programmer/tree Old site for as long as it lasts: http://mama.indstate.edu/users/ice/tree/ ftp://mama.indstate.edu/linux/tree/ If you don't like the way it looks let me know how you think it should be formatted. Feel free to suggest modifications and additions. Thanks go out so the following people who have helped bring tree to the pinnacle of perfection that it is: ;) Francesc Rocher - Added HTML output (-H). - Added options -o, -L and -R. Gerald Scheidl - Added -S option to print ASCII graphics lines for use under linux console when an alternate console font has been selected (might also work under DOS telnet). Guido Socher (and others) - Made tree more portable. Should compile under solaris. Mitja Lacen - Discovered bug where tree will segmentation fault on long pathnames. - Discovered in -L argument processing. Nathaniel Delage - Discovered problem with recursive symlink detection A. Karthik - Suggested option to remove file and directory report at end of tree listing. Roger Luethi - Spotted memory over-allocation bug in read_dir(). - Submitted several patches to fix various memory leaks. Daniel Lee - Reported that Tru64 defines TRUE/FALSE in sys/types.h (OSF1 standard?) Paolo Violini - Found bug in tree that caused it to seg-fault if 50 file arguments where given and directory coloring was turned on. Mitsuaki Masuhara - Discovered tree crashed on missing arguments. - Discovered that tree did not properly encode characters in filenames when used as URLs when using the -H option. - Fixed issue with --charset option processing. Johan Fredrik - Pointed out that tree did not list large files. Ted Tiberio - Submitted patch which fixed a compiler issue and cleaned up HTML and CSS code, applied CSS to all output, and fixed up HTML to 4.01 strict standards. David MacMahon - Added '|' support to the pattern matching routines. Dan Jacobson - Pointed out that -t did not sort properly for files with the same timestamp. - Suggested option to change HTML title and H1 string. - Suggested -r option for reversed alphanumeric sort ala 'ls -r'. Kyosuke Tokoro - Provided patch to support OS/2, fix HTML encoding, provide charset support. Added to authors list. Florian Ernst - Debian maintainer who pointed out problems and applied fire to feet to fix stuff. Jack Cuyler - Suggested -h option for human readable output for -s, ala ls -lh. Jonathon Cranford - Supplied patch to make tree under cygwin. Richard Houser - Provided patch to fix a colorization bug when dealing with special files and directories that seem to have an extension. Zurd (?) - Suggested removing trailing slash on user supplied directory names if -f option is used. John Nintendud - Pointed out broken HTML output in 1.5.1. Mark Braker - Suggested --filelimit option. Michael Vogt - Suggested -v option (version sort). Wang Quanhong - Provided build options for Solaris. Craig McDaniel - Provided build options and source mods for HP NonStop support. Christian Grigis - Noted that setlocale() should come before MB_CUR_MAX check. Kamaraju Kusumanchi - Submitted patch to remove compiler warnings for Solaris. Martin Nagy - Provided patch which fixes issue where indent may output more than it should when dirs[*] is not properly cleared before use. William C. Lathan III - Showed that tree was not properly quoting arguments to recursively called tree instances when using -R. Ulrich Eckhardt - Submitted patch for --si option. Tim Waugh (redhat) - Pointed out a potential memory leak in listdir(). Markus Schnalke - Tracked down bug where tree would print "argetm" before the filename of a symbolic link when the "target" option was specified for LINK in dircolors. Ujjwal Kumar - Suggested that tree backslash spaces like ls does for script use. Made output more like ls. Ivan Shmakov - Pointed out multiple CLI defenciencies (via Debian) Mantas Mikulnas - Provided patch to make tree more reliably detect the UTF-8 locale. Tim Mooney - Noticed S_ISDOOR/S_IFDOOR spelling mistake for under Solaris. Han Hui - Pointed out possible memory overflow in read_dir (path/lbuf not equal in size to pathsize/lbufsize.) Ryan Hollis - Pointed out problems with the Makefile w/ respect to OSX. Philipp M?ller - Provided patch for filesize sorting. Sascha Zorn - Pointed out that the HTML output was broken when -L 1 option was used. Alexandre Wendling - Pointed out that modern systems may use 32 bit uid/gids which could lead to a potential buffer overflow in the uid/gid to name mapping functions. Florian Sesser - Provided patch to add JSON support. Brian Mattern & Jason A. Donenfeld - Provided patch to add --matchdirs functionality. Jason A. Donenfeld - Added --caseinsentive, renamed --ignore-case option. - Bugged me a lot. Stephan Gabert - Found a bug where the wrong inode (and device) information would be printed for symbolic links. Nick Craig-Wood - Fixed issue where mbstowcs() fails to null terminate the string due to improper UTF-8 encoding leading to garbage being printed. Mantas Mikulėnas - Fixed issue with malformed multibyte string handling. Wagner Camarao - Pointed out that JSON size output ignored -h/--si flags John Lane, Tad, others - Fixed JSON output hanging commas Jacob Wahlgren - Improved command line switch error reporting. - Symbolic links not displayed if a -P pattern is active - Missing argument error reporting fixes on long format switches. Shawn Mehan - Update BINDIR in Makefile for MacOS X -- It is not allowed to install programs to /usr/bin on MacOS X any longer due to System Integrity Protection (SIP) Kirill Kolyshkin - Some man page fixes and cleanups Alyssa Ross - Suggested adding support for BSD's CLICOLOR and CLICOLOR_FORCE environment variables. Tomáš Beránek - Make sure we always use xmalloc / xrealloc Sergei Maximov - Make XML/HTML/JSON output mutually exclusive. Jonas Stein - Deprecate using local -DLINUX / -DCYGWIN and use the OS provided defines John A. Fedoruk - Suggested --filesfirst option. Michael Osipov - Optimized makefile, HP/UX support. Richard Mitchell - Suggested --metafirst option Paul Seyfert - Honor -n (no color) even if the CLICOLOR_FORCE environment variable is set Filips Romāns via Debian - Make tree colorization use reset (rs code in dir_colors,) not normal color when resetting attributes. Chentao Credungtao via Debian - Properly sort --fromfile input Jake Zimmerman (and others) - Suggest support for .gitignore files (--gitignore option) Eric Pruitt - Always HTML escape filenames in HTML output even when -C is used. Michiel Beijen (and others) - Suggest Support multiple -I and -P instances. - Suggest that / match directories in patterns (also Taylor Faubion) - Suggested to update MANPATH for OS X Michal Vasilek - Various Makefile fixes Josey Smith - Reported an error with * in the patchmatch code where *foo*bar would match *foo alone. Maxim Cournoyer - Reported HTML url output issue w/ 2.0.0-2.0.1 Kenta Arai - Reported Segfault with --filelimit option Ben Brown - Updates to the Makefile - Reported use after free error Erik Skultety - Reported same use after error Saniya Maheshwari / Mig-hub ? / Carlos Pinto - Reported various issues with --gitignore Piotr Andruszkow - Suggested adding support for --info and --gitignore for the --fromfile option. Kenta Arai - Add NULL guard for json_printinfo() and xml_printinfo() (and fix ftype printing for XML) - Fix getcharset() to not return a getenv() pointer. Sebastian Rose - Another attempt at fixing extraneous /'s in HTML URLs/output. Dave Rice - Fixed XML output Timm Fitschen - Suggest adding support for the NO_COLOR environment variable. Chentao Credungtao - Suggested supporting symbolic links in --fromfile (--fflinks option) Sith Wijesinghe and Matthew Sessions - Remove many C90 isms to make compiling with C90 compilers easier. And many others whom I've failed to keep track of. I should have started this list years ago. - Steve Baker oldmanprogrammer.llc@gmail.com