ls.h revision 105832
1100384Speter 2100384Speter/* 3100384Speter * Copyright (c) 1989, 1993 4100384Speter * The Regents of the University of California. All rights reserved. 5100384Speter * 6100384Speter * This code is derived from software contributed to Berkeley by 7100384Speter * Michael Fischbein. 8100384Speter * 9100384Speter * Redistribution and use in source and binary forms, with or without 10100384Speter * modification, are permitted provided that the following conditions 11100384Speter * are met: 12100384Speter * 1. Redistributions of source code must retain the above copyright 13100384Speter * notice, this list of conditions and the following disclaimer. 14100384Speter * 2. Redistributions in binary form must reproduce the above copyright 15100384Speter * notice, this list of conditions and the following disclaimer in the 16100384Speter * documentation and/or other materials provided with the distribution. 17100384Speter * 3. All advertising materials mentioning features or use of this software 18100384Speter * must display the following acknowledgement: 19100384Speter * This product includes software developed by the University of 20100384Speter * California, Berkeley and its contributors. 21100384Speter * 4. Neither the name of the University nor the names of its contributors 22100384Speter * may be used to endorse or promote products derived from this software 23100384Speter * without specific prior written permission. 24100384Speter * 25100384Speter * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 26100384Speter * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27118031Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28118031Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 29118031Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30104738Speter * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31191673Sjamie * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32191673Sjamie * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33104738Speter * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34205014Snwhitehorn * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35205014Snwhitehorn * SUCH DAMAGE. 36100384Speter * 37100384Speter * from: @(#)ls.h 8.1 (Berkeley) 5/31/93 38280258Srwatson * $FreeBSD: head/bin/ls/ls.h 105832 2002-10-24 00:07:30Z rwatson $ 39162954Sphk */ 40100384Speter 41100384Speter#define NO_PRINT 1 42100384Speter 43100384Speterextern long blocksize; /* block size units */ 44185435Sbz 45100384Speterextern int f_accesstime; /* use time of last access */ 46161343Sjkimextern int f_flags; /* show flags associated with a file */ 47220158Skibextern int f_humanval; /* show human-readable file sizes */ 48100384Speterextern int f_label; /* show MAC label */ 49100384Speterextern int f_inode; /* print inode */ 50100384Speterextern int f_longform; /* long listing format */ 51205014Snwhitehornextern int f_octal; /* print unprintables in octal */ 52151909Spsextern int f_octal_escape; /* like f_octal but use C escapes if possible */ 53100384Speterextern int f_nonprint; /* show unprintables as ? */ 54100384Speterextern int f_sectime; /* print the real time for all files */ 55100384Speterextern int f_size; /* list size in short listing */ 56100384Speterextern int f_slash; /* append a '/' if the file is a directory */ 57183044Sobrienextern int f_sortacross; /* sort across rows, not down columns */ 58100384Speterextern int f_statustime; /* use time of last mode change */ 59255708Sjhbextern int f_notabs; /* don't use tab-separated multi-col output */ 60100384Speterextern int f_type; /* add type character for non-regular files */ 61100384Speter#ifdef COLORLS 62100384Speterextern int f_color; /* add type in color for non-regular files */ 63100384Speter#endif 64146950Sps 65100384Spetertypedef struct { 66100384Speter FTSENT *list; 67100384Speter u_long btotal; 68100384Speter int bcfile; 69100384Speter int entries; 70100384Speter int maxlen; 71150883Sjhb u_int s_block; 72113859Sjhb u_int s_flags; 73100384Speter u_int s_label; 74100384Speter u_int s_group; 75100384Speter u_int s_inode; 76183044Sobrien u_int s_nlink; 77162551Sdavidxu u_int s_size; 78100384Speter u_int s_user; 79162551Sdavidxu} DISPLAY; 80100384Speter 81127140Sjhbtypedef struct { 82157285Sps char *user; 83174381Sjhb char *group; 84174381Sjhb char *flags; 85157285Sps char *label; 86100384Speter char data[1]; 87191673Sjamie} NAMES; 88191673Sjamie