Notes on Win32 Unicode/Unicows work

From: Andrew Dunbar (hippietrail@yahoo.com)
Date: Thu May 22 2003 - 00:16:59 EDT

  • Next message: Daniel Glassey: "Re: Commit: windows unicode input update"

    Hi there. Just some notes on the Windows keyboard work
    you've been doing.

    I noticed this code in ev_Win32Keyboard.cpp # 325:

    325 return
    (*m_pToUnicodeEx)(nVirtKey,wScanCode,lpKeyState,pwszBuff,cchBuff,0,m_hKeyboardLayout);
    326 return
    ToUnicodeEx(nVirtKey,wScanCode,lpKeyState,pwszBuff,cchBuff,0,m_hKeyboardLayout);
    327 /*if (m_bIsUnicodeInput)
    328 {
    329 UT_ASSERT(m_pToUnicodeEx);
    330 return
    (*m_pToUnicodeEx)(nVirtKey,wScanCode,lpKeyState,pwszBuff,cchBuff,0,m_hKeyboardLayout);
    331 }
    332 else
    333 return
    ToAsciiEx(nVirtKey,wScanCode,lpKeyState,(WORD*)pwszBuff,0,m_hKeyboardLayout);
    334 */

    Notice you have two return statements immediately
    following one-antother. The second one will never be
    called! I'm not sure if you should have an "if" in
    there or if you should only have one of the calls.
    I would've thought if your unicows stuff is working
    that you could get rid of my entire "m_pToUnicodeEx"
    code and just call ToUnicodeEx directly.

    If the unicows code is not working in this area then
    you should've committed it at all. Experimental code
    belongs in your home tree.
    The same goes with the commented-out code below it.
    If you know you've fixed it, don't comment out the old
    code, delete it. Dead code in CVS is very messy and
    hard to find once it's been there a while.
    Again if you think it doesn't work then don't commit
    it. Mailing a patch to the list is a better idea in
    this case.

    Please take this as constructive criticism! All i18n
    code is close to my heart (: Keep up the good work.

    Andrew Dunbar.

    =====
    http://linguaphile.sourceforge.net/cgi-bin/translator.pl http://www.abisource.com

    __________________________________________________
    It's Samaritans' Week. Help Samaritans help others.
    Call 08709 000032 to give or donate online now at http://www.samaritans.org/support/donations.shtm



    This archive was generated by hypermail 2.1.4 : Thu May 22 2003 - 00:31:12 EDT