From 9df8678bb0bab71da9631ff13244555e7a33c458 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 23 Aug 2011 18:39:16 +0800 Subject: fixes code style in src/include --- src/include/memory_chunk.h | 10 +++++----- src/include/novel_types.h | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/include') diff --git a/src/include/memory_chunk.h b/src/include/memory_chunk.h index 3d9ea35..c72e92f 100644 --- a/src/include/memory_chunk.h +++ b/src/include/memory_chunk.h @@ -116,7 +116,7 @@ public: } void* end() const{ - return m_data_end; + return m_data_end; } size_t size() const{ @@ -214,15 +214,15 @@ public: /* free old data */ reset(); - size_t file_size; + size_t file_size; FILE* file = fopen(filename, "r"); if ( !file ) return false; - fseek(file, 0, SEEK_END); - file_size = ftell(file); - fseek(file, 0, SEEK_SET); + fseek(file, 0, SEEK_END); + file_size = ftell(file); + fseek(file, 0, SEEK_SET); int data_len = file_size; void* data = malloc(data_len); diff --git a/src/include/novel_types.h b/src/include/novel_types.h index 8077af6..42dd3fc 100644 --- a/src/include/novel_types.h +++ b/src/include/novel_types.h @@ -42,7 +42,7 @@ typedef gunichar2 utf16_t; #define PHRASE_INDEX_LIBRARY_MASK 0x0F000000 #define PHRASE_INDEX_LIBRARY_COUNT (1<<4) #define PHRASE_INDEX_LIBRARY_INDEX(token) ((token&PHRASE_INDEX_LIBRARY_MASK)>>24) -#define PHRASE_INDEX_MAKE_TOKEN(phrase_index, token) \ +#define PHRASE_INDEX_MAKE_TOKEN(phrase_index, token) \ ( ( (phrase_index<<24) & PHRASE_INDEX_LIBRARY_MASK)|(token & PHRASE_MASK)) @@ -51,8 +51,8 @@ typedef gunichar2 utf16_t; */ struct PhraseIndexRange{ - phrase_token_t m_range_begin; - phrase_token_t m_range_end; /* pass the last item like stl */ + phrase_token_t m_range_begin; + phrase_token_t m_range_end; /* pass the last item like stl */ }; /*Array of PhraseIndexRange*/ @@ -106,8 +106,8 @@ enum ATTACH_FLAG{ */ struct BigramPhraseItem{ - phrase_token_t m_token; - gfloat m_freq; /* P(W2|W1) */ + phrase_token_t m_token; + gfloat m_freq; /* P(W2|W1) */ }; struct BigramPhraseItemWithCount{ @@ -125,9 +125,9 @@ typedef GArray * BigramPhraseWithCountArray; /* Array of BigramPhraseItemWithCou */ enum AttachOption{ - ATTACH_NEW_FILE = 1, - ATTACH_READ = 2, - ATTACH_READ_WRITE = 3 + ATTACH_NEW_FILE = 1, + ATTACH_READ = 2, + ATTACH_READ_WRITE = 3 }; #define MAX_PHRASE_LENGTH 16 -- cgit