campo-sirio/include/ccommon.h
alex 575e46d577 Patch level : xx.282
Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Riportata la versione 01.05 patch 282


git-svn-id: svn://10.65.10.50/trunk@8022 c028cbd2-c16b-5b4b-a496-9718f37d4682
1999-04-07 14:41:07 +00:00

148 lines
5.0 KiB
C
Executable File

#ifndef __CCOMMON_H
#define __CCOMMON_H
#ifdef DOS
#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
#define ELLIPSES ...
#define CHR(c) (c)
#define ORD(c) (c)
#define ODD(c) (((c) % 2) != 0)
#ifdef DOS
/* @(!) 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 MAXDATA cpackdata("31-12-50")
//#define MINDATA cpackdata("01-01-51")
//#define EMPTYDATA cpackdata(" - - ")
//#define MONTHNAME(i) months[(i) - 1]
//#define CCONVINT(s) atoi(s)
//#define CONVLONG(s) atol(s)
#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])
#define INSET(c,s) (ustrchr((s), (c)) != (uchar *) NULL)
#define CBITTEST(w,p) (((w) & (0x0001 << (p))) != 0)
#define CBITSET(w,p,v) ((v) ? ((w) |= (0x0001 << (p))) : ((w) &= (~(0x0001 << (p)))))
/* @(!) 2.3.01.temp */
#ifndef BOOLEAN
#define BOOLEAN short
#endif
/* @(:) 2.3.01.temp */
#define NoErr 0
//#define BADSIG (int (*)()) -1
//#define MAXMENUITEM 21
//#define MAXWIN 20
//#define MAXBORDERS 8
//#define MAXATTRS 20
//#define BackCh '_'
#define directory "dir.gen"
#define ntrrec "trc.gen"
#define nditta "dta.gen"
//#define printers "prt.gen"
//#define prcodes "prc.gen"
//#define WWMESS 0
//#define WWBAR 1
/* gia' definito in gm.h
typedef unsigned int word;
*/
typedef unsigned char byte;
#ifndef DOS
typedef unsigned char uchar;
#endif
#ifdef FOXPRO
typedef unsigned char uchar;
#endif
#ifdef XVT
#ifdef DOS
typedef unsigned char uchar;
#endif
#endif
typedef char Str8[9];
typedef char Str25[26];
typedef char Str30[32];
typedef char Str80[82];
typedef char Str255[256];
typedef uchar StCh[256];
typedef long TrDate;
typedef char PathSt[82];
extern Str80 cprefix;
#ifdef __cplusplus
extern "C" {
#endif
char *esc(char *);
int CIOResult(void );
#ifdef DOS
void tmpfname(char *,char *);
#endif
/* @(:) 2.3.01.316 */
#ifdef __cplusplus
};
#endif
#endif /* __CCOMMON_H */