/* charset.c -- charset 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
@addtogroup m17nCharset
¥³¡¼¥É¥Ý¥¤¥ó¥È¤«¤éʸ»ú¥³¡¼¥É¤Ø¤ÎÊÑ´¹¤ò @e ¥Ç¥³¡¼¥É
¤È¸Æ¤Ó¡¢Ê¸»ú¥³¡¼¥É¤«¤é¥³¡¼¥É¥Ý¥¤¥ó¥È¤Ø¤ÎÊÑ´¹¤ò @e ¥¨¥ó¥³¡¼¥É ¤È¸Æ¤Ö¡£ */
+
/*=*/
#if !defined (FOR_DOXYGEN) || defined (DOXYGEN_INTERNAL_MODULE)
/*** @addtogroup m17nInternal
#include "m17n-misc.h"
#include "internal.h"
#include "symbol.h"
-#include "charset.h"
-#include "coding.h"
+#include "database.h"
#include "chartab.h"
#include "plist.h"
+#include "charset.h"
+#include "coding.h"
static int unified_max;
return 0;
}
+/** Load a data of type @c charset from the file FD. */
+
+static void *
+load_charset (FILE *fp, MSymbol charset_name)
+{
+ MCharset *charset = MCHARSET (charset_name);
+ int *decoder;
+ MCharTable *encoder;
+ int size;
+ int i, c;
+ int found = 0;
+ MPlist *plist;
+
+ if (! charset)
+ MERROR (MERROR_DB, NULL);
+ size = (charset->code_range[15]
+ - (charset->min_code - charset->code_range_min_code));
+ MTABLE_MALLOC (decoder, size, MERROR_DB);
+ for (i = 0; i < size; i++)
+ decoder[i] = -1;
+ encoder = mchartable (Minteger, (void *) MCHAR_INVALID_CODE);
+
+ while ((c = getc (fp)) != EOF)
+ {
+ unsigned code1, code2, c1, c2;
+ int idx1, idx2;
+ char buf[256];
+
+ ungetc (c, fp);
+ if (! fgets (buf, 256, fp))
+ break;
+ if (c != '#')
+ {
+ if (sscanf (buf, "0x%x-0x%x 0x%x", &code1, &code2, &c1) == 3)
+ {
+ idx1 = CODE_POINT_TO_INDEX (charset, code1);
+ if (idx1 >= size)
+ continue;
+ idx2 = CODE_POINT_TO_INDEX (charset, code2);
+ if (idx2 >= size)
+ idx2 = size - 1;
+ c2 = c1 + (idx2 - idx1);
+ }
+ else if (sscanf (buf, "0x%x 0x%x", &code1, &c1) == 2)
+ {
+ idx1 = idx2 = CODE_POINT_TO_INDEX (charset, code1);
+ if (idx1 >= size)
+ continue;
+ c2 = c1;
+ }
+ else
+ continue;
+ if (idx1 >= 0 && idx2 >= 0)
+ {
+ decoder[idx1] = c1;
+ mchartable_set (encoder, c1, (void *) code1);
+ for (idx1++, c1++; idx1 <= idx2; idx1++, c1++)
+ {
+ code1 = INDEX_TO_CODE_POINT (charset, idx1);
+ decoder[idx1] = c1;
+ mchartable_set (encoder, c1, (void *) code1);
+ }
+ found++;
+ }
+ }
+ }
+
+ if (! found)
+ {
+ free (decoder);
+ M17N_OBJECT_UNREF (encoder);
+ return NULL;
+ }
+ plist = mplist ();
+ mplist_add (plist, Mt, decoder);
+ mplist_add (plist, Mt, encoder);
+ return plist;
+}
+
\f
/* Internal API */
unified_max = MCHAR_MAX;
+ mdatabase__load_charset_func = load_charset;
mcharset__cache = mplist ();
mplist_set (mcharset__cache, Mt, NULL);
memset (mcharset__iso_2022_table.classified, 0,
sizeof (mcharset__iso_2022_table.classified));
- Mcharset = msymbol ("charset");
-
Mmethod = msymbol ("method");
Moffset = msymbol ("offset");
Mmap = msymbol ("map");
MDatabase *mdb = mdatabase_find (msymbol ("charset-list"), Mnil, Mnil, Mnil);
MPlist *def_list, *plist;
MPlist *definitions = charset_definition_list;
- int mdebug_mask = MDEBUG_CHARSET;
+ int mdebug_flag = MDEBUG_CHARSET;
if (! mdb)
return 0;
#define MCHAR_INVALID_CODE
#endif
-/*=*/
-/***en
- @brief The symbol @c Mcharset.
-
- Any decoded M-text has a text property whose key is the predefined
- symbol @c Mcharset. The name of @c Mcharset is
- <tt>"charset"</tt>. */
-
-/***ja
- @brief ¥·¥ó¥Ü¥ë @c Mcharset.
-
- ¥Ç¥³¡¼¥É¤µ¤ì¤¿ M-text ¤Ï¡¢¥¡¼¤¬ @c Mcharset
- ¤Ç¤¢¤ë¤è¤¦¤Ê¥Æ¥¥¹¥È¥×¥í¥Ñ¥Æ¥£¤ò»ý¤Ä¡£
- ¥·¥ó¥Ü¥ë @c Mcharset ¤Ï <tt>"charset"</tt> ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Ä¡£ */
-MSymbol Mcharset;
/*=*/
/***en
/*** @{ */
/*=*/
-/***en
- Parameter key for mchar_define_charset () (which see). */
-
-/***ja
- ´Ø¿ô mchar_define_charset () ÍѤΥѥé¥á¡¼¥¿¡¦¥¡¼.
- ¾Ü¤·¤¯¤Ï¤³¤Î´Ø¿ô¤Î²òÀâ¤ò»²¾È¤Î¤³¤È¡£*/
-
MSymbol Mmethod;
MSymbol Mdimension;
MSymbol Mmin_range;
@name Variables: Symbols representing charset methods.
These are the predefined symbols that can be a value of the
- #Mmethod parameter of a charset used in an argument to the
+ @b Mmethod parameter of a charset used in an argument to the
mchar_define_charset () function.
A method specifies how code-points and character codes are
@name ÊÑ¿ô: ʸ»ú¥»¥Ã¥È¤Î¥á¥½¥Ã¥É»ØÄê¤Ë»È¤ï¤ì¤ë¥·¥ó¥Ü¥ë
¤³¤ì¤é¤Ï¡¢Ê¸»ú¥»¥Ã¥È¤Î @e ¥á¥½¥Ã¥É ¤ò»ØÄꤹ¤ë¤¿¤á¤ÎÄêµÁºÑ¤ß¥·¥ó¥Ü¥ë¤Ç¤¢¤ê¡¢Ê¸»ú¥»¥Ã¥È¤Î
- #Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤʤ뤳¤È¤¬¤Ç¤¤ë¡£
+ @b Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤʤ뤳¤È¤¬¤Ç¤¤ë¡£
¤³¤ÎÃͤϴؿô mchar_define_charset () ¤Î°ú¿ô¤È¤·¤Æ»È¤ï¤ì¤ë¡£
¥á¥½¥Ã¥É¤È¤Ï¡¢¥³¡¼¥É¥Ý¥¤¥ó¥È¤Èʸ»ú¥³¡¼¥É¤òÁê¸ßÊÑ´¹¤¹¤ëºÝ¤ÎÊý¼°¤Î¤³¤È¤Ç¤¢¤ë¡£
@brief Symbol for the offset type method of charset.
The symbol #Moffset has the name <tt>"offset"</tt> and, when used
- as a value of #Mmethod parameter of a charset, it means that the
+ as a value of @b Mmethod parameter of a charset, it means that the
conversion of code-points and character codes of the charset is
done by this calculation:
CHARACTER-CODE = CODE-POINT - MIN-CODE + MIN-CHAR
@endverbatim
- where, MIN-CODE is a value of #Mmin_code parameter of the charset,
- and MIN-CHAR is a value of #Mmin_char parameter. */
+ where, MIN-CODE is a value of @b Mmin_code parameter of the charset,
+ and MIN-CHAR is a value of @b Mmin_char parameter. */
/***ja
@brief ¥ª¥Õ¥»¥Ã¥È·¿¤Î¥á¥½¥Ã¥É¤ò¼¨¤¹¥·¥ó¥Ü¥ë.
¥·¥ó¥Ü¥ë #Moffset ¤Ï <tt>"offset"</tt> ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢Ê¸»ú¥»¥Ã¥È¤Î
- #Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢¥³¡¼¥É¥Ý¥¤¥ó¥È¤Èʸ»ú¥»¥Ã¥È¤Îʸ»ú¥³¡¼¥É¤Î´Ö¤ÎÊÑ´¹¤¬°Ê²¼¤Î¼°¤Ë½¾¤Ã¤Æ¹Ô¤ï¤ì¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
+ @b Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢¥³¡¼¥É¥Ý¥¤¥ó¥È¤Èʸ»ú¥»¥Ã¥È¤Îʸ»ú¥³¡¼¥É¤Î´Ö¤ÎÊÑ´¹¤¬°Ê²¼¤Î¼°¤Ë½¾¤Ã¤Æ¹Ô¤ï¤ì¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
@verbatim
ʸ»ú¥³¡¼¥É = ¥³¡¼¥É¥Ý¥¤¥ó¥È - MIN-CODE + MIN-CHAR
@endverbatim
- ¤³¤³¤Ç¡¢MIN-CODE ¤Ïʸ»ú¥»¥Ã¥È¤Î #Mmin_code ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤǤ¢¤ê¡¢MIN-CHAR ¤Ï
- #Mmin_char ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤǤ¢¤ë¡£ */
+ ¤³¤³¤Ç¡¢MIN-CODE ¤Ïʸ»ú¥»¥Ã¥È¤Î @b Mmin_code ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤǤ¢¤ê¡¢MIN-CHAR ¤Ï
+ @b Mmin_char ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤǤ¢¤ë¡£ */
MSymbol Moffset;
/*=*/
/***en @brief Symbol for the map type method of charset.
The symbol #Mmap has the name <tt>"map"</tt> and, when used as a
- value of #Mmethod parameter of a charset, it means that the
+ value of @b Mmethod parameter of a charset, it means that the
conversion of code-points and character codes of the charset is
- done by map looking up. The map must be given by #Mmapfile
+ done by map looking up. The map must be given by @b Mmapfile
parameter. */
/***ja @brief ¥Þ¥Ã¥×·¿¤Î¥á¥½¥Ã¥É¤ò¼¨¤¹¥·¥ó¥Ü¥ë.
¥·¥ó¥Ü¥ë #Mmap ¤Ï <tt>"map"</tt> ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢Ê¸»ú¥»¥Ã¥È¤Î
- #Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢¥³¡¼¥É¥Ý¥¤¥ó¥È¤Èʸ»ú¥»¥Ã¥È¤Îʸ»ú¥³¡¼¥É¤Î´Ö¤ÎÊÑ´¹¤¬¥Þ¥Ã¥×¤ò»²¾È¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¹Ô¤ï¤ì¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
- ¥Þ¥Ã¥×¤Ï #Mmapfile ¥Ñ¥é¥á¡¼¥¿¤È¤·¤ÆÍ¿¤¨¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ */
+ @b Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢¥³¡¼¥É¥Ý¥¤¥ó¥È¤Èʸ»ú¥»¥Ã¥È¤Îʸ»ú¥³¡¼¥É¤Î´Ö¤ÎÊÑ´¹¤¬¥Þ¥Ã¥×¤ò»²¾È¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¹Ô¤ï¤ì¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
+ ¥Þ¥Ã¥×¤Ï @b Mmapfile ¥Ñ¥é¥á¡¼¥¿¤È¤·¤ÆÍ¿¤¨¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£ */
MSymbol Mmap;
/*=*/
/***en @brief Symbol for the unify type method of charset.
The symbol #Munify has the name <tt>"unify"</tt> and, when used as
- a value of #Mmethod parameter of a charset, it means that the
+ a value of @b Mmethod parameter of a charset, it means that the
conversion of code-points and character codes of the charset is
done by map looking up and offsetting. The map must be given by
- #Mmapfile parameter. For this kind of charset, a unique
+ @b Mmapfile parameter. For this kind of charset, a unique
continuous character code space for all characters is assigned.
If the map has an entry for a code-point, the conversion is done
CHARACTER-CODE = CODE-POINT - MIN-CODE + LOWEST-CHAR-CODE
@endverbatim
- where, MIN-CODE is a value of #Mmin_code parameter of the charset,
+ where, MIN-CODE is a value of @b Mmin_code parameter of the charset,
and LOWEST-CHAR-CODE is the lowest character code of the assigned
code space. */
/***ja @brief ¥æ¥Ë¥Õ¥¡¥¤·¿¤Î¥á¥½¥Ã¥É¤ò¼¨¤¹¥·¥ó¥Ü¥ë.
- ¥·¥ó¥Ü¥ë #Minherit ¤Ï <tt>"unify"</tt> ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢Ê¸»ú¥»¥Ã¥È¤Î
- #Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢¥³¡¼¥É¥Ý¥¤¥ó¥È¤Èʸ»ú¥»¥Ã¥È¤Îʸ»ú¥³¡¼¥É¤Î´Ö¤ÎÊÑ´¹¤¬¡¢¥Þ¥Ã¥×¤Î»²¾È¤È¥ª¥Õ¥»¥Ã¥È¤ÎÁȤ߹ç¤ï¤»¤Ë¤è¤Ã¤Æ¹Ô¤ï¤ì¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
- ¥Þ¥Ã¥×¤Ï #Mmapfile ¥Ñ¥é¥á¡¼¥¿¤È¤·¤ÆÍ¿¤¨¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
+ ¥·¥ó¥Ü¥ë #Munify ¤Ï <tt>"unify"</tt> ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢Ê¸»ú¥»¥Ã¥È¤Î
+ @b Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢¥³¡¼¥É¥Ý¥¤¥ó¥È¤Èʸ»ú¥»¥Ã¥È¤Îʸ»ú¥³¡¼¥É¤Î´Ö¤ÎÊÑ´¹¤¬¡¢¥Þ¥Ã¥×¤Î»²¾È¤È¥ª¥Õ¥»¥Ã¥È¤ÎÁȤ߹ç¤ï¤»¤Ë¤è¤Ã¤Æ¹Ô¤ï¤ì¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
+ ¥Þ¥Ã¥×¤Ï @b Mmapfile ¥Ñ¥é¥á¡¼¥¿¤È¤·¤ÆÍ¿¤¨¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
¤³¤Î¼ï¤Î³Æʸ»ú¥»¥Ã¥È¤Ë¤Ï¡¢Á´Ê¸»ú¤ËÂФ·¤ÆϢ³¤¹¤ë¥³¡¼¥É¥¹¥Ú¡¼¥¹¤¬¤½¤ì¤¾¤ì³ä¤êÅö¤Æ¤é¤ì¤ë¡£
¥³¡¼¥É¥Ý¥¤¥ó¥È¤¬¥Þ¥Ã¥×¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ì¤Ð¡¢ÊÑ´¹¤Ï¥Þ¥Ã¥×»²¾È¤Ë¤è¤Ã¤Æ¹Ô¤ï¤ì¤ë¡£
CHARACTER-CODE = CODE-POINT - MIN-CODE + LOWEST-CHAR-CODE
@endverbatim
- ¤³¤³¤Ç¡¢MIN-CODE ¤Ïʸ»ú¥»¥Ã¥È¤Î #Mmin_code ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤǤ¢¤ê¡¢
+ ¤³¤³¤Ç¡¢MIN-CODE ¤Ïʸ»ú¥»¥Ã¥È¤Î @b Mmin_code ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤǤ¢¤ê¡¢
LOWEST-CHAR-CODE ¤Ï³ä¤êÅö¤Æ¤é¤ì¤¿¥³¡¼¥É¥¹¥Ú¡¼¥¹¤ÎºÇ¤â¾®¤µ¤¤Ê¸»ú¥³¡¼¥É¤Ç¤¢¤ë¡£
*/
@brief Symbol for the subset type method of charset.
The symbol #Msubset has the name <tt>"subset"</tt> and, when used
- as a value of #Mmethod parameter of a charset, it means that the
+ as a value of @b Mmethod parameter of a charset, it means that the
charset is a subset of a parent charset. The parent charset must
- be given by #Mparents parameter. The conversion of code-points
+ be given by @b Mparents parameter. The conversion of code-points
and character codes of the charset is done conceptually by this
calculation:
where, PARENT-CODE is a pseudo function that returns a character
code of CODE-POINT in the parent charset, and SUBSET-OFFSET is a
- value given by #Msubset_offset parameter. */
+ value given by @b Msubset_offset parameter. */
/***ja @brief ¥µ¥Ö¥»¥Ã¥È·¿¤Î¥á¥½¥Ã¥É¤ò¼¨¤¹¥·¥ó¥Ü¥ë.
¥·¥ó¥Ü¥ë #Msubset ¤Ï <tt>"subset"</tt> ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢Ê¸»ú¥»¥Ã¥È¤Î
- #Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢¤³¤Îʸ»ú¥»¥Ã¥È¤¬Ê̤Îʸ»ú¥»¥Ã¥È¡Ê¿Æʸ»ú¥»¥Ã¥È¡Ë¤ÎÉôʬ½¸¹ç¤Ç¤¢¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
- ¿Æʸ»ú¥»¥Ã¥È¤Ï #Mparents ¥Ñ¥é¥á¡¼¥¿¤Ë¤è¤Ã¤ÆÍ¿¤¨¤é¤ì¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
+ @b Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢¤³¤Îʸ»ú¥»¥Ã¥È¤¬Ê̤Îʸ»ú¥»¥Ã¥È¡Ê¿Æʸ»ú¥»¥Ã¥È¡Ë¤ÎÉôʬ½¸¹ç¤Ç¤¢¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
+ ¿Æʸ»ú¥»¥Ã¥È¤Ï @b Mparents ¥Ñ¥é¥á¡¼¥¿¤Ë¤è¤Ã¤ÆÍ¿¤¨¤é¤ì¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
¥³¡¼¥É¥Ý¥¤¥ó¥È¤Èʸ»ú¥»¥Ã¥È¤Îʸ»ú¥³¡¼¥É¤Î´Ö¤ÎÊÑ´¹¤Ï¡¢³µÇ°Åª¤Ë¤Ï°Ê²¼¤Î¼°¤Ë½¾¤¦¡£
@verbatim
¤³¤³¤Ç PARENT-CODE ¤Ï CODE-POINT
¤Î¿Æʸ»ú¥»¥Ã¥ÈÃæ¤Ç¤Îʸ»ú¥³¡¼¥É¤òÊÖ¤¹µ¼´Ø¿ô¤Ç¤¢¤ê¡¢SUBSET-OFFSET ¤Ï
- #Msubset_offset ¥Ñ¥é¥á¡¼¥¿¤ÇÍ¿¤¨¤é¤ì¤ëÃͤǤ¢¤ë¡£
+ @b Msubset_offset ¥Ñ¥é¥á¡¼¥¿¤ÇÍ¿¤¨¤é¤ì¤ëÃͤǤ¢¤ë¡£
*/
MSymbol Msubset;
@brief Symbol for the superset type method of charset.
The symbol #Msuperset has the name <tt>"superset"</tt> and, when
- used as a value of #Mmethod parameter of a charset, it means that
+ used as a value of @b Mmethod parameter of a charset, it means that
the charset is a superset of parent charsets. The parent charsets
- must be given by #Mparents parameter. */
+ must be given by @b Mparents parameter. */
/***ja
@brief ¥¹¡¼¥Ñ¡¼¥»¥Ã¥È·¿¤Î¥á¥½¥Ã¥É¤ò¼¨¤¹¥·¥ó¥Ü¥ë.
¥·¥ó¥Ü¥ë #Msuperset ¤Ï <tt>"superset"</tt> ¤È¤¤¤¦Ì¾Á°¤ò»ý¤Á¡¢Ê¸»ú¥»¥Ã¥È¤Î
- #Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢¤³¤Îʸ»ú¥»¥Ã¥È¤¬Ê̤Îʸ»ú¥»¥Ã¥È¡Ê¿Æʸ»ú¥»¥Ã¥È¡Ë¤Î¾å°Ì½¸¹ç¤Ç¤¢¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
- ¿Æʸ»ú¥»¥Ã¥È¤Ï #Mparents ¥Ñ¥é¥á¡¼¥¿¤Ë¤è¤Ã¤ÆÍ¿¤¨¤é¤ì¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
+ @b Mmethod ¥Ñ¥é¥á¡¼¥¿¤ÎÃͤȤ·¤ÆÍѤ¤¤é¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢¤³¤Îʸ»ú¥»¥Ã¥È¤¬Ê̤Îʸ»ú¥»¥Ã¥È¡Ê¿Æʸ»ú¥»¥Ã¥È¡Ë¤Î¾å°Ì½¸¹ç¤Ç¤¢¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
+ ¿Æʸ»ú¥»¥Ã¥È¤Ï @b Mparents ¥Ñ¥é¥á¡¼¥¿¤Ë¤è¤Ã¤ÆÍ¿¤¨¤é¤ì¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
*/
MSymbol Msuperset;
<ul>
- <li> Key is #Mmethod, value is a symbol.
+ <li> Key is @b Mmethod, value is a symbol.
The value specifies the method for decoding/encoding code-points
in the charset. It must be #Moffset, #Mmap (default), #Munify,
#Msubset, or #Msuperset.
- <li> Key is #Mdimension, value is an integer
+ <li> Key is @b Mdimension, value is an integer
The value specifies the dimension of code-points of the charset.
It must be 1 (default), 2, 3, or 4.
- <li> Key is #Mmin_range, value is an unsigned integer
+ <li> Key is @b Mmin_range, value is an unsigned integer
The value specifies the minimum range of a code-point, which means
that the Nth byte of the value is the minimum Nth byte of
code-points of the charset. The default value is 0.
- <li> Key is #Mmax_range, value is an unsigned integer
+ <li> Key is @b Mmax_range, value is an unsigned integer
The value specifies the maximum range of a code-point, which means
that the Nth byte of the value is the maximum Nth byte of
0xFFFFFF, or 0xFFFFFFFF if the dimension is 1, 2, 3, or 4
respectively.
- <li> Key is #Mmin_code, value is an unsigned integer
+ <li> Key is @b Mmin_code, value is an unsigned integer
The value specifies the minimum code-point of
the charset. The default value is the minimum range.
- <li> Key is #Mmax_code, value is an unsigned integer
+ <li> Key is @b Mmax_code, value is an unsigned integer
The value specifies the maximum code-point of
the charset. The default value is the maximum range.
- <li> Key is #Mascii_compatible, value is a symbol
+ <li> Key is @b Mascii_compatible, value is a symbol
The value specifies whether the charset is ASCII compatible or
not. If the value is #Mnil (default), it is not ASCII
compatible, else compatible.
- <li> Key is #Mfinal_byte, value is an integer
+ <li> Key is @b Mfinal_byte, value is an integer
The value specifies the @e final @e byte of the charset registered
in The International Registry. It must be 0 (default) or 32..127.
The value 0 means that the charset is not in the registry.
- <li> Key is #Mrevision, value is an integer
+ <li> Key is @b Mrevision, value is an integer
The value specifies the @e revision @e number of the charset
registered in The International Registry. It must be 0..127. If
ignored. The value 0 means that the charset has no revision
number.
- <li> Key is #Mmin_char, value is an integer
+ <li> Key is @b Mmin_char, value is an integer
The value specifies the minimum character code of the charset.
The default value is 0.
- <li> Key is #Mmapfile, value is an M-text
+ <li> Key is @b Mmapfile, value is an M-text
If the method is #Mmap or #Munify, a data that contains
mapping information is added to the m17n database by calling
Otherwise, this parameter is ignored.
- <li> Key is #Mparents, value is a plist
+ <li> Key is @b Mparents, value is a plist
If the method is #Msubset, the value must is a plist of length
1, and the value of the plist must be a symbol representing a
Otherwise, this parameter is ignored.
- <li> Key is #Mdefine_coding, value is a symbol
+ <li> Key is @b Mdefine_coding, value is a symbol
If the dimension of the charset is 1, the value specifies whether
or not to define a coding system of the same name whose type is
<ul>
- <li> ¥¡¼¤¬ #Mmethod ¤ÇÃͤ¬¥·¥ó¥Ü¥ë¤Î»þ
+ <li> ¥¡¼¤¬ @b Mmethod ¤ÇÃͤ¬¥·¥ó¥Ü¥ë¤Î»þ
Ãͤϡ¢#Moffset, #Mmap (¥Ç¥Õ¥©¥ë¥ÈÃÍ), #Munify, #Msubset,
#Msuperset ¤Î¤¤¤º¤ì¤«¤Ç¤¢¤ê¡¢Ê¸»ú¥»¥Ã¥È¤Î¥³¡¼¥É¥Ý¥¤¥ó¥È¤ò¥Ç¥³¡¼¥É¡¿¥¨¥ó¥³¡¼¥É¤¹¤ëºÝ¤Î¥á¥½¥Ã¥É¤ò»ØÄꤹ¤ë¡£
- <li> ¥¡¼¤¬ #Mdimension ¤ÇÃͤ¬À°¿ôÃͤλþ
+ <li> ¥¡¼¤¬ @b Mdimension ¤ÇÃͤ¬À°¿ôÃͤλþ
Ãͤϡ¢1 (¥Ç¥Õ¥©¥ë¥ÈÃÍ), 2, 3, 4
¤Î¤¤¤º¤ì¤«¤Ç¤¢¤ê¡¢Ê¸»ú¥»¥Ã¥È¤Î¥³¡¼¥É¥Ý¥¤¥ó¥È¤Î¼¡¸µ¤Ç¤¢¤ë¡£
- <li> ¥¡¼¤¬ #Mmin_range ¤ÇÃͤ¬ÈóÉéÀ°¿ôÃͤλþ
+ <li> ¥¡¼¤¬ @b Mmin_range ¤ÇÃͤ¬ÈóÉéÀ°¿ôÃͤλþ
Ãͤϥ³¡¼¥É¥Ý¥¤¥ó¥È¤ÎºÇ¾®¤ÎÃͤǤ¢¤ë¡£¤¹¤Ê¤ï¤Á¡¢¤³¤ÎÃͤΠN
ÈÖÌܤΥХ¤¥È¤Ï¤³¤Îʸ»ú¥»¥Ã¥È¤Î¥³¡¼¥É¥Ý¥¤¥ó¥È¤Î N ÈÖÌܤΥХ¤¥È¤ÎºÇ¾®¤Î¤â¤Î¤È¤Ê¤ë¡£
¥Ç¥Õ¥©¥ë¥ÈÃÍ¤Ï 0 ¡£
- <li> ¥¡¼¤¬ #Mmax_range ¤ÇÃͤ¬ÈóÉéÀ°¿ôÃͤλþ
+ <li> ¥¡¼¤¬ @b Mmax_range ¤ÇÃͤ¬ÈóÉéÀ°¿ôÃͤλþ
Ãͤϥ³¡¼¥É¥Ý¥¤¥ó¥È¤ÎºÇÂç¤ÎÃͤǤ¢¤ë¡£¤¹¤Ê¤ï¤Á¡¢¤³¤ÎÃͤΠN
ÈÖÌܤΥХ¤¥È¤Ï¤³¤Îʸ»ú¥»¥Ã¥È¤Î¥³¡¼¥É¥Ý¥¤¥ó¥È¤Î N ÈÖÌܤΥХ¤¥È¤ÎºÇÂç¤Î¤â¤Î¤È¤Ê¤ë¡£
¥Ç¥Õ¥©¥ë¥ÈÃͤϡ¢¥³¡¼¥É¥Ý¥¤¥ó¥È¤Î¼¡¸µ¤¬ 1, 2, 3, 4 ¤Î»þ¡¢¤½¤ì¤¾¤ì
0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF ¡£
- <li> ¥¡¼¤¬ #Mmin_code ¤ÇÃͤ¬ÈóÉéÀ°¿ôÃͤλþ
+ <li> ¥¡¼¤¬ @b Mmin_code ¤ÇÃͤ¬ÈóÉéÀ°¿ôÃͤλþ
ÃͤϤ³¤Îʸ»ú¥»¥Ã¥È¤ÎºÇ¾®¤Î¥³¡¼¥É¥Ý¥¤¥ó¥È¤Ç¤¢¤ë¡£¥Ç¥Õ¥©¥ë¥ÈÃͤÏ
- #Mmin_range ¤ÎÃÍ¡£
+ @b Mmin_range ¤ÎÃÍ¡£
- <li> ¥¡¼¤¬ #Mmax_code ¤ÇÃͤ¬ÈóÉéÀ°¿ôÃͤλþ
+ <li> ¥¡¼¤¬ @b Mmax_code ¤ÇÃͤ¬ÈóÉéÀ°¿ôÃͤλþ
ÃͤϤ³¤Îʸ»ú¥»¥Ã¥È¤ÎºÇÂç¤Î¥³¡¼¥É¥Ý¥¤¥ó¥È¤Ç¤¢¤ë¡£¥Ç¥Õ¥©¥ë¥ÈÃͤÏ
- #Mmax_range ¤ÎÃÍ¡£
+ @b Mmax_range ¤ÎÃÍ¡£
- <li> ¥¡¼¤¬ #Mascii_compatible ¤ÇÃͤ¬¥·¥ó¥Ü¥ë¤Î»þ
+ <li> ¥¡¼¤¬ @b Mascii_compatible ¤ÇÃͤ¬¥·¥ó¥Ü¥ë¤Î»þ
ÃͤϤ³¤Îʸ»ú¥»¥Ã¥È¤¬ ASCII ¸ß´¹¤Ç¤¢¤ë¤«¤É¤¦¤«¤ò¼¨¤¹¡£¥Ç¥Õ¥©¥ë¥ÈÃͤÎ
#Mnil ¤Ç¤¢¤ì¤Ð¸ß´¹¤Ç¤Ï¤Ê¤¯¡¢¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï¸ß´¹¤Ç¤¢¤ë¡£
- <li> ¥¡¼¤¬ #Mfinal_byte ¤ÇÃͤ¬À°¿ôÃͤλþ
+ <li> ¥¡¼¤¬ @b Mfinal_byte ¤ÇÃͤ¬À°¿ôÃͤλþ
ÃͤϤ³¤Îʸ»ú¥»¥Ã¥È¤Î The International Registry ¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë
@e ½ªÃ¼¥Ð¥¤¥È ¤Ç¤¢¤ê¡¢0 (¥Ç¥Õ¥©¥ë¥ÈÃÍ) ¤Ç¤¢¤ë¤« 32..127 ¤Ç¤¢¤ë¡£0
¤ÏÅÐÏ¿¤µ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
- <li> ¥¡¼¤¬ #Mrevision ¤ÇÃͤ¬À°¿ôÃͤλþ
+ <li> ¥¡¼¤¬ @b Mrevision ¤ÇÃͤ¬À°¿ôÃͤλþ
ÃÍ¤Ï The International Registry ¤ËÅÐÏ¿¤µ¤ì¤Æ¤¤¤ë @e revision @e
number ¤Ç¤¢¤ê¡¢0..127 ¤Ç¤¢¤ë¡£
ʸ»ú¥»¥Ã¥È¤¬ÅÐÏ¿¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¤³¤ÎÃͤÏ̵»ë¤µ¤ì¤ë¡£
0 ¤Ï revision number ¤¬Â¸ºß¤·¤Ê¤¤¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
- <li> ¥¡¼¤¬ #Mmin_char ¤ÇÃͤ¬À°¿ôÃͤλþ
+ <li> ¥¡¼¤¬ @b Mmin_char ¤ÇÃͤ¬À°¿ôÃͤλþ
ÃͤϤ³¤Îʸ»ú¥»¥Ã¥È¤ÎºÇ¾®¤Îʸ»ú¥³¡¼¥É¤Ç¤¢¤ë¡£¥Ç¥Õ¥©¥ë¥ÈÃÍ¤Ï 0 ¡£
- <li> ¥¡¼¤¬ #Mmapfile ¤ÇÃͤ¬ M-text ¤Î»þ
+ <li> ¥¡¼¤¬ @b Mmapfile ¤ÇÃͤ¬ M-text ¤Î»þ
¥á¥½¥Ã¥É¤¬ #Mmap ¤« #Munify ¤Î»þ¡¢´Ø¿ô mdatabase_define ()
¤ò¤³¤ÎÃͤò°ú¿ô $EXTRA_INFO ¤È¤·¤Æ¸Æ¤Ö¤³¤È¤Ë¤è¤Ã¤Æ¡¢¥Þ¥Ã¥Ô¥ó¥°¤Ë´Ø¤¹¤ë¥Ç¡¼¥¿¤¬
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢¤³¤Î¥Ñ¥é¥á¡¼¥¿¤Ï̵»ë¤µ¤ì¤ë¡£
- <li> ¥¡¼¤¬ #Mparents ¤ÇÃͤ¬ plist ¤Î»þ
+ <li> ¥¡¼¤¬ @b Mparents ¤ÇÃͤ¬ plist ¤Î»þ
¥á¥½¥Ã¥É¤¬ #Msubset ¤Ê¤é¤Ð¡¢ÃͤÏŤµ 1 ¤Î plist
¤Ç¤¢¤ê¡¢¤½¤ÎÃͤϤ³¤Îʸ»ú¥»¥Ã¥È¤Î¾å°Ì½¸¹ç¤È¤Ê¤ëʸ»ú¥»¥Ã¥È¤ò¼¨¤¹¥·¥ó¥Ü¥ë¤Ç¤¢¤ë¡£
¤½¤¦¤Ç¤Ê¤±¤ì¤Ð¡¢¤³¤Î¥Ñ¥é¥á¡¼¥¿¤Ï̵»ë¤µ¤ì¤ë¡£
- <li> ¥¡¼¤¬ #Mdefine_coding ¤ÇÃͤ¬¥·¥ó¥Ü¥ë¤Î»þ
+ <li> ¥¡¼¤¬ @b Mdefine_coding ¤ÇÃͤ¬¥·¥ó¥Ü¥ë¤Î»þ
ʸ»ú¥»¥Ã¥È¤Î¼¡¸µ¤¬ 1 ¤Ê¤é¤Ð¡¢Ãͤ¬ #Mnil °Ê³°¤Î¾ì¹ç¤Ë #Mcharset ·¿
¤ÇƱ¤¸Ì¾Á°¤ò»ý¤Ä¥³¡¼¥É·Ï¤òÄêµÁ¤¹¤ë¡£