/* ** wdir.c ** ** http://willus.com ** ** 1.34 3-2-18 ** * Added -fls option. ** ** 1.33 2-12-18 ** * Fixed bug freeing "sizes" var in wdir_sum() function. ** * Got it to compile with no warnings in gcc 7.2. ** ** 1.32 1-24-18 ** * Compiled with faster filelist_fill_from_disk() function that ** doesn't excessively check for symbolic links. Runs much more ** quickly on network drives in particular. ** ** 1.31 3-7-17 ** * -fww works for special network drive. ** ** 1.30 2-13-16 ** * Fixed wdir -sum so it responds to file arguments again. I think ** I broke it in v1.29. ** ** 1.29 10-26-15 ** * Can save and read a file list for processing ** ** 1.28 4-15-15 ** * Added -fl option--forces net drives to use file:/// convention. ** ** 1.27 10-17-14 ** * Does symbolic links (mount points with mklink) in Windows ** ** 1.26 5-8-14 ** * Fixed bug in linux version opening files (wz_open_special). ** ** 1.25 5-6-14 ** * -fww, if network drive, copies HTML link to clipboard if ** used with -c. ** ** 1.24 10-3-13 ** * Added -nx option. ** ** 1.23 3-15-13 ** * Use WDIR_HOSTNAME_ALIAS for -fww addresses if exists. ** ** 1.22 1-23-13 ** * Smarter about volumes beginning with \\ in Windows. ** (added get_drive_and_abs_path() function) ** * Look for up to Apache 2.4 with -fww. ** ** 1.21 1-16-13 ** * List -rz option in usage. Clean up a minor linux bug. ** ** 1.20 3-28-12 ** * Add -rz option to search through zip/7z archives (even works ** recursively and with -g option!). Requires 7z/zip/unzip to ** be in your command path. ** ** 1.15 6-28-11 ** * Include .7z in brown extensions. ** ** 1.14 2-10-11 ** * Put quotes around file names w/spaces in -ds and -gs options. ** ** 1.13 1-8-10 ** * Smarter search for Apache config file. ** ** 1.12 10-2-09 ** * Colorize .docx, .xlsx, .pptx, .xls, .ppt, .pdf. ** ** 1.11 8-19-08 ** * Looks through your Apache2 configuration file for aliases ** with the -fww option and names files accordingly. ** ** 1.10 4-16-08 ** *? acts as wildcard in -g. (only binary) ** ** 1.09 2-18-08 ** *Correctly reports dates for FAT volumes now (daylight savings ** time issue). ** ** 1.08 2-5-08 ** *List directories too in recursive listings with -dt flag. ** ** 1.07 7-19-07 ** *Made -ds and -gs more Linux friendly ** *Added -id (interactive delete) option ** ** 1.06 5-7-07 ** -c only (and always) quotes names w/spaces in them. ** -d -r now correctly recursively lists directories. ** ** 1.05 4-20-07 ** -c option automatically stores the last file name echoed ** to the display to the clipboard (Win32 only for now). ** ** 1.04 2-6-07 ** Uses new FILELIST structure which has no MAXFILENAMELEN and ** uses memory much more efficiently. ** ** 1.03 10-27-06 ** Increased max number of -i/-e to 128. ** ** 1.02 6-15-06 ** MAXFILENAMELEN cut back to 512 to conserve memory. ** Modified parsing of "dir" and "spec" in main() so that ** requests such as "wdir -r *\c.vim" will work as expected. ** ** 1.01 6-2-06 ** Changed [MAXFILENAMELEN] length strings to [MAXFILENAMELEN]. ** wdir can now handle complete file names up to 1024 chars. ** (Previous limit was 256.) ** ** 1.00 4-7-06 ** First version number even though this thing has already had ** many, many revisions. ** */