/* CCL (Code Conversion Language) interpreter.
- Copyright (C) 2001, 2002, 2003, 2004, 2005,
- 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2001-2011 Free Software Foundation, Inc.
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
- 2005, 2006, 2007, 2008, 2009, 2010
+ 2005, 2006, 2007, 2008, 2009, 2010, 2011
National Institute of Advanced Industrial Science and Technology (AIST)
Registration Number H14PRO021
Copyright (C) 2003
Lisp_Object Qccl, Qcclp;
-/* This contains all code conversion map available to CCL. */
-Lisp_Object Vcode_conversion_map_vector;
-
-/* Alist of fontname patterns vs corresponding CCL program. */
-Lisp_Object Vfont_ccl_encoder_alist;
-
/* This symbol is a property which associates with ccl program vector.
Ex: (get 'ccl-big5-encoder 'ccl-program) returns ccl program vector. */
Lisp_Object Qccl_program;
was once used. */
Lisp_Object Vccl_program_table;
-/* Vector of registered hash tables for translation. */
-Lisp_Object Vtranslation_hash_table_vector;
-
/* Return a hash table of id number ID. */
#define GET_HASH_TABLE(id) \
(XHASH_TABLE (XCDR(XVECTOR(Vtranslation_hash_table_vector)->contents[(id)])))
-extern int charset_unicode;
-
/* CCL (Code Conversion Language) is a simple language which has
operations on one input buffer, one output buffer, and 7 registers.
The syntax of CCL is described in `ccl.el'. Emacs Lisp function
Therefore, the instruction code range is 0..16384(0x3fff).
*/
-/* Read a multibyte characeter.
+/* Read a multibyte character.
A code point is stored into reg[rrr]. A charset ID is stored into
reg[RRR]. */
If IC is nil, it is initialized to head of the CCL program.
If optional 4th arg CONTINUE is non-nil, keep IC on read operation
-when read buffer is exausted, else, IC is always set to the end of
+when read buffer is exhausted, else, IC is always set to the end of
CCL-PROGRAM on exit.
It returns the contents of write buffer as a string,
int i;
int outbufsize;
unsigned char *outbuf, *outp;
- int str_chars, str_bytes;
+ EMACS_INT str_chars, str_bytes;
#define CCL_EXECUTE_BUF_SIZE 1024
int source[CCL_EXECUTE_BUF_SIZE], destination[CCL_EXECUTE_BUF_SIZE];
- int consumed_chars, consumed_bytes, produced_chars;
+ EMACS_INT consumed_chars, consumed_bytes, produced_chars;
if (setup_ccl_program (&ccl, ccl_prog) < 0)
error ("Invalid CCL program");
if (outp - outbuf + MAX_MULTIBYTE_LENGTH * ccl.produced
> outbufsize)
{
- int offset = outp - outbuf;
+ EMACS_INT offset = outp - outbuf;
outbufsize += MAX_MULTIBYTE_LENGTH * ccl.produced;
outbuf = (unsigned char *) xrealloc (outbuf, outbufsize);
outp = outbuf + offset;
{
if (outp - outbuf + ccl.produced > outbufsize)
{
- int offset = outp - outbuf;
+ EMACS_INT offset = outp - outbuf;
outbufsize += ccl.produced;
outbuf = (unsigned char *) xrealloc (outbuf, outbufsize);
outp = outbuf + offset;
Qcode_conversion_map_id = intern_c_string ("code-conversion-map-id");
staticpro (&Qcode_conversion_map_id);
- DEFVAR_LISP ("code-conversion-map-vector", &Vcode_conversion_map_vector,
+ DEFVAR_LISP ("code-conversion-map-vector", Vcode_conversion_map_vector,
doc: /* Vector of code conversion maps. */);
Vcode_conversion_map_vector = Fmake_vector (make_number (16), Qnil);
- DEFVAR_LISP ("font-ccl-encoder-alist", &Vfont_ccl_encoder_alist,
+ DEFVAR_LISP ("font-ccl-encoder-alist", Vfont_ccl_encoder_alist,
doc: /* Alist of fontname patterns vs corresponding CCL program.
Each element looks like (REGEXP . CCL-CODE),
where CCL-CODE is a compiled CCL program.
If the font is single-byte font, the register R2 is not used. */);
Vfont_ccl_encoder_alist = Qnil;
- DEFVAR_LISP ("translation-hash-table-vector", &Vtranslation_hash_table_vector,
+ DEFVAR_LISP ("translation-hash-table-vector", Vtranslation_hash_table_vector,
doc: /* Vector containing all translation hash tables ever defined.
Comprises pairs (SYMBOL . TABLE) where SYMBOL and TABLE were set up by calls
to `define-translation-hash-table'. The vector is indexed by the table id
defsubr (&Sregister_code_conversion_map);
}
-/* arch-tag: bb9a37be-68ce-4576-8d3d-15d750e4a860
- (do not change this comment) */