1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
/* -*- c-basic-offset: 8 -*-
   rdesktop: A Remote Desktop Protocol client.
   User interface services - Generic
   Copyright (C) Jay Sorg 2004-2006

   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.,
   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/

#include "../rdesktop.h"

extern int g_tcp_port_rdp;
int g_use_rdp5 = 0;
char g_hostname[16];
char g_username[64];
int g_height = 600;
int g_width = 800;
int g_server_depth = 8;
int g_encryption = 1;
int g_desktop_save = 1;
int g_polygon_ellipse_orders = 0;
int g_bitmap_cache = 1;
int g_bitmap_cache_persist_enable = False;
int g_bitmap_cache_precache = True;
int g_bitmap_compression = 1;
int g_rdp5_performanceflags = 0;
int g_console_session = 0;
int g_keylayout = 0x409; /* Defaults to US keyboard layout */
int g_keyboard_type = 0x4; /* Defaults to US keyboard layout */
int g_keyboard_subtype = 0x0; /* Defaults to US keyboard layout */
int g_keyboard_functionkeys = 0xc; /* Defaults to US keyboard layout */
/* Session Directory redirection */
BOOL g_redirect = False;
char g_redirect_server[64];
char g_redirect_domain[16];
char g_redirect_password[64];
char g_redirect_username[64];
char g_redirect_cookie[128];
uint32 g_redirect_flags = 0;

/*****************************************************************************/
void ui_bell(void)
{
}

/*****************************************************************************/
int ui_select(int in)
{
  return 1;
}

/*****************************************************************************/
void ui_destroy_cursor(void* cursor)
{
}

/*****************************************************************************/
void* ui_create_glyph(int width, int height, uint8* data)<--- Function 'ui_create_glyph' argument order different: declaration 'This, width, height' definition 'width, height, data'
{
  return 0;
}

/*****************************************************************************/
void ui_destroy_glyph(void* glyph)
{
}

/*****************************************************************************/
void ui_destroy_bitmap(void* bmp)
{
}

/*****************************************************************************/
void ui_reset_clip(void)
{
}

/*****************************************************************************/
void ui_set_clip(int x, int y, int cx, int cy)<--- Function 'ui_set_clip' argument order different: declaration 'This, x, y, cx' definition 'x, y, cx, cy'
{
}

/*****************************************************************************/
void* ui_create_colourmap(COLOURMAP * colours)
{
  return 0;
}

/*****************************************************************************/
void ui_set_colourmap(void* map)
{
}

/*****************************************************************************/
HBITMAP ui_create_bitmap(int width, int height, uint8* data)<--- Function 'ui_create_bitmap' argument order different: declaration 'This, width, height' definition 'width, height, data'
{
  return 0;
}

/*****************************************************************************/
void ui_draw_text(uint8 font, uint8 flags, uint8 opcode, int mixmode,<--- Function 'ui_draw_text' argument order different: declaration 'This, font, flags, opcode, mixmode, x, y, clipx, clipy, clipcx, clipcy, boxx, boxy, boxcx, boxcy, brush, bgcolour, fgcolour, text' definition 'font, flags, opcode, mixmode, x, y, clipx, clipy, clipcx, clipcy, boxx, boxy, boxcx, boxcy, brush, bgcolour, fgcolour, text, length'
                  int x, int y,
                  int clipx, int clipy, int clipcx, int clipcy,
                  int boxx, int boxy, int boxcx, int boxcy, BRUSH * brush,
                  int bgcolour, int fgcolour, uint8* text, uint8 length)
{
}

/*****************************************************************************/
void ui_line(uint8 opcode, int startx, int starty, int endx, int endy,<--- Function 'ui_line' argument order different: declaration 'This, opcode, startx, starty, endx, endy' definition 'opcode, startx, starty, endx, endy, pen'
             PEN * pen)
{
}

/*****************************************************************************/
void ui_triblt(uint8 opcode, int x, int y, int cx, int cy,<--- Function 'ui_triblt' argument order different: declaration 'This, opcode, x, y, cx, cy, src, srcx, srcy, brush, bgcolour' definition 'opcode, x, y, cx, cy, src, srcx, srcy, brush, bgcolour, fgcolour'
               HBITMAP src, int srcx, int srcy,
               BRUSH* brush, int bgcolour, int fgcolour)
{
}

/*****************************************************************************/
void ui_memblt(uint8 opcode, int x, int y, int cx, int cy,<--- Function 'ui_memblt' argument order different: declaration 'This, opcode, x, y, cx, cy, src, srcx' definition 'opcode, x, y, cx, cy, src, srcx, srcy'
               HBITMAP src, int srcx, int srcy)
{
}

/*****************************************************************************/
void ui_desktop_restore(uint32 offset, int x, int y, int cx, int cy)<--- Function 'ui_desktop_restore' argument order different: declaration 'This, offset, x, y, cx' definition 'offset, x, y, cx, cy'
{
}

/*****************************************************************************/
void ui_desktop_save(uint32 offset, int x, int y, int cx, int cy)<--- Function 'ui_desktop_save' argument order different: declaration 'This, offset, x, y, cx' definition 'offset, x, y, cx, cy'
{
}

/*****************************************************************************/
void ui_rect(int x, int y, int cx, int cy, int colour)<--- Function 'ui_rect' argument order different: declaration 'This, x, y, cx, cy' definition 'x, y, cx, cy, colour'
{
}

