--- /dev/null
+using System;
+using M17N.Core;
+
+public class Test
+{
+ public static void Main()
+ {
+ MSymbol sym1, sym2;
+
+ sym1 = new MSymbol ("abc");
+ Console.WriteLine (sym1.ToString ());
+ sym2 = new MSymbol ("abc");
+ Console.WriteLine (sym2.ToString ());
+ Console.WriteLine (sym1 == sym2 ? "OK" : "NO");
+ sym1.put (MSymbol.nil, MSymbol.t);
+
+ MPlist p = new MPlist ();
+
+ p.put (MSymbol.t, sym1);
+ p.push (MSymbol.t, sym2);
+
+ MPlist pp = new MPlist ();
+ pp.put (MSymbol.t, p);
+ Console.WriteLine (pp.ToString ());
+ Console.WriteLine (p.get (MSymbol.t));
+ }
+}
using System;
-using M17N;
+using M17N.Core;
-namespace M17N
+namespace M17N.Core
{
public class MPlist
{
return data.plist.put (key, val);
}
}
-
- public class MTextProperty
- {
- }
-
- public enum MTextFormat
- {
- MTEXT_FORMAT_US_ASCII,
- MTEXT_FORMAT_UTF_8,
- MTEXT_FORMAT_UTF_16BE,
- MTEXT_FORMAT_UTF_16LE,
- MTEXT_FORMAT_UTF_32BE,
- MTEXT_FORMAT_UTF_32LE,
- }
-
- public class MText
- {
- private class MTextPlist : MPlist
- {
- public class MInterval
- {
- public MPlist stack;
- public int nprops;
- public int start, end;
- public MInterval prev, next;
- }
-
- MInterval head, tail;
-
- public MTextPlist (MText mt)
- {
- head = tail = new MInterval ();
- head.start = 0;
- head.end = mt.nchars;
- }
- }
-
- private string str;
- private int nchars;
- private int nunits;
- private int cache_pos;
- private int cache_idx;
- private MTextPlist plist;
-
- public MText (byte str, MTextFormat format)
- {
-
- }
- }
-
-
- public class Test
- {
- public static void Main()
- {
- MSymbol sym1, sym2;
-
- sym1 = new MSymbol ("abc");
- Console.WriteLine (sym1.ToString ());
- sym2 = new MSymbol ("abc");
- Console.WriteLine (sym2.ToString ());
- Console.WriteLine (sym1 == sym2 ? "OK" : "NO");
- sym1.put (MSymbol.nil, MSymbol.t);
-
- MPlist p = new MPlist ();
-
- p.put (MSymbol.t, sym1);
- p.push (MSymbol.t, sym2);
-
- MPlist pp = new MPlist ();
- pp.put (MSymbol.t, p);
- Console.WriteLine (pp.ToString ());
- Console.WriteLine (p.get (MSymbol.t));
- }
- }
}
--- /dev/null
+using System;
+using M17N.Core;
+
+namespace M17N.Core
+{
+ public enum MTextFormat
+ {
+ MTEXT_FORMAT_US_ASCII,
+ MTEXT_FORMAT_UTF_8,
+ MTEXT_FORMAT_UTF_16BE,
+ MTEXT_FORMAT_UTF_16LE,
+ MTEXT_FORMAT_UTF_32BE,
+ MTEXT_FORMAT_UTF_32LE,
+ }
+
+ public class MText
+ {
+ private class MTextPlist : MPlist
+ {
+ public class MInterval
+ {
+ MPlist stack;
+ int nprops;
+ public int start, end;
+ public MInterval prev, next;
+ }
+
+ MInterval head, tail;
+
+ public MTextPlist (MText mt)
+ {
+ head = tail = new MInterval ();
+ head.start = 0;
+ head.end = mt.nchars;
+ }
+ }
+
+ private string str;
+ private int nchars;
+ private int nunits;
+ private int cache_pos;
+ private int cache_idx;
+ private MTextPlist plist;
+
+ public MText (byte str, MTextFormat format)
+ {
+
+ }
+ }
+
+ public class MTextProperty
+ {
+ }
+}
-all: MSymbol.exe
+CORE_SRC = MSymbol.cs MText.cs
+all: M17N.exe
-%.exe: %.cs
- mcs $<
+M17N.exe: M17N.cs M17NCore.dll
+ mcs /r:M17NCore M17N.cs
+
+M17NCore.dll: ${CORE_SRC}
+ mcs /out:$@ /t:library ${CORE_SRC}
+
+clean:
+ rm -f *.dll *.exe