Update FSF postal address.
[m17n/m17n-lib.git] / src / m17n-core.h
index 413c1ed..6d8b2b7 100644 (file)
@@ -1,5 +1,5 @@
 /* m17n-core.h -- header file for the CORE API of the m17n library.
-   Copyright (C) 2003, 2004
+   Copyright (C) 2003, 2004, 2005, 2006
      National Institute of Advanced Industrial Science and Technology (AIST)
      Registration Number H15PRO112
 
@@ -17,7 +17,7 @@
 
    You should have received a copy of the GNU Lesser General Public
    License along with the m17n library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
    02111-1307, USA.  */
 
 #ifndef _M17N_CORE_H_
@@ -42,8 +42,8 @@ extern "C"
 
 #define M17NLIB_MAJOR_VERSION 1
 #define M17NLIB_MINOR_VERSION 3
-#define M17NLIB_PATCH_LEVEL 0
-#define M17NLIB_VERSION_NAME "1.3.0"
+#define M17NLIB_PATCH_LEVEL 3
+#define M17NLIB_VERSION_NAME "1.3.3"
 
 extern void m17n_init_core (void);
 #define M17N_INIT() m17n_init_core ()
@@ -301,6 +301,8 @@ extern int mchartable_map (MCharTable *table, void *ignore,
 
 extern void mchartable_range (MCharTable *table, int *from, int *to);
 
+extern MCharTable *mchar_get_prop_table (MSymbol key, MSymbol *type);
+
 /*
  *  (5) Handling M-text.
  *     "M" of M-text stands for:
@@ -438,6 +440,8 @@ extern MText *mtext_from_data (const void *data, int nitems,
 /*=*/
 /*** @} */
 
+extern MSymbol Mlanguage;
+
 /*
  *  (5-2) Functions to manipulate M-texts.  They correspond to string
  *   manipulating functions in libc.
@@ -464,8 +468,13 @@ extern int mtext_del (MText *mt, int from, int to);
 
 extern int mtext_ins (MText *mt1, int pos, MText *mt2);
 
+extern int mtext_insert (MText *mt1, int pos, MText *mt2, int from, int to);
+
 extern int mtext_ins_char (MText *mt, int pos, int c, int n);
 
+extern int mtext_replace (MText *mt1, int from1, int to1,
+                         MText *mt2, int from2, int to2);
+
 extern MText *mtext_cat_char (MText *mt, int c);
 
 extern MText *mtext_duplicate (MText *mt, int from, int to);
@@ -504,6 +513,35 @@ extern int mtext_casecmp (MText *mt1, MText *mt2);
 
 extern int mtext_ncasecmp (MText *mt1, MText *mt2, int n);
 
+extern int mtext_lowercase (MText *mt);
+
+extern int mtext_titlecase (MText *mt);
+
+extern int mtext_uppercase (MText *mt);
+
+/***en
+    @brief Enumeration for specifying a set of line breaking option.
+
+    The enum #MTextLineBreakOption is to control the line breaking
+    algorithm of the function mtext_line_break () by specifying
+    logical-or of the members in the arg @e option.  */
+
+enum MTextLineBreakOption
+  {
+    /***en Specify the legacy support for space character as base for
+       combining marks.  See the section 8.3 of UAX#14. */
+    MTEXT_LBO_SP_CM = 1,
+    /***en Specify to use space characters for line breaking Korean
+       text.  */
+    MTEXT_LBO_KOREAN_SP = 2,
+    /***en Specify to treat characters of ambiguous line-breaking
+       class as of ideographic line-breaking class.  */
+    MTEXT_LBO_AI_AS_ID = 4,
+    MTEXT_LBO_MAX
+  };
+
+extern int mtext_line_break (MText *mt, int pos, int option, int *after);
+
 /*** @ingroup m17nPlist */
 extern MPlist *mplist_deserialize (MText *mt);
 
@@ -519,7 +557,7 @@ extern MPlist *mplist_deserialize (MText *mt);
 /***en
     @brief Flag bits to control text property.
 
-    The mtext_property () funciton accepts logical OR of these flag
+    The mtext_property () function accepts logical OR of these flag
     bits as an argument.  They control the behaviour of the created
     text property as described in the documentation of each flag
     bit.  */