/***********************************************************************1* *2* This software is part of the ast package *3* Copyright (c) 1985-2011 AT&T Intellectual Property *4* and is licensed under the *5* Eclipse Public License, Version 1.0 *6* by AT&T Intellectual Property *7* *8* A copy of the License is available at *9* http://www.eclipse.org/org/documents/epl-v10.html *10* (with md5 checksum b35adb5213ca9657e911e9befb180842) *11* *12* Information and Software Systems Research *13* AT&T Research *14* Florham Park NJ *15* *16* Glenn Fowler <[email protected]> *17* David Korn <[email protected]> *18* Phong Vo <[email protected]> *19* *20***********************************************************************/21#pragma prototyped22/*23* Glenn Fowler24* AT&T Research25*26* ls formatter interface definitions27*/2829#ifndef _LS_H30#define _LS_H3132#include <ast_std.h>33#include <ast_fs.h>34#include <ast_mode.h>3536/*37* some systems (could it beee AIX) pollute the std name space38*/3940#undef fileid41#define fileid fileID4243#define LS_BLOCKSIZE 5124445#define iblocks(p) _iblocks(p)4647#if _mem_st_rdev_stat48#define idevice(p) ((p)->st_rdev)49#define IDEVICE(p,v) ((p)->st_rdev=(v))50#else51#define idevice(p) 052#define IDEVICE(p,v)53#endif5455#define LS_ATIME (1<<0) /* list st_atime */56#define LS_BLOCKS (1<<1) /* list blocks used by file */57#define LS_CTIME (1<<2) /* list st_ctime */58#define LS_EXTERNAL (1<<3) /* st_mode is modex canonical */59#define LS_INUMBER (1<<4) /* list st_ino */60#define LS_LONG (1<<5) /* long listing */61#define LS_MARK (1<<6) /* append file name marks */62#define LS_NOGROUP (1<<7) /* omit group name for LS_LONG */63#define LS_NOUSER (1<<8) /* omit user name for LS_LONG */64#define LS_NUMBER (1<<9) /* number instead of name */6566#define LS_USER (1<<10) /* first user flag bit */6768#define LS_W_BLOCKS 6 /* LS_BLOCKS field width */69#define LS_W_INUMBER 9 /* LS_INUMBER field width */70#define LS_W_LONG 57 /* LS_LONG width (w/o names) */71#define LS_W_LINK 4 /* link text width (w/o names) */72#define LS_W_MARK 1 /* LS_MARK field width */73#define LS_W_NAME 9 /* group|user name field width */7475#if _BLD_ast && defined(__EXPORT__)76#define extern __EXPORT__77#endif7879extern off_t _iblocks(struct stat*);80extern char* fmtdev(struct stat*);81extern char* fmtfs(struct stat*);82extern char* fmtls(char*, const char*, struct stat*, const char*, const char*, int);83extern int pathstat(const char*, struct stat*);8485#undef extern8687#endif888990