"%wc" is Microsoft extension, not supported in every Std C Library. So
if we don't want to print "%wc%wc%wc%wc%..." instead of real chars, we
shall not use it.

Before:

%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wcession[28326]:
_Tt_s_session::s_init(): 1051 (TT_ERR_INTERNAL)!
%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wcession[28326]: waitpid():
No child processes
%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wcession[28326]: child
ttsession exited with status 1

After:

/usr/dt/bin/ttsession[12397]: _Tt_s_session::s_init(): 1051 (TT_ERR_INTERNAL)!
/usr/dt/bin/ttsession[12397]: waitpid(): No child processes
/usr/dt/bin/ttsession[12397]: child ttsession exited with status 1

Patch:

diff --git a/cde/lib/tt/lib/util/tt_string.C b/cde/lib/tt/lib/util/tt_string.C
index 2d89052..4b198bc 100644
--- a/cde/lib/tt/lib/util/tt_string.C
+++ b/cde/lib/tt/lib/util/tt_string.C
@@ -170,21 +170,13 @@ _tt_print_escaped_string(const _Tt_ostream &os,
const char *s, int length,
                                                // _Tt_iostream operator<<  
method because
                                                // wchar_t is equivalent  to a 
long and the
                                                // compiler doesn't know which 
method to use.
-#ifdef OPT_BUG_HPUX
                                                os.sprintf(MB_LEN_MAX, "%C", 
wc);
-#else
-                                               os.sprintf(MB_LEN_MAX, "%wc", 
wc);
-#endif
                                        } else {
                                                count += (3  + ((n == 0) ? 1 : 
n));

                                                // don't print past limit, even 
a little.
                                                if (count < max_print_width) {
-#ifdef OPT_BUG_HPUX
                                                        os.sprintf(10, 
"\\%03C", wc);
-#else
-                                                       os.sprintf(10, 
"\\%03wc", wc);
-#endif
                                                }
                                        }

Attachment: cde-tt_string-wcwcwcwc_fix.patch
Description: Binary data

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to