while ( !feof(infile)){
fscanf(infile, "%s", pinyin);
fscanf(infile, "%s", phrase);
- fscanf(infile, "%ld", &token);
+ fscanf(infile, "%u", &token);
fscanf(infile, "%ld", &freq);
if ( feof(infile) )
break;
while ( !feof(infile) ) {
fscanf(infile, "%s", pinyin);
fscanf(infile, "%s", phrase);
- fscanf(infile, "%ld", &token);
+ fscanf(infile, "%u", &token);
fscanf(infile, "%ld", &freq);
if ( feof(infile) )
delete array; \
break; \
}
- for ( int i = 0 ; i < m_pinyin_array_indexes->len; ++i){
+ for ( size_t i = 0 ; i < m_pinyin_array_indexes->len; ++i){
switch (i){
CASE(0);
CASE(1);
result |= SEARCH_OK;
- if ( cursor.m_range_begin == -1 ){
+ if ( cursor.m_range_begin == (phrase_token_t) -1 ){
cursor.m_range_begin = token;
cursor.m_range_end = token + 1;
cursor_head = head;
cursor_head = head;
}
}
- if ( cursor.m_range_begin == -1 )
+ if ( cursor.m_range_begin == (phrase_token_t) -1 )
return result;
g_array_append_val(cursor_head, cursor);
while ( !feof(infile) ) {
fscanf(infile, "%s", pinyin);
fscanf(infile, "%s", phrase);
- fscanf(infile, "%ld", &token);
+ fscanf(infile, "%u", &token);
fscanf(infile, "%ld", &freq);
if ( feof(infile) )