From 51c8b32a9a3313610a82a2fc20385ea40229915c Mon Sep 17 00:00:00 2001 From: handa Date: Mon, 25 May 2009 12:37:37 +0000 Subject: [PATCH] *** empty log message *** --- MText.cs | 34 +++++++++++++--------------------- Makefile | 2 +- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/MText.cs b/MText.cs index f7b99dc..95197c4 100644 --- a/MText.cs +++ b/MText.cs @@ -24,26 +24,29 @@ namespace M17N.Core [FlagsAttribute] public enum Flags { - None = 0, + None = 0x00, /// A text inserted before a character that has this property /// inherits this property. If the text already has properties /// of the same key, they are deleted. See the documentation of /// Sensitive for exception. - FrontSticky = 1, + FrontSticky = 0x01, /// A text inserted after a character that has this property /// inherits this property. If the text already has properties /// of the same key, they are deleted. See the documentation of /// Sensitive for exception. - RearSticky = 2, + RearSticky = 0x02, /// This property is deleted from a span of text if the span is /// modified (i.e. a character is changed, a text is inserted, /// some part is deleted). This propery is also deleted if a /// property of the same key is added, which means that this - /// property is not stackable. If this property is also - /// FrontSticky (or RearSticky), text insertion just before (or - /// after) the span also deletes this property from the span of - /// text. - Sensitive = 4, + /// property is not stackable. + Sensitive = 0x04, + /// This property is deleted from a span of text if a text just + /// before the span is modified, inserted, or deleted. + FrontSensitive = 0x08, + /// This property is deleted from a span of text if a text just + /// after the span is modified, inserted, or deleted. + RearSensitive = 0x10 }; internal MSymbol key; @@ -651,15 +654,13 @@ namespace M17N.Core public bool isFrontSensitive { get { return MProperty.HasFlags (Key, - (MProperty.Flags.Sensitive - | MProperty.Flags.FrontSticky)); } + MProperty.Flags.FrontSensitive) ; } } public bool isRearSensitive { get { return MProperty.HasFlags (Key, - (MProperty.Flags.Sensitive - | MProperty.Flags.RearSticky)); } + MProperty.Flags.RearSensitive) ; } } private void update_from_to () @@ -1378,15 +1379,6 @@ namespace M17N.Core } } - private void check_from_to (string str) - { - int save_from = From; - int save_to = To; - update_from_to (); - if (save_from != From || save_to != To) - throw new Exception (str + ":incorrect from or to"); - } - public void MergeAfterChange (int start, int end) { update_from_to (); diff --git a/Makefile b/Makefile index 160e44e..c63da03 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ CS=gmcs M17N_SRC = M17N.cs CORE_SRC = MSymbol.cs MPlist.cs MText.cs MDatabase.cs -TEST_PROG = symbol.exe plist.exe mtext.exe textprop.exe r__.exe _f_.exe +TEST_PROG = symbol.exe plist.exe mtext.exe textprop.exe r__.exe _f_.exe rf_.exe __s.exe all: ${TEST_PROG} -- 1.7.10.4