From don.anthony.lee at gmail.com Fri Feb 1 04:02:11 2008 From: don.anthony.lee at gmail.com (Anthony Lee) Date: Fri, 1 Feb 2008 20:02:11 +0800 Subject: [g11n-dev] [REVIEW] Help to review SunPinyin's porting on BeOS/Haiku In-Reply-To: <47A279D3.6090802@Sun.COM> References: <638bf0dd0801311457g1a63e315g66ec1134f9eb4e50@mail.gmail.com> <47A279D3.6090802@Sun.COM> Message-ID: <638bf0dd0802010402n5b8de8a7r28ac604de2cb6d78@mail.gmail.com> Hi Yong, > I just have 2 comments about your patch, > > 1. The copyright of your code would be yourself. Please refer to Kov's > scim wrapper. And for consistences, I suggest to use /* */ for the > license declaration headers. > > 2. The indentation, seems that you are using tabstop=4, and do not set > expandtab in your vi/vim. E.g., the sources of your beos wrapper, and > portability.cpp, the indentation looks not so tidy and inconsistent. > The modified patch for your review attached by this mail. Thanks. A.L. -------------- next part -------------- A non-text attachment was scrubbed... Name: sunpinyin-beos-patched-modified.diff.bz2 Type: application/x-bzip2 Size: 25796 bytes Desc: not available URL: From tchaikov at gmail.com Fri Feb 1 10:04:15 2008 From: tchaikov at gmail.com (Kov Chai) Date: Sat, 2 Feb 2008 02:04:15 +0800 Subject: [g11n-dev] [REVIEW] Help to review SunPinyin's porting on BeOS/Haiku In-Reply-To: <638bf0dd0801312259y486bf20cs7093e542baba4157@mail.gmail.com> References: <638bf0dd0801311457g1a63e315g66ec1134f9eb4e50@mail.gmail.com> <47A279D3.6090802@Sun.COM> <638bf0dd0801312259y486bf20cs7093e542baba4157@mail.gmail.com> Message-ID: Hi Anthony, Attached is your patch along with my modifications. The change includes: 1. free the buffer returned from bufferized() otherwise could lead to mem leak. (this also applies to scim-pinyin and cle wrapper. Yong, could you confirm it?) 2. some changes from nit picker's point of view. On Feb 1, 2008 2:59 PM, Anthony Lee wrote: > Hi Yong, > > > Both Kov Chai and I will review you patch. As you may know, Kov Chai is > > working on the Debian packaging and "make dist" things, he is more > > familiar than me about the gnu autotools. Besides that, Kov is also an > > experienced linux and C/C++ programmer. > > I noticed that as I merging the changes to the latest repo, > so I stopped changing those associated with "make dist" or "make > distclean". > Anthony, you change looks pretty good. Please go ahead with what you were doing with `make dist' and `make distclean' things if you'd like to do so. I'm eager to see more great improvement you make. :) > > Beside, I noticed the files in "ime/wrapper/iiim_le" probably were > outdated, > so I just add an empty "Makefile.am" to the directory for keeping > compatibility. > if you guys know how to write it with IIIM_LE, please tell me to > discard this change. > > > 1. The copyright of your code would be yourself. Please refer to Kov's > > scim wrapper. And for consistences, I suggest to use /* */ for the > > license declaration headers. > > Thanks, I'll do that. > > > 2. The indentation, seems that you are using tabstop=4, and do not set > > expandtab in your vi/vim. E.g., the sources of your beos wrapper, and > > portability.cpp, the indentation looks not so tidy and inconsistent. > > Yes, I wrote the codes by BeIDE which tab-width is 4. > Seems I have to expand all the tab, looking for tools, anyone have idea? > :) Emacs has `untabify', not sure how BeIDE handles such kind of problem. :) > > > > Thanks. > Lee > -- Regards Kov Chai -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: sunpinyin-beos-patched-kov.diff.bz2 Type: application/x-bzip2 Size: 25580 bytes Desc: not available URL: From don.anthony.lee at gmail.com Fri Feb 1 12:27:31 2008 From: don.anthony.lee at gmail.com (Anthony Lee) Date: Sat, 2 Feb 2008 04:27:31 +0800 Subject: [g11n-dev] [REVIEW] Help to review SunPinyin's porting on BeOS/Haiku In-Reply-To: References: <638bf0dd0801311457g1a63e315g66ec1134f9eb4e50@mail.gmail.com> <47A279D3.6090802@Sun.COM> <638bf0dd0801312259y486bf20cs7093e542baba4157@mail.gmail.com> Message-ID: <638bf0dd0802011227g3b189aabqea9c3a0a8d9ed840@mail.gmail.com> Hi Kov, Great to see your apply! > 1. free the buffer returned from bufferized() otherwise could lead to mem > leak. (this also applies to scim-pinyin and cle wrapper. Yong, could you > confirm it?) You are right. > 2. some changes from nit picker's point of view. You are welcome, thanks for your review. such as null pointer and punctuation mark. > Anthony, you change looks pretty good. Please go ahead with what you were > doing with `make dist' and `make distclean' things if you'd like to do so. > I'm eager to see more great improvement you make. :) I will what I can if you guys have time to review my changes. :) > Emacs has `untabify', not sure how BeIDE handles such kind of problem. :) No matter, done. BTW, I don't know whether it's safe to delete null pointer when user use Metrowerks CC to compile the source on BeBox, so I used to be keeping the habit in C++ like C. Though 5.3.5.2 section declared that delete null pointer just a null operation, I got the problem when I use an old compiler long time ago. Now it seemed that those BeBox users won't be interested in this software, then I will remove the codes associated with this. Thanks. And, compare to your modification, I would like to discuss with you below. FILE: sunpinyin/ime/wrapper/beos/SunPinyinHandler.h DIFF: *************************** -#include "../../src/imi_winHandler.h" +#include "imi_winHandler.h" *************************** My opinion: I known why you modified it, but I have different opinion. In C or C++, the quote string means looking for the header in current directory, if no found, looking for the header in default directories or specified directories. So, if the name of the directory contains necessary headers will change in the future, I would rather to use <> instead of "". FILE: sunpinyin/ime/wrapper/beos/SunPinyinModule.cpp DIFF: *************************** - if(fMessenger.IsValid() == false) + if(!fMessenger.IsValid()) *************************** My opinion: Actually I don't like the "!expr" style in C++, sometimes it's hard to find problem if there is. B.R. A.L. From Yong.Sun at Sun.COM Fri Feb 1 17:00:49 2008 From: Yong.Sun at Sun.COM (Yong Sun) Date: Sat, 02 Feb 2008 09:00:49 +0800 Subject: [g11n-dev] [REVIEW] Help to review SunPinyin's porting on BeOS/Haiku In-Reply-To: References: <638bf0dd0801311457g1a63e315g66ec1134f9eb4e50@mail.gmail.com> <47A279D3.6090802@Sun.COM> <638bf0dd0801312259y486bf20cs7093e542baba4157@mail.gmail.com> Message-ID: <47A3C0C1.2050902@Sun.COM> Thanks Kov! Yes, the buffer returned from CBigramHistory::bufferize() should be released. Kov Chai ??: > Hi Anthony, > > Attached is your patch along with my modifications. The change includes: > 1. free the buffer returned from bufferized() otherwise could lead to > mem leak. (this also applies to scim-pinyin and cle wrapper. Yong, > could you confirm it?) > 2. some changes from nit picker's point of view. > > On Feb 1, 2008 2:59 PM, Anthony Lee > wrote: > > Hi Yong, > > > Both Kov Chai and I will review you patch. As you may know, Kov > Chai is > > working on the Debian packaging and "make dist" things, he is more > > familiar than me about the gnu autotools. Besides that, Kov is > also an > > experienced linux and C/C++ programmer. > > I noticed that as I merging the changes to the latest repo, > so I stopped changing those associated with "make dist" or "make > distclean". > > Anthony, you change looks pretty good. Please go ahead with what you > were doing with `make dist' and `make distclean' things if you'd like > to do so. I'm eager to see more great improvement you make. :) > > > > Beside, I noticed the files in "ime/wrapper/iiim_le" probably were > outdated, > so I just add an empty "Makefile.am " to the > directory for keeping compatibility. > if you guys know how to write it with IIIM_LE, please tell me to > discard this change. > > > 1. The copyright of your code would be yourself. Please refer to > Kov's > > scim wrapper. And for consistences, I suggest to use /* */ for the > > license declaration headers. > > Thanks, I'll do that. > > > 2. The indentation, seems that you are using tabstop=4, and do > not set > > expandtab in your vi/vim. E.g., the sources of your beos > wrapper, and > > portability.cpp, the indentation looks not so tidy and inconsistent. > > Yes, I wrote the codes by BeIDE which tab-width is 4. > Seems I have to expand all the tab, looking for tools, anyone have > idea? :) > > Emacs has `untabify', not sure how BeIDE handles such kind of problem. :) > > > > > Thanks. > Lee > > > > > -- > Regards > Kov Chai > ------------------------------------------------------------------------ > > _______________________________________________ > g11n-dev mailing list > g11n-dev at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/g11n-dev From Yong.Sun at Sun.COM Fri Feb 1 17:06:56 2008 From: Yong.Sun at Sun.COM (Yong Sun) Date: Sat, 02 Feb 2008 09:06:56 +0800 Subject: [g11n-dev] [REVIEW] Help to review SunPinyin's porting on BeOS/Haiku In-Reply-To: <638bf0dd0802011227g3b189aabqea9c3a0a8d9ed840@mail.gmail.com> References: <638bf0dd0801311457g1a63e315g66ec1134f9eb4e50@mail.gmail.com> <47A279D3.6090802@Sun.COM> <638bf0dd0801312259y486bf20cs7093e542baba4157@mail.gmail.com> <638bf0dd0802011227g3b189aabqea9c3a0a8d9ed840@mail.gmail.com> Message-ID: <47A3C230.5060100@Sun.COM> You guys are early birds :) Please see my comments in-line, Anthony Lee ??: > Hi Kov, > > Great to see your apply! > > >> 1. free the buffer returned from bufferized() otherwise could lead to mem >> leak. (this also applies to scim-pinyin and cle wrapper. Yong, could you >> confirm it?) >> > > You are right. > > >> 2. some changes from nit picker's point of view. >> > > You are welcome, thanks for your review. > such as null pointer and punctuation mark. > > >> Anthony, you change looks pretty good. Please go ahead with what you were >> doing with `make dist' and `make distclean' things if you'd like to do so. >> I'm eager to see more great improvement you make. :) >> > > I will what I can if you guys have time to review my changes. :) > > >> Emacs has `untabify', not sure how BeIDE handles such kind of problem. :) >> > > No matter, done. > > > BTW, I don't know whether it's safe to delete null pointer when user > use Metrowerks CC to > compile the source on BeBox, so I used to be keeping the habit in C++ like C. > Though 5.3.5.2 section declared that delete null pointer just a null operation, > I got the problem when I use an old compiler long time ago. > Now it seemed that those BeBox users won't be interested in this software, > then I will remove the codes associated with this. Thanks. > > And, compare to your modification, I would like to discuss with you below. > > > FILE: sunpinyin/ime/wrapper/beos/SunPinyinHandler.h > DIFF: > *************************** > -#include "../../src/imi_winHandler.h" > +#include "imi_winHandler.h" > *************************** > My opinion: > I known why you modified it, but I have different opinion. > In C or C++, the quote string means looking for the header in current directory, > if no found, looking for the header in default directories or > specified directories. > So, if the name of the directory contains necessary headers will > change in the future, > I would rather to use <> instead of "". > [yongsun] Personally, I would assume the headers in <> are system header files in /usr/include or elsewhere :) Anyway, I am fine with <>. :) > > FILE: sunpinyin/ime/wrapper/beos/SunPinyinModule.cpp > DIFF: > *************************** > - if(fMessenger.IsValid() == false) > + if(!fMessenger.IsValid()) > *************************** > My opinion: > Actually I don't like the "!expr" style in C++, sometimes it's hard to > find problem if there is. > [yongsun] Either is OK for me :) > > B.R. > A.L. > From don.anthony.lee at gmail.com Fri Feb 1 18:18:27 2008 From: don.anthony.lee at gmail.com (Anthony Lee) Date: Fri, 1 Feb 2008 18:18:27 -0800 Subject: [g11n-dev] [REVIEW] Help to review SunPinyin's porting on BeOS/Haiku In-Reply-To: <47A3C230.5060100@Sun.COM> References: <638bf0dd0801311457g1a63e315g66ec1134f9eb4e50@mail.gmail.com> <47A279D3.6090802@Sun.COM> <638bf0dd0801312259y486bf20cs7093e542baba4157@mail.gmail.com> <638bf0dd0802011227g3b189aabqea9c3a0a8d9ed840@mail.gmail.com> <47A3C230.5060100@Sun.COM> Message-ID: <638bf0dd0802011818m7f79cfa1n7f6e18c6889fd8c6@mail.gmail.com> Hi Yong, > [yongsun] Personally, I would assume the headers in <> are system header > files in /usr/include or elsewhere :) Anyway, I am fine with <>. :) Just for discussing, should we rename the directory which name is "src" in the future? My suggestion: Rename the "src" directory to another, likes "libsunpinyin" or else. The remove those wrapper dependent lines in "imi_keys.h" with a few modification on current design, thus will avoid multiply compilation in each wrapper. Then those guys want to write a new wrapper just need add the lines like below, #include and pass a parameter "-L /path/to/libsunpinyin -lsunpinyin" to GNU C. In following URL you could find the details of "include" preprocessor in GNU C. http://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html#Include-Syntax B.R. A.L. From don.anthony.lee at gmail.com Fri Feb 1 18:26:51 2008 From: don.anthony.lee at gmail.com (Anthony Lee) Date: Fri, 1 Feb 2008 18:26:51 -0800 Subject: [g11n-dev] [REVIEW] Help to review SunPinyin's porting on BeOS/Haiku In-Reply-To: <638bf0dd0802011818m7f79cfa1n7f6e18c6889fd8c6@mail.gmail.com> References: <638bf0dd0801311457g1a63e315g66ec1134f9eb4e50@mail.gmail.com> <47A279D3.6090802@Sun.COM> <638bf0dd0801312259y486bf20cs7093e542baba4157@mail.gmail.com> <638bf0dd0802011227g3b189aabqea9c3a0a8d9ed840@mail.gmail.com> <47A3C230.5060100@Sun.COM> <638bf0dd0802011818m7f79cfa1n7f6e18c6889fd8c6@mail.gmail.com> Message-ID: <638bf0dd0802011826v32b34afeq4b6fde88a27e52e3@mail.gmail.com> Hi guys, If you guys have no other views or objects, I will submit the changes to the source repository after 24 hours. Because I have to leave my home to long trip for a long time, sorry to bother you all frequently. Regards. Lee From Yong.Sun at Sun.COM Fri Feb 1 18:39:59 2008 From: Yong.Sun at Sun.COM (Yong Sun) Date: Sat, 02 Feb 2008 10:39:59 +0800 Subject: [g11n-dev] [REVIEW] Help to review SunPinyin's porting on BeOS/Haiku In-Reply-To: <638bf0dd0802011818m7f79cfa1n7f6e18c6889fd8c6@mail.gmail.com> References: <638bf0dd0801311457g1a63e315g66ec1134f9eb4e50@mail.gmail.com> <47A279D3.6090802@Sun.COM> <638bf0dd0801312259y486bf20cs7093e542baba4157@mail.gmail.com> <638bf0dd0802011227g3b189aabqea9c3a0a8d9ed840@mail.gmail.com> <47A3C230.5060100@Sun.COM> <638bf0dd0802011818m7f79cfa1n7f6e18c6889fd8c6@mail.gmail.com> Message-ID: <47A3D7FF.1020907@Sun.COM> Hi, Anthony, Yes, I agree to rename 'src', maybe libsunpinyin-ime is better candidate. Let's resolve it later after you check-in. And, I think we all know the differences between <> and "", it's just about personal preferences :) And please continue to check-in, at last, happy new year to you!!! Regards, Anthony Lee ??: > Hi Yong, > > >> [yongsun] Personally, I would assume the headers in <> are system header >> files in /usr/include or elsewhere :) Anyway, I am fine with <>. :) >> > > Just for discussing, should we rename the directory which name is > "src" in the future? > > My suggestion: > Rename the "src" directory to another, likes "libsunpinyin" or else. > The remove those wrapper dependent lines in "imi_keys.h" with a few > modification on current design, thus will avoid multiply compilation > in each wrapper. > Then those guys want to write a new wrapper just need add the lines like below, > #include > and pass a parameter "-L /path/to/libsunpinyin -lsunpinyin" to GNU C. > > In following URL you could find the details of "include" preprocessor in GNU C. > > http://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html#Include-Syntax > > > B.R. > A.L. > _______________________________________________ > g11n-dev mailing list > g11n-dev at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/g11n-dev > From tchaikov at gmail.com Fri Feb 1 19:32:45 2008 From: tchaikov at gmail.com (Kov Chai) Date: Sat, 2 Feb 2008 11:32:45 +0800 Subject: [g11n-dev] [REVIEW] Help to review SunPinyin's porting on BeOS/Haiku In-Reply-To: <47A3C230.5060100@Sun.COM> References: <638bf0dd0801311457g1a63e315g66ec1134f9eb4e50@mail.gmail.com> <47A279D3.6090802@Sun.COM> <638bf0dd0801312259y486bf20cs7093e542baba4157@mail.gmail.com> <638bf0dd0802011227g3b189aabqea9c3a0a8d9ed840@mail.gmail.com> <47A3C230.5060100@Sun.COM> Message-ID: On Feb 2, 2008 9:06 AM, Yong Sun wrote: > You guys are early birds :) Please see my comments in-line, > > Anthony Lee ??: > > And, compare to your modification, I would like to discuss with you below. > > > > > > FILE: sunpinyin/ime/wrapper/beos/SunPinyinHandler.h > > DIFF: > > *************************** > > -#include "../../src/imi_winHandler.h" > > +#include "imi_winHandler.h" > > *************************** > > My opinion: > > I known why you modified it, but I have different opinion. > > In C or C++, the quote string means looking for the header in current > directory, > > > if no found, looking for the header in default directories or > > specified directories. > > > So, if the name of the directory contains necessary headers will > > change in the future, > > I would rather to use <> instead of "". > > > [yongsun] Personally, I would assume the headers in <> are system header > files in /usr/include or elsewhere :) Anyway, I am fine with <>. :) agree. :) > > > > > FILE: sunpinyin/ime/wrapper/beos/SunPinyinModule.cpp > > DIFF: > > *************************** > > - if(fMessenger.IsValid() == false) > > + if(!fMessenger.IsValid()) > > *************************** > > My opinion: > > Actually I don't like the "!expr" style in C++, sometimes it's hard to > > find problem if there is. > > > [yongsun] Either is OK for me :) personally speaking, I prefer `if (isValid())', because it reads like English. Anyway, it's entirely personal choice. :) > > > > > B.R. > > A.L. > > > > -- Regards Kov Chai -------------- next part -------------- An HTML attachment was scrubbed... URL: From don.anthony.lee at gmail.com Sat Feb 2 14:22:39 2008 From: don.anthony.lee at gmail.com (Anthony Lee) Date: Sun, 3 Feb 2008 06:22:39 +0800 Subject: [g11n-dev] [REVIEW] Help to review SunPinyin's porting on BeOS/Haiku In-Reply-To: <47A3D7FF.1020907@Sun.COM> References: <638bf0dd0801311457g1a63e315g66ec1134f9eb4e50@mail.gmail.com> <47A279D3.6090802@Sun.COM> <638bf0dd0801312259y486bf20cs7093e542baba4157@mail.gmail.com> <638bf0dd0802011227g3b189aabqea9c3a0a8d9ed840@mail.gmail.com> <47A3C230.5060100@Sun.COM> <638bf0dd0802011818m7f79cfa1n7f6e18c6889fd8c6@mail.gmail.com> <47A3D7FF.1020907@Sun.COM> Message-ID: <638bf0dd0802021422v3d3989edha83c4442f3e04eaa@mail.gmail.com> Hi Yong, > And please continue to check-in, at last, happy new year to you!!! Done. And happy new chinese year to all you good guys! BTW, here attached the document on "How to install SunPinyin on BeOS" written in Simplified Chinese. Thanks. A.L. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: How to install SunPinyin on BeOS(Simplified Chinese).txt URL: From don.anthony.lee at gmail.com Wed Feb 13 09:13:15 2008 From: don.anthony.lee at gmail.com (Anthony Lee) Date: Thu, 14 Feb 2008 01:13:15 +0800 Subject: [g11n-dev] [REVIEW][PATCH][SunPinyin] Misc patches on scim-sunpinyin Message-ID: <638bf0dd0802130913h29b05896waa484e60e83f51de@mail.gmail.com> Hi guys, scim-sunpinyin has bug when initalizing the input method engine, so I modified the source to fix it. And, I also corrected README and changed some translations, such as "Microsoft Pinyin Style" to "Modern Style", etc. Patch already been attached, modified files listed below: sunpinyin/ime/README sunpinyin/ime/Makefile.am sunpinyin/ime/po/sunpinyin.pot sunpinyin/ime/po/zh_CN.po sunpinyin/ime/wrapper/scim/sunpinyin_imengine.cpp sunpinyin/ime/wrapper/scim/sunpinyin_imengine_setup.cpp B.R. A.L. -------------- next part -------------- A non-text attachment was scrubbed... Name: sunpinyin-misc-patch.diff.bz2 Type: application/x-bzip2 Size: 2766 bytes Desc: not available URL: From Yong.Sun at Sun.COM Wed Feb 13 09:39:02 2008 From: Yong.Sun at Sun.COM (Yong Sun) Date: Thu, 14 Feb 2008 01:39:02 +0800 Subject: [g11n-dev] [REVIEW][PATCH][SunPinyin] Misc patches on scim-sunpinyin In-Reply-To: <638bf0dd0802130913h29b05896waa484e60e83f51de@mail.gmail.com> References: <638bf0dd0802130913h29b05896waa484e60e83f51de@mail.gmail.com> Message-ID: <47B32B36.8070507@Sun.COM> Hi, Anthony, Would you please explain about the two changes in scim_imengine_module_create_factory() and SunPyFactory::init()? 1. The factory new operation maybe failed and returned NULL? 2. load_user_data() may failed? Regards, Anthony Lee ??: > Hi guys, > > scim-sunpinyin has bug when initalizing the input method engine, > so I modified the source to fix it. > > And, I also corrected README and changed some translations, > such as "Microsoft Pinyin Style" to "Modern Style", etc. > > Patch already been attached, modified files listed below: > > sunpinyin/ime/README > sunpinyin/ime/Makefile.am > sunpinyin/ime/po/sunpinyin.pot > sunpinyin/ime/po/zh_CN.po > sunpinyin/ime/wrapper/scim/sunpinyin_imengine.cpp > sunpinyin/ime/wrapper/scim/sunpinyin_imengine_setup.cpp > > > B.R. > A.L. > > ------------------------------------------------------------------------ > > _______________________________________________ > g11n-dev mailing list > g11n-dev at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/g11n-dev > From don.anthony.lee at gmail.com Wed Feb 13 09:50:30 2008 From: don.anthony.lee at gmail.com (Anthony Lee) Date: Thu, 14 Feb 2008 01:50:30 +0800 Subject: [g11n-dev] [REVIEW][PATCH][SunPinyin] Misc patches on scim-sunpinyin In-Reply-To: <47B32B36.8070507@Sun.COM> References: <638bf0dd0802130913h29b05896waa484e60e83f51de@mail.gmail.com> <47B32B36.8070507@Sun.COM> Message-ID: <638bf0dd0802130950u53b350c0tbde743b8967db204@mail.gmail.com> Hi Yong, > 1. The factory new operation maybe failed and returned NULL? SunPyFactory *factory = new SunPyFactory (_scim_config); - if (factory && factory->valid ()) + if (factory->valid ()) { Usually, new operator return non-NULL if you don't specify "std::nothrow" or without -fno-exceptions passed to GNU C, so I thought it's unnecessary to determine whether the pointer is NULL or not. > 2. load_user_data() may failed? if (valid) - valid = load_user_data(); + load_user_data(); Yes, load_user_data() will failed when "~/.scim/sunpinyin/sunpinyin_history" is inexistence as user running the input method for the first time, then SunPinyin won't be loaded into SCIM unless create an empty file. A.L. From Yong.Sun at Sun.COM Wed Feb 13 18:54:11 2008 From: Yong.Sun at Sun.COM (Yong Sun) Date: Thu, 14 Feb 2008 10:54:11 +0800 Subject: [g11n-dev] [REVIEW][PATCH][SunPinyin] Misc patches on scim-sunpinyin In-Reply-To: <638bf0dd0802130950u53b350c0tbde743b8967db204@mail.gmail.com> References: <638bf0dd0802130913h29b05896waa484e60e83f51de@mail.gmail.com> <47B32B36.8070507@Sun.COM> <638bf0dd0802130950u53b350c0tbde743b8967db204@mail.gmail.com> Message-ID: <47B3AD53.4090907@Sun.COM> Hi, Anthony, Please see my comments inline, >> 1. The factory new operation maybe failed and returned NULL? >> > > SunPyFactory *factory = new SunPyFactory (_scim_config); > - if (factory && factory->valid ()) > + if (factory->valid ()) { > > Usually, new operator return non-NULL if you don't specify "std::nothrow" or > without -fno-exceptions passed to GNU C, so I thought it's unnecessary to > determine whether the pointer is NULL or not. > > So I think it's harmless to leave the NULL-checking for factory pointer. In some situations, such as embedded product area, the C++ code usually complied with -fno-exceptions. > >> 2. load_user_data() may failed? >> > > if (valid) > - valid = load_user_data(); > + load_user_data(); > > Yes, load_user_data() will failed when "~/.scim/sunpinyin/sunpinyin_history" is > inexistence as user running the input method for the first time, > then SunPinyin won't be loaded into SCIM unless create an empty file. > Then I think it's a problem in load_user_data(), it should not return false when the history is not there or even corrupted. And if in these cases, the function may create an empty history file. So probably, returning True/False is not necessary at all. Regards, > > > A.L. > _______________________________________________ > g11n-dev mailing list > g11n-dev at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/g11n-dev > From don.anthony.lee at gmail.com Wed Feb 13 19:29:20 2008 From: don.anthony.lee at gmail.com (Anthony Lee) Date: Thu, 14 Feb 2008 11:29:20 +0800 Subject: [g11n-dev] [REVIEW][PATCH][SunPinyin] Misc patches on scim-sunpinyin In-Reply-To: <47B3AD53.4090907@Sun.COM> References: <638bf0dd0802130913h29b05896waa484e60e83f51de@mail.gmail.com> <47B32B36.8070507@Sun.COM> <638bf0dd0802130950u53b350c0tbde743b8967db204@mail.gmail.com> <47B3AD53.4090907@Sun.COM> Message-ID: <638bf0dd0802131929y245b02a9pa26759e17330afa2@mail.gmail.com> Hi Yong, I won't change those files which belong to scim-sunpinyin, hope that Kov would like to update the source himself. I will sumit the changes of following files tonight. Files planning to modified: ------------------------------------- sunpinyin/ime/README sunpinyin/ime/Makefile.am B.R. A.L. From tchaikov at gmail.com Wed Feb 13 19:41:45 2008 From: tchaikov at gmail.com (Kov Chai) Date: Thu, 14 Feb 2008 11:41:45 +0800 Subject: [g11n-dev] [REVIEW][PATCH][SunPinyin] Misc patches on scim-sunpinyin In-Reply-To: <638bf0dd0802130950u53b350c0tbde743b8967db204@mail.gmail.com> References: <638bf0dd0802130913h29b05896waa484e60e83f51de@mail.gmail.com> <47B32B36.8070507@Sun.COM> <638bf0dd0802130950u53b350c0tbde743b8967db204@mail.gmail.com> Message-ID: Thanks for your fixes. On Feb 14, 2008 1:50 AM, Anthony Lee wrote: > Hi Yong, > > > 1. The factory new operation maybe failed and returned NULL? > > SunPyFactory *factory = new SunPyFactory (_scim_config); > - if (factory && factory->valid ()) > + if (factory->valid ()) { > > Usually, new operator return non-NULL if you don't specify "std::nothrow" > or > without -fno-exceptions passed to GNU C, so I thought it's unnecessary to > determine whether the pointer is NULL or not. That makes sense. > > > > > 2. load_user_data() may failed? > > if (valid) > - valid = load_user_data(); > + load_user_data(); > > Yes, load_user_data() will failed when > "~/.scim/sunpinyin/sunpinyin_history" is > inexistence as user running the input method for the first time, > then SunPinyin won't be loaded into SCIM unless create an empty file. Yes. With this fix, if user does not have the user history created, he/she will not run into an input method module initialization failure. > > > > > A.L. > _______________________________________________ > g11n-dev mailing list > g11n-dev at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/g11n-dev > -- Regards Kov Chai -------------- next part -------------- An HTML attachment was scrubbed... URL: From Yong.Sun at Sun.COM Wed Feb 13 20:27:44 2008 From: Yong.Sun at Sun.COM (Yong Sun) Date: Thu, 14 Feb 2008 12:27:44 +0800 Subject: [g11n-dev] [REVIEW][PATCH][SunPinyin] Misc patches on scim-sunpinyin In-Reply-To: <638bf0dd0802131929y245b02a9pa26759e17330afa2@mail.gmail.com> References: <638bf0dd0802130913h29b05896waa484e60e83f51de@mail.gmail.com> <47B32B36.8070507@Sun.COM> <638bf0dd0802130950u53b350c0tbde743b8967db204@mail.gmail.com> <47B3AD53.4090907@Sun.COM> <638bf0dd0802131929y245b02a9pa26759e17330afa2@mail.gmail.com> Message-ID: <47B3C340.1010602@Sun.COM> Hi, Anthony, Any fix for any component is welcome! Never mind the ownership :) I think, as a workaround, the fix for SunPyFactory::init() is pretty OK to check-in, and let Kov to refine it later :) Regards, Anthony Lee ??: > Hi Yong, > > I won't change those files which belong to scim-sunpinyin, > hope that Kov would like to update the source himself. > > I will sumit the changes of following files tonight. > > Files planning to modified: > ------------------------------------- > sunpinyin/ime/README > sunpinyin/ime/Makefile.am > > > B.R. > A.L. > _______________________________________________ > g11n-dev mailing list > g11n-dev at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/g11n-dev > From tchaikov at gmail.com Thu Feb 14 09:02:29 2008 From: tchaikov at gmail.com (Kov Chai) Date: Fri, 15 Feb 2008 01:02:29 +0800 Subject: [g11n-dev] [REVIEW][PATCH][SunPinyin] Misc patches on scim-sunpinyin In-Reply-To: <638bf0dd0802131929y245b02a9pa26759e17330afa2@mail.gmail.com> References: <638bf0dd0802130913h29b05896waa484e60e83f51de@mail.gmail.com> <47B32B36.8070507@Sun.COM> <638bf0dd0802130950u53b350c0tbde743b8967db204@mail.gmail.com> <47B3AD53.4090907@Sun.COM> <638bf0dd0802131929y245b02a9pa26759e17330afa2@mail.gmail.com> Message-ID: On Thu, Feb 14, 2008 at 11:29 AM, Anthony Lee wrote: > Hi Yong, > > I won't change those files which belong to scim-sunpinyin, > hope that Kov would like to update the source himself. Your fixes commited. Anyway, any fix/improvement of scim-sunpinyin is always welcome. I will never complain like `who touched my code?' ?) BTW, Anthony, have you tried `make dist' on a GNU/Linux box? I found that following patch against beos/Makefile.am can ease the problem: -SunPinyin: SunPinyinHandler.o SunPinyinModule.o SunPinyinLocale.o libsunpinyin.a - $(CXX) -nostart $^ $(BECJK_DEVEL_LIBS) -o $@ -Xlinker --soname=$@ $(LIBS) +SunPinyin_SOURCES = SunPinyinHandler.cpp SunPinyinHandler.h \ + SunPinyinModule.cpp SunPinyinModule.h \ + SunPinyinLocale.cpp SunPinyinLocale.h +SunPinyin_LDFLAGS = -nostart -Xlinker $(LIBS) $(BECJK_DEVEL_LIBS) --soname=SunPinyin +SunPinyin_LDADD = libsunpinyin.a I have no idea that if this patch works for BeOS systems. Could you help me review it? Probably we should start another thread... Thanks. > > I will sumit the changes of following files tonight. > > Files planning to modified: > ------------------------------------- > sunpinyin/ime/README > sunpinyin/ime/Makefile.am > > > B.R. > A.L. > -- Regards Kov Chai -------------- next part -------------- An HTML attachment was scrubbed... URL: From don.anthony.lee at gmail.com Fri Feb 15 08:04:26 2008 From: don.anthony.lee at gmail.com (Anthony Lee) Date: Sat, 16 Feb 2008 00:04:26 +0800 Subject: [g11n-dev] [SunPinyin][DISCUSS] The name of input style Message-ID: <638bf0dd0802150804n6ce120b2s911cc3caa74c17b9@mail.gmail.com> Hi guys, After looking through the source of IME part, I found difference in name of input style between CLE wrapper and SCIM wrapper. CLE wrapper's expression is "Modern Style" and "??????" in Chinese, SCIM wrapper's expression is "Microsoft Pinyin Style" and "??????" in Chinese. Here I would like the name what CLE wrapper expressed, though the behavior of another input style more than classic style in SunPinyin seems was similiar to the Microsoft Pinyin running on Windows, but there is a little diffrence between them. Besides, in my humble opinion, it's not good to contain "Microsoft". :) B.R. A.L. From Yong.Sun at Sun.COM Fri Feb 15 08:48:43 2008 From: Yong.Sun at Sun.COM (Yong Sun) Date: Sat, 16 Feb 2008 00:48:43 +0800 Subject: [g11n-dev] [SunPinyin][DISCUSS] The name of input style In-Reply-To: <638bf0dd0802150804n6ce120b2s911cc3caa74c17b9@mail.gmail.com> References: <638bf0dd0802150804n6ce120b2s911cc3caa74c17b9@mail.gmail.com> Message-ID: <47B5C26B.5080108@Sun.COM> Hi, Anthony, I agree with you, while we need a better English short description, "Modern Style" is not so clear for the end-users. How about "Converting in writing"? Anthony Lee ??: > Hi guys, > > After looking through the source of IME part, I found difference > in name of input style between CLE wrapper and SCIM wrapper. > CLE wrapper's expression is "Modern Style" and "??????" in Chinese, > SCIM wrapper's expression is "Microsoft Pinyin Style" and "??????" in Chinese. > > Here I would like the name what CLE wrapper expressed, > though the behavior of another input style more than classic style in SunPinyin > seems was similiar to the Microsoft Pinyin running on Windows, but there is > a little diffrence between them. > Besides, in my humble opinion, it's not good to contain "Microsoft". :) > > B.R. > A.L. > _______________________________________________ > g11n-dev mailing list > g11n-dev at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/g11n-dev > From don.anthony.lee at gmail.com Fri Feb 15 09:12:22 2008 From: don.anthony.lee at gmail.com (Anthony Lee) Date: Sat, 16 Feb 2008 01:12:22 +0800 Subject: [g11n-dev] [SunPinyin][DISCUSS] The name of input style In-Reply-To: <47B5C26B.5080108@Sun.COM> References: <638bf0dd0802150804n6ce120b2s911cc3caa74c17b9@mail.gmail.com> <47B5C26B.5080108@Sun.COM> Message-ID: <638bf0dd0802150912s241ff42elb2c48b1b8e9c917d@mail.gmail.com> Hi Yong, > "Modern Style" is not so clear for the end-users. How about "Converting > in writing"? How about "Instant Style"? Or "Inline Style" which came from terminology of BeOS' Input Method Framework. B.R. A.L. From Yong.Sun at Sun.COM Fri Feb 15 09:21:26 2008 From: Yong.Sun at Sun.COM (Yong Sun) Date: Sat, 16 Feb 2008 01:21:26 +0800 Subject: [g11n-dev] [SunPinyin][DISCUSS] The name of input style In-Reply-To: <638bf0dd0802150912s241ff42elb2c48b1b8e9c917d@mail.gmail.com> References: <638bf0dd0802150804n6ce120b2s911cc3caa74c17b9@mail.gmail.com> <47B5C26B.5080108@Sun.COM> <638bf0dd0802150912s241ff42elb2c48b1b8e9c917d@mail.gmail.com> Message-ID: <47B5CA16.8090109@Sun.COM> I love the "Instant Style" :) Anthony Lee ??: > Hi Yong, > > >> "Modern Style" is not so clear for the end-users. How about "Converting >> in writing"? >> > > How about "Instant Style"? > Or "Inline Style" which came from terminology of BeOS' Input Method Framework. > > > B.R. > A.L. > _______________________________________________ > g11n-dev mailing list > g11n-dev at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/g11n-dev > From don.anthony.lee at gmail.com Fri Feb 15 11:17:58 2008 From: don.anthony.lee at gmail.com (Anthony Lee) Date: Sat, 16 Feb 2008 03:17:58 +0800 Subject: [g11n-dev] [REVIEW][PATCH][SunPinyin] Misc patches on scim-sunpinyin In-Reply-To: References: <638bf0dd0802130913h29b05896waa484e60e83f51de@mail.gmail.com> <47B32B36.8070507@Sun.COM> <638bf0dd0802130950u53b350c0tbde743b8967db204@mail.gmail.com> <47B3AD53.4090907@Sun.COM> <638bf0dd0802131929y245b02a9pa26759e17330afa2@mail.gmail.com> Message-ID: <638bf0dd0802151117m68921955g94eb57bf055f238a@mail.gmail.com> Hi Kov, > BTW, Anthony, have you tried `make dist' on a GNU/Linux box? I found that > following patch against beos/Makefile.am can ease the problem: Libtool can't work on Haiku to generate dynamic-library when use "_SOURCES" & "_LDFLAGS". Same problem occurred on BeOS R5 if we generate the scripts with libtool < 1.5.24 So, I fixed the problem by another way.(commited, details by visiting following URL) http://mail.opensolaris.org/pipermail/g11n-notify/2008-February/000162.html B.R. A.L.