2000-05-10 09:36:34 +02:00
|
|
|
/*
|
|
|
|
rdesktop: A Remote Desktop Protocol client.
|
2000-08-15 12:23:24 +02:00
|
|
|
Master include file
|
2005-03-02 18:38:26 +01:00
|
|
|
Copyright (C) Matthew Chapman 1999-2005
|
2000-05-10 09:36:34 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
2001-06-20 15:54:48 +02:00
|
|
|
#include <stdlib.h>
|
2000-05-10 09:36:34 +02:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
2004-03-04 09:23:17 +01:00
|
|
|
#include <dirent.h>
|
2004-11-06 18:27:45 +01:00
|
|
|
#include <sys/time.h>
|
2004-11-06 16:29:38 +01:00
|
|
|
#ifdef HAVE_SYS_SELECT_H
|
2004-08-24 23:37:50 +02:00
|
|
|
#include <sys/select.h>
|
2004-11-06 16:29:38 +01:00
|
|
|
#else
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
2000-05-10 09:36:34 +02:00
|
|
|
|
2005-03-06 22:11:18 +01:00
|
|
|
#define VERSION "1.4.0"
|
2000-05-10 09:36:34 +02:00
|
|
|
|
2001-09-14 15:51:38 +02:00
|
|
|
#ifdef WITH_DEBUG
|
|
|
|
#define DEBUG(args) printf args;
|
2000-08-15 12:23:24 +02:00
|
|
|
#else
|
2001-09-14 15:51:38 +02:00
|
|
|
#define DEBUG(args)
|
2000-08-15 12:23:24 +02:00
|
|
|
#endif
|
2000-05-10 09:36:34 +02:00
|
|
|
|
2002-09-24 09:33:17 +02:00
|
|
|
#ifdef WITH_DEBUG_KBD
|
2002-07-30 09:30:12 +02:00
|
|
|
#define DEBUG_KBD(args) printf args;
|
2002-07-18 20:28:12 +02:00
|
|
|
#else
|
2002-07-30 09:30:12 +02:00
|
|
|
#define DEBUG_KBD(args)
|
2002-07-18 20:28:12 +02:00
|
|
|
#endif
|
|
|
|
|
2003-03-06 16:36:28 +01:00
|
|
|
#ifdef WITH_DEBUG_RDP5
|
|
|
|
#define DEBUG_RDP5(args) printf args;
|
|
|
|
#else
|
|
|
|
#define DEBUG_RDP5(args)
|
|
|
|
#endif
|
|
|
|
|
2003-06-06 12:43:01 +02:00
|
|
|
#ifdef WITH_DEBUG_CLIPBOARD
|
|
|
|
#define DEBUG_CLIPBOARD(args) printf args;
|
|
|
|
#else
|
|
|
|
#define DEBUG_CLIPBOARD(args)
|
|
|
|
#endif
|
|
|
|
|
2003-07-01 11:31:25 +02:00
|
|
|
#define STRNCPY(dst,src,n) { strncpy(dst,src,n-1); dst[n-1] = 0; }
|
2004-01-21 15:40:40 +01:00
|
|
|
|
2003-10-31 05:29:57 +01:00
|
|
|
#ifndef MIN
|
2003-07-01 11:31:25 +02:00
|
|
|
#define MIN(x,y) (((x) < (y)) ? (x) : (y))
|
2003-10-31 05:29:57 +01:00
|
|
|
#endif
|
2004-01-21 15:40:40 +01:00
|
|
|
|
2003-10-31 05:29:57 +01:00
|
|
|
#ifndef MAX
|
|
|
|
#define MAX(x,y) (((x) > (y)) ? (x) : (y))
|
|
|
|
#endif
|
2001-09-14 15:51:38 +02:00
|
|
|
|
2004-05-07 06:56:09 +02:00
|
|
|
/* 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 */
|
|
|
|
|
2005-03-02 18:38:26 +01:00
|
|
|
/* Temporary NEED_ALIGN for alpha, should be properly detected
|
|
|
|
by configure in the future */
|
|
|
|
#if defined(__alpha__)
|
|
|
|
#define NEED_ALIGN
|
|
|
|
#endif
|
|
|
|
|
2003-07-01 11:31:25 +02:00
|
|
|
#include "parse.h"
|
2000-08-15 12:23:24 +02:00
|
|
|
#include "constants.h"
|
|
|
|
#include "types.h"
|
2003-06-06 12:43:01 +02:00
|
|
|
|
2000-07-25 14:34:29 +02:00
|
|
|
#ifndef MAKE_PROTO
|
2000-05-10 09:36:34 +02:00
|
|
|
#include "proto.h"
|
2000-07-25 14:34:29 +02:00
|
|
|
#endif
|