diff options
author | Gustavo Zacarias <gustavoz@gentoo.org> | 2005-11-22 17:25:00 +0000 |
---|---|---|
committer | Gustavo Zacarias <gustavoz@gentoo.org> | 2005-11-22 17:25:00 +0000 |
commit | 6486b2856b84a9c225a4c0179d2f01e4eab83a94 (patch) | |
tree | ace694dccc2cb9339cbdbee385586afe4e68984f /net-irc/xchat/files | |
parent | Marked stable on amd64 and x86 wrt bug #109084. (diff) | |
download | gentoo-2-6486b2856b84a9c225a4c0179d2f01e4eab83a94.tar.gz gentoo-2-6486b2856b84a9c225a4c0179d2f01e4eab83a94.tar.bz2 gentoo-2-6486b2856b84a9c225a4c0179d2f01e4eab83a94.zip |
Revbump with patch for bug #109744
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'net-irc/xchat/files')
-rw-r--r-- | net-irc/xchat/files/44_fix_alignment_endianess.dpatch | 319 | ||||
-rw-r--r-- | net-irc/xchat/files/digest-xchat-2.4.5-r1 | 1 |
2 files changed, 320 insertions, 0 deletions
diff --git a/net-irc/xchat/files/44_fix_alignment_endianess.dpatch b/net-irc/xchat/files/44_fix_alignment_endianess.dpatch new file mode 100644 index 000000000000..4e2b3779f617 --- /dev/null +++ b/net-irc/xchat/files/44_fix_alignment_endianess.dpatch @@ -0,0 +1,319 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 44_fix_alignment_endianess.dpatch by evo +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fixed alignment and Endianess issues, doesn't affect x86. + +@DPATCH@ +diff -Naur xchat-2.4.5uno/src/common/outbound.c xchat-2.4.5/src/common/outbound.c +--- xchat-2.4.5uno/src/common/outbound.c 2005-10-01 12:32:53.000000000 +0200 ++++ xchat-2.4.5/src/common/outbound.c 2005-09-30 21:52:42.000000000 +0200 +@@ -1498,7 +1498,7 @@ + k = 0; + } else + { +- if (isdigit (buf[i]) && k < (sizeof (numb) - 1)) ++ if (isdigit ((unsigned char) buf[i]) && k < (sizeof (numb) - 1)) + { + numb[k] = buf[i]; + k++; +@@ -1899,7 +1899,7 @@ + p = name; + while (*p) + { +- hl->buf[len] = toupper (*p); ++ hl->buf[len] = toupper ((unsigned char) *p); + len++; + p++; + } +@@ -2136,7 +2136,7 @@ + + user = find_name (sess, nick); + +- if (isdigit (reason[0]) && reason[1] == 0) ++ if (isdigit ((unsigned char) reason[0]) && reason[1] == 0) + { + ban (sess, tbuf, nick, reason, (user && user->op)); + reason[0] = 0; +@@ -3287,9 +3287,9 @@ + { + if (src[0] == '%' || src[0] == '&') + { +- if (isdigit (src[1])) ++ if (isdigit ((unsigned char) src[1])) + { +- if (isdigit (src[2]) && isdigit (src[3])) ++ if (isdigit ((unsigned char) src[2]) && isdigit ((unsigned char) src[3])) + { + buf[0] = src[1]; + buf[1] = src[2]; +@@ -3442,8 +3442,8 @@ + occur++; + if ( do_ascii && + j + 3 < len && +- (isdigit (cmd[j + 1]) && isdigit (cmd[j + 2]) && +- isdigit (cmd[j + 3]))) ++ (isdigit ((unsigned char) cmd[j + 1]) && isdigit ((unsigned char) cmd[j + 2]) && ++ isdigit ((unsigned char) cmd[j + 3]))) + { + tbuf[0] = cmd[j + 1]; + tbuf[1] = cmd[j + 2]; +diff -Naur xchat-2.4.5uno/src/common/proto-irc.c xchat-2.4.5/src/common/proto-irc.c +--- xchat-2.4.5uno/src/common/proto-irc.c 2005-10-01 12:32:53.000000000 +0200 ++++ xchat-2.4.5/src/common/proto-irc.c 2005-09-30 22:31:11.000000000 +0200 +@@ -761,8 +761,12 @@ + + if (len == 4) + { ++ guint32 t; ++ ++ t = WORDL((guint8)type[0], (guint8)type[1], (guint8)type[2], ++ (guint8)type[3]); + /* this should compile to a bunch of: CMP.L, JE ... nice & fast */ +- switch (*((guint32 *)type)) ++ switch (t) + { + case WORDL('J','O','I','N'): + { +@@ -838,8 +842,12 @@ + + else if (len >= 5) + { ++ guint32 t; ++ ++ t = WORDL((guint8)type[0], (guint8)type[1], (guint8)type[2], ++ (guint8)type[3]); + /* this should compile to a bunch of: CMP.L, JE ... nice & fast */ +- switch (*((guint32 *)type)) ++ switch (t) + { + case WORDL('I','N','V','I'): + if (ignore_check (word[1], IG_INVI)) +@@ -1022,7 +1030,7 @@ + } + + /* see if the second word is a numeric */ +- if (isdigit (word[2][0])) ++ if (isdigit ((unsigned char) word[2][0])) + { + text = word_eol[4]; + if (*text == ':') +diff -Naur xchat-2.4.5uno/src/common/url.c xchat-2.4.5/src/common/url.c +--- xchat-2.4.5uno/src/common/url.c 2005-10-01 12:32:53.000000000 +0200 ++++ xchat-2.4.5/src/common/url.c 2005-10-01 12:26:33.000000000 +0200 +@@ -124,65 +124,60 @@ + int + url_check_word (char *word, int len) + { +- char *at, *dot; ++#define D(x) (x), ((sizeof (x)) - 1) ++ static const struct { ++ const char *s; ++ int len; ++ } ++ prefix[] = { ++ { D("irc.") }, ++ { D("ftp.") }, ++ { D("www.") }, ++ { D("irc://") }, ++ { D("ftp://") }, ++ { D("http://") }, ++ { D("https://") }, ++ { D("file://") }, ++ { D("rtsp://") }, ++ { D("gopher://") }, ++ }, ++ suffix[] = { ++ { D(".org") }, ++ { D(".net") }, ++ { D(".com") }, ++ { D(".edu") }, ++ { D(".html") }, ++ { D(".info") }, ++ { D(".name") }, ++ }; ++#undef D ++ const char *at, *dot; + int i, dots; +- char temp[4]; +- guint32 pre; + +- if ((word[0] == '@' || word[0] == '+' || word[0] == '^' || word[0] == '%' || word[0] == '*' ) && word[1] == '#') ++ if (len > 1 && word[1] == '#' && strchr("@+^%*#", word[0])) + return WORD_CHANNEL; + + if ((word[0] == '#' || word[0] == '&') && word[1] != '#' && word[1] != 0) + return WORD_CHANNEL; + +- if (len > 4 && word[4] != '.') ++ for (i = 0; i < G_N_ELEMENTS(prefix); i++) + { +- temp[0] = tolower (word[0]); +- temp[1] = tolower (word[1]); +- temp[2] = tolower (word[2]); +- temp[3] = tolower (word[3]); +- +- pre = *((guint32 *)temp); +- +- if (CMPL (pre, 'i','r','c','.')) +- return WORD_URL; +- if (CMPL (pre, 'f','t','p','.')) +- return WORD_URL; +- if (CMPL (pre, 'w','w','w','.')) +- return WORD_URL; ++ int l; + +- if (len > 7 && word[4] == '/' && word[5] == '/') ++ l = prefix[i].len; ++ if (len > l) + { +- if (CMPL (pre, 'i','r','c',':')) /* irc:// */ +- return WORD_URL; +- if (CMPL (pre, 'f','t','p',':')) /* ftp:// */ +- return WORD_URL; +- } ++ int j; + +- /* check for ABCD://... */ +- if (len > 8 && word[4] == ':' && word[5] == '/' && word[6] == '/') +- { +- if (CMPL (pre, 'h','t','t','p')) /* http:// */ +- return WORD_URL; +- if (CMPL (pre, 'f','i','l','e')) /* file:// */ +- return WORD_URL; +- if (CMPL (pre, 'r','t','s','p')) /* rtsp:// */ +- return WORD_URL; +- } +- +- /* check for https:// */ +- if (len > 9 && word[5] == ':' && word[6] == '/' && word[7] == '/') +- { +- if (CMPL (pre, 'h','t','t','p') && (word[4] == 's' || word[4] == 'S')) +- return WORD_URL; +- } +- +- /* check for gopher:// */ +- if (len > 10 && word[6] == ':' && word[7] == '/' && word[8] == '/') +- { +- if (CMPL (pre, 'g','o','p','h')) +- if (CMPW (word + 4, 'e','r') || CMPW (word + 4, 'E','R')) +- return WORD_URL; ++ /* This is pretty much strncasecmp(). */ ++ for (j = 0; j < l; j++) ++ { ++ unsigned char c = word[j]; ++ if (tolower(c) != prefix[i].s[j]) ++ break; ++ } ++ if (j == l) ++ return WORD_URL; + } + } + +@@ -205,7 +200,7 @@ + { + if (word[i] == '.' && i > 1) + dots++; /* allow 127.0.0.1:80 */ +- else if (!isdigit (word[i]) && word[i] != ':') ++ else if (!isdigit ((unsigned char) word[i]) && word[i] != ':') + { + dots = 0; + break; +@@ -216,35 +211,29 @@ + + if (len > 5) + { +- /* create a lowercase version of the last 4 letters */ +- temp[0] = tolower (word[len - 4]); +- temp[1] = tolower (word[len - 3]); +- temp[2] = tolower (word[len - 2]); +- temp[3] = tolower (word[len - 1]); ++ for (i = 0; i < G_N_ELEMENTS(suffix); i++) ++ { ++ int l; + +- pre = *((guint32 *)temp); ++ l = suffix[i].len; ++ if (len > l) ++ { ++ const unsigned char *p = &word[len - l]; ++ int j; + +- if (word[len - 5] == '.') +- { +- if (CMPL (pre, 'h','t','m','l')) +- return WORD_HOST; +- if (CMPL (pre, 'i','n','f','o')) +- return WORD_HOST; +- if (CMPL (pre, 'n','a','m','e')) +- return WORD_HOST; ++ /* This is pretty much strncasecmp(). */ ++ for (j = 0; j < l; j++) ++ { ++ if (tolower(p[j]) != suffix[i].s[j]) ++ break; ++ } ++ if (j == l) ++ return WORD_HOST; ++ } + } + +- if (CMPL (pre, '.','o','r','g')) +- return WORD_HOST; +- if (CMPL (pre, '.','n','e','t')) +- return WORD_HOST; +- if (CMPL (pre, '.','c','o','m')) +- return WORD_HOST; +- if (CMPL (pre, '.','e','d','u')) +- return WORD_HOST; +- + if (word[len - 3] == '.' && +- isalpha (word[len - 2]) && isalpha (word[len - 1])) ++ isalpha ((unsigned char) word[len - 2]) && isalpha ((unsigned char) word[len - 1])) + return WORD_HOST; + } + +diff -Naur xchat-2.4.5uno/src/common/util.c xchat-2.4.5/src/common/util.c +--- xchat-2.4.5uno/src/common/util.c 2005-10-01 12:32:53.000000000 +0200 ++++ xchat-2.4.5/src/common/util.c 2005-10-01 11:49:08.000000000 +0200 +@@ -435,8 +435,8 @@ + + while (len > 0) + { +- if ((col && isdigit (*text) && nc < 2) || +- (col && *text == ',' && isdigit (*(text+1)) && nc < 3)) ++ if ((col && isdigit ((unsigned char) *text) && nc < 2) || ++ (col && *text == ',' && isdigit ((unsigned char) *(text+1)) && nc < 3)) + { + nc++; + if (*text == ',') +@@ -1084,7 +1084,7 @@ + char *p; + domain_t *dom; + +- if (!hostname || !*hostname || isdigit (hostname[strlen (hostname) - 1])) ++ if (!hostname || !*hostname || isdigit ((unsigned char) hostname[strlen (hostname) - 1])) + return _("Unknown"); + if ((p = strrchr (hostname, '.'))) + p++; +@@ -1156,7 +1156,7 @@ + if (*src != quote) *buf++ = '\\'; + } + *buf++ = *src; +- } else if (isspace(*src)) { ++ } else if (isspace((unsigned char) *src)) { + if (*argv[argc]) { + buf++, argc++; + if (argc == argvAlloced) { +diff -Naur xchat-2.4.5uno/src/fe-gtk/maingui.c xchat-2.4.5/src/fe-gtk/maingui.c +--- xchat-2.4.5uno/src/fe-gtk/maingui.c 2005-10-01 12:32:53.000000000 +0200 ++++ xchat-2.4.5/src/fe-gtk/maingui.c 2005-10-01 11:53:56.000000000 +0200 +@@ -1608,7 +1608,7 @@ + return; + + sess = current_sess; +- mode = tolower (flag[0]); ++ mode = tolower ((unsigned char) flag[0]); + + switch (mode) + { diff --git a/net-irc/xchat/files/digest-xchat-2.4.5-r1 b/net-irc/xchat/files/digest-xchat-2.4.5-r1 new file mode 100644 index 000000000000..f968fefcc529 --- /dev/null +++ b/net-irc/xchat/files/digest-xchat-2.4.5-r1 @@ -0,0 +1 @@ +MD5 9107a92693e6c62ff2008030e698b92b xchat-2.4.5.tar.bz2 1324626 |