1995-09-11 15:31:07 +00:00
|
|
|
#ifndef __CFILES_H
|
|
|
|
#define __CFILES_H
|
|
|
|
|
|
|
|
#ifndef __CCUSTIO_H
|
2002-02-28 11:35:23 +00:00
|
|
|
#include "ccustio.h"
|
1995-09-11 15:31:07 +00:00
|
|
|
#endif
|
|
|
|
|
1998-03-05 13:54:51 +00:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#define __PACKED__ __attribute__ ((packed))
|
|
|
|
#define __ALIGNED__ __attribute__ ((aligned(2)))
|
|
|
|
#define __PACK_1__
|
|
|
|
#else
|
|
|
|
#define __PACKED__
|
|
|
|
#define __ALIGNED__
|
|
|
|
#pragma pack(2)
|
|
|
|
#endif
|
|
|
|
|
1995-09-11 15:31:07 +00:00
|
|
|
#define MaxFilesDir 70
|
|
|
|
#define MKFields 10
|
|
|
|
#define MaxFields 100
|
|
|
|
#define MaxKeys 8
|
|
|
|
#define glockname "xx"
|
|
|
|
#define INVFLD 255
|
|
|
|
/* @(!) 2.3.01.144 */
|
|
|
|
#define NORDIR 0
|
|
|
|
#define COMDIR 1
|
|
|
|
/* @(:) 2.3.01.144 */
|
|
|
|
|
1998-03-05 13:54:51 +00:00
|
|
|
typedef char FieldName[12] ;
|
1995-09-11 15:31:07 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
1998-03-05 13:54:51 +00:00
|
|
|
char SysName[42] __PACKED__ ;
|
|
|
|
RecNoType EOD __PACKED__ ;
|
|
|
|
RecNoType EOX __PACKED__ ;
|
1995-09-11 15:31:07 +00:00
|
|
|
unsigned short LenR __PACKED__ ;
|
1998-03-05 13:54:51 +00:00
|
|
|
RecNoType Flags __PACKED__ ;
|
|
|
|
char Des[42] __PACKED__ ;
|
|
|
|
char FCalc[32] __PACKED__ ;
|
|
|
|
char GenPrompt[32] __PACKED__ ;
|
|
|
|
} FileDes;
|
1995-09-11 15:31:07 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
1998-03-05 13:54:51 +00:00
|
|
|
FieldName Name __PACKED__ ;
|
|
|
|
byte TypeF __PACKED__ ;
|
|
|
|
byte Len __PACKED__ ;
|
|
|
|
byte Dec __PACKED__ ;
|
1995-09-11 15:31:07 +00:00
|
|
|
#ifdef __PACK_1__
|
1998-03-05 13:54:51 +00:00
|
|
|
byte junk __PACKED__ ;
|
1995-09-11 15:31:07 +00:00
|
|
|
#endif
|
1998-03-05 13:54:51 +00:00
|
|
|
unsigned short RecOff __PACKED__ ;
|
1995-09-11 15:31:07 +00:00
|
|
|
} RecFieldDes ;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2002-02-28 11:35:23 +00:00
|
|
|
short DupKeys __ALIGNED__ ; // Was BOOLEAN and dangerous
|
1998-03-05 13:54:51 +00:00
|
|
|
byte NkFields __ALIGNED__ ;
|
|
|
|
byte FieldSeq[MKFields] __PACKED__ ;
|
|
|
|
byte FromCh[MKFields] __PACKED__ ;
|
|
|
|
byte ToCh[MKFields] __PACKED__ ;
|
|
|
|
} KeyDes ;
|
1995-09-11 15:31:07 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
1998-03-05 13:54:51 +00:00
|
|
|
short NFields __PACKED__ ;
|
|
|
|
RecFieldDes Fd[MaxFields] __PACKED__ ;
|
|
|
|
byte SortFd[MaxFields] __PACKED__ ;
|
|
|
|
short NKeys __PACKED__ ;
|
|
|
|
KeyDes Ky[MaxKeys] __PACKED__ ;
|
1995-09-11 15:31:07 +00:00
|
|
|
} RecDes;
|
1998-03-05 13:54:51 +00:00
|
|
|
|
1995-09-11 15:31:07 +00:00
|
|
|
#ifdef __CFILES_C
|
|
|
|
SecDef rdir[2], fdir[2];
|
|
|
|
#else
|
|
|
|
extern SecDef rdir[2], fdir[2];
|
|
|
|
#endif
|
|
|
|
|
2003-05-07 13:06:50 +00:00
|
|
|
#ifdef WIN32
|
1998-03-05 13:54:51 +00:00
|
|
|
#pragma pack()
|
|
|
|
#endif
|
|
|
|
|
1995-09-11 15:31:07 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
/* @(!) 2.3.01.144 */
|
|
|
|
void COpenDir(int, int);
|
|
|
|
void CCloseDir(int);
|
|
|
|
void COpenFile(int, FileDes *, int, int);
|
|
|
|
void CCloseFile(int, FileDes *, int);
|
|
|
|
void CGetFile(int, FileDes *, int, int);
|
|
|
|
void CPutFile(int, FileDes *, int);
|
|
|
|
/* @(:) 2.3.01.144 */
|
|
|
|
void zerofdes(FileDes *);
|
|
|
|
/* @(!) 2.3.01.144 */
|
|
|
|
void COpenRecDir(int, int);
|
|
|
|
void CCloseRecDir(int);
|
|
|
|
void CGetRec(int, RecDes *, int);
|
|
|
|
void CPutRec(int, RecDes *, int);
|
|
|
|
/* @(:) 2.3.01.144 */
|
|
|
|
void zerordes(RecDes *);
|
1998-03-05 13:54:51 +00:00
|
|
|
// word setrdes(RecDes *);
|
1997-12-02 13:21:19 +00:00
|
|
|
const char* CGetPref(void);
|
|
|
|
void CPutPref(const char *);
|
1995-09-11 15:31:07 +00:00
|
|
|
char *CAddPref(char *);
|
|
|
|
/* @(!) 2.3.01.144 */
|
|
|
|
char *CInsPref(char *, int);
|
|
|
|
|
2003-06-06 08:57:05 +00:00
|
|
|
int CGetCampoStpValue(const char* name, char* value, int valsize);
|
2003-05-07 13:06:50 +00:00
|
|
|
const char* CGetCampoIni(void);
|
1997-12-02 13:21:19 +00:00
|
|
|
|
1995-09-11 15:31:07 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
};
|
|
|
|
#endif
|
1998-03-05 13:54:51 +00:00
|
|
|
|
1995-09-11 15:31:07 +00:00
|
|
|
#endif /* __CFILES_H */
|