ls.h revision 177907
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: head/bin/ls/ls.h 177907 2008-04-04 03:57:46Z grog $
341556Srgrimes */
351556Srgrimes
361556Srgrimes#define NO_PRINT	1
371556Srgrimes
381556Srgrimesextern long blocksize;		/* block size units */
391556Srgrimes
401556Srgrimesextern int f_accesstime;	/* use time of last access */
41157098Sjhbextern int f_birthtime;	/* use time of file creation */
421556Srgrimesextern int f_flags;		/* show flags associated with a file */
4388591Sjoeextern int f_humanval;		/* show human-readable file sizes */
44105832Srwatsonextern int f_label;		/* show MAC label */
451556Srgrimesextern int f_inode;		/* print inode */
461556Srgrimesextern int f_longform;		/* long listing format */
4735373Sdesextern int f_octal;		/* print unprintables in octal */
4835417Sdesextern int f_octal_escape;	/* like f_octal but use C escapes if possible */
4962597Sassarextern int f_nonprint;		/* show unprintables as ? */
501556Srgrimesextern int f_sectime;		/* print the real time for all files */
511556Srgrimesextern int f_size;		/* list size in short listing */
5296892Stjrextern int f_slash;		/* append a '/' if the file is a directory */
53177907Sgrogextern int f_sortacross;	/* sort across rows, not down columns */
541556Srgrimesextern int f_statustime;	/* use time of last mode change */
55177907Sgrogextern char *f_timeformat;      /* user-specified time format */
5637932Shoekextern int f_notabs;		/* don't use tab-separated multi-col output */
571556Srgrimesextern int f_type;		/* add type character for non-regular files */
5861268Sjoe#ifdef COLORLS
5961178Sjoeextern int f_color;		/* add type in color for non-regular files */
6061268Sjoe#endif
611556Srgrimes
621556Srgrimestypedef struct {
631556Srgrimes	FTSENT *list;
641556Srgrimes	u_long btotal;
651556Srgrimes	int bcfile;
661556Srgrimes	int entries;
671556Srgrimes	int maxlen;
6890150Smarkm	u_int s_block;
6990150Smarkm	u_int s_flags;
70105832Srwatson	u_int s_label;
7190150Smarkm	u_int s_group;
7290150Smarkm	u_int s_inode;
7390150Smarkm	u_int s_nlink;
7490150Smarkm	u_int s_size;
7590150Smarkm	u_int s_user;
761556Srgrimes} DISPLAY;
771556Srgrimes
781556Srgrimestypedef struct {
791556Srgrimes	char *user;
801556Srgrimes	char *group;
811556Srgrimes	char *flags;
82105832Srwatson	char *label;
831556Srgrimes	char data[1];
841556Srgrimes} NAMES;
85