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 40285734Sallanjude#define LS_XO_VERSION "1" 41285734Sallanjude 421556Srgrimesextern long blocksize; /* block size units */ 431556Srgrimes 441556Srgrimesextern int f_accesstime; /* use time of last access */ 45157098Sjhbextern int f_birthtime; /* use time of file creation */ 461556Srgrimesextern int f_flags; /* show flags associated with a file */ 4788591Sjoeextern int f_humanval; /* show human-readable file sizes */ 48105832Srwatsonextern int f_label; /* show MAC label */ 491556Srgrimesextern int f_inode; /* print inode */ 501556Srgrimesextern int f_longform; /* long listing format */ 5135373Sdesextern int f_octal; /* print unprintables in octal */ 5235417Sdesextern int f_octal_escape; /* like f_octal but use C escapes if possible */ 5362597Sassarextern int f_nonprint; /* show unprintables as ? */ 54242807Sgrogextern int f_samesort; /* sort time and name in same direction */ 551556Srgrimesextern int f_sectime; /* print the real time for all files */ 561556Srgrimesextern int f_size; /* list size in short listing */ 5796892Stjrextern int f_slash; /* append a '/' if the file is a directory */ 58177907Sgrogextern int f_sortacross; /* sort across rows, not down columns */ 591556Srgrimesextern int f_statustime; /* use time of last mode change */ 60242725Sgrogextern int f_thousands; /* show file sizes with thousands separators */ 61242807Sgrogextern char *f_timeformat; /* user-specified time format */ 6237932Shoekextern int f_notabs; /* don't use tab-separated multi-col output */ 63285734Sallanjudeextern int f_numericonly; /* don't convert uid/gid to name */ 641556Srgrimesextern int f_type; /* add type character for non-regular files */ 6561268Sjoe#ifdef COLORLS 6661178Sjoeextern int f_color; /* add type in color for non-regular files */ 6761268Sjoe#endif 681556Srgrimes 691556Srgrimestypedef struct { 701556Srgrimes FTSENT *list; 711556Srgrimes u_long btotal; 721556Srgrimes int entries; 731556Srgrimes int maxlen; 7490150Smarkm u_int s_block; 7590150Smarkm u_int s_flags; 76105832Srwatson u_int s_label; 7790150Smarkm u_int s_group; 7890150Smarkm u_int s_inode; 7990150Smarkm u_int s_nlink; 8090150Smarkm u_int s_size; 8190150Smarkm u_int s_user; 821556Srgrimes} DISPLAY; 831556Srgrimes 841556Srgrimestypedef struct { 851556Srgrimes char *user; 861556Srgrimes char *group; 871556Srgrimes char *flags; 88105832Srwatson char *label; 891556Srgrimes char data[1]; 901556Srgrimes} NAMES; 91