Mercurial > emacs
comparison src/ccl.c @ 40103:6b389fb978bc
Change doc-string comments to `new style' [w/`doc:' keyword].
author | Pavel Janík <Pavel@Janik.cz> |
---|---|
date | Sat, 20 Oct 2001 20:54:39 +0000 |
parents | 579177964efa |
children | cdfd4d09b79a |
comparison
equal
deleted
inserted
replaced
40102:d001bdd0593d | 40103:6b389fb978bc |
---|---|
2008 } | 2008 } |
2009 | 2009 |
2010 #ifdef emacs | 2010 #ifdef emacs |
2011 | 2011 |
2012 DEFUN ("ccl-program-p", Fccl_program_p, Sccl_program_p, 1, 1, 0, | 2012 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\ | 2013 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.") | 2014 See the documentation of `define-ccl-program' for the detail of CCL program. */) |
2015 (object) | 2015 (object) |
2016 Lisp_Object object; | 2016 Lisp_Object object; |
2017 { | 2017 { |
2018 Lisp_Object val; | 2018 Lisp_Object val; |
2019 | 2019 |
2020 if (VECTORP (object)) | 2020 if (VECTORP (object)) |
2030 || XINT (val) >= XVECTOR (Vccl_program_table)->size) | 2030 || XINT (val) >= XVECTOR (Vccl_program_table)->size) |
2031 ? Qnil : Qt); | 2031 ? Qnil : Qt); |
2032 } | 2032 } |
2033 | 2033 |
2034 DEFUN ("ccl-execute", Fccl_execute, Sccl_execute, 2, 2, 0, | 2034 DEFUN ("ccl-execute", Fccl_execute, Sccl_execute, 2, 2, 0, |
2035 "Execute CCL-PROGRAM with registers initialized by REGISTERS.\n\ | 2035 doc: /* Execute CCL-PROGRAM with registers initialized by REGISTERS. |
2036 \n\ | 2036 |
2037 CCL-PROGRAM is a CCL program name (symbol)\n\ | 2037 CCL-PROGRAM is a CCL program name (symbol) |
2038 or compiled code generated by `ccl-compile' (for backward compatibility.\n\ | 2038 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\ | 2039 In the latter case, the execution overhead is bigger than in the former). |
2040 No I/O commands should appear in CCL-PROGRAM.\n\ | 2040 No I/O commands should appear in CCL-PROGRAM. |
2041 \n\ | 2041 |
2042 REGISTERS is a vector of [R0 R1 ... R7] where RN is an initial value\n\ | 2042 REGISTERS is a vector of [R0 R1 ... R7] where RN is an initial value |
2043 for the Nth register.\n\ | 2043 for the Nth register. |
2044 \n\ | 2044 |
2045 As side effect, each element of REGISTERS holds the value of\n\ | 2045 As side effect, each element of REGISTERS holds the value of |
2046 the corresponding register after the execution.\n\ | 2046 the corresponding register after the execution. |
2047 \n\ | 2047 |
2048 See the documentation of `define-ccl-program' for a definition of CCL\n\ | 2048 See the documentation of `define-ccl-program' for a definition of CCL |
2049 programs.") | 2049 programs. */) |
2050 (ccl_prog, reg) | 2050 (ccl_prog, reg) |
2051 Lisp_Object ccl_prog, reg; | 2051 Lisp_Object ccl_prog, reg; |
2052 { | 2052 { |
2053 struct ccl_program ccl; | 2053 struct ccl_program ccl; |
2054 int i; | 2054 int i; |
2055 | 2055 |
2075 return Qnil; | 2075 return Qnil; |
2076 } | 2076 } |
2077 | 2077 |
2078 DEFUN ("ccl-execute-on-string", Fccl_execute_on_string, Sccl_execute_on_string, | 2078 DEFUN ("ccl-execute-on-string", Fccl_execute_on_string, Sccl_execute_on_string, |
2079 3, 5, 0, | 2079 3, 5, 0, |
2080 "Execute CCL-PROGRAM with initial STATUS on STRING.\n\ | 2080 doc: /* Execute CCL-PROGRAM with initial STATUS on STRING. |
2081 \n\ | 2081 |
2082 CCL-PROGRAM is a symbol registered by register-ccl-program,\n\ | 2082 CCL-PROGRAM is a symbol registered by register-ccl-program, |
2083 or a compiled code generated by `ccl-compile' (for backward compatibility,\n\ | 2083 or a compiled code generated by `ccl-compile' (for backward compatibility, |
2084 in this case, the execution is slower).\n\ | 2084 in this case, the execution is slower). |
2085 \n\ | 2085 |
2086 Read buffer is set to STRING, and write buffer is allocated automatically.\n\ | 2086 Read buffer is set to STRING, and write buffer is allocated automatically. |
2087 \n\ | 2087 |
2088 STATUS is a vector of [R0 R1 ... R7 IC], where\n\ | 2088 STATUS is a vector of [R0 R1 ... R7 IC], where |
2089 R0..R7 are initial values of corresponding registers,\n\ | 2089 R0..R7 are initial values of corresponding registers, |
2090 IC is the instruction counter specifying from where to start the program.\n\ | 2090 IC is the instruction counter specifying from where to start the program. |
2091 If R0..R7 are nil, they are initialized to 0.\n\ | 2091 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\ | 2092 If IC is nil, it is initialized to head of the CCL program. |
2093 \n\ | 2093 |
2094 If optional 4th arg CONTINUE is non-nil, keep IC on read operation\n\ | 2094 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\ | 2095 when read buffer is exausted, else, IC is always set to the end of |
2096 CCL-PROGRAM on exit.\n\ | 2096 CCL-PROGRAM on exit. |
2097 \n\ | 2097 |
2098 It returns the contents of write buffer as a string,\n\ | 2098 It returns the contents of write buffer as a string, |
2099 and as side effect, STATUS is updated.\n\ | 2099 and as side effect, STATUS is updated. |
2100 If the optional 5th arg UNIBYTE-P is non-nil, the returned string\n\ | 2100 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\ | 2101 is a unibyte string. By default it is a multibyte string. |
2102 \n\ | 2102 |
2103 See the documentation of `define-ccl-program' for the detail of CCL program.") | 2103 See the documentation of `define-ccl-program' for the detail of CCL program. */) |
2104 (ccl_prog, status, str, contin, unibyte_p) | 2104 (ccl_prog, status, str, contin, unibyte_p) |
2105 Lisp_Object ccl_prog, status, str, contin, unibyte_p; | 2105 Lisp_Object ccl_prog, status, str, contin, unibyte_p; |
2106 { | 2106 { |
2107 Lisp_Object val; | 2107 Lisp_Object val; |
2108 struct ccl_program ccl; | 2108 struct ccl_program ccl; |
2109 int i, produced; | 2109 int i, produced; |
2165 return val; | 2165 return val; |
2166 } | 2166 } |
2167 | 2167 |
2168 DEFUN ("register-ccl-program", Fregister_ccl_program, Sregister_ccl_program, | 2168 DEFUN ("register-ccl-program", Fregister_ccl_program, Sregister_ccl_program, |
2169 2, 2, 0, | 2169 2, 2, 0, |
2170 "Register CCL program CCL_PROG as NAME in `ccl-program-table'.\n\ | 2170 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\ | 2171 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\ | 2172 If it is nil, just reserve NAME as a CCL program name. |
2173 Return index number of the registered CCL program.") | 2173 Return index number of the registered CCL program. */) |
2174 (name, ccl_prog) | 2174 (name, ccl_prog) |
2175 Lisp_Object name, ccl_prog; | 2175 Lisp_Object name, ccl_prog; |
2176 { | 2176 { |
2177 int len = XVECTOR (Vccl_program_table)->size; | 2177 int len = XVECTOR (Vccl_program_table)->size; |
2178 int idx; | 2178 int idx; |
2179 Lisp_Object resolved; | 2179 Lisp_Object resolved; |
2250 */ | 2250 */ |
2251 | 2251 |
2252 DEFUN ("register-code-conversion-map", Fregister_code_conversion_map, | 2252 DEFUN ("register-code-conversion-map", Fregister_code_conversion_map, |
2253 Sregister_code_conversion_map, | 2253 Sregister_code_conversion_map, |
2254 2, 2, 0, | 2254 2, 2, 0, |
2255 "Register SYMBOL as code conversion map MAP.\n\ | 2255 doc: /* Register SYMBOL as code conversion map MAP. |
2256 Return index number of the registered map.") | 2256 Return index number of the registered map. */) |
2257 (symbol, map) | 2257 (symbol, map) |
2258 Lisp_Object symbol, map; | 2258 Lisp_Object symbol, map; |
2259 { | 2259 { |
2260 int len = XVECTOR (Vcode_conversion_map_vector)->size; | 2260 int len = XVECTOR (Vcode_conversion_map_vector)->size; |
2261 int i; | 2261 int i; |
2262 Lisp_Object index; | 2262 Lisp_Object index; |
2317 | 2317 |
2318 Qcode_conversion_map_id = intern ("code-conversion-map-id"); | 2318 Qcode_conversion_map_id = intern ("code-conversion-map-id"); |
2319 staticpro (&Qcode_conversion_map_id); | 2319 staticpro (&Qcode_conversion_map_id); |
2320 | 2320 |
2321 DEFVAR_LISP ("code-conversion-map-vector", &Vcode_conversion_map_vector, | 2321 DEFVAR_LISP ("code-conversion-map-vector", &Vcode_conversion_map_vector, |
2322 "Vector of code conversion maps."); | 2322 doc: /* Vector of code conversion maps. */); |
2323 Vcode_conversion_map_vector = Fmake_vector (make_number (16), Qnil); | 2323 Vcode_conversion_map_vector = Fmake_vector (make_number (16), Qnil); |
2324 | 2324 |
2325 DEFVAR_LISP ("font-ccl-encoder-alist", &Vfont_ccl_encoder_alist, | 2325 DEFVAR_LISP ("font-ccl-encoder-alist", &Vfont_ccl_encoder_alist, |
2326 "Alist of fontname patterns vs corresponding CCL program.\n\ | 2326 doc: /* Alist of fontname patterns vs corresponding CCL program. |
2327 Each element looks like (REGEXP . CCL-CODE),\n\ | 2327 Each element looks like (REGEXP . CCL-CODE), |
2328 where CCL-CODE is a compiled CCL program.\n\ | 2328 where CCL-CODE is a compiled CCL program. |
2329 When a font whose name matches REGEXP is used for displaying a character,\n\ | 2329 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\ | 2330 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\ | 2331 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\ | 2332 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\ | 2333 The code point in the font is set in CCL registers R1 and R2 |
2334 when the execution terminated.\n\ | 2334 when the execution terminated. |
2335 If the font is single-byte font, the register R2 is not used."); | 2335 If the font is single-byte font, the register R2 is not used. */); |
2336 Vfont_ccl_encoder_alist = Qnil; | 2336 Vfont_ccl_encoder_alist = Qnil; |
2337 | 2337 |
2338 defsubr (&Sccl_program_p); | 2338 defsubr (&Sccl_program_p); |
2339 defsubr (&Sccl_execute); | 2339 defsubr (&Sccl_execute); |
2340 defsubr (&Sccl_execute_on_string); | 2340 defsubr (&Sccl_execute_on_string); |