From 06a5fc29acc23453c13cf7f02671dc68e166d344 Mon Sep 17 00:00:00 2001 From: handa Date: Sat, 30 May 2009 00:53:27 +0000 Subject: [PATCH] *** empty log message *** --- MDatabase.cs | 6 ++++-- Makefile | 2 +- database.cs | 20 ++++++++++++++++++++ textprop.cs | 2 ++ 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 database.cs diff --git a/MDatabase.cs b/MDatabase.cs index dca37f6..e19ebc4 100644 --- a/MDatabase.cs +++ b/MDatabase.cs @@ -509,15 +509,17 @@ namespace M17N.Core update_database_directories (); foreach (KeyValuePair item in DBDictMulti) if (item.Key.Match (tag)) - for (j = 0; j < 4; j++) + for (int j = 0; j < 4; j++) if (item.Value[j] != null) if (item.Value[j].DBStatus == MDBStatus.OUTDATED) item.Value[j].expand_wildcard (j); - for (int i = 0; i < 4 && tag.Tags[i] == Mwildcard; i++); + int i; + for (i = 0; i < 4 && tag.Tags[i] == Mwildcard; i++); if (i == 4) { // No wildcard. + MDatabase[] mdbs; if (DBDict.TryGetValue (tag, out mdbs)) for (int j = 0; j < 4; j++) if (mdbs[j] != null) diff --git a/Makefile b/Makefile index 3b4f590..8b94700 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CS=gmcs +CS=gmcs2 M17N_SRC = M17N.cs CORE_SRC = MSymbol.cs MPlist.cs MText.cs MDatabase.cs diff --git a/database.cs b/database.cs new file mode 100644 index 0000000..cc0f258 --- /dev/null +++ b/database.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using M17N; +using M17N.Core; + +public class Test +{ + public static void Main () + { + M17n.debug = true; + MDatabase.ApplicationDir = "/usr/local/share/m17n"; + + MDatabase.ListDirs (); + List mdb_list + = MDatabase.List (new MDatabase.Tag (MSymbol.Of ("*"))); + Console.WriteLine ("Total {0} databases:", mdb_list.Count); + foreach (MDatabase db in mdb_list) + Console.WriteLine (db); + } +} diff --git a/textprop.cs b/textprop.cs index 3689664..c44f0e8 100644 --- a/textprop.cs +++ b/textprop.cs @@ -9,6 +9,7 @@ public class Test const int DEPTH = 10; static MText mt = new MText ("0123456789"); static MSymbol key = MSymbol.PropertyKey ("___"); +#if false static MSymbol key_r = MSymbol.PropertyKey ("r__", MProperty.Flags.RearSticky); static MSymbol key_f = MSymbol.PropertyKey ("_f_", @@ -28,6 +29,7 @@ public class Test (MProperty.Flags.RearSticky | MProperty.Flags.FrontSticky | MProperty.Flags.Sensitive)); +#endif static MSymbol val0 = MSymbol.Of ("0"); static MSymbol val1 = MSymbol.Of ("1"); -- 1.7.10.4