home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 6 File
/
06-File.zip
/
HPFSLS.ZOO
/
ls.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-02-17
|
2KB
|
69 lines
/*
* Header per ls
* $Log: ls.h $
* Revision 1.1 91/05/08 20:24:32 Unknown
* Initial revision
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#include <direct.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#define INCL_BASE
#include <os2.h>
#define BLOCK_SIZE 1024
#define BUF_SIZE 128
#define WIDE_LEN 14
#define WIDE_STR "14"
/* attributi normali */
enum { DIR, SYSTEM, HIDDEN, ARCHIVE, READABLE, WRITEABLE, EXECUTABLE };
#define NOTIME 0
#define CREATION 1
#define LASTACCESS 2
#define LASTWRITE 3
/* tipo per le opzioni */
typedef struct tag_option_type {
unsigned recursive: 1;
unsigned attributes: 1;
unsigned size: 1;
unsigned effectiveSize: 1;
unsigned time: 2;
unsigned all: 1;
unsigned k: 1;
unsigned wide: 1;
unsigned reverse: 1;
unsigned dirSlash: 1;
unsigned exeStar: 1;
unsigned ea : 1;
unsigned volume: 1;
} option_type;
/* funzione di confronto */
#ifdef NOCASE
#define STRCMP stricmp
#else
#define STRCMP strcmp
#endif
/* prototypes */
int main(int argc,char * *argv);
long ls_dir(char *name,unsigned short attr,struct tag_option_type opt,int level);
void ls(char *name,unsigned short attr,struct tag_option_type opt);
void ls_ea(char *name, int level);
void ls_volume(void);
int get_options(int argc,char * *argv,unsigned short *pattrs,struct tag_option_type *popt);
void print_help(void);
int is_executable(char *name);
long print_name(struct _FILEFINDBUF _far *pffbuf,struct tag_option_type opt,int level);