2 /* : : generated by proto : : */
3 /***********************************************************************
5 * This software is part of the ast package *
6 * Copyright (c) 1985-2010 AT&T Intellectual Property *
7 * and is licensed under the *
8 * Common Public License, Version 1.0 *
9 * by AT&T Intellectual Property *
11 * A copy of the License is available at *
12 * http://www.opensource.org/licenses/cpl1.0.txt *
13 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
15 * Information and Software Systems Research *
19 * Glenn Fowler <gsf@research.att.com> *
20 * David Korn <dgk@research.att.com> *
21 * Phong Vo <kpv@research.att.com> *
23 ***********************************************************************/
29 * ls formatter interface definitions
33 #if !defined(__PROTO__)
34 #include <prototyped.h>
36 #if !defined(__LINKAGE__)
37 #define __LINKAGE__ /* 2004-08-11 transition */
47 * some systems (could it beee AIX) pollute the std name space
53 #define LS_BLOCKSIZE 512
55 #define iblocks(p) _iblocks(p)
58 #define idevice(p) ((p)->st_rdev)
59 #define IDEVICE(p,v) ((p)->st_rdev=(v))
65 #define LS_ATIME (1<<0) /* list st_atime */
66 #define LS_BLOCKS (1<<1) /* list blocks used by file */
67 #define LS_CTIME (1<<2) /* list st_ctime */
68 #define LS_EXTERNAL (1<<3) /* st_mode is modex canonical */
69 #define LS_INUMBER (1<<4) /* list st_ino */
70 #define LS_LONG (1<<5) /* long listing */
71 #define LS_MARK (1<<6) /* append file name marks */
72 #define LS_NOGROUP (1<<7) /* omit group name for LS_LONG */
73 #define LS_NOUSER (1<<8) /* omit user name for LS_LONG */
74 #define LS_NUMBER (1<<9) /* number instead of name */
76 #define LS_USER (1<<10) /* first user flag bit */
78 #define LS_W_BLOCKS 6 /* LS_BLOCKS field width */
79 #define LS_W_INUMBER 9 /* LS_INUMBER field width */
80 #define LS_W_LONG 57 /* LS_LONG width (w/o names) */
81 #define LS_W_LINK 4 /* link text width (w/o names) */
82 #define LS_W_MARK 1 /* LS_MARK field width */
83 #define LS_W_NAME 9 /* group|user name field width */
85 #if _BLD_ast && defined(__EXPORT__)
87 #define __MANGLE__ __LINKAGE__ __EXPORT__
90 extern __MANGLE__ off_t _iblocks
__PROTO__((struct stat
*));
91 extern __MANGLE__
char* fmtdev
__PROTO__((struct stat
*));
92 extern __MANGLE__
char* fmtfs
__PROTO__((struct stat
*));
93 extern __MANGLE__
char* fmtls
__PROTO__((char*, const char*, struct stat
*, const char*, const char*, int));
94 extern __MANGLE__
int pathstat
__PROTO__((const char*, struct stat
*));
97 #define __MANGLE__ __LINKAGE__