1139969Simp/*-
21556Srgrimes * Copyright (c) 1989, 1993
31556Srgrimes *	The Regents of the University of California.  All rights reserved.
41556Srgrimes *
51556Srgrimes * This code is derived from software contributed to Berkeley by
61556Srgrimes * Michael Fischbein.
71556Srgrimes *
81556Srgrimes * Redistribution and use in source and binary forms, with or without
91556Srgrimes * modification, are permitted provided that the following conditions
101556Srgrimes * are met:
111556Srgrimes * 1. Redistributions of source code must retain the above copyright
121556Srgrimes *    notice, this list of conditions and the following disclaimer.
131556Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
141556Srgrimes *    notice, this list of conditions and the following disclaimer in the
151556Srgrimes *    documentation and/or other materials provided with the distribution.
161556Srgrimes * 4. Neither the name of the University nor the names of its contributors
171556Srgrimes *    may be used to endorse or promote products derived from this software
181556Srgrimes *    without specific prior written permission.
191556Srgrimes *
201556Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
211556Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
221556Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
231556Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
241556Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
251556Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
261556Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
271556Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
281556Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
291556Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
301556Srgrimes * SUCH DAMAGE.
311556Srgrimes *
3227958Ssteve *	from: @(#)ls.h	8.1 (Berkeley) 5/31/93
3350471Speter * $FreeBSD$
341556Srgrimes */
351556Srgrimes
361556Srgrimes#define NO_PRINT	1
371556Srgrimes
38202945Sjh#define HUMANVALSTR_LEN	5
39202945Sjh
401556Srgrimesextern long blocksize;		/* block size units */
411556Srgrimes
421556Srgrimesextern int f_accesstime;	/* use time of last access */
43157098Sjhbextern int f_birthtime;	/* use time of file creation */
441556Srgrimesextern int f_flags;		/* show flags associated with a file */
4588591Sjoeextern int f_humanval;		/* show human-readable file sizes */
46105832Srwatsonextern int f_label;		/* show MAC label */
471556Srgrimesextern int f_inode;		/* print inode */
481556Srgrimesextern int f_longform;		/* long listing format */
4935373Sdesextern int f_octal;		/* print unprintables in octal */
5035417Sdesextern int f_octal_escape;	/* like f_octal but use C escapes if possible */
5162597Sassarextern int f_nonprint;		/* show unprintables as ? */
52244075Sgrogextern int f_samesort;		/* sort time and name in same direction */
531556Srgrimesextern int f_sectime;		/* print the real time for all files */
541556Srgrimesextern int f_size;		/* list size in short listing */
5596892Stjrextern int f_slash;		/* append a '/' if the file is a directory */
56177907Sgrogextern int f_sortacross;	/* sort across rows, not down columns */
571556Srgrimesextern int f_statustime;	/* use time of last mode change */
58244075Sgrogextern int f_thousands;		/* show file sizes with thousands separators */
59177907Sgrogextern char *f_timeformat;      /* user-specified time format */
6037932Shoekextern int f_notabs;		/* don't use tab-separated multi-col output */
611556Srgrimesextern int f_type;		/* add type character for non-regular files */
6261268Sjoe#ifdef COLORLS
6361178Sjoeextern int f_color;		/* add type in color for non-regular files */
6461268Sjoe#endif
651556Srgrimes
661556Srgrimestypedef struct {
671556Srgrimes	FTSENT *list;
681556Srgrimes	u_long btotal;
691556Srgrimes	int entries;
701556Srgrimes	int maxlen;
7190150Smarkm	u_int s_block;
7290150Smarkm	u_int s_flags;
73105832Srwatson	u_int s_label;
7490150Smarkm	u_int s_group;
7590150Smarkm	u_int s_inode;
7690150Smarkm	u_int s_nlink;
7790150Smarkm	u_int s_size;
7890150Smarkm	u_int s_user;
791556Srgrimes} DISPLAY;
801556Srgrimes
811556Srgrimestypedef struct {
821556Srgrimes	char *user;
831556Srgrimes	char *group;
841556Srgrimes	char *flags;
85105832Srwatson	char *label;
861556Srgrimes	char data[1];
871556Srgrimes} NAMES;
88