1 /***********************************************************************
3 * This software is part of the ast package *
4 * Copyright (c) 1985-2010 AT&T Intellectual Property *
5 * and is licensed under the *
6 * Common Public License, Version 1.0 *
7 * by AT&T Intellectual Property *
9 * A copy of the License is available at *
10 * http://www.opensource.org/licenses/cpl1.0.txt *
11 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
13 * Information and Software Systems Research *
17 * Glenn Fowler <gsf@research.att.com> *
18 * David Korn <dgk@research.att.com> *
19 * Phong Vo <kpv@research.att.com> *
21 ***********************************************************************/
27 * ls formatter interface definitions
38 * some systems (could it beee AIX) pollute the std name space
44 #define LS_BLOCKSIZE 512
46 #define iblocks(p) _iblocks(p)
49 #define idevice(p) ((p)->st_rdev)
50 #define IDEVICE(p,v) ((p)->st_rdev=(v))
56 #define LS_ATIME (1<<0) /* list st_atime */
57 #define LS_BLOCKS (1<<1) /* list blocks used by file */
58 #define LS_CTIME (1<<2) /* list st_ctime */
59 #define LS_EXTERNAL (1<<3) /* st_mode is modex canonical */
60 #define LS_INUMBER (1<<4) /* list st_ino */
61 #define LS_LONG (1<<5) /* long listing */
62 #define LS_MARK (1<<6) /* append file name marks */
63 #define LS_NOGROUP (1<<7) /* omit group name for LS_LONG */
64 #define LS_NOUSER (1<<8) /* omit user name for LS_LONG */
65 #define LS_NUMBER (1<<9) /* number instead of name */
67 #define LS_USER (1<<10) /* first user flag bit */
69 #define LS_W_BLOCKS 6 /* LS_BLOCKS field width */
70 #define LS_W_INUMBER 9 /* LS_INUMBER field width */
71 #define LS_W_LONG 57 /* LS_LONG width (w/o names) */
72 #define LS_W_LINK 4 /* link text width (w/o names) */
73 #define LS_W_MARK 1 /* LS_MARK field width */
74 #define LS_W_NAME 9 /* group|user name field width */
76 #if _BLD_ast && defined(__EXPORT__)
77 #define extern __EXPORT__
80 extern off_t
_iblocks(struct stat
*);
81 extern char* fmtdev(struct stat
*);
82 extern char* fmtfs(struct stat
*);
83 extern char* fmtls(char*, const char*, struct stat
*, const char*, const char*, int);
84 extern int pathstat(const char*, struct stat
*);