/[emacs]/emacs/src/ccl.c
ViewVC logotype

Diff of /emacs/src/ccl.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.72 by raeburn, Tue Oct 16 09:09:51 2001 UTC revision 1.73 by pj, Sat Oct 20 20:48:47 2001 UTC
# Line 2010  setup_ccl_program (ccl, ccl_prog) Line 2010  setup_ccl_program (ccl, ccl_prog)
2010  #ifdef emacs  #ifdef emacs
2011    
2012  DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0,  DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0,
2013    "Return t if OBJECT is a CCL program name or a compiled CCL program code.\n\         doc: /* Return t if OBJECT is a CCL program name or a compiled CCL program code.
2014  See the documentation of  `define-ccl-program' for the detail of CCL program.")  See the documentation of  `define-ccl-program' for the detail of CCL program.  */)
2015    (object)       (object)
2016       Lisp_Object object;       Lisp_Object object;
2017  {  {
2018    Lisp_Object val;    Lisp_Object val;
# Line 2032  See the documentation of  `define-ccl-pr Line 2032  See the documentation of  `define-ccl-pr
2032  }  }
2033    
2034  DEFUN ("ccl-execute", Fccl_execute, Sccl_execute, 2, 2, 0,  DEFUN ("ccl-execute", Fccl_execute, Sccl_execute, 2, 2, 0,
2035    "Execute CCL-PROGRAM with registers initialized by REGISTERS.\n\         doc: /* Execute CCL-PROGRAM with registers initialized by REGISTERS.
2036  \n\  
2037  CCL-PROGRAM is a CCL program name (symbol)\n\  CCL-PROGRAM is a CCL program name (symbol)
2038  or compiled code generated by `ccl-compile' (for backward compatibility.\n\  or compiled code generated by `ccl-compile' (for backward compatibility.
2039  In the latter case, the execution overhead is bigger than in the former).\n\  In the latter case, the execution overhead is bigger than in the former).
2040  No I/O commands should appear in CCL-PROGRAM.\n\  No I/O commands should appear in CCL-PROGRAM.
2041  \n\  
2042  REGISTERS is a vector of [R0 R1 ... R7] where RN is an initial value\n\  REGISTERS is a vector of [R0 R1 ... R7] where RN is an initial value
2043  for the Nth register.\n\  for the Nth register.
2044  \n\  
2045  As side effect, each element of REGISTERS holds the value of\n\  As side effect, each element of REGISTERS holds the value of
2046  the corresponding register after the execution.\n\  the corresponding register after the execution.
2047  \n\  
2048  See the documentation of `define-ccl-program' for a definition of CCL\n\  See the documentation of `define-ccl-program' for a definition of CCL
2049  programs.")  programs.  */)
2050    (ccl_prog, reg)       (ccl_prog, reg)
2051       Lisp_Object ccl_prog, reg;       Lisp_Object ccl_prog, reg;
2052  {  {
2053    struct ccl_program ccl;    struct ccl_program ccl;
# Line 2077  programs.") Line 2077  programs.")
2077    
2078  DEFUN ("ccl-execute-on-string", Fccl_execute_on_string, Sccl_execute_on_string,  DEFUN ("ccl-execute-on-string", Fccl_execute_on_string, Sccl_execute_on_string,
2079         3, 5, 0,         3, 5, 0,
2080    "Execute CCL-PROGRAM with initial STATUS on STRING.\n\         doc: /* Execute CCL-PROGRAM with initial STATUS on STRING.
2081  \n\  
2082  CCL-PROGRAM is a symbol registered by register-ccl-program,\n\  CCL-PROGRAM is a symbol registered by register-ccl-program,
2083  or a compiled code generated by `ccl-compile' (for backward compatibility,\n\  or a compiled code generated by `ccl-compile' (for backward compatibility,
2084  in this case, the execution is slower).\n\  in this case, the execution is slower).
2085  \n\  
2086  Read buffer is set to STRING, and write buffer is allocated automatically.\n\  Read buffer is set to STRING, and write buffer is allocated automatically.
2087  \n\  
2088  STATUS is a vector of [R0 R1 ... R7 IC], where\n\  STATUS is a vector of [R0 R1 ... R7 IC], where
2089   R0..R7 are initial values of corresponding registers,\n\   R0..R7 are initial values of corresponding registers,
2090   IC is the instruction counter specifying from where to start the program.\n\   IC is the instruction counter specifying from where to start the program.
2091  If R0..R7 are nil, they are initialized to 0.\n\  If R0..R7 are nil, they are initialized to 0.
2092  If IC is nil, it is initialized to head of the CCL program.\n\  If IC is nil, it is initialized to head of the CCL program.
2093  \n\  
2094  If optional 4th arg CONTINUE is non-nil, keep IC on read operation\n\  If optional 4th arg CONTINUE is non-nil, keep IC on read operation
2095  when read buffer is exausted, else, IC is always set to the end of\n\  when read buffer is exausted, else, IC is always set to the end of
2096  CCL-PROGRAM on exit.\n\  CCL-PROGRAM on exit.
2097  \n\  
2098  It returns the contents of write buffer as a string,\n\  It returns the contents of write buffer as a string,
2099   and as side effect, STATUS is updated.\n\   and as side effect, STATUS is updated.
2100  If the optional 5th arg UNIBYTE-P is non-nil, the returned string\n\  If the optional 5th arg UNIBYTE-P is non-nil, the returned string
2101  is a unibyte string.  By default it is a multibyte string.\n\  is a unibyte string.  By default it is a multibyte string.
2102  \n\  
2103  See the documentation of `define-ccl-program' for the detail of CCL program.")  See the documentation of `define-ccl-program' for the detail of CCL program.  */)
2104    (ccl_prog, status, str, contin, unibyte_p)       (ccl_prog, status, str, contin, unibyte_p)
2105       Lisp_Object ccl_prog, status, str, contin, unibyte_p;       Lisp_Object ccl_prog, status, str, contin, unibyte_p;
2106  {  {
2107    Lisp_Object val;    Lisp_Object val;
# Line 2167  See the documentation of `define-ccl-pro Line 2167  See the documentation of `define-ccl-pro
2167    
2168  DEFUN ("register-ccl-program", Fregister_ccl_program, Sregister_ccl_program,  DEFUN ("register-ccl-program", Fregister_ccl_program, Sregister_ccl_program,
2169         2, 2, 0,         2, 2, 0,
2170    "Register CCL program CCL_PROG as NAME in `ccl-program-table'.\n\         doc: /* Register CCL program CCL_PROG as NAME in `ccl-program-table'.
2171  CCL_PROG should be a compiled CCL program (vector), or nil.\n\  CCL_PROG should be a compiled CCL program (vector), or nil.
2172  If it is nil, just reserve NAME as a CCL program name.\n\  If it is nil, just reserve NAME as a CCL program name.
2173  Return index number of the registered CCL program.")  Return index number of the registered CCL program.  */)
2174    (name, ccl_prog)       (name, ccl_prog)
2175       Lisp_Object name, ccl_prog;       Lisp_Object name, ccl_prog;
2176  {  {
2177    int len = XVECTOR (Vccl_program_table)->size;    int len = XVECTOR (Vccl_program_table)->size;
# Line 2252  Return index number of the registered CC Line 2252  Return index number of the registered CC
2252  DEFUN ("register-code-conversion-map", Fregister_code_conversion_map,  DEFUN ("register-code-conversion-map", Fregister_code_conversion_map,
2253         Sregister_code_conversion_map,         Sregister_code_conversion_map,
2254         2, 2, 0,         2, 2, 0,
2255    "Register SYMBOL as code conversion map MAP.\n\         doc: /* Register SYMBOL as code conversion map MAP.
2256  Return index number of the registered map.")  Return index number of the registered map.  */)
2257    (symbol, map)       (symbol, map)
2258       Lisp_Object symbol, map;       Lisp_Object symbol, map;
2259  {  {
2260    int len = XVECTOR (Vcode_conversion_map_vector)->size;    int len = XVECTOR (Vcode_conversion_map_vector)->size;
# Line 2319  syms_of_ccl () Line 2319  syms_of_ccl ()
2319    staticpro (&Qcode_conversion_map_id);    staticpro (&Qcode_conversion_map_id);
2320    
2321    DEFVAR_LISP ("code-conversion-map-vector", &Vcode_conversion_map_vector,    DEFVAR_LISP ("code-conversion-map-vector", &Vcode_conversion_map_vector,
2322      "Vector of code conversion maps.");                 doc: /* Vector of code conversion maps.  */);
2323    Vcode_conversion_map_vector = Fmake_vector (make_number (16), Qnil);    Vcode_conversion_map_vector = Fmake_vector (make_number (16), Qnil);
2324    
2325    DEFVAR_LISP ("font-ccl-encoder-alist", &Vfont_ccl_encoder_alist,    DEFVAR_LISP ("font-ccl-encoder-alist", &Vfont_ccl_encoder_alist,
2326      "Alist of fontname patterns vs corresponding CCL program.\n\                 doc: /* Alist of fontname patterns vs corresponding CCL program.
2327  Each element looks like (REGEXP . CCL-CODE),\n\  Each element looks like (REGEXP . CCL-CODE),
2328   where CCL-CODE is a compiled CCL program.\n\   where CCL-CODE is a compiled CCL program.
2329  When a font whose name matches REGEXP is used for displaying a character,\n\  When a font whose name matches REGEXP is used for displaying a character,
2330   CCL-CODE is executed to calculate the code point in the font\n\   CCL-CODE is executed to calculate the code point in the font
2331   from the charset number and position code(s) of the character which are set\n\   from the charset number and position code(s) of the character which are set
2332   in CCL registers R0, R1, and R2 before the execution.\n\   in CCL registers R0, R1, and R2 before the execution.
2333  The code point in the font is set in CCL registers R1 and R2\n\  The code point in the font is set in CCL registers R1 and R2
2334   when the execution terminated.\n\   when the execution terminated.
2335  If the font is single-byte font, the register R2 is not used.");   If the font is single-byte font, the register R2 is not used.  */);
2336    Vfont_ccl_encoder_alist = Qnil;    Vfont_ccl_encoder_alist = Qnil;
2337    
2338    defsubr (&Sccl_program_p);    defsubr (&Sccl_program_p);

Legend:
Removed from v.1.72  
changed lines
  Added in v.1.73

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26