45 |
char hostname[16]; |
char hostname[16]; |
46 |
char keymapname[16]; |
char keymapname[16]; |
47 |
int keylayout = 0x409; /* Defaults to US keyboard layout */ |
int keylayout = 0x409; /* Defaults to US keyboard layout */ |
48 |
int g_width = 800; /* If width or height are reset to zero, the geometry will |
|
49 |
be fetched from _NET_WORKAREA */ |
int g_width = 800; /* width is special: If 0, the |
50 |
|
geometry will be fetched from |
51 |
|
_NET_WORKAREA. If negative, |
52 |
|
absolute value specifies the |
53 |
|
percent of the whole screen. */ |
54 |
int g_height = 600; |
int g_height = 600; |
55 |
int tcp_port_rdp = TCP_PORT_RDP; |
int tcp_port_rdp = TCP_PORT_RDP; |
56 |
int g_server_bpp = 8; |
int g_server_bpp = 8; |
308 |
} |
} |
309 |
|
|
310 |
g_width = strtol(optarg, &p, 10); |
g_width = strtol(optarg, &p, 10); |
311 |
|
if (g_width <= 0) |
312 |
|
{ |
313 |
|
error("invalid geometry\n"); |
314 |
|
return 1; |
315 |
|
} |
316 |
|
|
317 |
if (*p == 'x') |
if (*p == 'x') |
318 |
g_height = strtol(p + 1, NULL, 10); |
g_height = strtol(p + 1, NULL, 10); |
319 |
|
|
320 |
if ((g_width == 0) || (g_height == 0)) |
if (g_height <= 0) |
321 |
{ |
{ |
322 |
error("invalid geometry\n"); |
error("invalid geometry\n"); |
323 |
return 1; |
return 1; |
324 |
} |
} |
325 |
|
|
326 |
|
if (*p == '%') |
327 |
|
g_width = -g_width; |
328 |
|
|
329 |
break; |
break; |
330 |
|
|
331 |
case 'f': |
case 'f': |