Deleted Added
full compact
print.c (242807) print.c (242840)
1/*-
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Michael Fischbein.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 */
32
33#if 0
34#ifndef lint
35static char sccsid[] = "@(#)print.c 8.4 (Berkeley) 4/17/94";
36#endif /* not lint */
37#endif
38#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Michael Fischbein.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 22 unchanged lines hidden (view full) ---

31 */
32
33#if 0
34#ifndef lint
35static char sccsid[] = "@(#)print.c 8.4 (Berkeley) 4/17/94";
36#endif /* not lint */
37#endif
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/bin/ls/print.c 242807 2012-11-08 23:45:19Z grog $");
39__FBSDID("$FreeBSD: head/bin/ls/print.c 242840 2012-11-09 20:19:56Z peter $");
40
41#include <sys/param.h>
42#include <sys/stat.h>
43#include <sys/acl.h>
44
45#include <err.h>
46#include <errno.h>
47#include <fts.h>

--- 107 unchanged lines hidden (view full) ---

155 (void)printf("%*ju ",
156 dp->s_inode, (uintmax_t)sp->st_ino);
157 if (f_size)
158 (void)printf("%*jd ",
159 dp->s_block, howmany(sp->st_blocks, blocksize));
160 strmode(sp->st_mode, buf);
161 aclmode(buf, p);
162 np = p->fts_pointer;
40
41#include <sys/param.h>
42#include <sys/stat.h>
43#include <sys/acl.h>
44
45#include <err.h>
46#include <errno.h>
47#include <fts.h>

--- 107 unchanged lines hidden (view full) ---

155 (void)printf("%*ju ",
156 dp->s_inode, (uintmax_t)sp->st_ino);
157 if (f_size)
158 (void)printf("%*jd ",
159 dp->s_block, howmany(sp->st_blocks, blocksize));
160 strmode(sp->st_mode, buf);
161 aclmode(buf, p);
162 np = p->fts_pointer;
163 (void)printf("%s %*u %-*s %-*s ", buf, dp->s_nlink,
163 (void)printf("%s %*u %-*s %-*s ", buf, dp->s_nlink,
164 sp->st_nlink, dp->s_user, np->user, dp->s_group,
165 np->group);
166 if (f_flags)
167 (void)printf("%-*s ", dp->s_flags, np->flags);
168 if (f_label)
169 (void)printf("%-*s ", dp->s_label, np->label);
170 if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode))
171 printdev(dp->s_size, sp->st_rdev);

--- 205 unchanged lines hidden (view full) ---

377 else if (f_sectime)
378 /* mmm dd hh:mm:ss yyyy || dd mmm hh:mm:ss yyyy */
379 format = d_first ? "%e %b %T %Y" : "%b %e %T %Y";
380 else if (ftime + SIXMONTHS > now && ftime < now + SIXMONTHS)
381 /* mmm dd hh:mm || dd mmm hh:mm */
382 format = d_first ? "%e %b %R" : "%b %e %R";
383 else
384 /* mmm dd yyyy || dd mmm yyyy */
164 sp->st_nlink, dp->s_user, np->user, dp->s_group,
165 np->group);
166 if (f_flags)
167 (void)printf("%-*s ", dp->s_flags, np->flags);
168 if (f_label)
169 (void)printf("%-*s ", dp->s_label, np->label);
170 if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode))
171 printdev(dp->s_size, sp->st_rdev);

--- 205 unchanged lines hidden (view full) ---

377 else if (f_sectime)
378 /* mmm dd hh:mm:ss yyyy || dd mmm hh:mm:ss yyyy */
379 format = d_first ? "%e %b %T %Y" : "%b %e %T %Y";
380 else if (ftime + SIXMONTHS > now && ftime < now + SIXMONTHS)
381 /* mmm dd hh:mm || dd mmm hh:mm */
382 format = d_first ? "%e %b %R" : "%b %e %R";
383 else
384 /* mmm dd yyyy || dd mmm yyyy */
385 format = d_first ? "%e %b %Y" : "%b %e %Y";
385 format = d_first ? "%e %b %Y" : "%b %e %Y";
386 strftime(longstring, sizeof(longstring), format, localtime(&ftime));
387 fputs(longstring, stdout);
388 fputc(' ', stdout);
389}
390
391static int
392printtype(u_int mode)
393{

--- 293 unchanged lines hidden ---
386 strftime(longstring, sizeof(longstring), format, localtime(&ftime));
387 fputs(longstring, stdout);
388 fputc(' ', stdout);
389}
390
391static int
392printtype(u_int mode)
393{

--- 293 unchanged lines hidden ---