diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2007-01-16 20:07:35 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2007-01-16 20:07:35 +0000 |
commit | 80e647a8dbc97662b9d966c0f7a8e1aedea89eed (patch) | |
tree | d3a322c28112b7623765847aa32e8e319c576b45 /modules/indic | |
parent | e6b83e4264b4ad2ab73a3239d902b4064c75634d (diff) | |
download | pango-80e647a8dbc97662b9d966c0f7a8e1aedea89eed.tar.gz |
*.c, *.h: Drop trailing whitespace.
2007-01-16 Behdad Esfahbod <behdad@gnome.org>
*.c, *.h: Drop trailing whitespace.
svn path=/trunk/; revision=2163
Diffstat (limited to 'modules/indic')
-rw-r--r-- | modules/indic/indic-fc.c | 20 | ||||
-rw-r--r-- | modules/indic/indic-lang.c | 14 | ||||
-rw-r--r-- | modules/indic/indic-ot-class-tables.c | 46 | ||||
-rw-r--r-- | modules/indic/indic-ot.c | 24 | ||||
-rw-r--r-- | modules/indic/mprefixups.c | 14 | ||||
-rw-r--r-- | modules/indic/mprefixups.h | 6 |
6 files changed, 62 insertions, 62 deletions
diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c index daa2c23e..cdfa7696 100644 --- a/modules/indic/indic-fc.c +++ b/modules/indic/indic-fc.c @@ -45,7 +45,7 @@ struct _IndicEngineFc struct _PangoIndicInfo { - PangoOTTag scriptTag; + PangoOTTag scriptTag; const IndicOTClassTable *classTable; const gchar *gsubQuarkName; const gchar *gposQuarkName; @@ -139,7 +139,7 @@ maybe_add_GSUB_feature (PangoOTRuleset *ruleset, gulong property_bit) { guint feature_index; - + /* 0xffff == default language system */ if (pango_ot_info_find_feature (info, PANGO_OT_TABLE_GSUB, feature_tag, script_index, 0xffff, &feature_index)) @@ -316,7 +316,7 @@ expand_text(const gchar *text, glong length, glong **offsets, glong *n_chars) /* analysis->shape_engine has the PangoEngine... */ -static void +static void indic_engine_shape (PangoEngineShape *engine, PangoFont *font, const char *text, @@ -352,15 +352,15 @@ indic_engine_shape (PangoEngineShape *engine, indic_info = indic_shape_engine->indicInfo; wc_in = expand_text (text, length, &utf8_offsets, &n_chars); - + n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_info->classTable, NULL, NULL, NULL, NULL); - + wc_out = g_new (gunichar, n_glyphs); indices = g_new (glong, n_glyphs); tags = g_new (gulong, n_glyphs); n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_info->classTable, wc_out, indices, tags, &mprefixups); - + pango_glyph_string_set_size (glyphs, n_glyphs); buffer = pango_ot_buffer_new (fc_font); @@ -409,18 +409,18 @@ indic_engine_fc_class_init (PangoEngineShapeClass *class) PANGO_ENGINE_SHAPE_DEFINE_TYPE (IndicEngineFc, indic_engine_fc, indic_engine_fc_class_init, NULL) -void +void PANGO_MODULE_ENTRY(init) (GTypeModule *module) { indic_engine_fc_register_type (module); } -void +void PANGO_MODULE_ENTRY(exit) (void) { } -void +void PANGO_MODULE_ENTRY(list) (PangoEngineInfo **engines, int *n_engines) { @@ -439,7 +439,7 @@ PANGO_MODULE_ENTRY(create) (const char *id) { IndicEngineFc *engine = g_object_new (indic_engine_fc_type, NULL); engine->indicInfo = &indic_info[i]; - + return (PangoEngine *)engine; } } diff --git a/modules/indic/indic-lang.c b/modules/indic/indic-lang.c index 3c9a21e4..89ab301f 100644 --- a/modules/indic/indic-lang.c +++ b/modules/indic/indic-lang.c @@ -154,7 +154,7 @@ indic_engine_break (PangoEngineLang *engine, attrs[i].is_mandatory_break = FALSE; } else if (prev_wc != 0 && (this_wc == 0x200D || this_wc == 0x200C)) - { + { if (next_wc != 0) { if (next_next_wc == 0) @@ -169,7 +169,7 @@ indic_engine_break (PangoEngineLang *engine, attrs[i].is_cursor_position = FALSE; attrs[i].is_char_break = FALSE; attrs[i].is_line_break = FALSE; - attrs[i].is_mandatory_break = FALSE; + attrs[i].is_mandatory_break = FALSE; } else if ((next_next_wc != 0) && (next_wc == 0x09CD || /* Bengali */ @@ -193,19 +193,19 @@ indic_engine_break (PangoEngineLang *engine, attrs[i].is_cursor_position = FALSE; attrs[i].is_char_break = FALSE; attrs[i].is_line_break = FALSE; - attrs[i].is_mandatory_break = FALSE; + attrs[i].is_mandatory_break = FALSE; - i++; + i++; attrs[i].is_cursor_position = FALSE; - } + } } - else + else { attrs[i].is_cursor_position = FALSE; attrs[i].is_char_break = FALSE; attrs[i].is_line_break = FALSE; attrs[i].is_mandatory_break = FALSE; - } + } } } } diff --git a/modules/indic/indic-ot-class-tables.c b/modules/indic/indic-ot-class-tables.c index 52966c8f..fe664bc9 100644 --- a/modules/indic/indic-ot-class-tables.c +++ b/modules/indic/indic-ot-class-tables.c @@ -151,7 +151,7 @@ static const IndicOTCharClass gujrCharClasses[] = }; static const IndicOTCharClass oryaCharClasses[] = -{ +{ _xx, _ma, _mp, _mp, _xx, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _iv, _xx, _xx, _iv, /* 0B00 - 0B0F */ _iv, _xx, _xx, _iv, _iv, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _ct, _bb, /* 0B10 - 0B1F */ _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _bb, _xx, _bb, _bb, _bb, _bb, _bb, _pb, /* 0B20 - 0B2F */ @@ -468,44 +468,44 @@ glong indic_ot_find_syllable(const IndicOTClassTable *class_table, const gunicha state = stateTable[state][char_class & CF_CLASS_MASK]; - /*for the components of split matra*/ + /*for the components of split matra*/ if ((char_count >= cursor + 3) && (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCF && chars[cursor + 2] == 0x0DCA)) { /*for 3 split matra of Sinhala*/ return cursor + 3; - } + } else if ((char_count >= cursor + 3) && (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CC2 && chars[cursor + 2] == 0x0CD5)) { /*for 3 split matra of Kannada*/ return cursor + 3; } - /*for 2 split matra*/ + /*for 2 split matra*/ else if (char_count >= cursor + 2) { /*for Bengali*/ - if ((chars[cursor] == 0x09C7 && chars[cursor + 1] == 0x09BE) || - (chars[cursor] == 0x09C7 && chars[cursor + 1] == 0x09D7) || + if ((chars[cursor] == 0x09C7 && chars[cursor + 1] == 0x09BE) || + (chars[cursor] == 0x09C7 && chars[cursor + 1] == 0x09D7) || /*for Oriya*/ - (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B3E) || - (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B56) || + (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B3E) || + (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B56) || (chars[cursor] == 0x0B47 && chars[cursor + 1] == 0x0B57) || /*for Tamil*/ - (chars[cursor] == 0x0BC6 && chars[cursor + 1] == 0x0BBE) || - (chars[cursor] == 0x0BC6 && chars[cursor + 1] == 0x0BD7) || - (chars[cursor] == 0x0BC7 && chars[cursor + 1] == 0x0BBE) || + (chars[cursor] == 0x0BC6 && chars[cursor + 1] == 0x0BBE) || + (chars[cursor] == 0x0BC6 && chars[cursor + 1] == 0x0BD7) || + (chars[cursor] == 0x0BC7 && chars[cursor + 1] == 0x0BBE) || /*for Malayalam*/ - (chars[cursor] == 0x0D46 && chars[cursor + 1] == 0x0D3E) || - (chars[cursor] == 0x0D46 && chars[cursor + 1] == 0x0D57) || - (chars[cursor] == 0x0D47 && chars[cursor + 1] == 0x0D3E) || + (chars[cursor] == 0x0D46 && chars[cursor + 1] == 0x0D3E) || + (chars[cursor] == 0x0D46 && chars[cursor + 1] == 0x0D57) || + (chars[cursor] == 0x0D47 && chars[cursor + 1] == 0x0D3E) || /*for Sinhala*/ - (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCA) || - (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCF) || - (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DDF) || - (chars[cursor] == 0x0DDC && chars[cursor + 1] == 0x0DCA) || + (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCA) || + (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DCF) || + (chars[cursor] == 0x0DD9 && chars[cursor + 1] == 0x0DDF) || + (chars[cursor] == 0x0DDC && chars[cursor + 1] == 0x0DCA) || /*for Telugu*/ - (chars[cursor] == 0x0C46 && chars[cursor + 1] == 0x0C56) || + (chars[cursor] == 0x0C46 && chars[cursor + 1] == 0x0C56) || /*for Kannada*/ - (chars[cursor] == 0x0CBF && chars[cursor + 1] == 0x0CD5) || - (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CD5) || - (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CD6) || - (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CC2) || + (chars[cursor] == 0x0CBF && chars[cursor + 1] == 0x0CD5) || + (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CD5) || + (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CD6) || + (chars[cursor] == 0x0CC6 && chars[cursor + 1] == 0x0CC2) || (chars[cursor] == 0x0CCA && chars[cursor + 1] == 0x0CD5)) return cursor + 2; } diff --git a/modules/indic/indic-ot.c b/modules/indic/indic-ot.c index 47df96a4..3b392674 100644 --- a/modules/indic/indic-ot.c +++ b/modules/indic/indic-ot.c @@ -130,7 +130,7 @@ static gboolean noteMatra(Output *output, const IndicOTClassTable *classTable, g } else { saveMatra(output, matra, matraClass); } - + return TRUE; } else return FALSE; @@ -156,7 +156,7 @@ static void swapChars(Output *output, int a, int b) output->fOutChars[output->fOutIndex + b] = output->fOutChars[output->fOutIndex + a]; output->fCharIndices[output->fOutIndex + b] = output->fCharIndices[output->fOutIndex + a]; - output->fCharTags[output->fOutIndex + b] = pstf_p; + output->fCharTags[output->fOutIndex + b] = pstf_p; output->fOutChars[output->fOutIndex + a] = temp_char; output->fCharIndices[output->fOutIndex + a] = temp_index; @@ -181,7 +181,7 @@ static void writeMpre(Output *output) gulong tags = output->fMatraTags; if (output->fMatraWordStart) tags &= ~init; - + output->fMPreOutIndex = output->fOutIndex; writeChar(output, output->fMpre, output->fMatraIndex, tags); } @@ -414,7 +414,7 @@ glong indic_ot_reorder(const gunichar *chars, const glong *utf8_offsets, glong c /* note the base consonant for post-GSUB fixups */ noteBaseConsonant(&output); - + /* write base consonant */ for (i = baseConsonant; i < bcSpan; i += 1) { writeChar(&output, chars[i], /*i*/ prev, nukt_p); @@ -423,18 +423,18 @@ glong indic_ot_reorder(const gunichar *chars, const glong *utf8_offsets, glong c /* for the special conjuction of Cons+0x0d4d+0x0d31 or Cons+0x0d4d+0x0d30 of Malayalam */ if ((baseConsonant - 2 >= 0) && (chars[baseConsonant - 1] == 0x0d4d) && - ((chars[baseConsonant] == 0x0d31) || + ((chars[baseConsonant] == 0x0d31) || (chars[baseConsonant] == 0x0d30)) && - ((chars[baseConsonant - 2] >= 0x0d15) && + ((chars[baseConsonant - 2] >= 0x0d15) && (chars[baseConsonant - 2] <= 0x0d39))) { swapChars (&output, -1, -3); - + if (mpreFixups) { if (mpreFixups->fFixupCount > 0) { mpreFixups->fFixupCount--; } - } - } + } + } if ((class_table->scriptFlags & SF_MATRAS_AFTER_BASE) != 0) { gboolean is_for_0C48 = FALSE; @@ -447,11 +447,11 @@ glong indic_ot_reorder(const gunichar *chars, const glong *utf8_offsets, glong c writeMpost(&output); is_for_0C48 = TRUE; - break; + break; } } } - + if (!is_for_0C48) { writeMbelow(&output); writeMabove(&output); @@ -546,6 +546,6 @@ glong indic_ot_reorder(const gunichar *chars, const glong *utf8_offsets, glong c if (outMPreFixups) { *outMPreFixups = mpreFixups; } - + return getOutputIndex(&output); } diff --git a/modules/indic/mprefixups.c b/modules/indic/mprefixups.c index 34118f5e..60517d88 100644 --- a/modules/indic/mprefixups.c +++ b/modules/indic/mprefixups.c @@ -1,5 +1,5 @@ -/* - * mprefixups.h: Handle left matra placement +/* + * mprefixups.h: Handle left matra placement * * Author: Sivaraj Doddannan * Ported from IBM's ICU engine. Original copyright: @@ -55,7 +55,7 @@ void indic_mprefixups_add (MPreFixups *mprefixups, glong baseIndex, glong mpreIn if (baseIndex - mpreIndex > 1) { mprefixups->fFixupData[mprefixups->fFixupCount].fBaseIndex = baseIndex; mprefixups->fFixupData[mprefixups->fFixupCount].fMPreIndex = mpreIndex; - + mprefixups->fFixupCount += 1; } } @@ -79,7 +79,7 @@ void indic_mprefixups_apply(MPreFixups *mprefixups, PangoOTBuffer *buffer) /* determine post GSUB location of baseIndex and mpreIndex */ pango_ot_buffer_get_glyphs (buffer, &glyphs, &n_glyphs); - + for (i = 0; i < n_glyphs; i++) { if (baseGlyph < 0 && glyphs[i].cluster == baseIndex) baseGlyph = i; @@ -87,7 +87,7 @@ void indic_mprefixups_apply(MPreFixups *mprefixups, PangoOTBuffer *buffer) if (mpreGlyph < 0) mpreGlyph = i; mpreLimit = i + 1; - } + } } if (baseGlyph < 0 || mpreGlyph < 0 || mpreLimit >= baseGlyph) { continue; @@ -110,7 +110,7 @@ void indic_mprefixups_apply(MPreFixups *mprefixups, PangoOTBuffer *buffer) for (i = 0; i < mpreCount; i += 1) { glyphs[mpreDest + i] = mpreSave[i]; } - + g_free(mpreSave); - } + } } diff --git a/modules/indic/mprefixups.h b/modules/indic/mprefixups.h index d09d6be5..22336dba 100644 --- a/modules/indic/mprefixups.h +++ b/modules/indic/mprefixups.h @@ -1,5 +1,5 @@ -/* - * mprefixups.c: Handle left matra placement +/* + * mprefixups.c: Handle left matra placement * * Author: Sivaraj Doddannan * Ported from IBM's ICU engine. Original copyright: @@ -43,7 +43,7 @@ MPreFixups *indic_mprefixups_new(glong char_count); void indic_mprefixups_free(MPreFixups *mprefixups); void indic_mprefixups_add(MPreFixups *mprefixups, glong baseIndex, glong mpreIndex); void indic_mprefixups_apply(MPreFixups *mprefixups, PangoOTBuffer *buffer); - + G_END_DECLS |