summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2008-02-23 17:36:08 +0000
committerUlrich Müller <ulm@gentoo.org>2008-02-23 17:36:08 +0000
commitd4728d8dea35c4a562966d5c0ba985990254c542 (patch)
treea9059791e73b861ba6f48e6d4aeccf8dca740a9a /patchsets/motif/2.2.3/05_all_char_not_supported.patch
downloadulm-d4728d8dea35c4a562966d5c0ba985990254c542.tar.gz
ulm-d4728d8dea35c4a562966d5c0ba985990254c542.tar.bz2
ulm-d4728d8dea35c4a562966d5c0ba985990254c542.zip
Add patchset for openmotif-2.2.3openmotif-2.2.3-patches-1
Diffstat (limited to 'patchsets/motif/2.2.3/05_all_char_not_supported.patch')
-rw-r--r--patchsets/motif/2.2.3/05_all_char_not_supported.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/patchsets/motif/2.2.3/05_all_char_not_supported.patch b/patchsets/motif/2.2.3/05_all_char_not_supported.patch
new file mode 100644
index 0000000..edd841b
--- /dev/null
+++ b/patchsets/motif/2.2.3/05_all_char_not_supported.patch
@@ -0,0 +1,31 @@
+--- openMotif-2.2.3/lib/Xm/TextF.c.char_not_supported 2004-06-03 12:59:10.241822710 +0200
++++ openMotif-2.2.3/lib/Xm/TextF.c 2004-06-03 13:02:18.987890852 +0200
+@@ -3723,20 +3723,17 @@
+ cache_ptr = tmp = XmStackAlloc(buf_size, cache);
+
+ tmp_str = (wchar_t *)str;
+- ret_val = wctomb(tmp, *tmp_str);
++ // Fixed MZ BZ#1257: by Brad Despres <brad@sd.aonix.com>
+ count = 0;
+- while ( (ret_val > 0)&& (buf_size >= MB_CUR_MAX) && (count < n) )
+- {
+- count += 1;
+- tmp += ret_val;
+- buf_size -= ret_val;
+- tmp_str++;
+- ret_val = wctomb(tmp, *tmp_str);
+- }
+-
++ do {
++ ret_val = wctomb(tmp, *tmp_str);
++ count += 1;
++ tmp += ret_val;
++ buf_size -= ret_val;
++ tmp_str++;
++ } while ( (ret_val > 0)&& (buf_size >= MB_CUR_MAX) && (count < n) ) ;
+ if (ret_val == -1) /* bad character */
+ return (False);
+-
+ is_printable = XTextWidth(TextF_Font(tf), cache_ptr, tmp - cache_ptr);
+ XmStackFree(cache_ptr, cache);
+ return (is_printable);