BSD 4_3_Reno release
[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.
ff47ce84 7 *
1c15e888
C
8 * Redistribution and use in source and binary forms are permitted
9 * provided that: (1) source distributions retain this entire copyright
10 * notice and comment, and (2) distributions including binaries display
11 * the following acknowledgement: ``This product includes software
12 * developed by the University of California, Berkeley and its contributors''
13 * in the documentation or other materials provided with the distribution
14 * and in all advertising materials mentioning features or use of this
15 * software. Neither the name of the University nor the names of its
16 * contributors may be used to endorse or promote products derived
17 * from this software without specific prior written permission.
18 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
19 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
ff47ce84 21 *
1c15e888 22 * @(#)ls.h 5.10 (Berkeley) 4/8/90
309f6376
KB
23 */
24
25typedef struct _lsstruct {
26 char *name; /* file name */
f2448398 27 int len; /* file name length */
309f6376
KB
28 struct stat lstat; /* lstat(2) for file */
29} LS;
30
45e87c19
KB
31/*
32 * overload -- we probably have to save blocks and/or maxlen with the lstat
33 * array, so tabdir() stuffs it into unused fields in the first stat structure.
34 * If there's ever a type larger than u_long, fix this. Any calls to qsort
35 * must save and restore the values.
36 */
37#define st_btotal st_flags
38#define st_maxlen st_gen
39
13c8513a
KB
40extern int errno;
41
309f6376 42extern int f_accesstime; /* use time of last access */
309f6376
KB
43extern int f_group; /* show group ownership of a file */
44extern int f_inode; /* print inode */
a657fc85 45extern int f_kblocks; /* print size in kilobytes */
309f6376 46extern int f_longform; /* long listing format */
13c8513a 47extern int f_singlecol; /* use single column output */
309f6376 48extern int f_size; /* list size in short listing */
13c8513a 49extern int f_statustime; /* use time of last mode change */
4dfe4db2 50extern int f_total; /* if precede with "total" line */
13c8513a 51extern int f_type; /* add type character for non-regular files */