ls.h revision 225847
1168404Spjd/*- 2168404Spjd * Copyright (c) 1989, 1993 3168404Spjd * The Regents of the University of California. All rights reserved. 4168404Spjd * 5168404Spjd * This code is derived from software contributed to Berkeley by 6168404Spjd * Michael Fischbein. 7168404Spjd * 8168404Spjd * Redistribution and use in source and binary forms, with or without 9168404Spjd * modification, are permitted provided that the following conditions 10168404Spjd * are met: 11168404Spjd * 1. Redistributions of source code must retain the above copyright 12168404Spjd * notice, this list of conditions and the following disclaimer. 13168404Spjd * 2. Redistributions in binary form must reproduce the above copyright 14168404Spjd * notice, this list of conditions and the following disclaimer in the 15168404Spjd * documentation and/or other materials provided with the distribution. 16168404Spjd * 4. Neither the name of the University nor the names of its contributors 17168404Spjd * may be used to endorse or promote products derived from this software 18168404Spjd * without specific prior written permission. 19168404Spjd * 20168404Spjd * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21168404Spjd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22219089Spjd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23304139Savg * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24251478Sdelphij * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25265744Sdelphij * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26288549Smav * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27282756Savg * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28288569Smav * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29297112Smav * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30168404Spjd * SUCH DAMAGE. 31168404Spjd * 32219089Spjd * from: @(#)ls.h 8.1 (Berkeley) 5/31/93 33219089Spjd * $FreeBSD: head/bin/ls/ls.h 225847 2011-09-28 18:53:36Z ed $ 34185029Spjd */ 35168404Spjd 36168404Spjd#define NO_PRINT 1 37168404Spjd 38168404Spjd#define HUMANVALSTR_LEN 5 39168404Spjd 40168404Spjdextern long blocksize; /* block size units */ 41168404Spjd 42185029Spjdextern int f_accesstime; /* use time of last access */ 43168404Spjdextern int f_birthtime; /* use time of file creation */ 44168404Spjdextern int f_flags; /* show flags associated with a file */ 45168404Spjdextern int f_humanval; /* show human-readable file sizes */ 46168404Spjdextern int f_label; /* show MAC label */ 47168404Spjdextern int f_inode; /* print inode */ 48168404Spjdextern int f_longform; /* long listing format */ 49168404Spjdextern int f_octal; /* print unprintables in octal */ 50185029Spjdextern int f_octal_escape; /* like f_octal but use C escapes if possible */ 51219089Spjdextern int f_nonprint; /* show unprintables as ? */ 52219089Spjdextern int f_sectime; /* print the real time for all files */ 53248571Smmextern int f_size; /* list size in short listing */ 54288569Smavextern int f_slash; /* append a '/' if the file is a directory */ 55168404Spjdextern int f_sortacross; /* sort across rows, not down columns */ 56219089Spjdextern int f_statustime; /* use time of last mode change */ 57219089Spjdextern char *f_timeformat; /* user-specified time format */ 58219089Spjdextern int f_notabs; /* don't use tab-separated multi-col output */ 59219089Spjdextern int f_type; /* add type character for non-regular files */ 60219089Spjd#ifdef COLORLS 61219089Spjdextern int f_color; /* add type in color for non-regular files */ 62288569Smav#endif 63288569Smav 64288569Smavtypedef struct { 65288569Smav FTSENT *list; 66288569Smav u_long btotal; 67288569Smav int entries; 68288569Smav int maxlen; 69288569Smav u_int s_block; 70288569Smav u_int s_flags; 71288569Smav u_int s_label; 72219089Spjd u_int s_group; 73219089Spjd u_int s_inode; 74219089Spjd u_int s_nlink; 75219089Spjd u_int s_size; 76219089Spjd u_int s_user; 77219089Spjd} DISPLAY; 78219089Spjd 79219089Spjdtypedef struct { 80219089Spjd char *user; 81219089Spjd char *group; 82219089Spjd char *flags; 83219089Spjd char *label; 84168404Spjd char data[1]; 85168404Spjd} NAMES; 86168404Spjd