--- sourceforge.net/trunk/rdesktop/rdesktop.h 2001/09/14 03:38:39 29 +++ sourceforge.net/trunk/rdesktop/rdesktop.h 2005/03/09 22:41:12 842 @@ -1,7 +1,7 @@ /* rdesktop: A Remote Desktop Protocol client. Master include file - Copyright (C) Matthew Chapman 1999-2000 + Copyright (C) Matthew Chapman 1999-2005 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,23 +21,73 @@ #include #include #include +#include +#include +#ifdef HAVE_SYS_SELECT_H +#include +#else +#include +#include +#endif + +#define VERSION "1.4.0" + +#ifdef WITH_DEBUG +#define DEBUG(args) printf args; +#else +#define DEBUG(args) +#endif -#define VERSION "1.1.0" +#ifdef WITH_DEBUG_KBD +#define DEBUG_KBD(args) printf args; +#else +#define DEBUG_KBD(args) +#endif -#define STATUS(args...) fprintf(stderr, args); -#define ERROR(args...) fprintf(stderr, "ERROR: "args); -#define WARN(args...) fprintf(stderr, "WARNING: "args); -#define NOTIMP(args...) fprintf(stderr, "NOTIMP: "args); +#ifdef WITH_DEBUG_RDP5 +#define DEBUG_RDP5(args) printf args; +#else +#define DEBUG_RDP5(args) +#endif -#ifdef RDP_DEBUG -#define DEBUG(args...) fprintf(stderr, args); +#ifdef WITH_DEBUG_CLIPBOARD +#define DEBUG_CLIPBOARD(args) printf args; #else -#define DEBUG(args...) +#define DEBUG_CLIPBOARD(args) #endif +#define STRNCPY(dst,src,n) { strncpy(dst,src,n-1); dst[n-1] = 0; } + +#ifndef MIN +#define MIN(x,y) (((x) < (y)) ? (x) : (y)) +#endif + +#ifndef MAX +#define MAX(x,y) (((x) > (y)) ? (x) : (y)) +#endif + +/* If configure does not define the endianess, try + to find it out */ +#if !defined(L_ENDIAN) && !defined(B_ENDIAN) +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define L_ENDIAN +#elif __BYTE_ORDER == __BIG_ENDIAN +#define B_ENDIAN +#else +#error Unknown endianness. Edit rdesktop.h. +#endif +#endif /* B_ENDIAN, L_ENDIAN from configure */ + +/* No need for alignment on x86 and amd64 */ +#if !defined(NEED_ALIGN) +#if !(defined(__x86__) || defined(__x86_64__) || defined(__AMD64__)) +#define NEED_ALIGN +#endif +#endif + +#include "parse.h" #include "constants.h" #include "types.h" -#include "parse.h" #ifndef MAKE_PROTO #include "proto.h"