diff options
author | Jim Meyering <jim@meyering.net> | 1998-08-02 16:23:06 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-08-02 16:23:06 +0000 |
commit | e71d9696d7d917186cf6ee5fc807067e5fa3d5e1 (patch) | |
tree | fdfd7a265a266d715ba39b68a02665f50f2dcd84 /src | |
parent | 6e1306ba8b02bc3113d110cbfeab33a8f7488e83 (diff) | |
download | coreutils-e71d9696d7d917186cf6ee5fc807067e5fa3d5e1.tar.xz |
(compare_ctime, rev_cmp_ctime, compare_mtime,
rev_cmp_mtime, compare_atime, rev_cmp_atime): Compare time
stamps with subsecond resolution if available.
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1982,7 +1982,7 @@ sort_files (void) static int compare_ctime (const struct fileinfo *file1, const struct fileinfo *file2) { - int diff = longdiff (file2->stat.st_ctime, file1->stat.st_ctime); + int diff = CTIME_CMP (file2->stat, file1->stat); if (diff == 0) diff = strcmp (file1->name, file2->name); return diff; @@ -1991,7 +1991,7 @@ compare_ctime (const struct fileinfo *file1, const struct fileinfo *file2) static int rev_cmp_ctime (const struct fileinfo *file2, const struct fileinfo *file1) { - int diff = longdiff (file2->stat.st_ctime, file1->stat.st_ctime); + int diff = CTIME_CMP (file2->stat, file1->stat); if (diff == 0) diff = strcmp (file1->name, file2->name); return diff; @@ -2000,7 +2000,7 @@ rev_cmp_ctime (const struct fileinfo *file2, const struct fileinfo *file1) static int compare_mtime (const struct fileinfo *file1, const struct fileinfo *file2) { - int diff = longdiff (file2->stat.st_mtime, file1->stat.st_mtime); + int diff = MTIME_CMP (file2->stat, file1->stat); if (diff == 0) diff = strcmp (file1->name, file2->name); return diff; @@ -2009,7 +2009,7 @@ compare_mtime (const struct fileinfo *file1, const struct fileinfo *file2) static int rev_cmp_mtime (const struct fileinfo *file2, const struct fileinfo *file1) { - int diff = longdiff (file2->stat.st_mtime, file1->stat.st_mtime); + int diff = MTIME_CMP (file2->stat, file1->stat); if (diff == 0) diff = strcmp (file1->name, file2->name); return diff; @@ -2018,7 +2018,7 @@ rev_cmp_mtime (const struct fileinfo *file2, const struct fileinfo *file1) static int compare_atime (const struct fileinfo *file1, const struct fileinfo *file2) { - int diff = longdiff (file2->stat.st_atime, file1->stat.st_atime); + int diff = ATIME_CMP (file2->stat, file1->stat); if (diff == 0) diff = strcmp (file1->name, file2->name); return diff; @@ -2027,7 +2027,7 @@ compare_atime (const struct fileinfo *file1, const struct fileinfo *file2) static int rev_cmp_atime (const struct fileinfo *file2, const struct fileinfo *file1) { - int diff = longdiff (file2->stat.st_atime, file1->stat.st_atime); + int diff = ATIME_CMP (file2->stat, file1->stat); if (diff == 0) diff = strcmp (file1->name, file2->name); return diff; |