summaryrefslogtreecommitdiff
path: root/src/stat.c
AgeCommit message (Collapse)Author
2004-06-01(print_stat): Update use of xreadlink.Jim Meyering
2004-04-09undo last changeJim Meyering
2004-04-09Don't include "file-type.h", now that system.h does.Jim Meyering
2004-04-04A specified format is no longer automatically newline terminated.Jim Meyering
If you want a newline at the end of your format, use `\n'. (print_it): Don't print a newline at the end of every format. (do_statfs): Add a newline at end of each default format string.
2004-02-05(human_time): Correct merge problem.Jim Meyering
2004-02-05Include "inttostr.h".Jim Meyering
(human_time): Print the date/time as a number of seconds since the epoch if it can't be converted by localtime. This is better than just saying "invalid", and is consistent with what "ls" does. Don't dump core if the year has more than 48 digits; this isn't possible on any contemporary host, but we might as well do it right.
2004-02-05(human_time): Accept time rather than pointer-to-const-time parameter,Jim Meyering
for clarity. All callers changed.
2004-02-02(do_stat): Remove extra trailing newline from default formats.Jim Meyering
2004-02-02Print actual fractional seconds in time stamps, not just `.00000000'.Jim Meyering
(human_time): Add and use new parameter, t_ns. (print_stat): Update callers.
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
2004-01-08(human_fstype): Use %lx, not %x format for `unsigned long'.Jim Meyering
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-08-27(print_it): Avoid buffer overrun that would occurJim Meyering
when the user-specified format string ends with `%'.
2003-08-25(main): Warn about use of deprecated `-l' option.Jim Meyering
2003-08-22(do_stat): For link count at end of line, use %h format,Jim Meyering
instead of %-5h. The latter would make stat emit trailing spaces.
2003-07-23Don't include headers already included by system.h:Jim Meyering
Don't include closeout.h.
2003-07-23Don't include unistd.h or time.h; system.h already does it.Jim Meyering
2003-06-17(main): Call initialize_main.Jim Meyering
2003-06-17Fix for build failure on Ultrix 4.3.Jim Meyering
Include sys/statvfs.h in preference to sys/vfs.h. Include sys/param.h and sys/mount.h on ultrix.
2003-05-26Fix portability problem on FreeBSD5.0: don't includeJim Meyering
<sys/statvfs.h> on systems without HAVE_STRUCT_STATVFS_F_BASETYPE. Use #if/#elif/... cascade so we get only one set of include files.
2003-04-10add commentJim Meyering
2003-04-10(human_fstype) [__linux__]: Append each hex constant fromJim Meyering
fs.h in a comment after the corresponding `case S_MAGIC_...:' statement.
2003-04-10(human_fstype): Handle Linux's devpts.Jim Meyering
2003-04-07Add #include directives for Ultrix 4.4.Jim Meyering
Based on a suggested change from Bert Deknuydt.
2003-03-22D'oh.Jim Meyering
2003-03-22Don't include <sys/sysmacros.h>.Jim Meyering
That is already done via system.h. Otherwise, the multiple inclusion would evoke redefinition warnings from Cray's /bin/cc (Cray Standard C Version 4.0.3 (057126) Mar 22 2003 22:02:28). (human_fstype): Factor some directives `up', out of this function. Cast away `const' to avoid error from Cray's /bin/cc.
2003-03-07(print_it): Use putchar, not fputs, to output a single character.Jim Meyering
2003-03-04(usage): Capitalize consistently.Jim Meyering
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