1995-09-11 15:31:07 +00:00
|
|
|
#ifndef __CCOMMON_H
|
|
|
|
#define __CCOMMON_H
|
|
|
|
|
2003-05-07 13:06:50 +00:00
|
|
|
#ifdef WIN32
|
1995-09-11 15:31:07 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#define _NO_STDIO
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#else
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#define _NO_STDIO
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <setjmp.h>
|
|
|
|
#else
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <time.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <setjmp.h>
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
1995-10-30 10:19:44 +00:00
|
|
|
#define ELLIPSES ...
|
1995-09-11 15:31:07 +00:00
|
|
|
|
2003-05-07 13:06:50 +00:00
|
|
|
#ifdef WIN32
|
1995-09-11 15:31:07 +00:00
|
|
|
/* @(!) 2.3.01.316 modif. #define TMPFNAME(p,n) sprintf(p, "\\tmp\\%s.tmp", (n)); */
|
|
|
|
#define TMPFNAME(p,n) tmpfname((p),(n))
|
|
|
|
/* @(:) 2.3.01.316 */
|
|
|
|
#define DIRSEP '\\'
|
|
|
|
#else
|
|
|
|
#define TMPFNAME(p,n) sprintf(p, "/usr/tmp/%s%-d", (n), getpid());
|
|
|
|
#define DIRSEP '/'
|
|
|
|
#endif
|
|
|
|
#define HIDDEN static
|
|
|
|
#define UPCASE(c) toupper(c)
|
|
|
|
#define LOWCASE(c) tolower(c)
|
|
|
|
#define LENGTH(s) strlen(s)
|
|
|
|
#define STREMPTY(s) (!(LENGTH(s)))
|
|
|
|
#define STRNOTEMPTY(s) (!STREMPTY(s))
|
|
|
|
#define STRCMP(s1,op,s2) (strcmp(s1,s2) op 0)
|
|
|
|
#define CSTR(n,s) sprintf((s), "%-d", (n))
|
|
|
|
#define CSTR4(n,s) sprintf((s), "%-ld", (n))
|
|
|
|
#define BADR(x) ((x) - 1)
|
|
|
|
#define WINHND(hw) warr[(hw)].w
|
|
|
|
/* @(!) 2.3.01.69 */
|
|
|
|
#define WINHNDB(hw) warr[(hw)].wb
|
|
|
|
/* @(:) 2.3.01.69 */
|
|
|
|
#define WINFLD(hw,f) warr[(hw)].f
|
|
|
|
#define POSTWIN(hw) WINFLD(hw,posted) = TRUE
|
|
|
|
#define UNPOSTWIN(hw) WINFLD(hw,posted) = FALSE
|
|
|
|
#define CCLEAREOL(w) xwclrtoeol(WINHND(w))
|
|
|
|
#define CCLEAREOS(w) xwclrtobot(WINHND(w))
|
|
|
|
#define CCLEARWIN(w) xpaint(WINHND(w), setattr[warr[(w)].bkat][iscolordisp])
|
2003-03-27 12:14:51 +00:00
|
|
|
#define INSET(c,s) (ustrchr((s), (c)) != (byte *) NULL)
|
1995-09-11 15:31:07 +00:00
|
|
|
#define CBITTEST(w,p) (((w) & (0x0001 << (p))) != 0)
|
|
|
|
#define CBITSET(w,p,v) ((v) ? ((w) |= (0x0001 << (p))) : ((w) &= (~(0x0001 << (p)))))
|
|
|
|
/* @(!) 2.3.01.temp */
|
1998-03-05 13:54:51 +00:00
|
|
|
#ifndef BOOLEAN
|
1995-09-11 15:31:07 +00:00
|
|
|
#define BOOLEAN short
|
|
|
|
#endif
|
|
|
|
/* @(:) 2.3.01.temp */
|
|
|
|
#define NoErr 0
|
2003-03-27 12:14:51 +00:00
|
|
|
|
1995-09-11 15:31:07 +00:00
|
|
|
#define directory "dir.gen"
|
|
|
|
#define ntrrec "trc.gen"
|
|
|
|
#define nditta "dta.gen"
|
1998-03-05 13:54:51 +00:00
|
|
|
|
2003-03-27 12:14:51 +00:00
|
|
|
typedef unsigned char byte;
|
1995-09-11 15:31:07 +00:00
|
|
|
typedef char Str8[9];
|
|
|
|
typedef char Str25[26];
|
|
|
|
typedef char Str30[32];
|
|
|
|
typedef char Str80[82];
|
|
|
|
typedef char Str255[256];
|
2003-03-27 12:14:51 +00:00
|
|
|
typedef byte StCh[256];
|
1995-09-11 15:31:07 +00:00
|
|
|
typedef long TrDate;
|
1998-03-05 13:54:51 +00:00
|
|
|
|
1997-12-02 13:21:19 +00:00
|
|
|
typedef char PathSt[82];
|
1995-09-11 15:31:07 +00:00
|
|
|
|
|
|
|
extern Str80 cprefix;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
char *esc(char *);
|
1995-10-30 10:19:44 +00:00
|
|
|
|
1995-09-11 15:31:07 +00:00
|
|
|
|
|
|
|
int CIOResult(void );
|
2003-05-07 13:06:50 +00:00
|
|
|
#ifdef WIN32
|
1995-09-11 15:31:07 +00:00
|
|
|
void tmpfname(char *,char *);
|
|
|
|
#endif
|
|
|
|
/* @(:) 2.3.01.316 */
|
|
|
|
#ifdef __cplusplus
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
#endif /* __CCOMMON_H */
|