xref: /titanic_44/usr/src/lib/libast/sparc/include/ast/ls.h (revision cab25e88571b90083876d2876f790fdf153773a2)
1 
2 /* : : generated by proto : : */
3 /***********************************************************************
4 *                                                                      *
5 *               This software is part of the ast package               *
6 *          Copyright (c) 1985-2009 AT&T Intellectual Property          *
7 *                      and is licensed under the                       *
8 *                  Common Public License, Version 1.0                  *
9 *                    by AT&T Intellectual Property                     *
10 *                                                                      *
11 *                A copy of the License is available at                 *
12 *            http://www.opensource.org/licenses/cpl1.0.txt             *
13 *         (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9)         *
14 *                                                                      *
15 *              Information and Software Systems Research               *
16 *                            AT&T Research                             *
17 *                           Florham Park NJ                            *
18 *                                                                      *
19 *                 Glenn Fowler <gsf@research.att.com>                  *
20 *                  David Korn <dgk@research.att.com>                   *
21 *                   Phong Vo <kpv@research.att.com>                    *
22 *                                                                      *
23 ***********************************************************************/
24 
25 /*
26  * Glenn Fowler
27  * AT&T Research
28  *
29  * ls formatter interface definitions
30  */
31 
32 #ifndef _LS_H
33 #if !defined(__PROTO__)
34 #include <prototyped.h>
35 #endif
36 #if !defined(__LINKAGE__)
37 #define __LINKAGE__		/* 2004-08-11 transition */
38 #endif
39 
40 #define _LS_H
41 
42 #include <ast_std.h>
43 #include <ast_fs.h>
44 #include <ast_mode.h>
45 
46 /*
47  * some systems (could it beee AIX) pollute the std name space
48  */
49 
50 #undef	fileid
51 #define fileid	fileID
52 
53 #define LS_BLOCKSIZE	512
54 
55 #define iblocks(p)	_iblocks(p)
56 
57 #if _mem_st_rdev_stat
58 #define idevice(p)	((p)->st_rdev)
59 #define IDEVICE(p,v)	((p)->st_rdev=(v))
60 #else
61 #define idevice(p)	0
62 #define IDEVICE(p,v)
63 #endif
64 
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	*/
75 
76 #define LS_USER		(1<<10)		/* first user flag bit		*/
77 
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	*/
84 
85 #if _BLD_ast && defined(__EXPORT__)
86 #undef __MANGLE__
87 #define __MANGLE__ __LINKAGE__		__EXPORT__
88 #endif
89 
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*));
95 
96 #undef __MANGLE__
97 #define __MANGLE__ __LINKAGE__
98 
99 #endif
100