/* chartab.h -- character table module.
- Copyright (C) 2003, 2004
+ Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H15PRO112
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. */
/***en
int
mchartable__init ()
{
- chartable_table.count = 0;
+ M17N_OBJECT_ADD_ARRAY (chartable_table, "Chartable");
return 0;
}
void
mchartable__fini ()
{
- mdebug__report_object ("Chartable", &chartable_table);
}
void *
M17N_OBJECT (table, free_chartable, MERROR_CHARTABLE);
M17N_OBJECT_REGISTER (chartable_table, table);
table->key = key;
- table->min_char = 0;
+ table->min_char = -1;
table->max_char = -1;
SET_DEPTH_MIN_CHAR (&table->subtable, 0, 0);
table->subtable.default_value = default_value;
/*=*/
/***en
+ @brief Return the minimum character whose value is set in a chartabe.
+
+ The mchartable_min_char () function return the minimum character
+ whose value is set in chartable $TABLE. No character is set its
+ value, the function returns -1.
+ */
+
+int
+mchartable_min_char (MCharTable *table)
+{
+ return table->min_char;
+}
+
+/*=*/
+
+/***en
+ @brief Return the maximum character whose value is set in a chartabe.
+
+ The mchartable_max_char () function return the maximum character
+ whose value is set in chartable $TABLE. No character is set its
+ value, the function returns -1.
+ */
+
+int
+mchartable_max_char (MCharTable *table)
+{
+ return table->max_char;
+}
+
+/*=*/
+
+/***en
@brief Return the assigned value of a character in a chartable.
The mchartable_lookup () function returns the value assigned to