summaryrefslogtreecommitdiff
path: root/src/stat.c
AgeCommit message (Collapse)Author
2003-02-21(usage): Tweak wording of %B description.Jim Meyering
2003-02-20(usage) [%b]: Refer to %B.Jim Meyering
2003-02-20(print_stat): New format: %B (to print ST_NBLOCKSIZE).Jim Meyering
(usage): Describe it.
2003-02-01(G_fail): New global.Jim Meyering
(human_time): Diagnose failed localtime, not failed nstrftime. (main): Fail if G_fail is set.
2003-01-31Include "file-type.h"Jim Meyering
(print_human_type): Remove function. (human_access): Rename from print_human_access. Return a string. (human_time): Rename from print_human_time. Return a string. (print_stat): Arrange so that field width and an alignment specifier are honored for the %A, %F, %x, %y, and %z formats. [%F]: Use file_type; this gives slightly different file type strings, e.g., `directory' instead of `Directory' and `regular file' or `regular empty file' instead of `Regular file'.
2003-01-31(print_stat): Use S_ISLNK rather than an explicitJim Meyering
test using S_IFMT and S_IFLNK. S_IFLNK may not be defined.
2003-01-27(print_stat): Use ST_NBLOCKS rather than `->st_blocks'.Jim Meyering
2002-12-15Remove declaration of nstrftime.Jim Meyering
Include strftime.h instead.
2002-12-01Don't include <string.h> or <ctype.h>.Jim Meyering
That's already done via system.h.
2002-11-10(usage): Transform --help output via s/ - / /,Jim Meyering
so that help2man produces properly formatted man pages.
2002-09-22(PRIdMAX, PRIuMAX): Remove definitions.Jim Meyering
Now they're defined through system.h.
2002-09-22Remove all inclusions of inttypes.h,Jim Meyering
since it's already included from sys2.h via system.h.
2002-07-26Don't include malloc.h -- it was unnecessary.Jim Meyering
2002-07-22(usage): The short form of --dereference is now -L, not -l.Jim Meyering
2002-07-16(print_it): Use memcpy and a little pointer arithmetic, rather than stpncpy.Jim Meyering
2002-07-13(print_it): Use xstrdup, not strdup.Jim Meyering
Use strspn to avoid an explicit loop. Use fputc rather than printf "\n". Include quote.h. (print_stat): Use xreadlink, rather than using readlink directly. Use the quote function rather than hard-coded double quotes. Use error, not perror.
2002-07-06Remove everything associated with --secure option.Jim Meyering
2002-07-03(usage): Rename --link/-l to --dereference/-L.Jim Meyering
Describe --secure. Describe --format. (main): Support -L. Deprecate -l.
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2002-06-29(print_statfs): Use `fputc ('*', stdout)'Jim Meyering
instead of the combination of strcat and printf. (print_statfs) [!FLASK_LINUX]: Print `*' for %S and %C, rather than `S' and `C'. (print_stat) [!FLASK_LINUX]: Likewise.
2002-06-24(usage): Add missing open-quote.Jim Meyering
2002-06-21Include sys/statvfs.h.Jim Meyering
[!HAVE_SYS_STATVFS_H && !HAVE_SYS_VFS_H]: Include sys/param.h and sys/mount.h, to get decl of struct statfs on NetBSD 1.5.2. (NAMEMAX_FORMAT, STRUCT_STATVFS): Define. (HAVE_STRUCT_STATXFS_F_TYPE, SB_F_NAMEMAX): Define. Remove `static' attribute from decl of program_name. (human_fstype): Use f_basetype or f_fstypename if available. (print_human_time): Use nstrftime and an ISO format string, in place of strftime with `%c'. The latter is too locale-dependent. (print_statfs): Deal with lots of portability issues: some fields are available only with statfs, others only with statvfs, and some are available in both, but with different types. (do_statfs) [DEFAULT_FORMAT_TERSE]: Factor out. [DEFAULT_FORMAT_VERBOSE]: Likewise.
2002-04-16(human_fstype): Rename from print_human_fstype, and rework accordingly.Jim Meyering
(print_statfs): Use human_fstype to honor format width on %T.
2002-04-16Add copyright comment.Jim Meyering
2002-04-15Handle "lld" vs "ld" printf formats the same way Bash does.Jim Meyering
Include inttypes.h. (PRIdMAX, PRIuMAX): Define, if not already defined. (print_statfs): Use those macros, not the literal strings. (print_stat): Likewise.
2002-04-15(print_human_fstype): Add missing `break;' for `case S_MAGIC_MINIX:'.Jim Meyering
2002-04-15remove parens in #if directivesJim Meyering
2002-04-14(statfs_secure): Define.Jim Meyering
(print_stat): Remove another #ifdef. (do_statfs): Likewise. (print_statfs): Prefer/use fputs over printf. (print_stat): Likewise.
2002-04-14filter through GNU indentJim Meyering
2002-04-14Split some long lines.Jim Meyering
(verbose_usage): Remove function.
2002-04-14(verbose_usage): Remove function. Move contents into usage.Jim Meyering
Remove lots of #if directives involving FLASK_LINUX [!FLASK_LINUX] (is_flask_enabled): Define. (stat_secure, lstat_secure): Define. (print_statfs): Remove lots of nested #if directives. Instead, rely on support fo %llu and %lld printf formats -- but that is only temporary, since it's not porable enough. (main): Hoist is_flask_enabled test to be done here, rather than in each of do_stat and do_statfs for every argument.
2002-04-14[HAVE_SYS_VFS_H]: Guard incluion of sys/vfs.h.Jim Meyering
Constify many parameters. (print_statfs): Fix typo: Use %u (to match %lu) for namelen, not %d.
2002-04-13add a couple `const'Jim Meyering
2002-04-13(print_human_fstype): Revamp in a similar fashion. Don't use strdup.Jim Meyering
2002-04-13(print_human_type): Call fputs once rather than calling printf many times.Jim Meyering
Declare most functions to be `static'.
2002-04-13Include system.h, error.h, and many other headers.Jim Meyering
[HAVE_SYS_SYSMACROS_H]: Guard inclusion of sys/sysmacros.h. (PROGRAM_NAME, AUTHORS): Define. (long_options): Declare/define. (print_human_access): Rewrite to use mode_string. (usage): Rewrite. (main): Use getopt_long.
2002-04-13Direct from Debian's stat_3.3-1, modulo trailing blanks (removed)Jim Meyering
and cpp directive (indented via cppi).
2002-02-26.Jim Meyering
2001-12-16use generated fs_name functionJim Meyering
2001-12-02Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions.
2001-11-26*** empty log message ***Jim Meyering