home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / fsp / part01 / bsd_src / ls.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-12  |  2.1 KB  |  52 lines

  1. /*
  2.  * Copyright (c) 1989 The Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * This code is derived from software contributed to Berkeley by
  6.  * Michael Fischbein.
  7.  *
  8.  * Redistribution and use in source and binary forms are permitted
  9.  * provided that: (1) source distributions retain this entire copyright
  10.  * notice and comment, and (2) distributions including binaries display
  11.  * the following acknowledgement:  ``This product includes software
  12.  * developed by the University of California, Berkeley and its contributors''
  13.  * in the documentation or other materials provided with the distribution
  14.  * and in all advertising materials mentioning features or use of this
  15.  * software. Neither the name of the University nor the names of its
  16.  * contributors may be used to endorse or promote products derived
  17.  * from this software without specific prior written permission.
  18.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  19.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  20.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21.  *
  22.  *    @(#)ls.h    5.10 (Berkeley) 4/8/90
  23.  */
  24.  
  25. typedef struct _lsstruct {
  26.     char *name;            /* file name */
  27.     int len;            /* file name length */
  28.     struct stat lstat;        /* lstat(2) for file */
  29. } LS;
  30.  
  31. /*
  32.  * overload -- we probably have to save blocks and/or maxlen with the lstat
  33.  * array, so tabdir() stuffs it into unused fields in the first stat structure.
  34.  * If there's ever a type larger than u_long, fix this.  Any calls to qsort
  35.  * must save and restore the values.
  36.  */
  37. #define    st_btotal    st_dev
  38. #define    st_maxlen    st_rdev
  39.  
  40. extern int errno;
  41.  
  42. extern int f_accesstime;    /* use time of last access */
  43. extern int f_group;        /* show group ownership of a file */
  44. extern int f_inode;        /* print inode */
  45. extern int f_kblocks;        /* print size in kilobytes */
  46. extern int f_longform;        /* long listing format */
  47. extern int f_singlecol;        /* use single column output */
  48. extern int f_size;        /* list size in short listing */
  49. extern int f_statustime;    /* use time of last mode change */
  50. extern int f_total;        /* if precede with "total" line */
  51. extern int f_type;        /* add type character for non-regular files */
  52.