CJK-LyX-1.4.0 (release-2)
Hello, I've just found a small but annoying bug and fixed it. So, anyone who downloaded CJK-LyX-qt-1.4.0-1, should upgraded to the release 2 version at the same ftp site, ftp://cellular.phys.pusan.ac.kr/CJK-LyX/qt . Sorry for any inconveniences this may cause. Regards, cghan
CJK-LyX-1.4.0 (release-2)
Hello, I've just found a small but annoying bug and fixed it. So, anyone who downloaded CJK-LyX-qt-1.4.0-1, should upgraded to the "release 2" version at the same ftp site, ftp://cellular.phys.pusan.ac.kr/CJK-LyX/qt . Sorry for any inconveniences this may cause. Regards, cghan
CJK-LyX-1.4.0
Hello, I have just uploaded CJK-LyX-qt-1.4.0 at the usual ftp site, ftp://cellular.phys.pusan.ac.kr/CJK-LyX/qt . I have tested the patch for some time without any problem, but it's always possible there may be some serious bugs. Also notice that I have dropped the xform-frontend for this version (I do not use this frontend any more). Regards, cghan
CJK-LyX-1.4.0
Hello, I have just uploaded CJK-LyX-qt-1.4.0 at the usual ftp site, ftp://cellular.phys.pusan.ac.kr/CJK-LyX/qt . I have tested the patch for some time without any problem, but it's always possible there may be some serious bugs. Also notice that I have dropped the xform-frontend for this version (I do not use this frontend any more). Regards, cghan
CJK-LyX-1.3.4
Hello, I have uploaded CJK-LyX-(xforms,qt)-1.3.4 at the new ftp site, ftp://cellular.phys.pusan.ac.kr/CJK-LyX CJK-LyX-(xforms,qt)-1.3.4 is a patched version of (xforms,qt) port of lyx-1.3.4 for multibyte language users such as Chinese, Japanese and Korean users. Thanks to Mr. Satoru Goto([EMAIL PROTECTED]), this version contains an important fix of the bug in exporting lyx files to ascii or latex files. I also found with the help from Mr. Atsushi Shimmra([EMAIL PROTECTED]), a workaround of the problem displaying symbols in CJK-LyX-qt. So, I strongly urge every users of CJK-LyX to this version. CJK-LyX-xforms users should also notice that a new i18ned xforms lib., xforms-1.0-i18n_7 has been uploaded at the above ftp site. Regards, cghan
CJK-LyX-1.3.4
Hello, I have uploaded CJK-LyX-(xforms,qt)-1.3.4 at the new ftp site, ftp://cellular.phys.pusan.ac.kr/CJK-LyX CJK-LyX-(xforms,qt)-1.3.4 is a patched version of (xforms,qt) port of lyx-1.3.4 for multibyte language users such as Chinese, Japanese and Korean users. Thanks to Mr. Satoru Goto([EMAIL PROTECTED]), this version contains an important fix of the bug in exporting lyx files to ascii or latex files. I also found with the help from Mr. Atsushi Shimmra([EMAIL PROTECTED]), a workaround of the problem displaying symbols in CJK-LyX-qt. So, I strongly urge every users of CJK-LyX to this version. CJK-LyX-xforms users should also notice that a new i18ned xforms lib., xforms-1.0-i18n_7 has been uploaded at the above ftp site. Regards, cghan
Re: About the CJK patch to xforms
Hello JMarc, On Thu, 19 Feb 2004, Jean-Marc Lasgouttes wrote: Hello cghan, Just a small message to keep you informed of recent cjk-related developments. There has been a bug reported recently on lyx-devel where german users of LyX/xforms had strange locale related problems. It turned out that this bug was related to the cjk patch to xforms that is not included in suse linux. As a result, the following patch has been applied to the xforms suse rpm: diff -ru xforms-1.0-release.orig/lib/flresource.c xforms-1.0-release/lib/flresource.c --- xforms-1.0-release.orig/lib/flresource.c 2004-02-10 12:45:01.0 +0100 +++ xforms-1.0-release/lib/flresource.c 2004-02-10 12:47:30.933876558 +0100 @@ -1035,7 +1035,7 @@ extern int use_fontset() { - char * loc = setlocale(LC_ALL, ); + char * loc = setlocale(LC_CTYPE, NULL); I have no objection to this change. In fact, Angus did not like this part of the patch, for it is not general enough for all kinds of language environments. This was the reason why we did not submit our i18n patch to the official xforms-devel list. I would deeply appreciate anyone's improving this part of the patch, so that it can be made an official i18n patch to the xforms library. Regards, cghan P.S. I uploaded new xforms-1.0-i18n_7 lib. on our new ftp site, ftp://cellular.phys.pusan.ac.kr/CJK-LyX/xforms
Re: About the CJK patch to xforms
Hello JMarc, On Thu, 19 Feb 2004, Jean-Marc Lasgouttes wrote: > > Hello cghan, > > Just a small message to keep you informed of recent cjk-related > developments. > > There has been a bug reported recently on lyx-devel where german users > of LyX/xforms had strange locale related problems. It turned out that > this bug was related to the cjk patch to xforms that is not included > in suse linux. > > As a result, the following patch has been applied to the xforms suse > rpm: > > diff -ru xforms-1.0-release.orig/lib/flresource.c > xforms-1.0-release/lib/flresource.c --- > xforms-1.0-release.orig/lib/flresource.c 2004-02-10 12:45:01.0 +0100 > +++ xforms-1.0-release/lib/flresource.c 2004-02-10 12:47:30.933876558 +0100 > @@ -1035,7 +1035,7 @@ > extern int > use_fontset() > { > - char * loc = setlocale(LC_ALL, ""); > + char * loc = setlocale(LC_CTYPE, NULL); > I have no objection to this change. In fact, Angus did not like this part of the patch, for it is not general enough for all kinds of language environments. This was the reason why we did not submit our i18n patch to the official xforms-devel list. I would deeply appreciate anyone's improving this part of the patch, so that it can be made an official i18n patch to the xforms library. Regards, cghan P.S. I uploaded new xforms-1.0-i18n_7 lib. on our new ftp site, ftp://cellular.phys.pusan.ac.kr/CJK-LyX/xforms
Re: Greek-letter prob. in lyx-qt
On Thu, 16 Oct 2003, John Levon wrote: On Thu, Oct 16, 2003 at 01:09:41PM +0100, Angus Leeming wrote: Note that he says it used to work fine with an earlier version of Qt-LyX. Has Qt's handling of such things changed since Qt 3.1? I don't know, I've long since lost track ... Now, I think I know where the source of the problem lies; it is in the Dekel's patch(summitted on March, 6th) against qfont_loader.C in lyx-1.3.1. I could confirm this by replacing qfont_loader.C in lyx-1.3.1 by qfont_loader.C of lyx-1.3.0 and finding the resulting lyx-1.3.1 works fine! (I was wrong to say that lyx-1.3.1 was O.K. It is lyx-1.3.0 that correctly displays the greek letters.) Can anybody look at the patch and help us? Dekel Tsur? John Levon? Regards, cghan
Re: Greek-letter prob. in lyx-qt
On Thu, 16 Oct 2003, John Levon wrote: > On Thu, Oct 16, 2003 at 01:09:41PM +0100, Angus Leeming wrote: > > > Note that he says it used to work fine with an earlier version of > > Qt-LyX. Has Qt's handling of such things changed since Qt 3.1? > > I don't know, I've long since lost track ... > Now, I think I know where the source of the problem lies; it is in the Dekel's patch(summitted on March, 6th) against "qfont_loader.C" in lyx-1.3.1. I could confirm this by replacing qfont_loader.C in lyx-1.3.1 by qfont_loader.C of lyx-1.3.0 and finding the resulting lyx-1.3.1 works fine! (I was wrong to say that lyx-1.3.1 was O.K. It is lyx-1.3.0 that correctly displays the greek letters.) Can anybody look at the patch and help us? Dekel Tsur? John Levon? Regards, cghan
Re: Greek-letter prob. in lyx-qt
On Thu, 16 Oct 2003, John Levon wrote: On Thu, Oct 16, 2003 at 01:09:41PM +0100, Angus Leeming wrote: Note that he says it used to work fine with an earlier version of Qt-LyX. Has Qt's handling of such things changed since Qt 3.1? I don't know, I've long since lost track ... Now, I think I know where the source of the problem lies; it is in the Dekel's patch(summitted on March, 6th) against qfont_loader.C in lyx-1.3.1. I could confirm this by replacing qfont_loader.C in lyx-1.3.1 by qfont_loader.C of lyx-1.3.0 and finding the resulting lyx-1.3.1 works fine! (I was wrong to say that lyx-1.3.1 was O.K. It is lyx-1.3.0 that correctly displays the greek letters.) Can anybody look at the patch and help us? Dekel Tsur? John Levon? Regards, cghan
Re: Greek-letter prob. in lyx-qt
On Thu, 16 Oct 2003, John Levon wrote: > On Thu, Oct 16, 2003 at 01:09:41PM +0100, Angus Leeming wrote: > > > Note that he says it used to work fine with an earlier version of > > Qt-LyX. Has Qt's handling of such things changed since Qt 3.1? > > I don't know, I've long since lost track ... > Now, I think I know where the source of the problem lies; it is in the Dekel's patch(summitted on March, 6th) against "qfont_loader.C" in lyx-1.3.1. I could confirm this by replacing qfont_loader.C in lyx-1.3.1 by qfont_loader.C of lyx-1.3.0 and finding the resulting lyx-1.3.1 works fine! (I was wrong to say that lyx-1.3.1 was O.K. It is lyx-1.3.0 that correctly displays the greek letters.) Can anybody look at the patch and help us? Dekel Tsur? John Levon? Regards, cghan
Greek-letter prob. in lyx-qt
Hello, In lyx-qt, greek letters are displayed only in 'TeX' form. That is, the Greek 'alpha', for example, is displayed on lyx-screen as red-colored alpha. I have had this problem since lyx-3.2, and this is the reason why the most recent version of CJK-LyX-qt is CJK-LyX-qt-3.1(lyx-qt-3.1 is O.K.!). Can anybody help here? My machine's OS is Redhat-9(Shrike). Regards, cghan
New ftp site for CJK-LyX
Hello, I have lost all the data on the ftp site, stone.phys.pusan.ac.kr, which I have tried to recover, but in vain. I do not know what caused the problem, but the machine has the history of being hacked from outside several times. So, I decided to open a new ftp site for CJK-LyX, ftp://cellular.phys.pusan.ac.kr/CJK-LyX Please notice that to save the disk space, I have uploaded only the most recent version of CJK-LyX on the site. Anyone who needs old versions may email to me. Regards, cghan
Greek-letter prob. in lyx-qt
Hello, In lyx-qt, greek letters are displayed only in 'TeX' form. That is, the Greek 'alpha', for example, is displayed on lyx-screen as red-colored "alpha". I have had this problem since lyx-3.2, and this is the reason why the most recent version of CJK-LyX-qt is CJK-LyX-qt-3.1(lyx-qt-3.1 is O.K.!). Can anybody help here? My machine's OS is Redhat-9(Shrike). Regards, cghan
New ftp site for CJK-LyX
Hello, I have lost all the data on the ftp site, stone.phys.pusan.ac.kr, which I have tried to recover, but in vain. I do not know what caused the problem, but the machine has the history of being hacked from outside several times. So, I decided to open a new ftp site for CJK-LyX, ftp://cellular.phys.pusan.ac.kr/CJK-LyX Please notice that to save the disk space, I have uploaded only the most recent version of CJK-LyX on the site. Anyone who needs old versions may email to me. Regards, cghan
Re: Qt-frontend of CJK-LyX
On 28 Apr 2003, Jean-Marc Lasgouttes wrote: Adding it in CXXFLAGS is a _bad_ idea, since no essential flags should go there. The best thing to do is to add to configure.ac a line like AC_DEFINE(I18N, 1, [Define if you want to enable CJK LyX extensions]) This will automatically add the I18N define to config.h. Great advice! I'll definitely take it. Later, we will maybe make this configurable at configure time. Of course, you are welcome to replace the help text with something that makes more sense. I'll think about it. Regards, cghan
Re: Qt-frontend of CJK-LyX
On 28 Apr 2003, Jean-Marc Lasgouttes wrote: > > Adding it in CXXFLAGS is a _bad_ idea, since no essential flags should > go there. The best thing to do is to add to configure.ac a line like > AC_DEFINE(I18N, 1, [Define if you want to enable CJK LyX extensions]) > > This will automatically add the I18N define to config.h. Great advice! I'll definitely take it. Later, we > will maybe make this configurable at configure time. Of course, you > are welcome to replace the help text with something that makes more > sense. > I'll think about it. Regards, cghan
CJK-LyX-1.3.1
Hello, CJK-LyX-1.3.1 has been uploaded at the following ftp site, ftp://stone.phys.pusan.ac.kr/pub/CJK-LyX . THis one is much more stable than the buggy CJK-LyX-1.3.0 (sorry for that!). Be sure that your xforms-1,0-i18n is updated to the current version, 'xforms-1.0-i18n_6'. Regards, cghan
CJK-LyX-1.3.1
Hello, CJK-LyX-1.3.1 has been uploaded at the following ftp site, ftp://stone.phys.pusan.ac.kr/pub/CJK-LyX . THis one is much more stable than the buggy CJK-LyX-1.3.0 (sorry for that!). Be sure that your xforms-1,0-i18n is updated to the current version, 'xforms-1.0-i18n_6'. Regards, cghan
Re: Upgrade to New CJK-LyX-1.3.0
On Fri, 7 Mar 2003, Angus Leeming wrote: boost::signal2void, int,char const * workAreaCJK_IMprocess; No, this is fine. Only static signals can be problematic. The problem lies elsewhere then. Then, I think I have nothing to do with the error. By the way, Angus, I posted a crash problem during the loading of old lyx file created with lyx-1.2.1(in fact, CJK-LyX-1.2.1) yesterday, to which I've got no response yet. The problem I think is not confined to CJK-LyX or xforms-lib, for the same crash occurs in lyx-qt-frontend, too. The lyx file contains lots of equations and CJK-chars. Sometimes lyx loads the file, but it crashes during the scrolling inside the file. The curious about this crash is that there's no backtrace debug message except Couldn't get registers: No such process. Any idea on this? cghan
Re: Upgrade to New CJK-LyX-1.3.0
On 7 Mar 2003, Lars Gullik [iso-8859-1] Bjøînes wrote: Angus Leeming [EMAIL PROTECTED] writes: | Well you were the one who dug deep in all this. And I do not remember in what cases specifically an explicit connection tracking was needed. | I'm merely reporting what I | remember. Anyway, the crash occurs in Toolbar::Pimpl::~Pimpl, called from | boost::checked_delete; complain about a missing pure virtual function. | | Seen anything like this before? Yes... but I do not know its cause. -- Ah, I remember I added virtual XMiniBuffer * getMiniBuffer() const = 0; virtual FL_FORM * getForm() const = 0; in the src/frontends/LyXView.h. Can this be the cause ? cghan
Re: Upgrade to New CJK-LyX-1.3.0
On Fri, 7 Mar 2003, Angus Leeming wrote: > > > > "boost::signal2<void, int,char const *> workAreaCJK_IMprocess;" > > No, this is fine. Only static signals can be problematic. The problem lies > elsewhere then. > Then, I think I have nothing to do with the error. By the way, Angus, I posted a crash problem during the loading of old lyx file created with lyx-1.2.1(in fact, CJK-LyX-1.2.1) yesterday, to which I've got no response yet. The problem I think is not confined to CJK-LyX or xforms-lib, for the same crash occurs in lyx-qt-frontend, too. The lyx file contains lots of equations and CJK-chars. Sometimes lyx loads the file, but it crashes during the scrolling inside the file. The curious about this crash is that there's no backtrace debug message except "Couldn't get registers: No such process." Any idea on this? cghan
Re: Upgrade to New CJK-LyX-1.3.0
On 7 Mar 2003, Lars Gullik [iso-8859-1] Bjøînes wrote: > Angus Leeming <[EMAIL PROTECTED]> writes: > > | Well you were the one who dug deep in all this. > > And I do not remember in what cases specifically an explicit > connection tracking was needed. > > | I'm merely reporting what I > | remember. Anyway, the crash occurs in Toolbar::Pimpl::~Pimpl, called from > | boost::checked_delete; complain about a missing pure virtual function. > | > | Seen anything like this before? > > Yes... but I do not know its cause. > > -- Ah, I remember I added "virtual XMiniBuffer * getMiniBuffer() const = 0; virtual FL_FORM * getForm() const = 0; " in the src/frontends/LyXView.h. Can this be the cause ? cghan
Re: Upgrade to New CJK-LyX-1.3.0
Hello, Angus: On Thu, 6 Mar 2003, Angus Leeming wrote: Hmmm. This rings a bell. CG did I see that you added a static boost::signal to the code? I believe taht older gcc compilers had problems with these static signals (generated incorrect code) but can't remember the details anymore. Anyway, if you did add a static boost::signal in your patch, then we devised a work-around. Could you let me know as I don't have your source to hand. Yes, I did. It is in src/frontends/WorkArea.h, boost::signal2void, int,char const * workAreaCJK_IMprocess; I have used this code since lyx-1.2.0, and have had no problem, but why now? Regards, cghan
Re: Upgrade to New CJK-LyX-1.3.0
Hello, Angus: On Thu, 6 Mar 2003, Angus Leeming wrote: > Hmmm. This rings a bell. > CG did I see that you added a static boost::signal to the code? I > believe taht older gcc compilers had problems with these static > signals (generated incorrect code) but can't remember the details > anymore. Anyway, if you did add a static boost::signal in your patch, > then we devised a work-around. Could you let me know as I don't have > your source to hand. Yes, I did. It is in src/frontends/WorkArea.h, "boost::signal2<void, int,char const *> workAreaCJK_IMprocess;" I have used this code since lyx-1.2.0, and have had no problem, but why now? Regards, cghan
Re: Upgrade to New CJK-LyX-1.3.0
On Wed, 5 Mar 2003, Mike FABIAN wrote: Currently it looks like this on my system: http://www.suse.de/~mfabian/misc/cghan-20030305/cjk-lyx-1.3.0-korean.png Looks strange to me, too. All I can think of for the reason, is that xforms-lib is not properly installed? With CJK-LyX-1.2.0 on SuSE Linux 8.1, the same file displayed as: http://www.suse.de/~mfabian/suse-cjk/cjk-lyx-korean.html Also a bit strange is, that in the new screenshot the characters in the bold face headline are smaller than the rest of the headline, whereas they were the same size in the old screenshot. Maybe this is because it tries to use a bold-face Korean font now, doesn't find one and falls back some replacement font which happens to be smaller? I guess I agree with you on that point. But why does this happen? I have to look at closely the xfont_loader. If you have any idea, that will be a help to me. cghan
Re: Upgrade to New CJK-LyX-1.3.0
On Wed, 5 Mar 2003, Mike FABIAN wrote: Looks strange to me, too. All I can think of for the reason, is that xforms-lib is not properly installed? Although I don't think that I made a mistake in installing the i18n patched xforms, I am tempted to try a Qt build instead. O.K. Here's my solution. First of all, your menu problem is due to the CJK-font loading by xforms-lib. Because I do not have this problem(I use redhat-8.0), I cannot help any more on this problem. For the remaining problems, I recommend you to upgrade xforms-lib and CJK-LyX to current version, 'xforms-1.0-i18n_4' and 'CJK-LyX-1.3.0-5', which I just uploaded on the usual ftp site. Hope this solve all of your problems. Regards, cghan
Re: Upgrade to New CJK-LyX-1.3.0
On Wed, 5 Mar 2003, Mike FABIAN wrote: I found a workaround for the mojibake in the menus problem: LANG=ja_JP LC_CTYPE=ja_JP LC_MESSAGES=ja_JP lyx-cjk example-japanese-cjk-latex.lyx show mojibake in the menus *but* LC_ALL=ja_JP lyx-cjk example-japanese-cjk-latex.lyx shows correct Japanese in the menus. Same for Korean, setting LC_ALL removes the problem. That's strange. Oh, I see. That's because I set CJK locales in xforms-lib with 'LC_ALL'. This would be changed, but for now I cannot find better way. So please bear with it, for some moment. cghan
What does this error statement mean?
Hello, With CJK-LyX-1.3.0, lyx crashes while loading a long lyx file created with CJK-LyX-1.2.1. Sometimes lyx loads the file, but still it crashes during scrolling down or up inside the file. No backtrace debug statements,except Couldn't get registers: No such process. Can anyone explain me what this error statement mean? Regards, cghan
Re: Upgrade to New CJK-LyX-1.3.0
On Wed, 5 Mar 2003, Mike FABIAN wrote: > > Currently it looks like this on my system: > > http://www.suse.de/~mfabian/misc/cghan-20030305/cjk-lyx-1.3.0-korean.png > Looks strange to me, too. All I can think of for the reason, is that xforms-lib is not properly installed? > With CJK-LyX-1.2.0 on SuSE Linux 8.1, the same file displayed as: > > http://www.suse.de/~mfabian/suse-cjk/cjk-lyx-korean.html > > Also a bit strange is, that in the new screenshot the characters > in the bold face headline are smaller than the rest of the headline, > whereas they were the same size in the old screenshot. > > Maybe this is because it tries to use a bold-face Korean font now, > doesn't find one and falls back some replacement font which happens > to be smaller? > > I guess I agree with you on that point. But why does this happen? I have to look at closely the xfont_loader. If you have any idea, that will be a help to me. cghan
Re: Upgrade to New CJK-LyX-1.3.0
On Wed, 5 Mar 2003, Mike FABIAN wrote: > > > Looks strange to me, too. All I can think of for the reason, is that > > xforms-lib is not properly installed? > > Although I don't think that I made a mistake in installing > the i18n patched xforms, I am tempted to try a Qt build instead. > O.K. Here's my solution. First of all, your menu problem is due to the CJK-font loading by xforms-lib. Because I do not have this problem(I use redhat-8.0), I cannot help any more on this problem. For the remaining problems, I recommend you to upgrade xforms-lib and CJK-LyX to current version, 'xforms-1.0-i18n_4' and 'CJK-LyX-1.3.0-5', which I just uploaded on the usual ftp site. Hope this solve all of your problems. Regards, cghan
Re: Upgrade to New CJK-LyX-1.3.0
On Wed, 5 Mar 2003, Mike FABIAN wrote: > > I found a workaround for the "mojibake in the menus" problem: > > LANG=ja_JP LC_CTYPE=ja_JP LC_MESSAGES=ja_JP lyx-cjk > example-japanese-cjk-latex.lyx > > show mojibake in the menus *but* > > LC_ALL=ja_JP lyx-cjk example-japanese-cjk-latex.lyx > > shows correct Japanese in the menus. Same for Korean, setting LC_ALL > removes the problem. That's strange. > > Oh, I see. That's because I set CJK locales in xforms-lib with 'LC_ALL'. This would be changed, but for now I cannot find better way. So please bear with it, for some moment. cghan
What does this error statement mean?
Hello, With CJK-LyX-1.3.0, lyx crashes while loading a long lyx file created with CJK-LyX-1.2.1. Sometimes lyx loads the file, but still it crashes during scrolling down or up inside the file. No backtrace debug statements,except "Couldn't get registers: No such process." Can anyone explain me what this error statement mean? Regards, cghan
Upgrade to New CJK-LyX-1.3.0
Hello, I found a critical bug in CJK-LyX-1.3.0 (up to the version '3') regarding to 'tex command inset'. So I urge all CJK-LyX users to upgrade to the latest 'CJK-LyX-1.3.0-4' which can be downloaded at the ftp site, ftp://stone.phys.pusan.ac.kr/pub/CJK-LyX . Sorry for the inconveniences this may cause. cghan
Upgrade to New CJK-LyX-1.3.0
Hello, I found a critical bug in CJK-LyX-1.3.0 (up to the version '3') regarding to 'tex command inset'. So I urge all CJK-LyX users to upgrade to the latest 'CJK-LyX-1.3.0-4' which can be downloaded at the ftp site, ftp://stone.phys.pusan.ac.kr/pub/CJK-LyX . Sorry for the inconveniences this may cause. cghan
Re: CJK-LyX-1.3.0
On Fri, 28 Feb 2003, Kohtaro Hitomi wrote: In file included from ../../src/lyxtextclass.h:21, from ../../src/bufferparams.h:23, from ../../src/lyxrc.h:19, from formulabase.C:27: ../../src/support/types.h:27: syntax error before ;' make[3]: *** [formulabase.lo] Error 1 This error also comes from the old version of gcc. Apply the attached patch. Good Luck ! cghan
Re: CJK-LyX-1.3.0
Apparantly, the patch is here! cghan --- types.h 2003-03-01 03:57:47.0 +0900 +++ types._new.h2003-03-01 03:59:30.0 +0900 @@ -24,7 +24,7 @@ * char_type == char except in CJK-LyX where char_type == wchar_t. */ typedef wchar_t char_type; - typedef unsigned wchar_t unsigned_char_type; + typedef wchar_t unsigned_char_type; /// a type for positions used in paragraphs // needs to be signed for a while to hold the special value -1 that is
Re: CJK-LyX-1.3.0
On Fri, 28 Feb 2003, Kohtaro Hitomi wrote: >In file included from ../../src/lyxtextclass.h:21, > from ../../src/bufferparams.h:23, > from ../../src/lyxrc.h:19, > from formulabase.C:27: > >../../src/support/types.h:27: syntax error before ;' >make[3]: *** [formulabase.lo] Error 1 This error also comes from the old version of gcc. Apply the attached patch. Good Luck ! cghan
Re: CJK-LyX-1.3.0
Apparantly, the patch is here! cghan --- types.h 2003-03-01 03:57:47.0 +0900 +++ types._new.h2003-03-01 03:59:30.0 +0900 @@ -24,7 +24,7 @@ * char_type == char except in CJK-LyX where char_type == wchar_t. */ typedef wchar_t char_type; - typedef unsigned wchar_t unsigned_char_type; + typedef wchar_t unsigned_char_type; /// a type for positions used in paragraphs // needs to be signed for a while to hold the special value -1 that is
Re: CJK-LyX-1.3.0
On Thu, 27 Feb 2003, Angus Leeming wrote: Kohtaro Hitomi wrote: Thank you for making CJK-LyX 1.3.0. Howenver, I could not compile the patched xforms with the following message. xpopup.c: In function draw_title': xpopup.c:1485: parse error before static' xpopup.c:1493: fset' undeclared (first use in this function) xpopup.c:1493: (Each undeclared identifier is reported only once xpopup.c:1493: for each function it appears in.) xpopup.c:1497: missing_charset' undeclared (first use in this function) xpopup.c:1497: num_missing' undeclared (first use in this function) xpopup.c:1497: dd' undeclared (first use in this function) make[1]: *** [xpopup.o] Error 1 make[1]: Leaving directory /home/kohtaro/rpm/BUILD/xforms-1.0-release/lib' make: *** [all] Error 2 Bad exit status from /var/tmp/rpm-tmp.17746 (%build) Do you have any idea to solve it. Patch attached. Apply as: $ cd ${xforms-src}/lib $ patch -p0 xpopup.diff The errors occur from the old versions of gcc(i.e., gcc at RH7.3). The patch cures the problem. Thank you, Angus. cghan
Re: CJK-LyX-1.3.0
On Thu, 27 Feb 2003, Angus Leeming wrote: > Kohtaro Hitomi wrote: > > > Thank you for making CJK-LyX 1.3.0. Howenver, I could not compile the > > patched xforms with the following message. > > > > xpopup.c: In function draw_title': > > xpopup.c:1485: parse error before static' > > xpopup.c:1493: fset' undeclared (first use in this function) > > xpopup.c:1493: (Each undeclared identifier is reported only once > > xpopup.c:1493: for each function it appears in.) > > xpopup.c:1497: missing_charset' undeclared (first use in this function) > > xpopup.c:1497: num_missing' undeclared (first use in this function) > > xpopup.c:1497: dd' undeclared (first use in this function) > > make[1]: *** [xpopup.o] Error 1 > > make[1]: Leaving directory /home/kohtaro/rpm/BUILD/xforms-1.0-release/lib' > > make: *** [all] Error 2 > > Bad exit status from /var/tmp/rpm-tmp.17746 (%build) > > > > Do you have any idea to solve it. > > Patch attached. Apply as: > > $ cd ${xforms-src}/lib > $ patch -p0 < xpopup.diff > The errors occur from the old versions of gcc(i.e., gcc at RH7.3). The patch cures the problem. Thank you, Angus. cghan
Re: CJK-LyX-1.2.3
Hello, Angus, Attached is another xforms-i18n patch in which 1. I made XFontSet to be loaded only on the machine with locales set Chinese, Japanese or Korean ( or their aliases, of course). 2. The messy part in handle_key in input.c is removed so that the order is back to the original. Please quick-look at the patch, and if it looks fine, give me a sign. I'm ready to announce CJK-LyX-1.3.0. Regards, cghan
Re: CJK-LyX-1.2.3
Apparantly, I forgot to attach the patch. Hre si the one. cghan diff -urdN xforms-1.0-release/Imakefile xforms-1.0-i18n/Imakefile --- xforms-1.0-release/ImakefileWed Dec 4 02:25:43 2002 +++ xforms-1.0-i18n/Imakefile Tue Feb 25 19:19:40 2003 @@ -100,7 +100,7 @@ image \ $(GL) \ fdesign \ - fd2ps \ + fd2ps \ $(DEMOS) IMAKE_DEFINES = \ diff -urdN xforms-1.0-release/lib/flinternal.h xforms-1.0-i18n/lib/flinternal.h --- xforms-1.0-release/lib/flinternal.h Tue May 21 04:38:39 2002 +++ xforms-1.0-i18n/lib/flinternal.hTue Feb 25 19:19:40 2003 @@ -226,6 +226,10 @@ extern void fl_dump_state_info(int, const char *); extern void fl_init_stipples(void); +/* XFontSet loading */ + +extern int use_fontset(void); + /* for fdesign */ const char *fl_query_colorname(FL_COLOR); extern long fl_query_namedcolor(const char *s); @@ -411,10 +415,8 @@ int tooltip_time; #ifdef XlibSpecificationRelease XIMxim ;/* input method */ -XICxic ;/* input context */ #else void *xim; -void *xic; #endif unsigned int navigate_mask; /* input field */ long reserverd[6]; @@ -490,6 +492,7 @@ #define IsEnd(k) (k==XK_End || k==XK_KP_End) #define IsPageDown(k) (k==XK_Next || k==XK_Page_Down || k==XK_KP_Page_Down) #define IsPageUp(k)(k==XK_Prior || k==XK_Page_Up || k==XK_KP_Page_Up) +#define IsReturn(k)(k==XK_Return || k==XK_KP_Enter) #else #define IsHome(k) (k==XK_Home || k== XK_Begin) #define IsLeft(k) (k==XK_Left) @@ -499,6 +502,7 @@ #define IsEnd(k) (k==XK_End) #define IsPageDown(k) (k==XK_Next) #define IsPageUp(k)(k==XK_Prior) +#define IsReturn(k)(k==XK_Return) #endif #define FL_HALFPAGE_UP 0x1000 @@ -514,6 +518,15 @@ #define Is1LineUp(k) ((k)==FL_1LINE_UP) #define Is1LineDown(k)((k)==FL_1LINE_DOWN) +#define IsFLCursorKey(k) (IsHome(k) || IsLeft(k) || \ + IsRight(k)|| IsUp(k) || \ + IsDown(k) || IsEnd(k)|| \ + IsPageDown(k) || IsPageUp(k) || \ + IsReturn(k) || IsHalfPageUp(k) || \ + IsHalfPageDown(k) || IsNLinesUp(k) || \ + IsNLinesDown(k) || Is1LineUp(k)|| \ + Is1LineDown(k)) + extern int fl_convert_shortcut(const char *, long *); extern int fl_get_underline_pos(const char *, const char *); diff -urdN xforms-1.0-release/lib/flresource.c xforms-1.0-i18n/lib/flresource.c --- xforms-1.0-release/lib/flresource.c Sun Jun 2 07:09:37 2002 +++ xforms-1.0-i18n/lib/flresource.cTue Feb 25 19:19:40 2003 @@ -48,7 +48,7 @@ /* used to have other uses, currently does almost nothing */ extern int fl_check_it(const char *); - +extern int use_fontset(void); static XrmDatabase fldatabase; /* final merged database */ static XrmDatabase cmddb; /* command line database */ static char *fl_app_name, *fl_app_class, *fl_ori_app_name; @@ -952,16 +952,9 @@ { XSetLocaleModifiers(); /* use the same input method throughout xforms */ -fl_context-xim = XOpenIM(fl_display, 0, 0, 0); -/* also use the same input context */ -if (fl_context-xim) -{ -int style = XIMPreeditNothing|XIMStatusNothing; -fl_context-xic = XCreateIC(fl_context-xim, - XNInputStyle, style, - 0); -} + fl_context-xim = XOpenIM(fl_display, 0, 0, 0); } + #endif fl_default_xswa(); fl_init_stipples(); @@ -1037,6 +1030,34 @@ return fl_display; } +/* font_loading */ + +extern int +use_fontset() +{ + char * loc = setlocale(LC_ALL, ); + +if (!strcmp(loc, ko_KR) || !strcmp(loc, ko_KR.eucKR) || + !strcmp(loc, korean) || !strcmp(loc, korean_euc) || +!strcmp(loc, ko_KR.euc) || !strcmp(loc, ko_KR.euckr) || +!strcmp(loc, ko) || !strcmp(loc, ko_KR.EUC) || +!strcmp(loc, ja_JP.eucJP) || !strcmp(loc, ja_JP) || +!strcmp(loc, japanese) || !strcmp(loc, japanese.euc) || +!strcmp(loc, ja_JP.ujis) || !strcmp(loc, ja_JP.SJIS) || +!strcmp(loc, japanese.sjis) || !strcmp(loc, zh) || +!strcmp(loc, zh_CN) || !strcmp(loc, zh_CN.eucCN) || +!strcmp(loc, zh_CN.euc) || !strcmp(loc, zh_CN.Big5) || +!strcmp(loc, zh_CN.EUC) || !strcmp(loc, zh_CN.big5) || +!strcmp(loc, zh_CN.gbk) || !strcmp(loc, zh_TW) || +!strcmp(loc, zh_TW.big5) || !strcmp(loc, zh_TW.Big5) || +!strcmp(loc, zh_HK) || !strcmp(loc, zh_HK.big5) || +!strcmp(loc, zh_CN.GB18030) || !strcmp(loc, zh_CN.gb18030) || +!strcmp(loc, zh_HK.Big5) || !strcmp(loc
Re: CJK-LyX-1.3.0
On Tue, 25 Feb 2003, Angus Leeming wrote: Congratulations! Congratulations to you, too! cghan
Re: CJK-LyX-1.3.0
ftp://stone.phys.pusan.ac.kr/ftp/pub/CJK-LyX . Sorry, the above ftp adress is wrong. The correct one is ftp://stone.phys.pusan.ac.kr/pub/CJK-LyX cghan
CJK-LyX-1.3.0
Hello, I am really happy to announce CJK-LyX-1.3.0, which is a patched version of lyx-1.3.0 for Chinese, Japanese and Korean language users. You can download the patch, RPM source and binary(redhat-8.0) at the usual ftp site, ftp://stone.phys.pusan.ac.kr/ftp/pub/CJK-LyX . Please be aware that from this version on, CJK-LyX will depend on xforms-lib with vesion not earlier than 1.0. Why? From this version, the xforms-lib became open-source, and the needed internationalization of the lib can be implemented more easily. In fact, we have made a heavy patch againt official xforms-1.0, which CJK-LyX-1.3.0 critically depends on. So users of CJK-LyX should install our patched xforms-lib(xforms-1.0-i18n) ^^^ which you can download the patch, rpm source or binaries from the above ftp site. CJK-LyX-1.3.0 has a couple of important improvements over the previous versions. 1. With our patched xforms-lib, you can now input CJK-charcters on any part of lyx. You can even input file name in CJK-chars. 2. Cursor movement owned by the local input server is much improved. It is not perfect yet, but is improving! 3. You can now Find Search CJK-characters as well. But Spellchecking CJK-chars has not been implemented (Anyone how to do?) As you all know, we, the CJK-LyX users, have been helped by the pool of lyx developers. But this time, Angus Leeming's contributions for the release of this CJK-LyX have been so critical that without his help CJK-LyX-1.3.0 could never come out this early. Last couple of weeks, we had numerous(my count went beyond 40 !) communication sessions--usually my question and his answer-- to develop the internationalization of xforms. He also gave a hand to polish CJK-LyX. I admire his kindness, generosity, endurance and professional skills. He really deserves our, the CJK-LyX user's, Big applause !! So, enjoy LyX, and enjoy GNU spirit. Regards, cghan
Re: CJK-LyX-1.2.3
Hello, Angus, Attached is another xforms-i18n patch in which 1. I made XFontSet to be loaded only on the machine with locales set Chinese, Japanese or Korean ( or their aliases, of course). 2. The messy part in handle_key in input.c is removed so that the order is back to the original. Please quick-look at the patch, and if it looks fine, give me a sign. I'm ready to announce CJK-LyX-1.3.0. Regards, cghan
Re: CJK-LyX-1.2.3
Apparantly, I forgot to attach the patch. Hre si the one. cghan diff -urdN xforms-1.0-release/Imakefile xforms-1.0-i18n/Imakefile --- xforms-1.0-release/ImakefileWed Dec 4 02:25:43 2002 +++ xforms-1.0-i18n/Imakefile Tue Feb 25 19:19:40 2003 @@ -100,7 +100,7 @@ image \ $(GL) \ fdesign \ - fd2ps \ + fd2ps \ $(DEMOS) IMAKE_DEFINES = \ diff -urdN xforms-1.0-release/lib/flinternal.h xforms-1.0-i18n/lib/flinternal.h --- xforms-1.0-release/lib/flinternal.h Tue May 21 04:38:39 2002 +++ xforms-1.0-i18n/lib/flinternal.hTue Feb 25 19:19:40 2003 @@ -226,6 +226,10 @@ extern void fl_dump_state_info(int, const char *); extern void fl_init_stipples(void); +/* XFontSet loading */ + +extern int use_fontset(void); + /* for fdesign */ const char *fl_query_colorname(FL_COLOR); extern long fl_query_namedcolor(const char *s); @@ -411,10 +415,8 @@ int tooltip_time; #ifdef XlibSpecificationRelease XIMxim ;/* input method */ -XICxic ;/* input context */ #else void *xim; -void *xic; #endif unsigned int navigate_mask; /* input field */ long reserverd[6]; @@ -490,6 +492,7 @@ #define IsEnd(k) (k==XK_End || k==XK_KP_End) #define IsPageDown(k) (k==XK_Next || k==XK_Page_Down || k==XK_KP_Page_Down) #define IsPageUp(k)(k==XK_Prior || k==XK_Page_Up || k==XK_KP_Page_Up) +#define IsReturn(k)(k==XK_Return || k==XK_KP_Enter) #else #define IsHome(k) (k==XK_Home || k== XK_Begin) #define IsLeft(k) (k==XK_Left) @@ -499,6 +502,7 @@ #define IsEnd(k) (k==XK_End) #define IsPageDown(k) (k==XK_Next) #define IsPageUp(k)(k==XK_Prior) +#define IsReturn(k)(k==XK_Return) #endif #define FL_HALFPAGE_UP 0x1000 @@ -514,6 +518,15 @@ #define Is1LineUp(k) ((k)==FL_1LINE_UP) #define Is1LineDown(k)((k)==FL_1LINE_DOWN) +#define IsFLCursorKey(k) (IsHome(k) || IsLeft(k) || \ + IsRight(k)|| IsUp(k) || \ + IsDown(k) || IsEnd(k)|| \ + IsPageDown(k) || IsPageUp(k) || \ + IsReturn(k) || IsHalfPageUp(k) || \ + IsHalfPageDown(k) || IsNLinesUp(k) || \ + IsNLinesDown(k) || Is1LineUp(k)|| \ + Is1LineDown(k)) + extern int fl_convert_shortcut(const char *, long *); extern int fl_get_underline_pos(const char *, const char *); diff -urdN xforms-1.0-release/lib/flresource.c xforms-1.0-i18n/lib/flresource.c --- xforms-1.0-release/lib/flresource.c Sun Jun 2 07:09:37 2002 +++ xforms-1.0-i18n/lib/flresource.cTue Feb 25 19:19:40 2003 @@ -48,7 +48,7 @@ /* used to have other uses, currently does almost nothing */ extern int fl_check_it(const char *); - +extern int use_fontset(void); static XrmDatabase fldatabase; /* final merged database */ static XrmDatabase cmddb; /* command line database */ static char *fl_app_name, *fl_app_class, *fl_ori_app_name; @@ -952,16 +952,9 @@ { XSetLocaleModifiers(""); /* use the same input method throughout xforms */ -fl_context->xim = XOpenIM(fl_display, 0, 0, 0); -/* also use the same input context */ -if (fl_context->xim) -{ -int style = XIMPreeditNothing|XIMStatusNothing; -fl_context->xic = XCreateIC(fl_context->xim, - XNInputStyle, style, - 0); -} + fl_context->xim = XOpenIM(fl_display, 0, 0, 0); } + #endif fl_default_xswa(); fl_init_stipples(); @@ -1037,6 +1030,34 @@ return fl_display; } +/* font_loading */ + +extern int +use_fontset() +{ + char * loc = setlocale(LC_ALL, ""); + +if (!strcmp(loc, "ko_KR") || !strcmp(loc, "ko_KR.eucKR") || + !strcmp(loc, "korean") || !strcmp(loc, "korean_euc") || +!strcmp(loc, "ko_KR.euc") || !strcmp(loc, "ko_KR.euckr") || +!strcmp(loc, "ko") || !strcmp(loc, "ko_KR.EUC") || +!strcmp(loc, "ja_JP.eucJP") || !strcmp(loc, "ja_JP") || +!strcmp(loc, "japanese") || !strcmp(loc, "japanese.euc") || +!strcmp(loc, "ja_JP.ujis") || !strcmp(loc, "ja_JP.SJIS") || +!strcmp(loc, "japanese.sjis") || !strcmp(loc, "zh") || +!strcmp(loc, "zh_CN") || !strcmp(loc, "zh_CN.eucCN") || +!strcmp(loc, "zh_CN.euc") || !strcmp(loc, "zh_CN.Big5") || +!strcmp(loc, "zh_CN.EUC") || !strcmp(loc, "zh_CN.big5") || +
Re: CJK-LyX-1.3.0
On Tue, 25 Feb 2003, Angus Leeming wrote: > > Congratulations! > Congratulations to you, too! cghan
Re: CJK-LyX-1.3.0
> > ftp://stone.phys.pusan.ac.kr/ftp/pub/CJK-LyX . > Sorry, the above ftp adress is wrong. The correct one is ftp://stone.phys.pusan.ac.kr/pub/CJK-LyX cghan
CJK-LyX-1.3.0
Hello, I am really happy to announce CJK-LyX-1.3.0, which is a patched version of lyx-1.3.0 for Chinese, Japanese and Korean language users. You can download the patch, RPM source and binary(redhat-8.0) at the usual ftp site, ftp://stone.phys.pusan.ac.kr/ftp/pub/CJK-LyX . Please be aware that from this version on, CJK-LyX will depend on xforms-lib with vesion not earlier than 1.0. Why? From this version, the xforms-lib became open-source, and the needed internationalization of the lib can be implemented more easily. In fact, we have made a heavy patch againt official xforms-1.0, which CJK-LyX-1.3.0 critically depends on. So users of CJK-LyX should install our patched xforms-lib(xforms-1.0-i18n) ^^^ which you can download the patch, rpm source or binaries from the above ftp site. CJK-LyX-1.3.0 has a couple of important improvements over the previous versions. 1. With our patched xforms-lib, you can now input CJK-charcters on any part of lyx. You can even input file name in CJK-chars. 2. Cursor movement owned by the local input server is much improved. It is not perfect yet, but is improving! 3. You can now Find & Search CJK-characters as well. But Spellchecking CJK-chars has not been implemented (Anyone how to do?) As you all know, we, the CJK-LyX users, have been helped by the pool of lyx developers. But this time, Angus Leeming's contributions for the release of this CJK-LyX have been so critical that without his help CJK-LyX-1.3.0 could never come out this early. Last couple of weeks, we had numerous(my count went beyond 40 !) communication sessions--usually my question and his answer-- to develop the internationalization of xforms. He also gave a hand to polish CJK-LyX. I admire his kindness, generosity, endurance and professional skills. He really deserves our, the CJK-LyX user's, Big applause !! So, enjoy LyX, and enjoy GNU spirit. Regards, cghan
Re: CJK-LyX-1.2.3
On Mon, 24 Feb 2003, Angus Leeming wrote: Ok I tested it with LANG == en_US.UTF-8 (Standard RH8 setup). All is fine. Note, however, that I don't think that xforms should be clever about this. I know. The patch should fail where some non-standard locale setting is set. This should be set by a flag passed to fl_initialize. Can you give me an example code to realize this? Please notice that I have to release CJK-LyX-1.3.0 tomorrow at the latest( I promised some CJK-LyX users to release CJK-LyX-1.3.0 early this week). +/* keysym == NoSymbol during multi-byte char composition. + Eg, I've typed Multi_key-a but not yet ' to give ? + Silently swallow these partial-compositions. */ +if (keysym == NoSymbol kbuflen == 0) +return; CG, are you sure that this could not be simplified? I thought that you had established that null keysyms should not be passed to the widgets at all? if (keysym == NoSymbol) return; Nope, composed CJK-chars have also keysym==0. So without extra kbuflen==0, all the composed CJK-chars will be swallowd here. cghan
Re: CJK-LyX-1.2.3
Please bear with me, Angus. I cannot understand a thing in your new code. But let me try. @@ -863,6 +866,7 @@ fl_cntl.vclass = fl_vclass_val(fl_cntl.vname); fl_cntl.coordUnit = fl_get_vn_value(vn_coordunit, OpCoordUnit); +printf(fontset == %d\n, fl_cntl.fontset); * Here, 'fl_cntl.fontset' is the intended 'navigation key', right? Then, why do I get the compile error in input.c such as input.c: In function `handle_key': input.c:1065: called object is not a function , where I put If(fl_cntl.fontset) activate_CJK_composition; I do not have compile error in xtext.c and xpopup.c, though. cghan
Re: CJK-LyX-1.2.3
Just ignore my previous messages. It was a false alarm. So with this, '-fontset' option turns on fl_cntl.fontset=1, right? cghan
Re: CJK-LyX-1.2.3
What does the print statement, above, print to console when you run? $ lyx -fontset It should be: fontset == 1 All is well, here. By the way, is there any 'noble' way of putting the option '-fontset' inside the CJK-LyX so that we don't have to turn this option on each time we load lyx ? With CJK-LyX, '-fontset' is not an option but a 'must', right? cghan
Re: CJK-LyX-1.2.3
You should set the xforms.Fontset option in your .Xdefaults file. (I think that the syntax is correct but am not too sure. Try. If successful, you'll get fontset == 1 I think that you need to restart X after changing .Xdefaults. Isn't it possible to make the end-users to just rpm install of CJK-LyX and then fire lyx to get the effect? I know there are some CJK-LyX users who think setting things in .Xdefaults or in .Xresources or wherever, too complicated. cghan
Re: CJK-LyX-1.2.3
On Mon, 24 Feb 2003, Angus Leeming wrote: Wow! You could supply them with a shell-script wrapper: $ cat cjklyx #! /bin/sh if [ $# = 0 ]; then lyx -fontset elif (echo $* | grep '[-]fontset' /dev/null); then lyx $@ else lyx -fontset $@ fi Angus, you should know that there are some linux users who even do not read README. To them, this shell script cannot be the answer. Well, I think I can go with 'lyx -fontset'. In fact, with the kde or gnome desktop setting, this is not so bad, for you can create an application icon which execute 'lyx -fontset'. Attached is the new patch. If you do not have any objection, I will release CJK-LyX-1.3.0 along with the patched xforms-lib, tomorrow. Nicely done, Angus. cghan diff -urdN xforms-1.0-release/Imakefile xforms-1.0-i18n/Imakefile --- xforms-1.0-release/Imakefile2002-12-04 02:25:43.0 +0900 +++ xforms-1.0-i18n/Imakefile 2003-02-24 09:48:16.0 +0900 @@ -100,7 +100,7 @@ image \ $(GL) \ fdesign \ - fd2ps \ + fd2ps \ $(DEMOS) IMAKE_DEFINES = \ diff -urdN xforms-1.0-release/diff xforms-1.0-i18n/diff --- xforms-1.0-release/diff 1970-01-01 09:00:00.0 +0900 +++ xforms-1.0-i18n/diff2003-02-25 09:21:04.0 +0900 @@ -0,0 +1,4 @@ +1490c1490 + if(use_fontset()) { +--- + if(fl_cntl.fontset) { diff -urdN xforms-1.0-release/lib/flinternal.h xforms-1.0-i18n/lib/flinternal.h --- xforms-1.0-release/lib/flinternal.h 2002-05-21 04:38:39.0 +0900 +++ xforms-1.0-i18n/lib/flinternal.h2003-02-24 09:53:46.0 +0900 @@ -226,6 +226,10 @@ extern void fl_dump_state_info(int, const char *); extern void fl_init_stipples(void); +/* XFontSet loading */ + +extern int use_fontset(void); + /* for fdesign */ const char *fl_query_colorname(FL_COLOR); extern long fl_query_namedcolor(const char *s); @@ -411,10 +415,8 @@ int tooltip_time; #ifdef XlibSpecificationRelease XIMxim ;/* input method */ -XICxic ;/* input context */ #else void *xim; -void *xic; #endif unsigned int navigate_mask; /* input field */ long reserverd[6]; @@ -490,6 +492,7 @@ #define IsEnd(k) (k==XK_End || k==XK_KP_End) #define IsPageDown(k) (k==XK_Next || k==XK_Page_Down || k==XK_KP_Page_Down) #define IsPageUp(k)(k==XK_Prior || k==XK_Page_Up || k==XK_KP_Page_Up) +#define IsReturn(k)(k==XK_Return || k==XK_KP_Enter) #else #define IsHome(k) (k==XK_Home || k== XK_Begin) #define IsLeft(k) (k==XK_Left) @@ -499,6 +502,7 @@ #define IsEnd(k) (k==XK_End) #define IsPageDown(k) (k==XK_Next) #define IsPageUp(k)(k==XK_Prior) +#define IsReturn(k)(k==XK_Return) #endif #define FL_HALFPAGE_UP 0x1000 @@ -514,6 +518,15 @@ #define Is1LineUp(k) ((k)==FL_1LINE_UP) #define Is1LineDown(k)((k)==FL_1LINE_DOWN) +#define IsFLCursorKey(k) (IsHome(k) || IsLeft(k) || \ + IsRight(k)|| IsUp(k) || \ + IsDown(k) || IsEnd(k)|| \ + IsPageDown(k) || IsPageUp(k) || \ + IsReturn(k) || IsHalfPageUp(k) || \ + IsHalfPageDown(k) || IsNLinesUp(k) || \ + IsNLinesDown(k) || Is1LineUp(k)|| \ + Is1LineDown(k)) + extern int fl_convert_shortcut(const char *, long *); extern int fl_get_underline_pos(const char *, const char *); diff -urdN xforms-1.0-release/lib/flresource.c xforms-1.0-i18n/lib/flresource.c --- xforms-1.0-release/lib/flresource.c 2002-06-02 07:09:37.0 +0900 +++ xforms-1.0-i18n/lib/flresource.c2003-02-25 09:17:13.0 +0900 @@ -48,7 +48,6 @@ /* used to have other uses, currently does almost nothing */ extern int fl_check_it(const char *); - static XrmDatabase fldatabase; /* final merged database */ static XrmDatabase cmddb; /* command line database */ static char *fl_app_name, *fl_app_class, *fl_ori_app_name; @@ -81,7 +80,8 @@ #endif /*{-single, *doubleBuffer, XrmoptionNoArg, (caddr_t) 0}, */ -{-bs, *backingStore, XrmoptionNoArg, (caddr_t) 0} +{-bs, *backingStore, XrmoptionNoArg, (caddr_t) 0}, +{-fontset, *fontset, XrmoptionNoArg, (caddr_t) 1} }; #define Ncopt (sizeof(copt)/sizeof(copt[0])) @@ -99,6 +99,7 @@ static Bop OpPrivateMap, OpSharedMap, OpStandardMap, OpDouble; static Bop OpSync, OpULW = 1; static Iop OpDebug, OpDepth, OpULT = -1; +static Bop OpFontset; static char OpBS[12] = 1;/* whenmapped */ static char OpSafe[12]; static char OpSCBT[16] = thin; @@ -142,7 +143,8 @@ { SetR(debug, Debug, FL_INT, OpDebug, 0), SetR(sync, Sync, FL_BOOL, OpSync, 0), - +SetR(fontset, Fontset, FL_BOOL, OpFontset, 0), + #ifdef DO_GAMMA_CORRECTION
Re: CJK-LyX-1.2.3
Angus, there seems something seriously wrong in your new code of '-fontset'. I have had two kinds of problems. 1. After loading your 'trial' widget without '-fontset' option, my X-Window behaves abnormally. One of my xterms crashes without any reason, and even after stopping the 'trial' this abnormality continues and eventually the whole X-Window blacks out with the error sign of 'font-path init failure'. 2. This window crash occurs even with '-fontset' option on.The problem is a little bit milder than without '-fontset' option case, but eventually X-Window crashes in this case, too. All these crashes are repeatable. cghan
Re: CJK-LyX-1.2.3
On Mon, 24 Feb 2003, Angus Leeming wrote: > Ok I tested it with LANG == en_US.UTF-8 (Standard RH8 setup). > All is fine. > > Note, however, that I don't think that xforms should be clever about this. I know. The patch should fail where some non-standard locale setting is set. > This should be set by a flag passed to fl_initialize. Can you give me an example code to realize this? Please notice that I have to release CJK-LyX-1.3.0 tomorrow at the latest( I promised some CJK-LyX users to release CJK-LyX-1.3.0 early this week). > > +/* keysym == NoSymbol during multi-byte char composition. > > + Eg, I've typed Multi_key-a but not yet ' to give ? > > + Silently swallow these partial-compositions. */ > > +if (keysym == NoSymbol && kbuflen == 0) > > +return; > > CG, are you sure that this could not be simplified? I thought that you had > established that null keysyms should not be passed to the widgets at all? > if (keysym == NoSymbol) > return; Nope, composed CJK-chars have also keysym==0. So without extra kbuflen==0, all the composed CJK-chars will be swallowd here. cghan
Re: CJK-LyX-1.2.3
Please bear with me, Angus. I cannot understand a thing in your new code. But let me try. @@ -863,6 +866,7 @@ fl_cntl.vclass = fl_vclass_val(fl_cntl.vname); fl_cntl.coordUnit = fl_get_vn_value(vn_coordunit, OpCoordUnit); +printf("fontset == %d\n", fl_cntl.fontset); * Here, 'fl_cntl.fontset' is the intended 'navigation key', right? Then, why do I get the compile error in input.c such as " input.c: In function `handle_key': input.c:1065: called object is not a function " , where I put "If(fl_cntl.fontset) activate_CJK_composition; " I do not have compile error in xtext.c and xpopup.c, though. cghan
Re: CJK-LyX-1.2.3
Just ignore my previous messages. It was a false alarm. So with this, '-fontset' option turns on "fl_cntl.fontset=1", right? cghan
Re: CJK-LyX-1.2.3
> What does the print statement, above, print to console when you run? > $ lyx -fontset > It should be: > fontset == 1 All is well, here. By the way, is there any 'noble' way of putting the option '-fontset' inside the CJK-LyX so that we don't have to turn this option on each time we load lyx ? With CJK-LyX, '-fontset' is not an option but a 'must', right? cghan
Re: CJK-LyX-1.2.3
> You should set the xforms.Fontset option in your .Xdefaults file. (I think > that the syntax is correct but am not too sure. Try. If successful, you'll > get > fontset == 1 > > I think that you need to restart X after changing .Xdefaults. Isn't it possible to make the end-users to "just rpm install of CJK-LyX" and then fire "lyx" to get the effect? I know there are some CJK-LyX users who think setting things in .Xdefaults or in .Xresources or wherever, too complicated. cghan
Re: CJK-LyX-1.2.3
On Mon, 24 Feb 2003, Angus Leeming wrote: > Wow! > > You could supply them with a shell-script wrapper: > > $ cat cjklyx > #! /bin/sh > if [ $# = 0 ]; then > lyx -fontset > elif (echo $* | grep '[-]fontset' > /dev/null); then > lyx $@ > else > lyx -fontset $@ > fi > Angus, you should know that there are some linux users who even do not read README. To them, this shell script cannot be the answer. Well, I think I can go with 'lyx -fontset'. In fact, with the kde or gnome desktop setting, this is not so bad, for you can create an application icon which execute 'lyx -fontset'. Attached is the new patch. If you do not have any objection, I will release CJK-LyX-1.3.0 along with the patched xforms-lib, tomorrow. Nicely done, Angus. cghan diff -urdN xforms-1.0-release/Imakefile xforms-1.0-i18n/Imakefile --- xforms-1.0-release/Imakefile2002-12-04 02:25:43.0 +0900 +++ xforms-1.0-i18n/Imakefile 2003-02-24 09:48:16.0 +0900 @@ -100,7 +100,7 @@ image \ $(GL) \ fdesign \ - fd2ps \ + fd2ps \ $(DEMOS) IMAKE_DEFINES = \ diff -urdN xforms-1.0-release/diff xforms-1.0-i18n/diff --- xforms-1.0-release/diff 1970-01-01 09:00:00.0 +0900 +++ xforms-1.0-i18n/diff2003-02-25 09:21:04.0 +0900 @@ -0,0 +1,4 @@ +1490c1490 +< if(use_fontset()) { +--- +> if(fl_cntl.fontset) { diff -urdN xforms-1.0-release/lib/flinternal.h xforms-1.0-i18n/lib/flinternal.h --- xforms-1.0-release/lib/flinternal.h 2002-05-21 04:38:39.0 +0900 +++ xforms-1.0-i18n/lib/flinternal.h2003-02-24 09:53:46.0 +0900 @@ -226,6 +226,10 @@ extern void fl_dump_state_info(int, const char *); extern void fl_init_stipples(void); +/* XFontSet loading */ + +extern int use_fontset(void); + /* for fdesign */ const char *fl_query_colorname(FL_COLOR); extern long fl_query_namedcolor(const char *s); @@ -411,10 +415,8 @@ int tooltip_time; #ifdef XlibSpecificationRelease XIMxim ;/* input method */ -XICxic ;/* input context */ #else void *xim; -void *xic; #endif unsigned int navigate_mask; /* input field */ long reserverd[6]; @@ -490,6 +492,7 @@ #define IsEnd(k) (k==XK_End || k==XK_KP_End) #define IsPageDown(k) (k==XK_Next || k==XK_Page_Down || k==XK_KP_Page_Down) #define IsPageUp(k)(k==XK_Prior || k==XK_Page_Up || k==XK_KP_Page_Up) +#define IsReturn(k)(k==XK_Return || k==XK_KP_Enter) #else #define IsHome(k) (k==XK_Home || k== XK_Begin) #define IsLeft(k) (k==XK_Left) @@ -499,6 +502,7 @@ #define IsEnd(k) (k==XK_End) #define IsPageDown(k) (k==XK_Next) #define IsPageUp(k)(k==XK_Prior) +#define IsReturn(k)(k==XK_Return) #endif #define FL_HALFPAGE_UP 0x1000 @@ -514,6 +518,15 @@ #define Is1LineUp(k) ((k)==FL_1LINE_UP) #define Is1LineDown(k)((k)==FL_1LINE_DOWN) +#define IsFLCursorKey(k) (IsHome(k) || IsLeft(k) || \ + IsRight(k)|| IsUp(k) || \ + IsDown(k) || IsEnd(k)|| \ + IsPageDown(k) || IsPageUp(k) || \ + IsReturn(k) || IsHalfPageUp(k) || \ + IsHalfPageDown(k) || IsNLinesUp(k) || \ + IsNLinesDown(k) || Is1LineUp(k)|| \ + Is1LineDown(k)) + extern int fl_convert_shortcut(const char *, long *); extern int fl_get_underline_pos(const char *, const char *); diff -urdN xforms-1.0-release/lib/flresource.c xforms-1.0-i18n/lib/flresource.c --- xforms-1.0-release/lib/flresource.c 2002-06-02 07:09:37.0 +0900 +++ xforms-1.0-i18n/lib/flresource.c2003-02-25 09:17:13.0 +0900 @@ -48,7 +48,6 @@ /* used to have other uses, currently does almost nothing */ extern int fl_check_it(const char *); - static XrmDatabase fldatabase; /* final merged database */ static XrmDatabase cmddb; /* command line database */ static char *fl_app_name, *fl_app_class, *fl_ori_app_name; @@ -81,7 +80,8 @@ #endif /*{"-single", "*doubleBuffer", XrmoptionNoArg, (caddr_t) "0"}, */ -{"-bs", "*backingStore", XrmoptionNoArg, (caddr_t) "0"} +{"-bs", "*backingStore", XrmoptionNoArg, (caddr_t) "0"}, +{"-fontset", "*fontset", XrmoptionNoArg, (caddr_t) "1"} }; #define Ncopt (sizeof(copt)/sizeof(copt[0])) @@ -99,6 +99,7 @@ static Bop OpPrivateMap, OpSharedMap, OpStandardMap, OpDouble; static Bop OpSync, OpULW = "1"; static Iop OpDebug, OpDepth, OpULT = "-1"; +static Bop OpFontset; static char OpBS[12] = "1";/* whenmapped */ s
Re: CJK-LyX-1.2.3
Angus, there seems something seriously wrong in your new code of '-fontset'. I have had two kinds of problems. 1. After loading your 'trial' widget without '-fontset' option, my X-Window behaves abnormally. One of my xterms crashes without any reason, and even after stopping the 'trial' this abnormality continues and eventually the whole X-Window blacks out with the error sign of 'font-path init failure'. 2. This window crash occurs even with '-fontset' option on.The problem is a little bit milder than without '-fontset' option case, but eventually X-Window crashes in this case, too. All these crashes are repeatable. cghan
Re: Re: CJK input
On 23 Feb 2003 [EMAIL PROTECTED] wrote: Restart xfs in a mode suitable for both CJK and non-CJK environment if it is possible. Also try to install some TrueType font. For Korean, you can probably tell the URL where baekmuk font is available. For Japanese, try http://yozk.hp.infoseek.co.jp/another/YOzFont.ZIP Does this mean that to use our i18n-patched xforms lib, those with non-CJK environment should do all those hassles of installing TrueType fonts, and so on? This seems a bit unfair to them, then. By the way, in my machine with the TrueType fonts installed, I still have the same slowness problem as Angus machine suffers when loading i18n-xforms lib with locale set to 'C'. To remove the slowness what should I do? You can store XFontSet a.k.a. XOC (X Output Context) and reuse it globally. Right! Now the question is: Do we really need XFontSet? OK, Input Method needs one. And UI code in xforms source may need one, so your conversion of XDrawString = XmbDrawString in xforms source is a good move. But LyX may not need one. Admittedly, at present state, of the xforms frontend, you have to loop on a wchar string to be drawn and switch fonts if encountered with latin characters and numbers and then switch back later. I.e., you have to combine a CJK font and a ASCII font manually. But you are already doing similar thing for small cap emulation, right? And when LyX move to Unicode with XDrawString16 for XPainter, or if you are intending to port CJK-LyX to the Qt frontend, such kludge will no longer be necessary with ISO-10464 encoded fonts. You can remove CJK specific text drawing code as well as FontLoader code from your patch and the unification of CJK support gets nearer. My short knowledge prevents me from understanding fully what you are saying here, but do you mean we do not need XFontSet to port CJK-LyX to the Qt frontend? Regards, cghan
Re: CJK-LyX-1.2.3
On Fri, 21 Feb 2003, Angus Leeming wrote: Ok, CG. I tried it. xfs uses all my cpu. This is very wrong :-( Can you try things out with LANG=C or something 'normal'. This thing has to work for the rest of the world too, doesn't it? Well, I should have expected this kind of disaster sooner. See ? All I can do is 'beavering'(I like this word very much!), and I have to do another 'beavering' to solve this problem. My suggestion is to make all the changes XDrawString-XmbDrawString conditional. For example, I define a boolean variable, as extern bool use_fontset and then define char * loc = setlocale(LC_CTYPE,NULL); if (!loc || !strcmp(loc,C) || !strcmp(loc,POSIX) || !XSupportLocale()){ use_fontset = True; } else { use_fontset = False; } Then, make if(use_fontset) { XmbDrawString, XfontSet,... } else { original XDrawString, XFontStruct,... } By doing this, machines with non-CJK environment do not have to load the XFontSet which cause the slowness problem. Now my question is, Does this strategy work as intended ? If yes, then how can I implement this strategy ? I cannot even make if(use_fontset) correctly recognized (Poor me!) Can you help ? Regards, cghan
Re: CJK-LyX-1.2.3
Hello, Angus, Attached another of my 'beavering'. It works with 'LANG=C' environment here. Would you mind testing the patch in your environment ? If it fails, I'm sure that the 'if condition' of the new 'use_fontset()' defined at flresource.c, as *** extern int use_fontset() { char * loc = setlocale(LC_ALL, ); if (!loc || !strcmp(loc, C) || !strcmp(loc, POSIX) || !XSupportsLocale()) return 0; else return 1; } does not include your environment. If that is the case, would you mind telling me how I can make the condition as general as it can? Regards, cghan diff -urdN xforms-1.0-release/Imakefile xforms-1.0-i18n/Imakefile --- xforms-1.0-release/Imakefile2002-12-04 02:25:43.0 +0900 +++ xforms-1.0-i18n/Imakefile 2003-02-24 09:48:16.0 +0900 -100,7 +100,7 image \ $(GL) \ fdesign \ - fd2ps \ + fd2ps \ $(DEMOS) IMAKE_DEFINES = \ diff -urdN xforms-1.0-release/lib/flinternal.h xforms-1.0-i18n/lib/flinternal.h --- xforms-1.0-release/lib/flinternal.h 2002-05-21 04:38:39.0 +0900 +++ xforms-1.0-i18n/lib/flinternal.h2003-02-24 09:53:46.0 +0900 -226,6 +226,10 extern void fl_dump_state_info(int, const char *); extern void fl_init_stipples(void); +/* XFontSet loading */ + +extern int use_fontset(void); + /* for fdesign */ const char *fl_query_colorname(FL_COLOR); extern long fl_query_namedcolor(const char *s); -411,10 +415,8 int tooltip_time; #ifdef XlibSpecificationRelease XIMxim ;/* input method */ -XICxic ;/* input context */ #else void *xim; -void *xic; #endif unsigned int navigate_mask; /* input field */ long reserverd[6]; -490,6 +492,7 #define IsEnd(k) (k==XK_End || k==XK_KP_End) #define IsPageDown(k) (k==XK_Next || k==XK_Page_Down || k==XK_KP_Page_Down) #define IsPageUp(k)(k==XK_Prior || k==XK_Page_Up || k==XK_KP_Page_Up) +#define IsReturn(k)(k==XK_Return || k==XK_KP_Enter) #else #define IsHome(k) (k==XK_Home || k== XK_Begin) #define IsLeft(k) (k==XK_Left) -499,6 +502,7 #define IsEnd(k) (k==XK_End) #define IsPageDown(k) (k==XK_Next) #define IsPageUp(k)(k==XK_Prior) +#define IsReturn(k)(k==XK_Return) #endif #define FL_HALFPAGE_UP 0x1000 -514,6 +518,15 #define Is1LineUp(k) ((k)==FL_1LINE_UP) #define Is1LineDown(k)((k)==FL_1LINE_DOWN) +#define IsFLCursorKey(k) (IsHome(k) || IsLeft(k) || \ + IsRight(k)|| IsUp(k) || \ + IsDown(k) || IsEnd(k)|| \ + IsPageDown(k) || IsPageUp(k) || \ + IsReturn(k) || IsHalfPageUp(k) || \ + IsHalfPageDown(k) || IsNLinesUp(k) || \ + IsNLinesDown(k) || Is1LineUp(k)|| \ + Is1LineDown(k)) + extern int fl_convert_shortcut(const char *, long *); extern int fl_get_underline_pos(const char *, const char *); diff -urdN xforms-1.0-release/lib/flresource.c xforms-1.0-i18n/lib/flresource.c --- xforms-1.0-release/lib/flresource.c 2002-06-02 07:09:37.0 +0900 +++ xforms-1.0-i18n/lib/flresource.c2003-02-24 09:51:00.0 +0900 -48,7 +48,7 /* used to have other uses, currently does almost nothing */ extern int fl_check_it(const char *); - +extern int use_fontset(void); static XrmDatabase fldatabase; /* final merged database */ static XrmDatabase cmddb; /* command line database */ static char *fl_app_name, *fl_app_class, *fl_ori_app_name; -952,16 +952,9 { XSetLocaleModifiers(); /* use the same input method throughout xforms */ -fl_context-xim = XOpenIM(fl_display, 0, 0, 0); -/* also use the same input context */ -if (fl_context-xim) -{ -int style = XIMPreeditNothing|XIMStatusNothing; -fl_context-xic = XCreateIC(fl_context-xim, - XNInputStyle, style, - 0); -} + fl_context-xim = XOpenIM(fl_display, 0, 0, 0); } + #endif fl_default_xswa(); fl_init_stipples(); -1037,6 +1030,17 return fl_display; } +/* XFontSet loading */ + +extern int +use_fontset() +{ + char * loc = setlocale(LC_ALL, ); + +if (!loc || !strcmp(loc, C) || !strcmp(loc, POSIX) || !XSupportsLocale()) return 0; +else return 1; +} + /* * Find out about virtual root. Taken from XFaq */ diff -urdN xforms-1.0-release/lib/forms.c xforms-1.0-i18n/lib/forms.c --- xforms-1.0-release/lib/forms.c 2002-11-20 06:06:43.0 +0900 +++ xforms-1.0-i18n/lib/forms.c 2003-02-24 09:48:16.0 +0900
Re: CJK input
On 24 Feb 2003 [EMAIL PROTECTED] wrote: No. QFont is *supposed* to perform all the necessary dirty works. Does this mean QFont is a unicode font ? If this is the case, what should be done to port CJK-LyX to Qt-lib ? Regards, cghan
Re: CJK-LyX-1.2.3
Hello, Angus, On Sun, 23 Feb 2003, Angus Leeming wrote: Attached another of my 'beavering'. It works with 'LANG=C' environment here. Would you mind testing the patch in your environment ? Ok. If it works for your environment, I better leave it as it is. O.K. ? Have you got the time to think about putting the 'XNextEvents' into xforms? With this one completed, I think out patched xforms-lib is for prime-time. Even without this 'XNextEvents', it will be enough for CJK-LyX-1.3.0. Any comments? Regards, cghan
Re: Re: CJK input
On 23 Feb 2003 [EMAIL PROTECTED] wrote: > > Restart xfs in a mode suitable for both CJK and non-CJK environment > if it is possible. Also try to install some TrueType font. > For Korean, you can probably tell the URL where baekmuk font > is available. For Japanese, try > http://yozk.hp.infoseek.co.jp/another/YOzFont.ZIP Does this mean that to use our i18n-patched xforms lib, those with non-CJK environment should do all those hassles of installing TrueType fonts, and so on? This seems a bit unfair to them, then. By the way, in my machine with the TrueType fonts installed, I still have the same slowness problem as Angus machine suffers when loading i18n-xforms lib with locale set to 'C'. To remove the slowness what should I do? > > You can store XFontSet a.k.a. XOC (X Output Context) and reuse > it globally. > Right! > Now the question is: > Do we really need XFontSet? OK, Input Method needs one. > And UI code in xforms source may need one, so your conversion > of XDrawString => XmbDrawString in xforms source is a good move. > But LyX may not need one. Admittedly, at present state, > of the xforms frontend, you have to loop on a wchar string to > be drawn and switch fonts if encountered with latin characters > and numbers and then switch back later. I.e., you have to > combine a CJK font and a ASCII font manually. But you are > already doing similar thing for small cap emulation, right? > And when LyX move to Unicode with XDrawString16 for XPainter, > or if you are intending to port CJK-LyX to the Qt frontend, > such kludge will no longer be necessary with ISO-10464 encoded > fonts. You can remove CJK specific text drawing code as well > as FontLoader code from your patch and the unification of > CJK support gets nearer. > My short knowledge prevents me from understanding fully what you are saying here, but do you mean we do not need XFontSet to port CJK-LyX to the Qt frontend? Regards, cghan
Re: CJK-LyX-1.2.3
On Fri, 21 Feb 2003, Angus Leeming wrote: > Ok, CG. I tried it. xfs uses all my cpu. This is very wrong :-( Can you try > things out with LANG=C or something 'normal'. This thing has to work for > the rest of the world too, doesn't it? Well, I should have expected this kind of disaster sooner. See ? All I can do is 'beavering'(I like this word very much!), and I have to do another 'beavering' to solve this problem. My suggestion is to make all the changes "XDrawString->XmbDrawString" conditional. For example, I define a boolean variable, as "extern bool use_fontset" and then define "char * loc = setlocale(LC_CTYPE,NULL); if (!loc || !strcmp(loc,"C") || !strcmp(loc,"POSIX") || !XSupportLocale()){ use_fontset = True; } else { use_fontset = False; } " Then, make "if(use_fontset) { XmbDrawString, XfontSet,... } else { original XDrawString, XFontStruct,... } " By doing this, machines with non-CJK environment do not have to load the XFontSet which cause the slowness problem. Now my question is, "Does this strategy work as intended ?" If yes, then how can I implement this strategy ? I cannot even make "if(use_fontset)" correctly recognized (Poor me!) Can you help ? Regards, cghan
Re: CJK-LyX-1.2.3
Hello, Angus, Attached another of my 'beavering'. It works with 'LANG=C' environment here. Would you mind testing the patch in your environment ? If it fails, I'm sure that the 'if condition' of the new 'use_fontset()' defined at flresource.c, as *** extern int use_fontset() { char * loc = setlocale(LC_ALL, ""); if (!loc || !strcmp(loc, "C") || !strcmp(loc, "POSIX") || !XSupportsLocale()) return 0; else return 1; } does not include your environment. If that is the case, would you mind telling me how I can make the condition as general as it can? Regards, cghan diff -urdN xforms-1.0-release/Imakefile xforms-1.0-i18n/Imakefile --- xforms-1.0-release/Imakefile2002-12-04 02:25:43.0 +0900 +++ xforms-1.0-i18n/Imakefile 2003-02-24 09:48:16.0 +0900 @@ -100,7 +100,7 @@ image \ $(GL) \ fdesign \ - fd2ps \ + fd2ps \ $(DEMOS) IMAKE_DEFINES = \ diff -urdN xforms-1.0-release/lib/flinternal.h xforms-1.0-i18n/lib/flinternal.h --- xforms-1.0-release/lib/flinternal.h 2002-05-21 04:38:39.0 +0900 +++ xforms-1.0-i18n/lib/flinternal.h2003-02-24 09:53:46.0 +0900 @@ -226,6 +226,10 @@ extern void fl_dump_state_info(int, const char *); extern void fl_init_stipples(void); +/* XFontSet loading */ + +extern int use_fontset(void); + /* for fdesign */ const char *fl_query_colorname(FL_COLOR); extern long fl_query_namedcolor(const char *s); @@ -411,10 +415,8 @@ int tooltip_time; #ifdef XlibSpecificationRelease XIMxim ;/* input method */ -XICxic ;/* input context */ #else void *xim; -void *xic; #endif unsigned int navigate_mask; /* input field */ long reserverd[6]; @@ -490,6 +492,7 @@ #define IsEnd(k) (k==XK_End || k==XK_KP_End) #define IsPageDown(k) (k==XK_Next || k==XK_Page_Down || k==XK_KP_Page_Down) #define IsPageUp(k)(k==XK_Prior || k==XK_Page_Up || k==XK_KP_Page_Up) +#define IsReturn(k)(k==XK_Return || k==XK_KP_Enter) #else #define IsHome(k) (k==XK_Home || k== XK_Begin) #define IsLeft(k) (k==XK_Left) @@ -499,6 +502,7 @@ #define IsEnd(k) (k==XK_End) #define IsPageDown(k) (k==XK_Next) #define IsPageUp(k)(k==XK_Prior) +#define IsReturn(k)(k==XK_Return) #endif #define FL_HALFPAGE_UP 0x1000 @@ -514,6 +518,15 @@ #define Is1LineUp(k) ((k)==FL_1LINE_UP) #define Is1LineDown(k)((k)==FL_1LINE_DOWN) +#define IsFLCursorKey(k) (IsHome(k) || IsLeft(k) || \ + IsRight(k)|| IsUp(k) || \ + IsDown(k) || IsEnd(k)|| \ + IsPageDown(k) || IsPageUp(k) || \ + IsReturn(k) || IsHalfPageUp(k) || \ + IsHalfPageDown(k) || IsNLinesUp(k) || \ + IsNLinesDown(k) || Is1LineUp(k)|| \ + Is1LineDown(k)) + extern int fl_convert_shortcut(const char *, long *); extern int fl_get_underline_pos(const char *, const char *); diff -urdN xforms-1.0-release/lib/flresource.c xforms-1.0-i18n/lib/flresource.c --- xforms-1.0-release/lib/flresource.c 2002-06-02 07:09:37.0 +0900 +++ xforms-1.0-i18n/lib/flresource.c2003-02-24 09:51:00.0 +0900 @@ -48,7 +48,7 @@ /* used to have other uses, currently does almost nothing */ extern int fl_check_it(const char *); - +extern int use_fontset(void); static XrmDatabase fldatabase; /* final merged database */ static XrmDatabase cmddb; /* command line database */ static char *fl_app_name, *fl_app_class, *fl_ori_app_name; @@ -952,16 +952,9 @@ { XSetLocaleModifiers(""); /* use the same input method throughout xforms */ -fl_context->xim = XOpenIM(fl_display, 0, 0, 0); -/* also use the same input context */ -if (fl_context->xim) -{ -int style = XIMPreeditNothing|XIMStatusNothing; -fl_context->xic = XCreateIC(fl_context->xim, - XNInputStyle, style, - 0); -} + fl_context->xim = XOpenIM(fl_display, 0, 0, 0); } + #endif fl_default_xswa(); fl_init_stipples(); @@ -1037,6 +1030,17 @@ return fl_display; } +/* XFontSet loading */ + +extern int +use_fontset() +{ + char * loc = setlocale(LC_ALL, ""); + +if (!loc || !strcmp(loc, "C") || !strcmp(loc, "POSIX") || !XSupportsLocale()) return 0; +else return 1; +} + /* * Find out about virtual root. Taken from XFaq */ diff -urdN xforms-1.0-release/lib/forms.c xforms-1.0-i18n/lib/forms.c -
Re: CJK input
On 24 Feb 2003 [EMAIL PROTECTED] wrote: > > > No. QFont is *supposed* to perform all the necessary dirty works. > Does this mean QFont is a unicode font ? If this is the case, what should be done to port CJK-LyX to Qt-lib ? Regards, cghan
Re: CJK-LyX-1.2.3
Hello, Angus, On Sun, 23 Feb 2003, Angus Leeming wrote: > > Attached another of my 'beavering'. It works with 'LANG=C' > environment > here. Would you mind testing the patch in your > environment ? > > Ok. > If it works for your environment, I better leave it as it is. O.K. ? Have you got the time to think about putting the 'XNextEvents' into xforms? With this one completed, I think out patched xforms-lib is for prime-time. Even without this 'XNextEvents', it will be enough for CJK-LyX-1.3.0. Any comments? Regards, cghan
Re: CJK input
On Sat, 22 Feb 2003, Shigeru Miyata wrote: I guess you are trying to scale a bitmap font. On my machine with Pentium 75MHz and 80MB RAM, it can take several minutes just to load a single Japanese font if it is a BDF and the requested size differ from the original one. Scaling a TrueType font is much faster (a few seconds). Also check if your font server supports deferglyphs option or something similar. With deferglyphs option turned on, a CJK font is internally divided into dozens of chunks each contains 256 or so glyphs and only the required pieces are loaded, while without this option all glyphs in the font are loaded once when the font is opened. Hm... I see. Then what can be your suggestion to resolve the problem, Miyata ? Remember that the environment setting in Angus machine should be quite standard with western locale. I also would like to point out that my implementation on XDrawString - XmbDrawString is very incomplete, and this might be another cause of the problem. To introduce XmbDrawString, I adopted the minimal way. That is, wherever I need to change XDrawString-XmbDrawString, I introduce XFontSet with XCreateFontSet, by not touching any part in lib/fonts.c in xforms source. So it is not a complete i18n, but a little bit of emulating it, isn't it? Do you have any comments, or suggestion? Regards, cghan
Re: CJK input
On Sat, 22 Feb 2003, Shigeru Miyata wrote: > I guess you are trying to scale a bitmap font. On my machine with > Pentium 75MHz > and 80MB RAM, it can take several minutes just to load a single Japanese > font > if it is a BDF and the requested size differ from the original one. > Scaling a > TrueType font is much faster (a few seconds). > Also check if your font server supports deferglyphs option or something > similar. > With deferglyphs option turned on, a CJK font is internally divided into > dozens > of chunks each contains 256 or so glyphs and only the required pieces > are loaded, > while without this option all glyphs in the font are loaded once when > the font > is opened. Hm... I see. Then what can be your suggestion to resolve the problem, Miyata ? Remember that the environment setting in Angus machine should be quite standard with western locale. I also would like to point out that my implementation on XDrawString -> XmbDrawString is very incomplete, and this might be another cause of the problem. To introduce XmbDrawString, I adopted the minimal way. That is, wherever I need to change XDrawString->XmbDrawString, I introduce XFontSet with XCreateFontSet, by not touching any part in lib/fonts.c in xforms source. So it is not a complete i18n, but a little bit of emulating it, isn't it? Do you have any comments, or suggestion? Regards, cghan
Re: CJK-LyX-1.2.3
Hello, Angus: I have made some interesting observations regarding to the swallowing of the first CJK-chars on the Edit-FindSearch box. The 'draw_char' in input.c starts with the block, if (sp-endrange = 0) { delete_piece(ob, sp-beginrange, sp-endrange - 1); slen = strlen(sp-str); } and 'delete_piece(...)' is defined as static void delete_piece(FL_OBJECT * ob, register int start, register int end) { register SPEC *sp = ob-spec; register int i = 0; do { i++; sp-str[start + i - 1] = sp-str[end + i]; } while (sp-str[end + i] != '\0'); sp-position = start; sp-lines = fl_get_input_numberoflines(ob); fl_get_input_cursorpos(ob, sp-xpos, sp-ypos); } The first interesting fact is that no signal from the keyboard enters the first block of 'draw_char' EXCEPT it is the first input from the keyboard to Edit-Find... widget. I mean No signal enters this block(whether it is the first one or not) when we are on any other xforms widget. When closely looking at it on Edit-Find... widget, I found that one signal enters the block when the first key is English character such as 'a' or 'A' or 'space', etc, while two signals enter successively the block when the first key is the precomposed one CJK-char. In the latter case(CJK-char case) the 'space' signal bypasses the block. The second interesting fact is that unknowing why 'sp-position = start;' line in 'delete_piece()' is there, I removed that line, and Bang the 'swallowing problem went away. I found no problem with this hack so far. Can you justify this hack, or give me any other idea? Regards, cghan P.S. I am waiting for your comments or suggestion regarding the xfoms-1.0-i18n.patch I sent you yesterday.
Re: CJK-LyX-1.2.3
On Fri, 21 Feb 2003, Angus Leeming wrote: It looks to me that this piece of code is meant to remove highlighted text. Somethink like, mark a block of text with the cursor key and press any key. The highlighted block is replaced by your key. Yes, I just confirmed your guess. What happens to the beginrange, endrange values when you mark text? When I mark the text, no signal enters the draw_char. However after marking the text, pressing any key entres the block and in this case, sp-beginrange=0, sp-endrange 0 are obtained. This being the case, it doesn't anwser WHY the block is entered in your case. Is endcase not initialised to zero when the input widget is created? I have no idea. But on other xform widget, all the sigals(the first or the subsequent ones) have, beginrange = 0, endrange = -1 In Edit-Find... widget, the first signal(whether it is ascii letter 'a', or CJK-char) has beginrange = 0, endrange = 0. This being the case, the English letter is not swallowed. Even on this widget, all the subsequent signals have beginrange = 0, endramge = -1. Sounds like something is not initialised, doesn't it. Ya, I feel strongly so. Sure. I've been busy too ;-) It looks fine but I haven't tried it out yet. The last time I did so, I found that my font server started consuming 100% of CPU. Have you any idea why? My apology if I push you too much on this. cghan
Re: CJK-LyX-1.2.3
In Edit-Find... widget, the first signal(whether it is ascii letter 'a', or CJK-char) has beginrange = 0, endrange = 0. This being the case, the English letter is not swallowed. Even on this widget, all the subsequent signals have beginrange = 0, endramge = -1. Based on these facts, how about making if(sp-endrange 0) instead of is(sp-endrange = 0) ? cghan
Re: CJK-LyX-1.2.3
Hello, Angus: I have made some interesting observations regarding to the "swallowing" of the first CJK-chars on the "Edit->Find" box. The 'draw_char' in input.c starts with the block, "if (sp->endrange >= 0) { delete_piece(ob, sp->beginrange, sp->endrange - 1); slen = strlen(sp->str); }" and 'delete_piece(...)' is defined as "static void delete_piece(FL_OBJECT * ob, register int start, register int end) { register SPEC *sp = ob->spec; register int i = 0; do { i++; sp->str[start + i - 1] = sp->str[end + i]; } while (sp->str[end + i] != '\0'); sp->position = start; sp->lines = fl_get_input_numberoflines(ob); fl_get_input_cursorpos(ob, >xpos, >ypos); }" The first interesting fact is that no signal from the keyboard enters the first block of 'draw_char' EXCEPT it is the first input from the keyboard to "Edit->Find..." widget. I mean No signal enters this block(whether it is the first one or not) when we are on any other xforms widget. When closely looking at it on "Edit->Find..." widget, I found that one signal enters the block when the first key is English character such as 'a' or 'A' or 'space', etc, while two signals enter successively the block when the first key is the precomposed one CJK-char. In the latter case(CJK-char case) the 'space' signal bypasses the block. The second interesting fact is that unknowing why 'sp->position = start;' line in 'delete_piece()' is there, I removed that line, and "Bang" the 'swallowing" problem went away. I found no problem with this hack so far. Can you justify this hack, or give me any other idea? Regards, cghan P.S. I am waiting for your comments or suggestion regarding the xfoms-1.0-i18n.patch I sent you yesterday.
Re: CJK-LyX-1.2.3
On Fri, 21 Feb 2003, Angus Leeming wrote: > > It looks to me that this piece of code is meant to remove highlighted text. > Somethink like, mark a block of text with the cursor key and press any key. > The highlighted block is replaced by your key. > Yes, I just confirmed your guess. > What happens to the beginrange, endrange values when you mark text? > When I mark the text, no signal enters the draw_char. However after marking the text, pressing any key entres the block and in this case, "sp->beginrange=0, sp->endrange > 0" are obtained. > This being the case, it doesn't anwser WHY the block is entered in your > case. Is endcase not initialised to zero when the input widget is created? I have no idea. But on other xform widget, all the sigals(the first or the subsequent ones) have, "beginrange = 0, endrange = -1" In "Edit->Find..." widget, the first signal(whether it is ascii letter 'a', or CJK-char) has "beginrange = 0, endrange = 0". This being the case, the English letter is not swallowed. Even on this widget, all the subsequent signals have "beginrange = 0, endramge = -1". > Sounds like something is not initialised, doesn't it. > Ya, I feel strongly so. > Sure. I've been busy too ;-) > It looks fine but I haven't tried it out yet. The last time I did so, I > found that my font server started consuming 100% of CPU. Have you any idea > why? > My apology if I push you too much on this. cghan
Re: CJK-LyX-1.2.3
> In "Edit->Find..." widget, the first signal(whether it is ascii letter > 'a', or CJK-char) has > "beginrange = 0, endrange = 0". This being the case, the English letter is > not swallowed. > Even on this widget, all the subsequent signals have > "beginrange = 0, endramge = -1". Based on these facts, how about making "if(sp->endrange > 0)" instead of "is(sp->endrange >= 0)" ? cghan
Error in compiling in xforms/forms dir
Hello, In lyx-1.3.0, I added a form in form_preferences.fd and made corresponding changes in form_preferences.[hC] and also in xforms/FormPreferences.[hC]. But when compiling, 0 size form_preferences.C is produced which leads to several errors in the final linking stage. form_preferences.h is O.K. Can anybody tell me what are the possible mistakes I made? Regards, cghan
Re: Error in compiling in xforms/forms dir
Hello, Angus; On Thu, 20 Feb 2003, Angus Leeming wrote: Usually it makes it easier to diagnose if you send the offending file too... However, in this particular case I suspect the problem occurs because you have added #if ... #endif statements to form_preferences.fd. fdesign does not recognise them and exits. So, the solution (as I have told you in the past) is to remove them. The automatic dialog generation process will create form_preferences.[Ch] with this extra dialog. There is no #if...#endif statement in form_preferences.fd. In fact, this fd file is what you sent me the other day. Thereafter, add your #if ... #endif statements to FormPreferences.C and only CJK-LyX will actually build the new tab. Yes, This is done, too, but still I have zero size.C file. Attached is form_preferences.fd file I used. cghan P.S. My mail returned yesterday and I suspect you have not got my mail yet, today. In case you have not, I'll send it again, this time ccing lyx-devel, too. Magic: 13000 Internal Form Definition File (do not change) Number of forms: 15 Unit of measure: FL_COORD_PIXEL SnapGrid: 5 === FORM === Name: form_preferences Width: 470 Height: 500 Number of Objects: 8 class: FL_BOX type: UP_BOX box: 0 0 470 500 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: class: FL_TABFOLDER type: TOP_TABFOLDER box: 5 10 455 375 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: tabfolder_prefs callback: argument: class: FL_BUTTON type: NORMAL_BUTTON box: 5 390 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Restore|#R shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_restore callback: C_FormBaseRestoreCB argument: 0 class: FL_BUTTON type: RETURN_BUTTON box: 170 390 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Save shortcut: ^M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_ok callback: C_FormBaseOKCB argument: 0 class: FL_BUTTON type: NORMAL_BUTTON box: 270 390 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Apply|#A shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_apply callback: C_FormBaseApplyCB argument: 0 class: FL_BUTTON type: NORMAL_BUTTON box: 370 390 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Cancel|^[ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_close callback: C_FormBaseCancelCB argument: 0 class: FL_FRAME type: ENGRAVED_FRAME box: 0 425 470 1 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: class: FL_TEXT type: NORMAL_TEXT box: 5 430 460 70 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: text_warning callback: argument: === FORM === Name: form_preferences_inner_tab Width: 455 Height: 375 Number of Objects: 2 class: FL_BOX type: FLAT_BOX box: 0 0 455 375 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: class: FL_TABFOLDER type: TOP_TABFOLDER box: 0 0 455 375 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: tabfolder_inner callback: argument: === FORM === Name: form_preferences_cjk_fonts Width: 455 Height: 375 Number
Re: CJK-LyX-1.2.3
Hello, Angus; my mail failed to reach you yesterday. The internet mail delivery system seems unstable recently. On Tue, 18 Feb 2003, Angus Leeming wrote: (a) the first widget in both windows overwrite the 'X' or (b) only the first widget of the first dialog? I ask because if you get result (a), then that suggests that the problem lies with the initialisation of the XIC. If you get result (b), then the problem must lie with some static variable in the xforms library. I found that ONLY 'Edit-FindSearch' widget has the problem. Your genuine xforms-widget(trial.C) does not have the problem. So I think the problem lies not on the xforms, but on the source code of the widget. Where is the source code of the 'Edit-...' widget? That's a good questiion which you may know the answer to, no? So I cleaned up a little bit and made the patch against clean xforms-1.0, which I attached on this mail. I hope you lok at the patch and polish it as much as possible, and then send it back to me as soon as possible. Because the CJK-LyX-1.3.0 critically depends on the patched xforms, I have to make both of them(CJK-LyX-1.3.0 and the patched xforms-lib) available at the time of the announcement of CJK-LyX-1.3.0. For the i18n of xforms, I also have attached a slightly modified trial.C to this mail. If you look at the file, you will find the modified function, 'XNextEvents' is added to it. Without this function added, I cannot input CJK-chars on your 'trial' widget. This means to make the xforms-lib i18n, this modified 'XNextEvents' must be added to the lib, which I hope you can give a hand. The job is not urgent, though, forthis 'XNextEvents' function is a part of lyxim.C, and thus without this function added to the lib, CJK-LyX will have no problem. Regards, cghan diff -urdN xforms-1.0-release/Imakefile xforms-1.0-i18n/Imakefile --- xforms-1.0-release/Imakefile2002-12-04 02:25:43.0 +0900 +++ xforms-1.0-i18n/Imakefile 2003-02-20 21:42:27.0 +0900 @@ -100,7 +100,7 @@ image \ $(GL) \ fdesign \ - fd2ps \ + fd2ps \ $(DEMOS) IMAKE_DEFINES = \ diff -urdN xforms-1.0-release/X11/X11/forms.h xforms-1.0-i18n/X11/X11/forms.h --- xforms-1.0-release/X11/X11/forms.h 2002-06-07 04:05:48.0 +0900 +++ xforms-1.0-i18n/X11/X11/forms.h 2003-02-20 21:42:27.0 +0900 @@ -729,6 +729,11 @@ void (*pre_attach)(struct forms_ *); void *attach_data; int no_tooltip; +#ifdef XlibSpecificationRelease +XICxic ;/* input context */ +#else +void *xic; +#endif int reserved[10]; /* future use */ } FL_FORM; @@ -987,6 +992,10 @@ FL_FORMCALLBACKPTR callback, void *d ); +FL_EXPORT void fl_get_composed_string( + int * ptr_kbuflen, + char const ** ptr_keybuf + ); #define fl_set_form_call_backfl_set_form_callback @@ -1409,7 +1418,6 @@ int *height ); - #define fl_get_string_size fl_get_string_dimension FL_EXPORT void fl_get_align_xy( @@ -5518,6 +5526,11 @@ FL_OBJECT *ob ); +FL_EXPORT void fl_get_CJK_offset( + FL_OBJECT *ob, + int * x, + int * y + ); FL_EXPORT int fl_get_menu( FL_OBJECT *ob diff -urdN xforms-1.0-release/exports/include/X11/forms.h xforms-1.0-i18n/exports/include/X11/forms.h --- xforms-1.0-release/exports/include/X11/forms.h 2002-06-07 04:05:48.0 +0900 +++ xforms-1.0-i18n/exports/include/X11/forms.h 2003-02-20 21:42:27.0 +0900 @@ -729,6 +729,11 @@ void (*pre_attach)(struct forms_ *); void *attach_data; int no_tooltip; +#ifdef XlibSpecificationRelease +XICxic ;/* input context */ +#else +void *xic; +#endif int reserved[10]; /* future use */ } FL_FORM; @@ -987,6 +992,10 @@ FL_FORMCALLBACKPTR callback, void *d ); +FL_EXPORT void fl_get_composed_string( + int * ptr_kbuflen, + char const ** ptr_keybuf + ); #define fl_set_form_call_backfl_set_form_callback @@ -1409,7 +1418,6 @@ int *height ); - #define fl_get_string_size fl_get_string_dimension FL_EXPORT void fl_get_align_xy( @@ -5518,6 +5526,11 @@ FL_OBJECT *ob ); +FL_EXPORT void fl_get_CJK_offset( + FL_OBJECT *ob, + int * x, + int * y + ); FL_EXPORT int fl_get_menu( FL_OBJECT *ob diff -urdN xforms-1.0-release/lib/X11/X11/forms.h xforms-1.0-i18n/lib/X11/X11
Re: Error in compiling in xforms/forms dir
On Thu, 20 Feb 2003, Angus Leeming wrote: $ fdesign form_preferences.fd In LoadForm [fd_file.c 445] Invalid Width/Height: 12365250560.007812 2.210938 Could you check again? Here 'fdesign form_preferences.fd' gives me two nice popup windows with no error. I have received a mail from you today. I'm relieved. cghan
Re: Error in compiling in xforms/forms dir
On Thu, 20 Feb 2003, Angus Leeming wrote: And what could I check with? Ok. I'll try and dig deeper. I don't know. All I want is creating form_preferences.C correctly. cghan
Re: CJK-LyX-1.2.3
On 20 Feb 2003, Jean-Marc Lasgouttes wrote: I cannot comment on the content of the patch itself, but I have two observation on its form. 1/ the header forms.h is AFAIK automatically generated from the various header files in lib/include. So you should not modify this files directly, but change the relevant sub-header file. I would think that it should be Basic.h, but I am not sure. 2/ the following part is not good, because (1) // is not a C comment and (2) you should remove the line completely instead. --- xforms-1.0-release/lib/flinternal.h 2002-05-21 04:38:39.0 +0900 +++ xforms-1.0-i18n/lib/flinternal.h 2003-02-20 21:42:27.0 +0900 @@ -411,10 +411,10 @@ int tooltip_time; #ifdef XlibSpecificationRelease XIMxim ;/* input method */ -XICxic ;/* input context */ +//XICxic ;/* input context */ #else void *xim; -void *xic; +//void *xic; #endif unsigned int navigate_mask; /* input field */ long reserverd[6]; Hope this helps. Thank you for the corrections. You are helping! cghan
Re: Error in compiling in xforms/forms dir
On Thu, 20 Feb 2003, Angus Leeming wrote: [EMAIL PROTECTED] wrote: Could you check again? Here 'fdesign form_preferences.fd' gives me two nice popup windows with no error. And what could I check with? Ok. I'll try and dig deeper. The problem solved! I had ifdef...endif at form_preferences.C Thanks for the help. cghan
Re: CJK input
On Fri, 21 Feb 2003, Shigeru Miyata wrote: - Now if you are satisfied with the kanji conversion, type 'Return' to fixate your input. The toolkit finally obtains a meaningful string from the IM server to be passed down to the client. The client displays the received string and move the cursor and notifies the change of cursor position to the IM server so that it can adjust the input location. I guess it is a little bit more complicated than a typical Korean input. Thank you for the explanation, Miyata. I now have a cleaner picture of how Japanese IM works. So in summary, 'if(kbuflen 1)' is O.K. with the japanese input, right? Regards, cghan
Error in compiling in xforms/forms dir
Hello, In lyx-1.3.0, I added a form in form_preferences.fd and made corresponding changes in form_preferences.[hC] and also in xforms/FormPreferences.[hC]. But when compiling, 0 size form_preferences.C is produced which leads to several errors in the final linking stage. form_preferences.h is O.K. Can anybody tell me what are the possible mistakes I made? Regards, cghan
Re: Error in compiling in xforms/forms dir
Hello, Angus; On Thu, 20 Feb 2003, Angus Leeming wrote: > Usually it makes it easier to diagnose if you send the offending file too... > > However, in this particular case I suspect the problem occurs because you > have added #if ... #endif statements to form_preferences.fd. fdesign does > not recognise them and exits. So, the solution (as I have told you in the > past) is to remove them. The automatic dialog generation process will > create form_preferences.[Ch] with this extra dialog. There is no #if...#endif statement in form_preferences.fd. In fact, this fd file is what you sent me the other day. > Thereafter, add your #if ... #endif statements to FormPreferences.C and only > CJK-LyX will actually build the new tab. > Yes, This is done, too, but still I have zero size.C file. Attached is form_preferences.fd file I used. cghan P.S. My mail returned yesterday and I suspect you have not got my mail yet, today. In case you have not, I'll send it again, this time ccing lyx-devel, too. Magic: 13000 Internal Form Definition File (do not change) Number of forms: 15 Unit of measure: FL_COORD_PIXEL SnapGrid: 5 === FORM === Name: form_preferences Width: 470 Height: 500 Number of Objects: 8 class: FL_BOX type: UP_BOX box: 0 0 470 500 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: class: FL_TABFOLDER type: TOP_TABFOLDER box: 5 10 455 375 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_BOLD_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: tabfolder_prefs callback: argument: class: FL_BUTTON type: NORMAL_BUTTON box: 5 390 100 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Restore|#R shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_restore callback: C_FormBaseRestoreCB argument: 0 class: FL_BUTTON type: RETURN_BUTTON box: 170 390 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Save shortcut: ^M resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_ok callback: C_FormBaseOKCB argument: 0 class: FL_BUTTON type: NORMAL_BUTTON box: 270 390 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Apply|#A shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_apply callback: C_FormBaseApplyCB argument: 0 class: FL_BUTTON type: NORMAL_BUTTON box: 370 390 90 30 boxtype: FL_UP_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_NORMAL_SIZE lcol: FL_BLACK label: Cancel|^[ shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: button_close callback: C_FormBaseCancelCB argument: 0 class: FL_FRAME type: ENGRAVED_FRAME box: 0 425 470 1 boxtype: FL_NO_BOX colors: FL_BLACK FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: class: FL_TEXT type: NORMAL_TEXT box: 5 430 460 70 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_MCOL alignment: FL_ALIGN_LEFT|FL_ALIGN_INSIDE style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: text_warning callback: argument: === FORM === Name: form_preferences_inner_tab Width: 455 Height: 375 Number of Objects: 2 class: FL_BOX type: FLAT_BOX box: 0 0 455 375 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_CENTER style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_ALL gravity: FL_NoGravity FL_NoGravity name: callback: argument: class: FL_TABFOLDER type: TOP_TABFOLDER box: 0 0 455 375 boxtype: FL_FLAT_BOX colors: FL_COL1 FL_COL1 alignment: FL_ALIGN_TOP_LEFT style: FL_NORMAL_STYLE size: FL_DEFAULT_SIZE lcol: FL_BLACK label: shortcut: resize: FL_RESIZE_NONE gravity: FL_NoGravity FL_NoGravity name: tabfolder_inner callback: argument: === FORM === Name: form_preferences_cjk_fonts W
Re: CJK-LyX-1.2.3
Hello, Angus; my mail failed to reach you yesterday. The internet mail delivery system seems unstable recently. On Tue, 18 Feb 2003, Angus Leeming wrote: > > > (a) the first widget in both windows overwrite the 'X' or > > > (b) only the first widget of the first dialog? > > > > > > I ask because if you get result (a), then that suggests that the problem > > > lies with the initialisation of the XIC. If you get result (b), then the > > > problem must lie with some static variable in the xforms library. > > I found that ONLY 'Edit->Find' widget has the problem. Your genuine xforms-widget(trial.C) does not have the problem. So I think the problem lies not on the xforms, but on the source code of the widget. Where is the source code of the 'Edit->...' widget? That's a good questiion which you may know the answer to, no? So I cleaned up a little bit and made the patch against clean xforms-1.0, which I attached on this mail. I hope you lok at the patch and polish it as much as possible, and then send it back to me as soon as possible. Because the CJK-LyX-1.3.0 critically depends on the patched xforms, I have to make both of them(CJK-LyX-1.3.0 and the patched xforms-lib) available at the time of the announcement of CJK-LyX-1.3.0. For the i18n of xforms, I also have attached a slightly modified trial.C to this mail. If you look at the file, you will find the modified function, 'XNextEvents' is added to it. Without this function added, I cannot input CJK-chars on your 'trial' widget. This means to make the xforms-lib i18n, this modified 'XNextEvents' must be added to the lib, which I hope you can give a hand. The job is not urgent, though, forthis 'XNextEvents' function is a part of lyxim.C, and thus without this function added to the lib, CJK-LyX will have no problem. Regards, cghan diff -urdN xforms-1.0-release/Imakefile xforms-1.0-i18n/Imakefile --- xforms-1.0-release/Imakefile2002-12-04 02:25:43.0 +0900 +++ xforms-1.0-i18n/Imakefile 2003-02-20 21:42:27.0 +0900 @@ -100,7 +100,7 @@ image \ $(GL) \ fdesign \ - fd2ps \ + fd2ps \ $(DEMOS) IMAKE_DEFINES = \ diff -urdN xforms-1.0-release/X11/X11/forms.h xforms-1.0-i18n/X11/X11/forms.h --- xforms-1.0-release/X11/X11/forms.h 2002-06-07 04:05:48.0 +0900 +++ xforms-1.0-i18n/X11/X11/forms.h 2003-02-20 21:42:27.0 +0900 @@ -729,6 +729,11 @@ void (*pre_attach)(struct forms_ *); void *attach_data; int no_tooltip; +#ifdef XlibSpecificationRelease +XICxic ;/* input context */ +#else +void *xic; +#endif int reserved[10]; /* future use */ } FL_FORM; @@ -987,6 +992,10 @@ FL_FORMCALLBACKPTR callback, void *d ); +FL_EXPORT void fl_get_composed_string( + int * ptr_kbuflen, + char const ** ptr_keybuf + ); #define fl_set_form_call_backfl_set_form_callback @@ -1409,7 +1418,6 @@ int *height ); - #define fl_get_string_size fl_get_string_dimension FL_EXPORT void fl_get_align_xy( @@ -5518,6 +5526,11 @@ FL_OBJECT *ob ); +FL_EXPORT void fl_get_CJK_offset( + FL_OBJECT *ob, + int * x, + int * y + ); FL_EXPORT int fl_get_menu( FL_OBJECT *ob diff -urdN xforms-1.0-release/exports/include/X11/forms.h xforms-1.0-i18n/exports/include/X11/forms.h --- xforms-1.0-release/exports/include/X11/forms.h 2002-06-07 04:05:48.0 +0900 +++ xforms-1.0-i18n/exports/include/X11/forms.h 2003-02-20 21:42:27.0 +0900 @@ -729,6 +729,11 @@ void (*pre_attach)(struct forms_ *); void *attach_data; int no_tooltip; +#ifdef XlibSpecificationRelease +XICxic ;/* input context */ +#else +void *xic; +#endif int reserved[10]; /* future use */ } FL_FORM; @@ -987,6 +992,10 @@ FL_FORMCALLBACKPTR callback, void *d ); +FL_EXPORT void fl_get_composed_string( + int * ptr_kbuflen, + char const ** ptr_keybuf + ); #define fl_set_form_call_backfl_set_form_callback @@ -1409,7 +1418,6 @@ int *height ); - #define fl_get_string_size fl_get_string_dimension FL_EXPORT void fl_get_align_xy( @@ -5518,6 +5526,11 @@ FL_OBJECT *ob ); +FL_EXPORT void fl_get_CJK_offset( + FL_OBJECT *ob, + int * x, + int * y + ); FL_EXPORT int fl_get_menu( FL_OBJECT *ob
Re: Error in compiling in xforms/forms dir
On Thu, 20 Feb 2003, Angus Leeming wrote: > $ fdesign form_preferences.fd > In LoadForm [fd_file.c 445] Invalid Width/Height: 12365250560.007812 > 2.210938 Could you check again? Here 'fdesign form_preferences.fd' gives me two nice popup windows with no error. > I have received a mail from you today. I'm relieved. cghan
Re: Error in compiling in xforms/forms dir
On Thu, 20 Feb 2003, Angus Leeming wrote: > And what could I check with? Ok. I'll try and dig deeper. I don't know. All I want is creating form_preferences.C correctly. cghan
Re: CJK-LyX-1.2.3
On 20 Feb 2003, Jean-Marc Lasgouttes wrote: > > I cannot comment on the content of the patch itself, but I have two > observation on its form. > > 1/ the header forms.h is AFAIK automatically generated from the > various header files in lib/include. So you should not modify this > files directly, but change the relevant sub-header file. I would think > that it should be Basic.h, but I am not sure. > > 2/ the following part is not good, because (1) // is not a C comment > and (2) you should remove the line completely instead. > > --- xforms-1.0-release/lib/flinternal.h 2002-05-21 04:38:39.0 +0900 > +++ xforms-1.0-i18n/lib/flinternal.h 2003-02-20 21:42:27.0 +0900 > @@ -411,10 +411,10 @@ > int tooltip_time; > #ifdef XlibSpecificationRelease > XIMxim ;/* input method */ > -XICxic ;/* input context */ > +//XICxic ;/* input context */ > #else > void *xim; > -void *xic; > +//void *xic; > #endif > unsigned int navigate_mask; /* input field */ > long reserverd[6]; > > Hope this helps. Thank you for the corrections. You are helping! cghan
Re: Error in compiling in xforms/forms dir
On Thu, 20 Feb 2003, Angus Leeming wrote: > [EMAIL PROTECTED] wrote: > > Could you check again? Here 'fdesign form_preferences.fd' gives me two > > nice popup windows with no error. > > And what could I check with? Ok. I'll try and dig deeper. The problem solved! I had ifdef...endif at form_preferences.C Thanks for the help. cghan
Re: CJK input
On Fri, 21 Feb 2003, Shigeru Miyata wrote: > - Now if you are satisfied with the kanji conversion, type 'Return' > to fixate your input. > The toolkit finally obtains a meaningful string from the > IM server to be passed down to the client. The client > displays the received string and move the cursor and notifies > the change of cursor position to the IM server so that it > can adjust the input location. > > I guess it is a little bit more complicated than a typical Korean input. Thank you for the explanation, Miyata. I now have a cleaner picture of how Japanese IM works. So in summary, 'if(kbuflen > 1)' is O.K. with the japanese input, right? Regards, cghan