comparison src/coding.c @ 109179:8cfee7d2955f

Convert DEFUNs to standard C. * src/alloc.c: Convert DEFUNs to standard C. * src/buffer.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/dosfns.c: * src/editfns.c: * src/emacs.c: * src/eval.c: * src/fileio.c: * src/filelock.c: * src/floatfns.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/image.c: * src/indent.c: * src/insdel.c: * src/keyboard.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/menu.c: * src/minibuf.c: * src/msdos.c: * src/nsfns.m: * src/nsmenu.m: * src/nsselect.m: * src/print.c: * src/process.c: * src/search.c: * src/sound.c: * src/syntax.c: * src/term.c: * src/terminal.c: * src/textprop.c: * src/undo.c: * src/w16select.c: * src/w32console.c: * src/w32fns.c: * src/w32font.c: * src/w32menu.c: * src/w32proc.c: * src/w32select.c: * src/window.c: * src/xdisp.c: * src/xfaces.c: * src/xfns.c: * src/xmenu.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: Likewise.
author Dan Nicolaescu <dann@ics.uci.edu>
date Thu, 08 Jul 2010 14:25:08 -0700
parents 750db9f3e6d8
children f37b85834f7e
comparison
equal deleted inserted replaced
109178:53f8ebcd9a97 109179:8cfee7d2955f
8089 8089
8090 DEFUN ("coding-system-p", Fcoding_system_p, Scoding_system_p, 1, 1, 0, 8090 DEFUN ("coding-system-p", Fcoding_system_p, Scoding_system_p, 1, 1, 0,
8091 doc: /* Return t if OBJECT is nil or a coding-system. 8091 doc: /* Return t if OBJECT is nil or a coding-system.
8092 See the documentation of `define-coding-system' for information 8092 See the documentation of `define-coding-system' for information
8093 about coding-system objects. */) 8093 about coding-system objects. */)
8094 (object) 8094 (Lisp_Object object)
8095 Lisp_Object object;
8096 { 8095 {
8097 if (NILP (object) 8096 if (NILP (object)
8098 || CODING_SYSTEM_ID (object) >= 0) 8097 || CODING_SYSTEM_ID (object) >= 0)
8099 return Qt; 8098 return Qt;
8100 if (! SYMBOLP (object) 8099 if (! SYMBOLP (object)
8104 } 8103 }
8105 8104
8106 DEFUN ("read-non-nil-coding-system", Fread_non_nil_coding_system, 8105 DEFUN ("read-non-nil-coding-system", Fread_non_nil_coding_system,
8107 Sread_non_nil_coding_system, 1, 1, 0, 8106 Sread_non_nil_coding_system, 1, 1, 0,
8108 doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. */) 8107 doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. */)
8109 (prompt) 8108 (Lisp_Object prompt)
8110 Lisp_Object prompt;
8111 { 8109 {
8112 Lisp_Object val; 8110 Lisp_Object val;
8113 do 8111 do
8114 { 8112 {
8115 val = Fcompleting_read (prompt, Vcoding_system_alist, Qnil, 8113 val = Fcompleting_read (prompt, Vcoding_system_alist, Qnil,
8122 DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0, 8120 DEFUN ("read-coding-system", Fread_coding_system, Sread_coding_system, 1, 2, 0,
8123 doc: /* Read a coding system from the minibuffer, prompting with string PROMPT. 8121 doc: /* Read a coding system from the minibuffer, prompting with string PROMPT.
8124 If the user enters null input, return second argument DEFAULT-CODING-SYSTEM. 8122 If the user enters null input, return second argument DEFAULT-CODING-SYSTEM.
8125 Ignores case when completing coding systems (all Emacs coding systems 8123 Ignores case when completing coding systems (all Emacs coding systems
8126 are lower-case). */) 8124 are lower-case). */)
8127 (prompt, default_coding_system) 8125 (Lisp_Object prompt, Lisp_Object default_coding_system)
8128 Lisp_Object prompt, default_coding_system;
8129 { 8126 {
8130 Lisp_Object val; 8127 Lisp_Object val;
8131 int count = SPECPDL_INDEX (); 8128 int count = SPECPDL_INDEX ();
8132 8129
8133 if (SYMBOLP (default_coding_system)) 8130 if (SYMBOLP (default_coding_system))
8144 1, 1, 0, 8141 1, 1, 0,
8145 doc: /* Check validity of CODING-SYSTEM. 8142 doc: /* Check validity of CODING-SYSTEM.
8146 If valid, return CODING-SYSTEM, else signal a `coding-system-error' error. 8143 If valid, return CODING-SYSTEM, else signal a `coding-system-error' error.
8147 It is valid if it is nil or a symbol defined as a coding system by the 8144 It is valid if it is nil or a symbol defined as a coding system by the
8148 function `define-coding-system'. */) 8145 function `define-coding-system'. */)
8149 (coding_system) 8146 (Lisp_Object coding_system)
8150 Lisp_Object coding_system;
8151 { 8147 {
8152 Lisp_Object define_form; 8148 Lisp_Object define_form;
8153 8149
8154 define_form = Fget (coding_system, Qcoding_system_define_form); 8150 define_form = Fget (coding_system, Qcoding_system_define_form);
8155 if (! NILP (define_form)) 8151 if (! NILP (define_form))
8497 or its subsidiary coding system according to a detected end-of-line 8493 or its subsidiary coding system according to a detected end-of-line
8498 format. 8494 format.
8499 8495
8500 If optional argument HIGHEST is non-nil, return the coding system of 8496 If optional argument HIGHEST is non-nil, return the coding system of
8501 highest priority. */) 8497 highest priority. */)
8502 (start, end, highest) 8498 (Lisp_Object start, Lisp_Object end, Lisp_Object highest)
8503 Lisp_Object start, end, highest;
8504 { 8499 {
8505 int from, to; 8500 int from, to;
8506 int from_byte, to_byte; 8501 int from_byte, to_byte;
8507 8502
8508 CHECK_NUMBER_COERCE_MARKER (start); 8503 CHECK_NUMBER_COERCE_MARKER (start);
8536 or its subsidiary coding system according to a detected end-of-line 8531 or its subsidiary coding system according to a detected end-of-line
8537 format. 8532 format.
8538 8533
8539 If optional argument HIGHEST is non-nil, return the coding system of 8534 If optional argument HIGHEST is non-nil, return the coding system of
8540 highest priority. */) 8535 highest priority. */)
8541 (string, highest) 8536 (Lisp_Object string, Lisp_Object highest)
8542 Lisp_Object string, highest;
8543 { 8537 {
8544 CHECK_STRING (string); 8538 CHECK_STRING (string);
8545 8539
8546 return detect_coding_system (SDATA (string), 8540 return detect_coding_system (SDATA (string),
8547 SCHARS (string), SBYTES (string), 8541 SCHARS (string), SBYTES (string),
8579 8573
8580 DEFUN ("find-coding-systems-region-internal", 8574 DEFUN ("find-coding-systems-region-internal",
8581 Ffind_coding_systems_region_internal, 8575 Ffind_coding_systems_region_internal,
8582 Sfind_coding_systems_region_internal, 2, 3, 0, 8576 Sfind_coding_systems_region_internal, 2, 3, 0,
8583 doc: /* Internal use only. */) 8577 doc: /* Internal use only. */)
8584 (start, end, exclude) 8578 (Lisp_Object start, Lisp_Object end, Lisp_Object exclude)
8585 Lisp_Object start, end, exclude;
8586 { 8579 {
8587 Lisp_Object coding_attrs_list, safe_codings; 8580 Lisp_Object coding_attrs_list, safe_codings;
8588 EMACS_INT start_byte, end_byte; 8581 EMACS_INT start_byte, end_byte;
8589 const unsigned char *p, *pbeg, *pend; 8582 const unsigned char *p, *pbeg, *pend;
8590 int c; 8583 int c;
8713 list of positions. 8706 list of positions.
8714 8707
8715 If optional 5th argument STRING is non-nil, it is a string to search 8708 If optional 5th argument STRING is non-nil, it is a string to search
8716 for un-encodable characters. In that case, START and END are indexes 8709 for un-encodable characters. In that case, START and END are indexes
8717 to the string. */) 8710 to the string. */)
8718 (start, end, coding_system, count, string) 8711 (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object count, Lisp_Object string)
8719 Lisp_Object start, end, coding_system, count, string;
8720 { 8712 {
8721 int n; 8713 int n;
8722 struct coding_system coding; 8714 struct coding_system coding;
8723 Lisp_Object attrs, charset_list, translation_table; 8715 Lisp_Object attrs, charset_list, translation_table;
8724 Lisp_Object positions; 8716 Lisp_Object positions;
8829 encodable, and the value contains indices to the string instead of 8821 encodable, and the value contains indices to the string instead of
8830 buffer positions. END is ignored. 8822 buffer positions. END is ignored.
8831 8823
8832 If the current buffer (or START if it is a string) is unibyte, the value 8824 If the current buffer (or START if it is a string) is unibyte, the value
8833 is nil. */) 8825 is nil. */)
8834 (start, end, coding_system_list) 8826 (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system_list)
8835 Lisp_Object start, end, coding_system_list;
8836 { 8827 {
8837 Lisp_Object list; 8828 Lisp_Object list;
8838 EMACS_INT start_byte, end_byte; 8829 EMACS_INT start_byte, end_byte;
8839 int pos; 8830 int pos;
8840 const unsigned char *p, *pbeg, *pend; 8831 const unsigned char *p, *pbeg, *pend;
8996 If DESTINATION is t, the decoded text is returned. 8987 If DESTINATION is t, the decoded text is returned.
8997 8988
8998 This function sets `last-coding-system-used' to the precise coding system 8989 This function sets `last-coding-system-used' to the precise coding system
8999 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is 8990 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is
9000 not fully specified.) */) 8991 not fully specified.) */)
9001 (start, end, coding_system, destination) 8992 (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object destination)
9002 Lisp_Object start, end, coding_system, destination;
9003 { 8993 {
9004 return code_convert_region (start, end, coding_system, destination, 0, 0); 8994 return code_convert_region (start, end, coding_system, destination, 0, 0);
9005 } 8995 }
9006 8996
9007 DEFUN ("encode-coding-region", Fencode_coding_region, Sencode_coding_region, 8997 DEFUN ("encode-coding-region", Fencode_coding_region, Sencode_coding_region,
9019 If DESTINATION is t, the encoded text is returned. 9009 If DESTINATION is t, the encoded text is returned.
9020 9010
9021 This function sets `last-coding-system-used' to the precise coding system 9011 This function sets `last-coding-system-used' to the precise coding system
9022 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is 9012 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is
9023 not fully specified.) */) 9013 not fully specified.) */)
9024 (start, end, coding_system, destination) 9014 (Lisp_Object start, Lisp_Object end, Lisp_Object coding_system, Lisp_Object destination)
9025 Lisp_Object start, end, coding_system, destination;
9026 { 9015 {
9027 return code_convert_region (start, end, coding_system, destination, 1, 0); 9016 return code_convert_region (start, end, coding_system, destination, 1, 0);
9028 } 9017 }
9029 9018
9030 Lisp_Object 9019 Lisp_Object
9097 case, the return value is the length of the decoded text. 9086 case, the return value is the length of the decoded text.
9098 9087
9099 This function sets `last-coding-system-used' to the precise coding system 9088 This function sets `last-coding-system-used' to the precise coding system
9100 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is 9089 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is
9101 not fully specified.) */) 9090 not fully specified.) */)
9102 (string, coding_system, nocopy, buffer) 9091 (Lisp_Object string, Lisp_Object coding_system, Lisp_Object nocopy, Lisp_Object buffer)
9103 Lisp_Object string, coding_system, nocopy, buffer;
9104 { 9092 {
9105 return code_convert_string (string, coding_system, buffer, 9093 return code_convert_string (string, coding_system, buffer,
9106 0, ! NILP (nocopy), 0); 9094 0, ! NILP (nocopy), 0);
9107 } 9095 }
9108 9096
9118 case, the return value is the length of the encoded text. 9106 case, the return value is the length of the encoded text.
9119 9107
9120 This function sets `last-coding-system-used' to the precise coding system 9108 This function sets `last-coding-system-used' to the precise coding system
9121 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is 9109 used (which may be different from CODING-SYSTEM if CODING-SYSTEM is
9122 not fully specified.) */) 9110 not fully specified.) */)
9123 (string, coding_system, nocopy, buffer) 9111 (Lisp_Object string, Lisp_Object coding_system, Lisp_Object nocopy, Lisp_Object buffer)
9124 Lisp_Object string, coding_system, nocopy, buffer;
9125 { 9112 {
9126 return code_convert_string (string, coding_system, buffer, 9113 return code_convert_string (string, coding_system, buffer,
9127 1, ! NILP (nocopy), 1); 9114 1, ! NILP (nocopy), 1);
9128 } 9115 }
9129 9116
9130 9117
9131 DEFUN ("decode-sjis-char", Fdecode_sjis_char, Sdecode_sjis_char, 1, 1, 0, 9118 DEFUN ("decode-sjis-char", Fdecode_sjis_char, Sdecode_sjis_char, 1, 1, 0,
9132 doc: /* Decode a Japanese character which has CODE in shift_jis encoding. 9119 doc: /* Decode a Japanese character which has CODE in shift_jis encoding.
9133 Return the corresponding character. */) 9120 Return the corresponding character. */)
9134 (code) 9121 (Lisp_Object code)
9135 Lisp_Object code;
9136 { 9122 {
9137 Lisp_Object spec, attrs, val; 9123 Lisp_Object spec, attrs, val;
9138 struct charset *charset_roman, *charset_kanji, *charset_kana, *charset; 9124 struct charset *charset_roman, *charset_kanji, *charset_kana, *charset;
9139 int c; 9125 int c;
9140 9126
9177 9163
9178 9164
9179 DEFUN ("encode-sjis-char", Fencode_sjis_char, Sencode_sjis_char, 1, 1, 0, 9165 DEFUN ("encode-sjis-char", Fencode_sjis_char, Sencode_sjis_char, 1, 1, 0,
9180 doc: /* Encode a Japanese character CH to shift_jis encoding. 9166 doc: /* Encode a Japanese character CH to shift_jis encoding.
9181 Return the corresponding code in SJIS. */) 9167 Return the corresponding code in SJIS. */)
9182 (ch) 9168 (Lisp_Object ch)
9183 Lisp_Object ch;
9184 { 9169 {
9185 Lisp_Object spec, attrs, charset_list; 9170 Lisp_Object spec, attrs, charset_list;
9186 int c; 9171 int c;
9187 struct charset *charset; 9172 struct charset *charset;
9188 unsigned code; 9173 unsigned code;
9206 } 9191 }
9207 9192
9208 DEFUN ("decode-big5-char", Fdecode_big5_char, Sdecode_big5_char, 1, 1, 0, 9193 DEFUN ("decode-big5-char", Fdecode_big5_char, Sdecode_big5_char, 1, 1, 0,
9209 doc: /* Decode a Big5 character which has CODE in BIG5 coding system. 9194 doc: /* Decode a Big5 character which has CODE in BIG5 coding system.
9210 Return the corresponding character. */) 9195 Return the corresponding character. */)
9211 (code) 9196 (Lisp_Object code)
9212 Lisp_Object code;
9213 { 9197 {
9214 Lisp_Object spec, attrs, val; 9198 Lisp_Object spec, attrs, val;
9215 struct charset *charset_roman, *charset_big5, *charset; 9199 struct charset *charset_roman, *charset_big5, *charset;
9216 int c; 9200 int c;
9217 9201
9245 } 9229 }
9246 9230
9247 DEFUN ("encode-big5-char", Fencode_big5_char, Sencode_big5_char, 1, 1, 0, 9231 DEFUN ("encode-big5-char", Fencode_big5_char, Sencode_big5_char, 1, 1, 0,
9248 doc: /* Encode the Big5 character CH to BIG5 coding system. 9232 doc: /* Encode the Big5 character CH to BIG5 coding system.
9249 Return the corresponding character code in Big5. */) 9233 Return the corresponding character code in Big5. */)
9250 (ch) 9234 (Lisp_Object ch)
9251 Lisp_Object ch;
9252 { 9235 {
9253 Lisp_Object spec, attrs, charset_list; 9236 Lisp_Object spec, attrs, charset_list;
9254 struct charset *charset; 9237 struct charset *charset;
9255 int c; 9238 int c;
9256 unsigned code; 9239 unsigned code;
9273 9256
9274 9257
9275 DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_internal, 9258 DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_internal,
9276 Sset_terminal_coding_system_internal, 1, 2, 0, 9259 Sset_terminal_coding_system_internal, 1, 2, 0,
9277 doc: /* Internal use only. */) 9260 doc: /* Internal use only. */)
9278 (coding_system, terminal) 9261 (Lisp_Object coding_system, Lisp_Object terminal)
9279 Lisp_Object coding_system;
9280 Lisp_Object terminal;
9281 { 9262 {
9282 struct coding_system *terminal_coding = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); 9263 struct coding_system *terminal_coding = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1));
9283 CHECK_SYMBOL (coding_system); 9264 CHECK_SYMBOL (coding_system);
9284 setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding); 9265 setup_coding_system (Fcheck_coding_system (coding_system), terminal_coding);
9285 /* We had better not send unsafe characters to terminal. */ 9266 /* We had better not send unsafe characters to terminal. */
9293 9274
9294 DEFUN ("set-safe-terminal-coding-system-internal", 9275 DEFUN ("set-safe-terminal-coding-system-internal",
9295 Fset_safe_terminal_coding_system_internal, 9276 Fset_safe_terminal_coding_system_internal,
9296 Sset_safe_terminal_coding_system_internal, 1, 1, 0, 9277 Sset_safe_terminal_coding_system_internal, 1, 1, 0,
9297 doc: /* Internal use only. */) 9278 doc: /* Internal use only. */)
9298 (coding_system) 9279 (Lisp_Object coding_system)
9299 Lisp_Object coding_system;
9300 { 9280 {
9301 CHECK_SYMBOL (coding_system); 9281 CHECK_SYMBOL (coding_system);
9302 setup_coding_system (Fcheck_coding_system (coding_system), 9282 setup_coding_system (Fcheck_coding_system (coding_system),
9303 &safe_terminal_coding); 9283 &safe_terminal_coding);
9304 /* Characer composition should be disabled. */ 9284 /* Characer composition should be disabled. */
9311 DEFUN ("terminal-coding-system", Fterminal_coding_system, 9291 DEFUN ("terminal-coding-system", Fterminal_coding_system,
9312 Sterminal_coding_system, 0, 1, 0, 9292 Sterminal_coding_system, 0, 1, 0,
9313 doc: /* Return coding system specified for terminal output on the given terminal. 9293 doc: /* Return coding system specified for terminal output on the given terminal.
9314 TERMINAL may be a terminal object, a frame, or nil for the selected 9294 TERMINAL may be a terminal object, a frame, or nil for the selected
9315 frame's terminal device. */) 9295 frame's terminal device. */)
9316 (terminal) 9296 (Lisp_Object terminal)
9317 Lisp_Object terminal;
9318 { 9297 {
9319 struct coding_system *terminal_coding 9298 struct coding_system *terminal_coding
9320 = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1)); 9299 = TERMINAL_TERMINAL_CODING (get_terminal (terminal, 1));
9321 Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id); 9300 Lisp_Object coding_system = CODING_ID_NAME (terminal_coding->id);
9322 9301
9325 } 9304 }
9326 9305
9327 DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_internal, 9306 DEFUN ("set-keyboard-coding-system-internal", Fset_keyboard_coding_system_internal,
9328 Sset_keyboard_coding_system_internal, 1, 2, 0, 9307 Sset_keyboard_coding_system_internal, 1, 2, 0,
9329 doc: /* Internal use only. */) 9308 doc: /* Internal use only. */)
9330 (coding_system, terminal) 9309 (Lisp_Object coding_system, Lisp_Object terminal)
9331 Lisp_Object coding_system;
9332 Lisp_Object terminal;
9333 { 9310 {
9334 struct terminal *t = get_terminal (terminal, 1); 9311 struct terminal *t = get_terminal (terminal, 1);
9335 CHECK_SYMBOL (coding_system); 9312 CHECK_SYMBOL (coding_system);
9336 if (NILP (coding_system)) 9313 if (NILP (coding_system))
9337 coding_system = Qno_conversion; 9314 coding_system = Qno_conversion;
9345 } 9322 }
9346 9323
9347 DEFUN ("keyboard-coding-system", 9324 DEFUN ("keyboard-coding-system",
9348 Fkeyboard_coding_system, Skeyboard_coding_system, 0, 1, 0, 9325 Fkeyboard_coding_system, Skeyboard_coding_system, 0, 1, 0,
9349 doc: /* Return coding system specified for decoding keyboard input. */) 9326 doc: /* Return coding system specified for decoding keyboard input. */)
9350 (terminal) 9327 (Lisp_Object terminal)
9351 Lisp_Object terminal;
9352 { 9328 {
9353 return CODING_ID_NAME (TERMINAL_KEYBOARD_CODING 9329 return CODING_ID_NAME (TERMINAL_KEYBOARD_CODING
9354 (get_terminal (terminal, 1))->id); 9330 (get_terminal (terminal, 1))->id);
9355 } 9331 }
9356 9332
9394 contents (not yet decoded). If `file-coding-system-alist' specifies a 9370 contents (not yet decoded). If `file-coding-system-alist' specifies a
9395 function to call for FILENAME, that function should examine the 9371 function to call for FILENAME, that function should examine the
9396 contents of BUFFER instead of reading the file. 9372 contents of BUFFER instead of reading the file.
9397 9373
9398 usage: (find-operation-coding-system OPERATION ARGUMENTS...) */) 9374 usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
9399 (nargs, args) 9375 (int nargs, Lisp_Object *args)
9400 int nargs;
9401 Lisp_Object *args;
9402 { 9376 {
9403 Lisp_Object operation, target_idx, target, val; 9377 Lisp_Object operation, target_idx, target, val;
9404 register Lisp_Object chain; 9378 register Lisp_Object chain;
9405 9379
9406 if (nargs < 2) 9380 if (nargs < 2)
9472 doc: /* Assign higher priority to the coding systems given as arguments. 9446 doc: /* Assign higher priority to the coding systems given as arguments.
9473 If multiple coding systems belong to the same category, 9447 If multiple coding systems belong to the same category,
9474 all but the first one are ignored. 9448 all but the first one are ignored.
9475 9449
9476 usage: (set-coding-system-priority &rest coding-systems) */) 9450 usage: (set-coding-system-priority &rest coding-systems) */)
9477 (nargs, args) 9451 (int nargs, Lisp_Object *args)
9478 int nargs;
9479 Lisp_Object *args;
9480 { 9452 {
9481 int i, j; 9453 int i, j;
9482 int changed[coding_category_max]; 9454 int changed[coding_category_max];
9483 enum coding_category priorities[coding_category_max]; 9455 enum coding_category priorities[coding_category_max];
9484 9456
9534 doc: /* Return a list of coding systems ordered by their priorities. 9506 doc: /* Return a list of coding systems ordered by their priorities.
9535 The list contains a subset of coding systems; i.e. coding systems 9507 The list contains a subset of coding systems; i.e. coding systems
9536 assigned to each coding category (see `coding-category-list'). 9508 assigned to each coding category (see `coding-category-list').
9537 9509
9538 HIGHESTP non-nil means just return the highest priority one. */) 9510 HIGHESTP non-nil means just return the highest priority one. */)
9539 (highestp) 9511 (Lisp_Object highestp)
9540 Lisp_Object highestp;
9541 { 9512 {
9542 int i; 9513 int i;
9543 Lisp_Object val; 9514 Lisp_Object val;
9544 9515
9545 for (i = 0, val = Qnil; i < coding_category_max; i++) 9516 for (i = 0, val = Qnil; i < coding_category_max; i++)
9581 9552
9582 DEFUN ("define-coding-system-internal", Fdefine_coding_system_internal, 9553 DEFUN ("define-coding-system-internal", Fdefine_coding_system_internal,
9583 Sdefine_coding_system_internal, coding_arg_max, MANY, 0, 9554 Sdefine_coding_system_internal, coding_arg_max, MANY, 0,
9584 doc: /* For internal use only. 9555 doc: /* For internal use only.
9585 usage: (define-coding-system-internal ...) */) 9556 usage: (define-coding-system-internal ...) */)
9586 (nargs, args) 9557 (int nargs, Lisp_Object *args)
9587 int nargs;
9588 Lisp_Object *args;
9589 { 9558 {
9590 Lisp_Object name; 9559 Lisp_Object name;
9591 Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */ 9560 Lisp_Object spec_vec; /* [ ATTRS ALIASE EOL_TYPE ] */
9592 Lisp_Object attrs; /* Vector of attributes. */ 9561 Lisp_Object attrs; /* Vector of attributes. */
9593 Lisp_Object eol_type; 9562 Lisp_Object eol_type;
10112 10081
10113 10082
10114 DEFUN ("coding-system-put", Fcoding_system_put, Scoding_system_put, 10083 DEFUN ("coding-system-put", Fcoding_system_put, Scoding_system_put,
10115 3, 3, 0, 10084 3, 3, 0,
10116 doc: /* Change value in CODING-SYSTEM's property list PROP to VAL. */) 10085 doc: /* Change value in CODING-SYSTEM's property list PROP to VAL. */)
10117 (coding_system, prop, val) 10086 (Lisp_Object coding_system, Lisp_Object prop, Lisp_Object val)
10118 Lisp_Object coding_system, prop, val;
10119 { 10087 {
10120 Lisp_Object spec, attrs; 10088 Lisp_Object spec, attrs;
10121 10089
10122 CHECK_CODING_SYSTEM_GET_SPEC (coding_system, spec); 10090 CHECK_CODING_SYSTEM_GET_SPEC (coding_system, spec);
10123 attrs = AREF (spec, 0); 10091 attrs = AREF (spec, 0);
10169 10137
10170 10138
10171 DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias, 10139 DEFUN ("define-coding-system-alias", Fdefine_coding_system_alias,
10172 Sdefine_coding_system_alias, 2, 2, 0, 10140 Sdefine_coding_system_alias, 2, 2, 0,
10173 doc: /* Define ALIAS as an alias for CODING-SYSTEM. */) 10141 doc: /* Define ALIAS as an alias for CODING-SYSTEM. */)
10174 (alias, coding_system) 10142 (Lisp_Object alias, Lisp_Object coding_system)
10175 Lisp_Object alias, coding_system;
10176 { 10143 {
10177 Lisp_Object spec, aliases, eol_type, val; 10144 Lisp_Object spec, aliases, eol_type, val;
10178 10145
10179 CHECK_SYMBOL (alias); 10146 CHECK_SYMBOL (alias);
10180 CHECK_CODING_SYSTEM_GET_SPEC (coding_system, spec); 10147 CHECK_CODING_SYSTEM_GET_SPEC (coding_system, spec);
10210 10177
10211 DEFUN ("coding-system-base", Fcoding_system_base, Scoding_system_base, 10178 DEFUN ("coding-system-base", Fcoding_system_base, Scoding_system_base,
10212 1, 1, 0, 10179 1, 1, 0,
10213 doc: /* Return the base of CODING-SYSTEM. 10180 doc: /* Return the base of CODING-SYSTEM.
10214 Any alias or subsidiary coding system is not a base coding system. */) 10181 Any alias or subsidiary coding system is not a base coding system. */)
10215 (coding_system) 10182 (Lisp_Object coding_system)
10216 Lisp_Object coding_system;
10217 { 10183 {
10218 Lisp_Object spec, attrs; 10184 Lisp_Object spec, attrs;
10219 10185
10220 if (NILP (coding_system)) 10186 if (NILP (coding_system))
10221 return (Qno_conversion); 10187 return (Qno_conversion);
10225 } 10191 }
10226 10192
10227 DEFUN ("coding-system-plist", Fcoding_system_plist, Scoding_system_plist, 10193 DEFUN ("coding-system-plist", Fcoding_system_plist, Scoding_system_plist,
10228 1, 1, 0, 10194 1, 1, 0,
10229 doc: "Return the property list of CODING-SYSTEM.") 10195 doc: "Return the property list of CODING-SYSTEM.")
10230 (coding_system) 10196 (Lisp_Object coding_system)
10231 Lisp_Object coding_system;
10232 { 10197 {
10233 Lisp_Object spec, attrs; 10198 Lisp_Object spec, attrs;
10234 10199
10235 if (NILP (coding_system)) 10200 if (NILP (coding_system))
10236 coding_system = Qno_conversion; 10201 coding_system = Qno_conversion;
10241 10206
10242 10207
10243 DEFUN ("coding-system-aliases", Fcoding_system_aliases, Scoding_system_aliases, 10208 DEFUN ("coding-system-aliases", Fcoding_system_aliases, Scoding_system_aliases,
10244 1, 1, 0, 10209 1, 1, 0,
10245 doc: /* Return the list of aliases of CODING-SYSTEM. */) 10210 doc: /* Return the list of aliases of CODING-SYSTEM. */)
10246 (coding_system) 10211 (Lisp_Object coding_system)
10247 Lisp_Object coding_system;
10248 { 10212 {
10249 Lisp_Object spec; 10213 Lisp_Object spec;
10250 10214
10251 if (NILP (coding_system)) 10215 if (NILP (coding_system))
10252 coding_system = Qno_conversion; 10216 coding_system = Qno_conversion;
10263 and CR respectively. 10227 and CR respectively.
10264 10228
10265 A vector value indicates that a format of end-of-line should be 10229 A vector value indicates that a format of end-of-line should be
10266 detected automatically. Nth element of the vector is the subsidiary 10230 detected automatically. Nth element of the vector is the subsidiary
10267 coding system whose eol-type is N. */) 10231 coding system whose eol-type is N. */)
10268 (coding_system) 10232 (Lisp_Object coding_system)
10269 Lisp_Object coding_system;
10270 { 10233 {
10271 Lisp_Object spec, eol_type; 10234 Lisp_Object spec, eol_type;
10272 int n; 10235 int n;
10273 10236
10274 if (NILP (coding_system)) 10237 if (NILP (coding_system))