ls.h revision 157098
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 157098 2006-03-24 16:38:02Z jhb $ 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 */ 5396892Stjrextern int f_sortacross; /* sort across rows, not down columns */ 541556Srgrimesextern int f_statustime; /* use time of last mode change */ 5537932Shoekextern int f_notabs; /* don't use tab-separated multi-col output */ 561556Srgrimesextern int f_type; /* add type character for non-regular files */ 5761268Sjoe#ifdef COLORLS 5861178Sjoeextern int f_color; /* add type in color for non-regular files */ 5961268Sjoe#endif 601556Srgrimes 611556Srgrimestypedef struct { 621556Srgrimes FTSENT *list; 631556Srgrimes u_long btotal; 641556Srgrimes int bcfile; 651556Srgrimes int entries; 661556Srgrimes int maxlen; 6790150Smarkm u_int s_block; 6890150Smarkm u_int s_flags; 69105832Srwatson u_int s_label; 7090150Smarkm u_int s_group; 7190150Smarkm u_int s_inode; 7290150Smarkm u_int s_nlink; 7390150Smarkm u_int s_size; 7490150Smarkm u_int s_user; 751556Srgrimes} DISPLAY; 761556Srgrimes 771556Srgrimestypedef struct { 781556Srgrimes char *user; 791556Srgrimes char *group; 801556Srgrimes char *flags; 81105832Srwatson char *label; 821556Srgrimes char data[1]; 831556Srgrimes} NAMES; 84