Re: Re: patch:[update0703] enchant_dict_hyphenation_chenxiajian

From: chenxiajian1985 <chenxiajian1985_at_gmail.com>
Date: Mon Jul 04 2011 - 16:58:39 CEST

> + unsigned int word_start = -1;
> In the same class, may I know the reason for the above assignment of
> -1 to the unsigned int?

the reason that:
I want to assign *word_start* to -1, so that *word_start* can be set to a new value in *IF* condition
 if (word_start == string::npos && isalpha)
            word_start = i;

//define of npos: Maximum value for size_t
static const size_t npos = -1;

 

chen xiajian



发件人: Kathiravelu Pradeeban
发送时间: 2011-07-04 19:11:29
收件人: chenxiajian1985
抄送:
主题: Re: patch:[update0703] enchant_dict_hyphenation_chenxiajian
 
+ unsigned int word_start = -1;
In the same class, may I know the reason for the above assignment of
-1 to the unsigned int?
On Mon, Jul 4, 2011 at 4:30 PM, Kathiravelu Pradeeban
<kk.pradeeban@gmail.com> wrote:
> Chen,
> In src/ispell/Hyphenator.cpp, you are building a pattern from the file provided.
>
> + std::ofstream myfile("c://1.txt",ios::app);
>
> + myfile<<"result0£º"<<result<<endl;
>
> + myfile.close();
>
>
> I can see some weird characters, above.
>
> Make sure the relative path is given for the files. Hope you are not
> hard-coding the file location as above to a fixed absolute location.
> What happens if the file is missing? Is there any performance impact?
>
> Regards,
> Pradeeban.
>
>
>
> 2011/7/3 chenxiajian1985 <chenxiajian1985@gmail.com>:
>> Hi
>> the attachment is the newest patch file that I make some changes about my last patch. Thanks.
>>
>> the changes:
>> 1 in my hyphenation branch, I add some code to call the function from enchant
>> and some comments in lineBreaker.h(cpp) and textRun.h(cpp)
>> 2 some tests in hyphenation
>>
>> todo:
>> 1 Fully support hyphenation in Abiword
>> 2 Support more language besides En_us
>> 3 Some tests in Linux(Unix)
>>
>>
>> Best Regards~
>> chenxiajian
>
>
>
> --
> Kathiravelu Pradeeban.
> Software Engineer.
> WSO2 Inc.
>
> Blog: [Llovizna] http://kkpradeeban.blogspot.com/
>
--
Kathiravelu Pradeeban.
Software Engineer.
WSO2 Inc.
Blog: [Llovizna] http://kkpradeeban.blogspot.com/
Received on Mon Jul 4 16:58:52 2011

This archive was generated by hypermail 2.1.8 : Mon Jul 04 2011 - 16:58:52 CEST