ls.h revision 127958
1198157Srrs 2198157Srrs/* 3198157Srrs * Copyright (c) 1989, 1993 4198157Srrs * The Regents of the University of California. All rights reserved. 5198157Srrs * 6198157Srrs * This code is derived from software contributed to Berkeley by 7198157Srrs * Michael Fischbein. 8198157Srrs * 9198157Srrs * Redistribution and use in source and binary forms, with or without 10198157Srrs * modification, are permitted provided that the following conditions 11198157Srrs * are met: 12198157Srrs * 1. Redistributions of source code must retain the above copyright 13198157Srrs * notice, this list of conditions and the following disclaimer. 14198157Srrs * 2. Redistributions in binary form must reproduce the above copyright 15198157Srrs * notice, this list of conditions and the following disclaimer in the 16198157Srrs * documentation and/or other materials provided with the distribution. 17198157Srrs * 4. Neither the name of the University nor the names of its contributors 18198157Srrs * may be used to endorse or promote products derived from this software 19198157Srrs * without specific prior written permission. 20198157Srrs * 21198157Srrs * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22198157Srrs * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23198157Srrs * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24198157Srrs * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25198157Srrs * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26198157Srrs * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27198157Srrs * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28198157Srrs * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29202066Simp * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30202066Simp * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31198157Srrs * SUCH DAMAGE. 32202066Simp * 33202066Simp * from: @(#)ls.h 8.1 (Berkeley) 5/31/93 34198157Srrs * $FreeBSD: head/bin/ls/ls.h 127958 2004-04-06 20:06:54Z markm $ 35198157Srrs */ 36198157Srrs 37198157Srrs#define NO_PRINT 1 38198157Srrs 39198157Srrsextern long blocksize; /* block size units */ 40198157Srrs 41198157Srrsextern int f_accesstime; /* use time of last access */ 42198157Srrsextern int f_flags; /* show flags associated with a file */ 43198157Srrsextern int f_humanval; /* show human-readable file sizes */ 44198157Srrsextern int f_label; /* show MAC label */ 45198157Srrsextern int f_inode; /* print inode */ 46212763Sjchandraextern int f_longform; /* long listing format */ 47212763Sjchandraextern int f_octal; /* print unprintables in octal */ 48212763Sjchandraextern int f_octal_escape; /* like f_octal but use C escapes if possible */ 49212763Sjchandraextern int f_nonprint; /* show unprintables as ? */ 50212763Sjchandraextern int f_sectime; /* print the real time for all files */ 51212763Sjchandraextern int f_size; /* list size in short listing */ 52198157Srrsextern int f_slash; /* append a '/' if the file is a directory */ 53212763Sjchandraextern int f_sortacross; /* sort across rows, not down columns */ 54212763Sjchandraextern int f_statustime; /* use time of last mode change */ 55198157Srrsextern int f_notabs; /* don't use tab-separated multi-col output */ 56198157Srrsextern int f_type; /* add type character for non-regular files */ 57198157Srrs#ifdef COLORLS 58202066Simpextern int f_color; /* add type in color for non-regular files */ 59198157Srrs#endif 60212763Sjchandra 61198157Srrstypedef struct { 62198157Srrs FTSENT *list; 63198157Srrs u_long btotal; 64212763Sjchandra int bcfile; 65212763Sjchandra int entries; 66212763Sjchandra int maxlen; 67198157Srrs u_int s_block; 68198627Srrs u_int s_flags; 69198627Srrs u_int s_label; 70198627Srrs u_int s_group; 71198157Srrs u_int s_inode; 72198157Srrs u_int s_nlink; 73198157Srrs u_int s_size; 74198627Srrs u_int s_user; 75198627Srrs} DISPLAY; 76198627Srrs 77198627Srrstypedef struct { 78198157Srrs char *user; 79212763Sjchandra char *group; 80212763Sjchandra char *flags; 81212763Sjchandra char *label; 82212763Sjchandra char data[1]; 83212763Sjchandra} NAMES; 84227843Smarius