Deleted Added
full compact
ls.c (157098) ls.c (157100)
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

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

37#endif /* not lint */
38
39#if 0
40#ifndef lint
41static char sccsid[] = "@(#)ls.c 8.5 (Berkeley) 4/2/94";
42#endif /* not lint */
43#endif
44#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

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

37#endif /* not lint */
38
39#if 0
40#ifndef lint
41static char sccsid[] = "@(#)ls.c 8.5 (Berkeley) 4/2/94";
42#endif /* not lint */
43#endif
44#include <sys/cdefs.h>
45__FBSDID("$FreeBSD: head/bin/ls/ls.c 157098 2006-03-24 16:38:02Z jhb $");
45__FBSDID("$FreeBSD: head/bin/ls/ls.c 157100 2006-03-24 16:47:22Z jhb $");
46
47#include <sys/types.h>
48#include <sys/stat.h>
49#include <sys/ioctl.h>
50#include <sys/mac.h>
51
52#include <dirent.h>
53#include <err.h>

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

411 (void)getbsize(&notused, &blocksize);
412 blocksize /= 512;
413 }
414 }
415 /* Select a sort function. */
416 if (f_reversesort) {
417 if (!f_timesort && !f_sizesort)
418 sortfcn = revnamecmp;
46
47#include <sys/types.h>
48#include <sys/stat.h>
49#include <sys/ioctl.h>
50#include <sys/mac.h>
51
52#include <dirent.h>
53#include <err.h>

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

411 (void)getbsize(&notused, &blocksize);
412 blocksize /= 512;
413 }
414 }
415 /* Select a sort function. */
416 if (f_reversesort) {
417 if (!f_timesort && !f_sizesort)
418 sortfcn = revnamecmp;
419 else if (f_sizesort)
420 sortfcn = revsizecmp;
419 else if (f_accesstime)
420 sortfcn = revacccmp;
421 else if (f_birthtime)
422 sortfcn = revbirthcmp;
423 else if (f_statustime)
424 sortfcn = revstatcmp;
421 else if (f_accesstime)
422 sortfcn = revacccmp;
423 else if (f_birthtime)
424 sortfcn = revbirthcmp;
425 else if (f_statustime)
426 sortfcn = revstatcmp;
425 else if (f_sizesort)
426 sortfcn = revsizecmp;
427 else /* Use modification time. */
428 sortfcn = revmodcmp;
429 } else {
430 if (!f_timesort && !f_sizesort)
431 sortfcn = namecmp;
427 else /* Use modification time. */
428 sortfcn = revmodcmp;
429 } else {
430 if (!f_timesort && !f_sizesort)
431 sortfcn = namecmp;
432 else if (f_sizesort)
433 sortfcn = sizecmp;
432 else if (f_accesstime)
433 sortfcn = acccmp;
434 else if (f_birthtime)
435 sortfcn = birthcmp;
436 else if (f_statustime)
437 sortfcn = statcmp;
434 else if (f_accesstime)
435 sortfcn = acccmp;
436 else if (f_birthtime)
437 sortfcn = birthcmp;
438 else if (f_statustime)
439 sortfcn = statcmp;
438 else if (f_sizesort)
439 sortfcn = sizecmp;
440 else /* Use modification time. */
441 sortfcn = modcmp;
442 }
443
444 /* Select a print function. */
445 if (f_singlecol)
446 printfcn = printscol;
447 else if (f_longform)

--- 426 unchanged lines hidden ---
440 else /* Use modification time. */
441 sortfcn = modcmp;
442 }
443
444 /* Select a print function. */
445 if (f_singlecol)
446 printfcn = printscol;
447 else if (f_longform)

--- 426 unchanged lines hidden ---