1*0a6a1f1dSLionel Sambuc /* $NetBSD: ls.h,v 1.19 2014/02/20 18:56:36 christos Exp $ */ 2b7ef8cfbSLionel Sambuc 3b7ef8cfbSLionel Sambuc /* 4b7ef8cfbSLionel Sambuc * Copyright (c) 1989, 1993 5b7ef8cfbSLionel Sambuc * The Regents of the University of California. All rights reserved. 6b7ef8cfbSLionel Sambuc * 7b7ef8cfbSLionel Sambuc * This code is derived from software contributed to Berkeley by 8b7ef8cfbSLionel Sambuc * Michael Fischbein. 9b7ef8cfbSLionel Sambuc * 10b7ef8cfbSLionel Sambuc * Redistribution and use in source and binary forms, with or without 11b7ef8cfbSLionel Sambuc * modification, are permitted provided that the following conditions 12b7ef8cfbSLionel Sambuc * are met: 13b7ef8cfbSLionel Sambuc * 1. Redistributions of source code must retain the above copyright 14b7ef8cfbSLionel Sambuc * notice, this list of conditions and the following disclaimer. 15b7ef8cfbSLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright 16b7ef8cfbSLionel Sambuc * notice, this list of conditions and the following disclaimer in the 17b7ef8cfbSLionel Sambuc * documentation and/or other materials provided with the distribution. 18b7ef8cfbSLionel Sambuc * 3. Neither the name of the University nor the names of its contributors 19b7ef8cfbSLionel Sambuc * may be used to endorse or promote products derived from this software 20b7ef8cfbSLionel Sambuc * without specific prior written permission. 21b7ef8cfbSLionel Sambuc * 22b7ef8cfbSLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23b7ef8cfbSLionel Sambuc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24b7ef8cfbSLionel Sambuc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25b7ef8cfbSLionel Sambuc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26b7ef8cfbSLionel Sambuc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27b7ef8cfbSLionel Sambuc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28b7ef8cfbSLionel Sambuc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29b7ef8cfbSLionel Sambuc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30b7ef8cfbSLionel Sambuc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31b7ef8cfbSLionel Sambuc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32b7ef8cfbSLionel Sambuc * SUCH DAMAGE. 33b7ef8cfbSLionel Sambuc * 34b7ef8cfbSLionel Sambuc * @(#)ls.h 8.1 (Berkeley) 5/31/93 35b7ef8cfbSLionel Sambuc */ 36b7ef8cfbSLionel Sambuc 37b7ef8cfbSLionel Sambuc #define NO_PRINT 1 38b7ef8cfbSLionel Sambuc 39b7ef8cfbSLionel Sambuc extern long blocksize; /* block size units */ 40b7ef8cfbSLionel Sambuc 41b7ef8cfbSLionel Sambuc extern int f_accesstime; /* use time of last access */ 42b7ef8cfbSLionel Sambuc extern int f_flags; /* show flags associated with a file */ 43b7ef8cfbSLionel Sambuc extern int f_grouponly; /* long listing without owner */ 44b7ef8cfbSLionel Sambuc extern int f_humanize; /* humanize size field */ 45b7ef8cfbSLionel Sambuc extern int f_commas; /* separate size field with commas */ 46b7ef8cfbSLionel Sambuc extern int f_inode; /* print inode */ 47b7ef8cfbSLionel Sambuc extern int f_longform; /* long listing format */ 48b7ef8cfbSLionel Sambuc extern int f_octal; /* print octal escapes for nongraphic characters */ 49b7ef8cfbSLionel Sambuc extern int f_octal_escape; /* like f_octal but use C escapes if possible */ 50b7ef8cfbSLionel Sambuc extern int f_sectime; /* print the real time for all files */ 51b7ef8cfbSLionel Sambuc extern int f_size; /* list size in short listing */ 52b7ef8cfbSLionel Sambuc extern int f_statustime; /* use time of last mode change */ 53b7ef8cfbSLionel Sambuc extern int f_type; /* add type character for non-regular files */ 54b7ef8cfbSLionel Sambuc extern int f_typedir; /* add type character for directories */ 55b7ef8cfbSLionel Sambuc extern int f_nonprint; /* show unprintables as ? */ 56*0a6a1f1dSLionel Sambuc extern int f_fullpath; /* print full pathname, not filename */ 57*0a6a1f1dSLionel Sambuc extern int f_leafonly; /* when recursing, print leaf names only */ 58b7ef8cfbSLionel Sambuc 59b7ef8cfbSLionel Sambuc typedef struct { 60b7ef8cfbSLionel Sambuc FTSENT *list; 61b7ef8cfbSLionel Sambuc u_int64_t btotal; 62b7ef8cfbSLionel Sambuc u_int64_t stotal; 63b7ef8cfbSLionel Sambuc int entries; 64b7ef8cfbSLionel Sambuc unsigned int maxlen; 65b7ef8cfbSLionel Sambuc int s_block; 66b7ef8cfbSLionel Sambuc int s_flags; 67b7ef8cfbSLionel Sambuc int s_group; 68b7ef8cfbSLionel Sambuc int s_inode; 69b7ef8cfbSLionel Sambuc int s_nlink; 70b7ef8cfbSLionel Sambuc int s_size; 71b7ef8cfbSLionel Sambuc int s_user; 72b7ef8cfbSLionel Sambuc int s_major; 73b7ef8cfbSLionel Sambuc int s_minor; 74b7ef8cfbSLionel Sambuc } DISPLAY; 75b7ef8cfbSLionel Sambuc 76b7ef8cfbSLionel Sambuc typedef struct { 77b7ef8cfbSLionel Sambuc char *user; 78b7ef8cfbSLionel Sambuc char *group; 79b7ef8cfbSLionel Sambuc char *flags; 80b7ef8cfbSLionel Sambuc char data[1]; 81b7ef8cfbSLionel Sambuc } NAMES; 82