14887Schin 24887Schin /* : : generated by proto : : */ 34887Schin /*********************************************************************** 44887Schin * * 54887Schin * This software is part of the ast package * 6*12068SRoger.Faulkner@Oracle.COM * Copyright (c) 1985-2010 AT&T Intellectual Property * 74887Schin * and is licensed under the * 84887Schin * Common Public License, Version 1.0 * 98462SApril.Chin@Sun.COM * by AT&T Intellectual Property * 104887Schin * * 114887Schin * A copy of the License is available at * 124887Schin * http://www.opensource.org/licenses/cpl1.0.txt * 134887Schin * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 144887Schin * * 154887Schin * Information and Software Systems Research * 164887Schin * AT&T Research * 174887Schin * Florham Park NJ * 184887Schin * * 194887Schin * Glenn Fowler <gsf@research.att.com> * 204887Schin * David Korn <dgk@research.att.com> * 214887Schin * Phong Vo <kpv@research.att.com> * 224887Schin * * 234887Schin ***********************************************************************/ 244887Schin 254887Schin /* 264887Schin * Glenn Fowler 274887Schin * AT&T Research 284887Schin * 294887Schin * ls formatter interface definitions 304887Schin */ 314887Schin 324887Schin #ifndef _LS_H 334887Schin #if !defined(__PROTO__) 344887Schin #include <prototyped.h> 354887Schin #endif 364887Schin #if !defined(__LINKAGE__) 374887Schin #define __LINKAGE__ /* 2004-08-11 transition */ 384887Schin #endif 394887Schin 404887Schin #define _LS_H 414887Schin 424887Schin #include <ast_std.h> 434887Schin #include <ast_fs.h> 444887Schin #include <ast_mode.h> 454887Schin 464887Schin /* 474887Schin * some systems (could it beee AIX) pollute the std name space 484887Schin */ 494887Schin 504887Schin #undef fileid 514887Schin #define fileid fileID 524887Schin 534887Schin #define LS_BLOCKSIZE 512 544887Schin 554887Schin #define iblocks(p) _iblocks(p) 564887Schin 574887Schin #if _mem_st_rdev_stat 584887Schin #define idevice(p) ((p)->st_rdev) 594887Schin #define IDEVICE(p,v) ((p)->st_rdev=(v)) 604887Schin #else 614887Schin #define idevice(p) 0 624887Schin #define IDEVICE(p,v) 634887Schin #endif 644887Schin 654887Schin #define LS_ATIME (1<<0) /* list st_atime */ 664887Schin #define LS_BLOCKS (1<<1) /* list blocks used by file */ 674887Schin #define LS_CTIME (1<<2) /* list st_ctime */ 684887Schin #define LS_EXTERNAL (1<<3) /* st_mode is modex canonical */ 694887Schin #define LS_INUMBER (1<<4) /* list st_ino */ 704887Schin #define LS_LONG (1<<5) /* long listing */ 714887Schin #define LS_MARK (1<<6) /* append file name marks */ 724887Schin #define LS_NOGROUP (1<<7) /* omit group name for LS_LONG */ 734887Schin #define LS_NOUSER (1<<8) /* omit user name for LS_LONG */ 744887Schin #define LS_NUMBER (1<<9) /* number instead of name */ 754887Schin 764887Schin #define LS_USER (1<<10) /* first user flag bit */ 774887Schin 784887Schin #define LS_W_BLOCKS 6 /* LS_BLOCKS field width */ 7910898Sroland.mainz@nrubsig.org #define LS_W_INUMBER 9 /* LS_INUMBER field width */ 8010898Sroland.mainz@nrubsig.org #define LS_W_LONG 57 /* LS_LONG width (w/o names) */ 814887Schin #define LS_W_LINK 4 /* link text width (w/o names) */ 824887Schin #define LS_W_MARK 1 /* LS_MARK field width */ 834887Schin #define LS_W_NAME 9 /* group|user name field width */ 844887Schin 854887Schin #if _BLD_ast && defined(__EXPORT__) 864887Schin #undef __MANGLE__ 874887Schin #define __MANGLE__ __LINKAGE__ __EXPORT__ 884887Schin #endif 894887Schin 904887Schin extern __MANGLE__ off_t _iblocks __PROTO__((struct stat*)); 914887Schin extern __MANGLE__ char* fmtdev __PROTO__((struct stat*)); 924887Schin extern __MANGLE__ char* fmtfs __PROTO__((struct stat*)); 934887Schin extern __MANGLE__ char* fmtls __PROTO__((char*, const char*, struct stat*, const char*, const char*, int)); 944887Schin extern __MANGLE__ int pathstat __PROTO__((const char*, struct stat*)); 954887Schin 964887Schin #undef __MANGLE__ 974887Schin #define __MANGLE__ __LINKAGE__ 984887Schin 994887Schin #endif 100