/[rdesktop]/jpeg/rdesktop/trunk/rdesktop.h
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /jpeg/rdesktop/trunk/rdesktop.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1364 - (hide annotations)
Thu Jan 4 04:55:56 2007 UTC (17 years, 4 months ago) by jsorg71
Original Path: sourceforge.net/trunk/rdesktop/rdesktop.h
File MIME type: text/plain
File size: 3179 byte(s)
RD_ prefix and win32 compatibility for core files

1 matty 10 /*
2     rdesktop: A Remote Desktop Protocol client.
3     Master include file
4 stargo 826 Copyright (C) Matthew Chapman 1999-2005
5 jsorg71 1364
6 matty 10 This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10 jsorg71 1364
11 matty 10 This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     GNU General Public License for more details.
15 jsorg71 1364
16 matty 10 You should have received a copy of the GNU General Public License
17     along with this program; if not, write to the Free Software
18     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19     */
20    
21 matty 28 #include <stdlib.h>
22 matty 10 #include <stdio.h>
23     #include <string.h>
24 jsorg71 1364 #ifdef _WIN32
25     #define WINVER 0x0400
26     #include <windows.h>
27     #include <winsock.h>
28     #include <time.h>
29     #define DIR int
30     #else
31 n-ki 626 #include <dirent.h>
32 stargo 799 #include <sys/time.h>
33 stargo 798 #ifdef HAVE_SYS_SELECT_H
34 stargo 756 #include <sys/select.h>
35 stargo 798 #else
36     #include <sys/types.h>
37     #include <unistd.h>
38     #endif
39 jsorg71 1364 #endif
40 stargo 980 #include <limits.h> /* PATH_MAX */
41 matty 10
42 astrand 1251 #define VERSION "1.5.0"
43 matty 10
44 matty 30 #ifdef WITH_DEBUG
45     #define DEBUG(args) printf args;
46 matty 10 #else
47 matty 30 #define DEBUG(args)
48 matty 10 #endif
49    
50 matthewc 190 #ifdef WITH_DEBUG_KBD
51 astrand 84 #define DEBUG_KBD(args) printf args;
52 astrand 66 #else
53 astrand 84 #define DEBUG_KBD(args)
54 astrand 66 #endif
55    
56 forsberg 341 #ifdef WITH_DEBUG_RDP5
57     #define DEBUG_RDP5(args) printf args;
58     #else
59     #define DEBUG_RDP5(args)
60     #endif
61    
62 forsberg 406 #ifdef WITH_DEBUG_CLIPBOARD
63     #define DEBUG_CLIPBOARD(args) printf args;
64     #else
65     #define DEBUG_CLIPBOARD(args)
66     #endif
67    
68 ossman_ 1336 #ifdef WITH_DEBUG_SOUND
69     #define DEBUG_SOUND(args) printf args;
70     #else
71     #define DEBUG_SOUND(args)
72     #endif
73    
74 astrand 1199 #ifdef WITH_DEBUG_CHANNEL
75     #define DEBUG_CHANNEL(args) printf args;
76     #else
77     #define DEBUG_CHANNEL(args)
78     #endif
79    
80 stargo 1319 #ifdef WITH_DEBUG_SCARD
81     #define DEBUG_SCARD(args) printf args;
82     #else
83     #define DEBUG_SCARD(args)
84     #endif
85    
86 matthewc 432 #define STRNCPY(dst,src,n) { strncpy(dst,src,n-1); dst[n-1] = 0; }
87 n-ki 569
88 matthewc 536 #ifndef MIN
89 matthewc 432 #define MIN(x,y) (((x) < (y)) ? (x) : (y))
90 matthewc 536 #endif
91 n-ki 569
92 matthewc 536 #ifndef MAX
93     #define MAX(x,y) (((x) > (y)) ? (x) : (y))
94     #endif
95 matty 30
96 astrand 1199 /* timeval macros */
97     #ifndef timerisset
98     #define timerisset(tvp)\
99     ((tvp)->tv_sec || (tvp)->tv_usec)
100     #endif
101     #ifndef timercmp
102     #define timercmp(tvp, uvp, cmp)\
103     ((tvp)->tv_sec cmp (uvp)->tv_sec ||\
104     (tvp)->tv_sec == (uvp)->tv_sec &&\
105     (tvp)->tv_usec cmp (uvp)->tv_usec)
106     #endif
107     #ifndef timerclear
108     #define timerclear(tvp)\
109     ((tvp)->tv_sec = (tvp)->tv_usec = 0)
110     #endif
111    
112 stargo 692 /* If configure does not define the endianess, try
113     to find it out */
114     #if !defined(L_ENDIAN) && !defined(B_ENDIAN)
115     #if __BYTE_ORDER == __LITTLE_ENDIAN
116     #define L_ENDIAN
117     #elif __BYTE_ORDER == __BIG_ENDIAN
118     #define B_ENDIAN
119     #else
120     #error Unknown endianness. Edit rdesktop.h.
121     #endif
122     #endif /* B_ENDIAN, L_ENDIAN from configure */
123    
124 stargo 842 /* No need for alignment on x86 and amd64 */
125     #if !defined(NEED_ALIGN)
126 jsorg71 854 #if !(defined(__x86__) || defined(__x86_64__) || \
127 jsorg71 878 defined(__AMD64__) || defined(_M_IX86) || \
128     defined(__i386__))
129 stargo 826 #define NEED_ALIGN
130     #endif
131 stargo 842 #endif
132 stargo 826
133 matthewc 432 #include "parse.h"
134 matty 10 #include "constants.h"
135     #include "types.h"
136    
137     #ifndef MAKE_PROTO
138     #include "proto.h"
139     #endif

  ViewVC Help
Powered by ViewVC 1.1.26