aboutsummaryrefslogtreecommitdiff
path: root/net/rdesktop/files
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2005-04-25 15:01:26 +0000
committerPav Lucistnik <pav@FreeBSD.org>2005-04-25 15:01:26 +0000
commita0b42d433786bf598a7e678b11d99400721b6928 (patch)
treebaabf886998dc700f39922c0f156766d49855975 /net/rdesktop/files
parent2cad98267f9687979cbd34085b49dbdf431fb0af (diff)
downloadports-a0b42d433786bf598a7e678b11d99400721b6928.tar.gz
ports-a0b42d433786bf598a7e678b11d99400721b6928.zip
Notes
Diffstat (limited to 'net/rdesktop/files')
-rw-r--r--net/rdesktop/files/patch-constants.h13
-rw-r--r--net/rdesktop/files/patch-licence.c12
-rw-r--r--net/rdesktop/files/patch-rdesktop.c67
-rw-r--r--net/rdesktop/files/patch-rdp.c118
4 files changed, 0 insertions, 210 deletions
diff --git a/net/rdesktop/files/patch-constants.h b/net/rdesktop/files/patch-constants.h
deleted file mode 100644
index bbe80c66a104..000000000000
--- a/net/rdesktop/files/patch-constants.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- constants.h.orig 2004-11-03 16:56:44.000000000 +0300
-+++ constants.h 2004-12-15 11:47:49.583973715 +0300
-@@ -21,6 +21,9 @@
- /* TCP port for Remote Desktop Protocol */
- #define TCP_PORT_RDP 3389
-
-+#define DEFAULT_CODEPAGE "UTF-8"
-+#define WINDOWS_CODEPAGE "UTF-16"
-+
- /* ISO PDU codes */
- enum ISO_PDU_CODE
- {
-diff -uNr licence.c.orig licence.c
diff --git a/net/rdesktop/files/patch-licence.c b/net/rdesktop/files/patch-licence.c
deleted file mode 100644
index 4071ab9b8495..000000000000
--- a/net/rdesktop/files/patch-licence.c
+++ /dev/null
@@ -1,12 +0,0 @@
---- licence.c.orig 2004-07-31 17:07:41.000000000 +0400
-+++ licence.c 2004-12-15 10:19:42.000000000 +0300
-@@ -21,7 +21,7 @@
- #include "rdesktop.h"
- #include <openssl/rc4.h>
-
--extern char g_username[16];
-+extern char g_username[64];
- extern char g_hostname[16];
-
- static uint8 g_licence_key[16];
-diff -uNr rdesktop.c.orig rdesktop.c
diff --git a/net/rdesktop/files/patch-rdesktop.c b/net/rdesktop/files/patch-rdesktop.c
deleted file mode 100644
index 509be4c1107a..000000000000
--- a/net/rdesktop/files/patch-rdesktop.c
+++ /dev/null
@@ -1,67 +0,0 @@
---- rdesktop.c.orig 2004-11-18 14:18:49.000000000 +0300
-+++ rdesktop.c 2004-12-15 12:19:11.263991136 +0300
-@@ -28,6 +28,8 @@
- #include <sys/times.h> /* times */
- #include <ctype.h> /* toupper */
- #include <errno.h>
-+#include <locale.h>
-+#include <langinfo.h>
- #include "rdesktop.h"
-
- #ifdef EGD_SOCKET
-@@ -39,6 +41,7 @@
-
- char g_title[64] = "";
- char g_username[64];
-+char g_codepage[16] = "";
- char g_hostname[16];
- char keymapname[16];
- int g_keylayout = 0x409; /* Defaults to US keyboard layout */
-@@ -112,6 +115,7 @@
- fprintf(stderr, " -g: desktop geometry (WxH)\n");
- fprintf(stderr, " -f: full-screen mode\n");
- fprintf(stderr, " -b: force bitmap updates\n");
-+ fprintf(stderr, " -L: local codepage\n");
- fprintf(stderr, " -B: use BackingStore of X-server (if available)\n");
- fprintf(stderr, " -e: disable encryption (French TS)\n");
- fprintf(stderr, " -E: disable encryption from client to server\n");
-@@ -366,7 +370,7 @@
- #endif
-
- while ((c = getopt(argc, argv,
-- VNCOPT "u:d:s:c:p:n:k:g:fbBeEmzCDKS:T:NX:a:x:Pr:045h?")) != -1)
-+ VNCOPT "u:L:d:s:c:p:n:k:g:fbBeEmzCDKS:T:NX:a:x:Pr:045h?")) != -1)
- {
- switch (c)
- {
-@@ -389,6 +393,10 @@
- username_option = 1;
- break;
-
-+ case 'L':
-+ STRNCPY(g_codepage, optarg, sizeof(g_codepage));
-+ break;
-+
- case 'd':
- STRNCPY(domain, optarg, sizeof(domain));
- break;
-@@ -675,6 +683,18 @@
- STRNCPY(g_username, pw->pw_name, sizeof(g_username));
- }
-
-+ if (g_codepage[0] == 0)
-+ {
-+ if (setlocale(LC_CTYPE, ""))
-+ {
-+ STRNCPY(g_codepage, nl_langinfo(CODESET), sizeof(g_codepage));
-+ }
-+ else
-+ {
-+ STRNCPY(g_codepage, DEFAULT_CODEPAGE, sizeof(g_codepage));
-+ }
-+ }
-+
- if (g_hostname[0] == 0)
- {
- if (gethostname(fullhostname, sizeof(fullhostname)) == -1)
-diff -uNr rdp.c.orig rdp.c
diff --git a/net/rdesktop/files/patch-rdp.c b/net/rdesktop/files/patch-rdp.c
deleted file mode 100644
index 6c0c690fd024..000000000000
--- a/net/rdesktop/files/patch-rdp.c
+++ /dev/null
@@ -1,118 +0,0 @@
---- rdp.c.orig 2004-10-07 17:00:28.000000000 +0400
-+++ rdp.c 2004-12-15 12:12:23.022107839 +0300
-@@ -19,10 +19,14 @@
- */
-
- #include <time.h>
-+#include <errno.h>
-+#include <iconv.h>
-+#include <unistd.h>
- #include "rdesktop.h"
-
- extern uint16 g_mcs_userid;
--extern char g_username[16];
-+extern char g_username[64];
-+extern char g_codepage[16];
- extern BOOL g_bitmap_compression;
- extern BOOL g_orders;
- extern BOOL g_encryption;
-@@ -140,17 +144,51 @@
- void
- rdp_out_unistr(STREAM s, char *string, int len)
- {
-- int i = 0, j = 0;
-+ static iconv_t iconv_h = (iconv_t)-1;
-+ size_t ibl = strlen(string), obl = len + 2;
-+ char *pin = string, *pout;
-+#ifdef WORDS_BIGENDIAN
-+ char ss[4096]; // FIXME: global MAX_BUF_SIZE macro need
-+
-+ pout = ss;
-+#else
-+ pout = s->p;
-+#endif
-
-- len += 2;
-+ memset(pout, 0, len + 4);
-
-- while (i < len)
-+ if (iconv_h == (iconv_t)-1)
- {
-- s->p[i++] = string[j++];
-- s->p[i++] = 0;
-+ size_t i = 1, o = 4;
-+ if ((iconv_h = iconv_open(WINDOWS_CODEPAGE, g_codepage)) == (iconv_t)-1)
-+ {
-+ printf("rdp_out_unistr: iconv_open[%s -> %s] fail %d\n",
-+ g_codepage, WINDOWS_CODEPAGE, (int)iconv_h);
-+ return;
-+ }
-+ if (iconv(iconv_h, &pin, &i, &pout, &o) == (size_t)-1)
-+ {
-+ iconv_close(iconv_h);
-+ iconv_h = (iconv_t)-1;
-+ printf("rdp_out_unistr: iconv(1) fail, errno %d\n", errno);
-+ return;
-+ }
-+ pin = string; pout = s->p;
- }
-
-- s->p += len;
-+ if (iconv(iconv_h, &pin, &ibl, &pout, &obl) == (size_t)-1)
-+ {
-+ iconv_close(iconv_h);
-+ iconv_h = (iconv_t)-1;
-+ printf("rdp_out_unistr: iconv(2) fail, errno %d\n", errno);
-+ return;
-+ }
-+
-+#ifdef WORDS_BIGENDIAN
-+ swab(ss, s->p, len + 4);
-+#endif
-+
-+ s->p += len + 2;
- }
-
- /* Input a string in Unicode
-@@ -160,15 +198,36 @@
- int
- rdp_in_unistr(STREAM s, char *string, int uni_len)
- {
-- int i = 0;
-+ static iconv_t iconv_h = (iconv_t)-1;
-+ size_t ibl = uni_len, obl = uni_len;
-+ char *pin, *pout = string;
-+#ifdef WORDS_BIGENDIAN
-+ char ss[4096]; // FIXME: global MAX_BUF_SIZE macro need
-+
-+ swab(s->p, ss, uni_len);
-+ pin = ss;
-+#else
-+ pin = s->p;
-+#endif
-
-- while (i < uni_len / 2)
-+ if (iconv_h == (iconv_t)-1)
- {
-- in_uint8a(s, &string[i++], 1);
-- in_uint8s(s, 1);
-+ if ((iconv_h = iconv_open(g_codepage, WINDOWS_CODEPAGE)) == (iconv_t)-1)
-+ {
-+ printf("rdp_in_unistr: iconv_open[%s -> %s] fail %d\n",
-+ WINDOWS_CODEPAGE, g_codepage, (int)iconv_h);
-+ return 0;
-+ }
- }
-
-- return i - 1;
-+ if (iconv(iconv_h, &pin, &ibl, &pout, &obl) == (size_t)-1)
-+ {
-+ iconv_close(iconv_h);
-+ iconv_h = (iconv_t)-1;
-+ printf("rdp_in_unistr: iconv fail, errno %d\n", errno);
-+ return 0;
-+ }
-+ return pout - string;
- }
-
-