-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfilebrowse.h
174 lines (154 loc) · 3.43 KB
/
filebrowse.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
#define EDIT_MODE TRUE
#define REPLY_MODE FALSE
#define error_exit(format,filedef) error_ex(format,filedef,__FILE__,__LINE__)
struct rfabuff {
uint16 b1,b2,b3;
/* unsigned short b1,b2,b3;*/
};
#define LISTLINELNTH 128
struct List_Element {
char Prompt[LISTLINELNTH];
uint16 Index;
struct rfabuff rfa;
struct List_Element *Prev;
struct List_Element *Next;
};
struct filestruct {
char *filename;
struct FAB fab;
struct RAB rab;
void (*initialize)();
char *fileio;
char *recbuff;
uint16 recsize;
uint16 fileiosz;
void (*setprompt)();
struct scr_params *entry_screen;
uint16 entry_length;
uint16 entry_comment;
struct cmndline_params *read_cmndline;
struct cmndline_params *list_cmndline;
char *listkey;
uint16 listkeysz;
uint16 fwrdkeyid;
uint16 revrkeyid;
void (*setlistkey)(void);
void (*padrecord)(void);
void (*unpadrecord)(void);
void (*loadvarbuff)();
int (*dumpvarbuff)();
struct List_Element *FirstPtr;
struct List_Element *LastPtr;
struct List_Element *CurrentPtr;
int CurrentLine;
int ListCount;
int ShowRead;
void *startkey;
uint16 startkeyln;
int (*where)();
void (*preedit)();
int (*preinsert)();
void (*postedit)();
void (*postinsert)();
unsigned long TopLine;
unsigned long BottomLine;
unsigned long RegionLength;
void (*mainsrch)();
int (*recalc)();
};
#ifdef FILEBROWSE_C_
struct filestruct filedef$init = {
NULL,
{0},
{0},
NULL,
NULL,
NULL,
0,
0,
NULL,
NULL,
0,
0,
NULL,
NULL,
NULL,
0,
0,
0,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
0,
0,
NULL,
0,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
0,
0,
NULL,
NULL
};
#else
extern struct filestruct filedef$init;
#endif
/* I think this is in extools.h
struct timebuff
{
uint32 b1,b2;
};
*/
enum filebrowse_mode {normal,select};
extern int ShowRead;
extern int rms_status;
void ReadMiddleOut(struct rfabuff *,struct filestruct *);
void Redraw_Screen(struct filestruct *);
void Seek_and_Edit(struct rfabuff *,int,struct filestruct *);
void RefreshList(struct filestruct *);
void Delete_Record(struct rfabuff *,struct filestruct *);
void DeleteList(struct filestruct *);
void Read_Directory(int,struct filestruct *);
void rfa_copy(/* struct rfabuff *, struct rfabuff * */);
int rfa_iszero(struct rfabuff *);
int tbuff_iszero(struct timebuff *);
int tbuff_equal(struct timebuff *,struct timebuff *);
void tbuff_copy(struct timebuff *,struct timebuff *);
void get_time(struct timebuff *);
char *print_time(struct timebuff *);
char *print_date(struct timebuff *);
int ReadSearchTerm (char *);
void Insrt_Record();
void Edit_Record();
void Remove_Record();
void Search_Record();
void toggle_unread();
void reread_index();
/* void File_Browse(struct filestruct *,void *,void *); */
struct rfabuff *File_Browse();
void Status (const char *, ...);
void Help (const char *, ...);
void get_username(void);
void error_ex(const char *,struct filestruct *,char *,uint16);
void open_file(struct filestruct *);
char warn_user(const char *,...);
void mkuid(char *,struct timebuff);
char *filterfn(char *);
int rmstest(int,int,...);
void pad(char *,int);
void unpad(char *,int);
char *rmslookup(unsigned int);
void read_master_record();
void write_master_record();
void spawn_scroll_window(struct filestruct *,int,int);
struct timebuff *dttodo (struct timebuff *);