33 |
#define __OFM_FILDIR__ |
#define __OFM_FILDIR__ |
34 |
|
|
35 |
#include <sys/stat.h> |
#include <sys/stat.h> |
36 |
|
#include <sys/types.h> |
37 |
#include <dirent.h> |
#include <dirent.h> |
38 |
#include <stdio.h> |
#include <stdio.h> |
39 |
#include <curses.h> |
#include <curses.h> |
49 |
|
|
50 |
/* given entry is the file */ |
/* given entry is the file */ |
51 |
|
|
52 |
#define DP_FILE 1 /* podany wpis jest plikiem */ |
#define DP_FILE 1 //podany wpis jest plikiem |
53 |
|
|
54 |
/* directory after input */ |
/* directory after input */ |
55 |
|
|
56 |
#define DP_DIRIN 2 /* katalogiem po wejsciu */ |
#define DP_DIRIN 2 //katalogiem po wejsciu |
57 |
|
|
58 |
/* directory after output */ |
/* directory after output */ |
59 |
|
|
71 |
#define SORT_SIZE 3 |
#define SORT_SIZE 3 |
72 |
|
|
73 |
typedef struct dirstruct{ |
typedef struct dirstruct{ |
74 |
|
char *path; //field for bookmarks |
75 |
char *name; |
char *name; |
76 |
short mode; |
short mode; |
77 |
short uid; |
short uid; |
82 |
bool link; |
bool link; |
83 |
bool dir; |
bool dir; |
84 |
bool selected; |
bool selected; |
85 |
|
time_t atime; |
86 |
|
time_t mtime; |
87 |
|
time_t ctime; |
88 |
struct dirstruct *next; |
struct dirstruct *next; |
89 |
struct dirstruct *prev; |
struct dirstruct *prev; |
90 |
struct dirstruct *first; |
struct dirstruct *first; |
98 |
/* isn't changing directory, you should watch out for it!!! */ |
/* isn't changing directory, you should watch out for it!!! */ |
99 |
|
|
100 |
DirStruct *dirSuck(char *dname); |
DirStruct *dirSuck(char *dname); |
101 |
|
DirStruct *dirDuplicate(DirStruct *ds); |
102 |
int dirFree(DirStruct *dst); |
int dirFree(DirStruct *dst); |
103 |
DirStruct *dirSort(DirStruct *dst, int mode); |
DirStruct *dirSort(DirStruct *dst, int mode, int keep_prev); |
104 |
DirStruct *dirFind(DirStruct *ds, char *name); |
DirStruct *dirFind(DirStruct *ds, char *name); |
105 |
int dirProcess(DirStruct *ds, void (*fptr)(DirStruct *,int) ,int all); |
int dirProcess(DirStruct *ds, void (*fptr)(DirStruct *,int) ,int all); |
106 |
void dirProcessBreak(int errno); |
void dirProcessBreak(int errno); |
107 |
|
DirStruct *dirDuplicate(DirStruct *ds); |
108 |
|
|
109 |
#endif /* __OFM_FILDIR_ */ |
#endif /* __OFM_FILDIR_ */ |
110 |
|
|