Repository navigation
Expand file tree
/
Copy pathcathead.h
More file actions
191 lines (120 loc) · 3.56 KB
/
Copy pathcathead.h
File metadata and controls
191 lines (120 loc) · 3.56 KB
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
#ifndef _CAT_H_
#define _CAT_H_
#include <dir.h>
#include <io.h>
#define VERSION 3.2
#define VERSION_PRECISION 1
#define MAX_REC_LENGTH 410
typedef int BOOL;
struct User {
char text[23]; /* array element 0 not used */
int length; /* (element 4 used as end-of-array indicator)*/
};
typedef struct {
char szName[MAXFILE + MAXEXT];
char szNameOnly[MAXFILE];
long lRecords;
long lMatches;
int nLines;
BOOL bInSuper;
BOOL bSuperSearch;
BOOL bIncompatible;
long lSize;
struct ftime Date;
} Catalog;
typedef struct LL_Record {
long lNumber;
char *szRecord;
char *szOwner;
struct LL_Record *next;
} Record;
#define CAT_MAX 40
#define NOT_CATFIRED 0
#define IS_CATFIRED 1
#define ENDLINE 3
#define CS_CONTINUE 1
#define CS_END_SEARCH 2
#define CS_NEXT_RECORD 3
#define QUIT 0
#define STOP 0
#define P_NO_PRINT_RESULTS 0
#define P_PRINT_RESULTS 1
#define P_OPT_PRINTER 1
#define P_OPT_FILE 2
#define P_OPT_FILE_APPEND 3
#define P_OPT_MANIPULATE_PRICES 4
#define PRN_condensed_on 15
#define PRN_condensed_off 18
#define PRN_italic_on 27, 52
#define PRN_italic_off 27, 53
#define MP_DO_CHANGE 1
#define MP_QUIT_CHANGE 0
#define USER_CLEAR_KEYWORDS 1
#define USER_NEW_CAT 2
#define USER_DO_SEARCH 3
// the options below can be returned from the function Choose_Catalog
// this function returns a catalog selection number (0-40). Any alterior messages
// must therefore be negative to distinguish them from a valid selection
#define USER_EXIT -1
#define USER_SELECT_CATALOG -2
#define VALID 1
#define INVALID 0
#define SUPER_LINES 5
#define OUT_OF_MEMORY 0
#define SUCCESS 1
#define FALSE 0
#define TRUE 1
void display_message(char *, int);
void file_not_found(char *);
void Catalog_Incompatible(char *);
void Draw_Screen(Catalog *);
int Get_Keywords(void);
char Process_Input(int);
int Search_Catalog(Catalog **, int);
void PrePrint_Record(Catalog *, Catalog *, int);
void Draw_ResultsScreen(int, int);
void kbwait(void);
void Get_FileInfo(Catalog **);
int Choose_Catalog(void);
int Browse_Results(Catalog *);
void Display_Records(int, Catalog *);
void StatusBar(char *, int, int);
void Update_ProgressBar(long, long);
void Get_PrintOption(Catalog *);
void Sort_Catalogs(Catalog **, int);
void initialise(Catalog **);
int Manipulate_Prices(void);
int Get_PriceData(float *, float *, float *);
int Printer_Ready(void);
int DisplayMenuEx(int, int, int, char **, int, char *, int *, int, int);
void CleanUp(Catalog **);
void CatFiRe_Catalog(char *, char *);
void OutOfMemory(void);
void InputError(void);
void Print_NoMatches(Catalog *);
int Print_StatusMessage(int, Catalog *);
void Print_ScreenInfo(Catalog *, int, int);
void Draw_MenuScreen(void);
void Draw_SearchScreen(void);
void Draw_SuperScreen(char *, int);
void Rename_csvFiles(void);
void Prepare_Menu_1(Catalog **);
void Prepare_Menu_2(Catalog **);
void Detect_CatalogFiles(Catalog **);
int Detect_CatFiRed(char *);
void Write_Record(char *, int);
void Display_PriceChangeBox(void);
void Results_to_Printer(void);
void Results_to_File(Catalog *, int);
void Print_PageHeader(int *);
void Display_toFileScreen(char *, int);
void Initialise_Search(Catalog *, char[][256]);
BOOL Add_ToLList(char *, Catalog *);
void Delete_LList(void);
void Delete_Link(long);
Record *Find_Record(long);
void Display_Page(int, Catalog *);
void getkbhit(void);
BOOL Confirm_Quit(void);
void message_NoCatalogs(void);
#endif