/*****************************************************************************/
void ui_screenblt(uint8 opcode, int x, int y, int cx, int cy,<--- Function 'ui_screenblt' argument order different: declaration 'This, opcode, x, y, cx, cy, srcx' definition 'opcode, x, y, cx, cy, srcx, srcy'
                  int srcx, int srcy)
{
}

/*****************************************************************************/
void ui_patblt(uint8 opcode, int x, int y, int cx, int cy,<--- Function 'ui_patblt' argument order different: declaration 'This, opcode, x, y, cx, cy, brush, bgcolour' definition 'opcode, x, y, cx, cy, brush, bgcolour, fgcolour'
               BRUSH * brush, int bgcolour, int fgcolour)
{
}

/*****************************************************************************/
void ui_destblt(uint8 opcode, int x, int y, int cx, int cy)<--- Function 'ui_destblt' argument order different: declaration 'This, opcode, x, y, cx' definition 'opcode, x, y, cx, cy'
{
}

/*****************************************************************************/
void ui_move_pointer(int x, int y)<--- Function 'ui_move_pointer' argument order different: declaration 'This, x' definition 'x, y'
{
}

/*****************************************************************************/
void ui_set_null_cursor(void)
{
}

/*****************************************************************************/
void ui_paint_bitmap(int x, int y, int cx, int cy,<--- Function 'ui_paint_bitmap' argument order different: declaration 'This, x, y, cx, cy, width, height' definition 'x, y, cx, cy, width, height, data'
                     int width, int height, uint8* data)
{
}

/*****************************************************************************/
void ui_set_cursor(HCURSOR cursor)
{
}

/*****************************************************************************/
HCURSOR ui_create_cursor(unsigned int x, unsigned int y,<--- Function 'ui_create_cursor' argument order different: declaration 'This, x, y, width, height, andmask' definition 'x, y, width, height, andmask, xormask'
                         int width, int height,
                         uint8* andmask, uint8* xormask)
{
  return 0;
}

/*****************************************************************************/
uint16 ui_get_numlock_state(unsigned int state)
{
  return 0;
}

/*****************************************************************************/
unsigned int read_keyboard_state(void)
{
  return 0;
}

/*****************************************************************************/
void ui_resize_window(void)
{
}

/*****************************************************************************/
void ui_begin_update(void)
{
}

/*****************************************************************************/
void ui_end_update(void)
{
}

/*****************************************************************************/
void ui_polygon(uint8 opcode, uint8 fillmode, POINT * point, int npoints,<--- Function 'ui_polygon' argument order different: declaration 'This, opcode, fillmode, point, npoints, brush, bgcolour' definition 'opcode, fillmode, point, npoints, brush, bgcolour, fgcolour'
                BRUSH * brush, int bgcolour, int fgcolour)
{
}

/*****************************************************************************/
/* todo, use qt function for this (QPainter::drawPolyline) */
void ui_polyline(uint8 opcode, POINT * points, int npoints, PEN * pen)<--- Function 'ui_polyline' argument order different: declaration 'This, opcode, points, npoints' definition 'opcode, points, npoints, pen'
{
  int i, x, y, dx, dy;
  if (npoints > 0)
  {
    x = points[0].x;
    y = points[0].y;
    for (i = 1; i < npoints; i++)
    {
      dx = points[i].x;
      dy = points[i].y;
      ui_line(opcode, x, y, x + dx, y + dy, pen);
      x = x + dx;
      y = y + dy;
    }
  }
}

/*****************************************************************************/
void ui_ellipse(uint8 opcode, uint8 fillmode,<--- Function 'ui_ellipse' argument order different: declaration 'This, opcode, fillmode, x, y, cx, cy, brush, bgcolour' definition 'opcode, fillmode, x, y, cx, cy, brush, bgcolour, fgcolour'
                int x, int y, int cx, int cy,
                BRUSH * brush, int bgcolour, int fgcolour)
{
}

/*****************************************************************************/
void generate_random(uint8* random)
{
}

/*****************************************************************************/
void save_licence(uint8* data, int length)<--- Function 'save_licence' argument order different: declaration 'This, data' definition 'data, length'
{
}

/*****************************************************************************/
int load_licence(uint8** data)
{
  return 0;
}

/*****************************************************************************/
void* xrealloc(void* in, int size)
{
  return 0;
}

/*****************************************************************************/
void* xmalloc(int size)
{
  return 0;
}

/*****************************************************************************/
void xfree(void* in)
{
}

/*****************************************************************************/
char * xstrdup(const char * s)
{
  char * mem = strdup(s);
  if (mem == NULL)
  {
    perror("strdup");
    exit(1);
  }
  return mem;
}
/*****************************************************************************/
void warning(char* format, ...)
{
}

/*****************************************************************************/
void unimpl(char* format, ...)
{
}

/*****************************************************************************/
void error(char* format, ...)
{
}

/*****************************************************************************/
BOOL rd_pstcache_mkdir(void)
{
  return 0;
}

/*****************************************************************************/
int rd_open_file(char *filename)
{
  return 0;
}

/*****************************************************************************/
void rd_close_file(int fd)
{
  return;
}

/*****************************************************************************/
int rd_read_file(int fd, void *ptr, int len)
{
  return 0;
}

/*****************************************************************************/
int rd_write_file(int fd, void* ptr, int len)
{
  return 0;
}

/*****************************************************************************/
int rd_lseek_file(int fd, int offset)
{
  return 0;
}

/*****************************************************************************/
BOOL rd_lock_file(int fd, int start, int len)
{
  return False;
}

/*****************************************************************************/
int main(int c, char** p)
{
  return 0;
}