print totals for -s flag, as well as -l
[unix-history] / usr / src / bin / ls / ls.h
CommitLineData
309f6376
KB
1/*
2 * Copyright (c) 1989 The Regents of the University of California.
3 * All rights reserved.
4 *
eeb191cb
KB
5 * This code is derived from software contributed to Berkeley by
6 * Michael Fischbein.
7 *
309f6376
KB
8 * Redistribution and use in source and binary forms are permitted
9 * provided that the above copyright notice and this paragraph are
10 * duplicated in all such forms and that any documentation,
11 * advertising materials, and other materials related to such
12 * distribution and use acknowledge that the software was developed
13 * by the University of California, Berkeley. The name of the
14 * University may not be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
19 *
45e87c19 20 * @(#)ls.h 5.6 (Berkeley) %G%
309f6376
KB
21 */
22
23typedef struct _lsstruct {
24 char *name; /* file name */
f2448398 25 int len; /* file name length */
309f6376
KB
26 struct stat lstat; /* lstat(2) for file */
27} LS;
28
45e87c19
KB
29/*
30 * overload -- we probably have to save blocks and/or maxlen with the lstat
31 * array, so tabdir() stuffs it into unused fields in the first stat structure.
32 * If there's ever a type larger than u_long, fix this. Any calls to qsort
33 * must save and restore the values.
34 */
35#define st_btotal st_flags
36#define st_maxlen st_gen
37
13c8513a
KB
38extern int errno;
39
309f6376 40extern int f_accesstime; /* use time of last access */
309f6376
KB
41extern int f_group; /* show group ownership of a file */
42extern int f_inode; /* print inode */
43extern int f_longform; /* long listing format */
13c8513a 44extern int f_singlecol; /* use single column output */
309f6376 45extern int f_size; /* list size in short listing */
13c8513a
KB
46extern int f_statustime; /* use time of last mode change */
47extern int f_type; /* add type character for non-regular files */