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

Diff of /emacs/src/coding.c

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

revision 1.226 by eliz, Mon Oct 29 19:34:44 2001 UTC revision 1.227 by pj, Fri Nov 2 20:20:43 2001 UTC
# Line 5741  code_convert_region (from, from_byte, to Line 5741  code_convert_region (from, from_byte, to
5741        inhibit_pre_post_conversion = 0;        inhibit_pre_post_conversion = 0;
5742        /* Discard the unwind protect.  */        /* Discard the unwind protect.  */
5743        specpdl_ptr--;        specpdl_ptr--;
5744        CHECK_NUMBER (val, 0);        CHECK_NUMBER (val);
5745        inserted += Z - prev_Z;        inserted += Z - prev_Z;
5746      }      }
5747    
# Line 6148  The value of property should be a vector Line 6148  The value of property should be a vector
6148    (coding_system)    (coding_system)
6149       Lisp_Object coding_system;       Lisp_Object coding_system;
6150  {  {
6151    CHECK_SYMBOL (coding_system, 0);    CHECK_SYMBOL (coding_system);
6152    if (!NILP (Fcoding_system_p (coding_system)))    if (!NILP (Fcoding_system_p (coding_system)))
6153      return coding_system;      return coding_system;
6154    while (1)    while (1)
# Line 6236  highest priority.") Line 6236  highest priority.")
6236    int from_byte, to_byte;    int from_byte, to_byte;
6237    int include_anchor_byte = 0;    int include_anchor_byte = 0;
6238    
6239    CHECK_NUMBER_COERCE_MARKER (start, 0);    CHECK_NUMBER_COERCE_MARKER (start);
6240    CHECK_NUMBER_COERCE_MARKER (end, 1);    CHECK_NUMBER_COERCE_MARKER (end);
6241    
6242    validate_region (&start, &end);    validate_region (&start, &end);
6243    from = XINT (start), to = XINT (end);    from = XINT (start), to = XINT (end);
# Line 6276  highest priority.") Line 6276  highest priority.")
6276    (string, highest)    (string, highest)
6277       Lisp_Object string, highest;       Lisp_Object string, highest;
6278  {  {
6279    CHECK_STRING (string, 0);    CHECK_STRING (string);
6280    
6281    return detect_coding_system (XSTRING (string)->data,    return detect_coding_system (XSTRING (string)->data,
6282                                 /* "+ 1" is to include the anchor byte                                 /* "+ 1" is to include the anchor byte
# Line 6386  DEFUN ("find-coding-systems-region-inter Line 6386  DEFUN ("find-coding-systems-region-inter
6386      {      {
6387        int from, to, stop;        int from, to, stop;
6388    
6389        CHECK_NUMBER_COERCE_MARKER (start, 0);        CHECK_NUMBER_COERCE_MARKER (start);
6390        CHECK_NUMBER_COERCE_MARKER (end, 1);        CHECK_NUMBER_COERCE_MARKER (end);
6391        if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end))        if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end))
6392          args_out_of_range (start, end);          args_out_of_range (start, end);
6393        if (NILP (current_buffer->enable_multibyte_characters))        if (NILP (current_buffer->enable_multibyte_characters))
# Line 6453  code_convert_region1 (start, end, coding Line 6453  code_convert_region1 (start, end, coding
6453    struct coding_system coding;    struct coding_system coding;
6454    int from, to;    int from, to;
6455    
6456    CHECK_NUMBER_COERCE_MARKER (start, 0);    CHECK_NUMBER_COERCE_MARKER (start);
6457    CHECK_NUMBER_COERCE_MARKER (end, 1);    CHECK_NUMBER_COERCE_MARKER (end);
6458    CHECK_SYMBOL (coding_system, 2);    CHECK_SYMBOL (coding_system);
6459    
6460    validate_region (&start, &end);    validate_region (&start, &end);
6461    from = XFASTINT (start);    from = XFASTINT (start);
# Line 6513  code_convert_string1 (string, coding_sys Line 6513  code_convert_string1 (string, coding_sys
6513  {  {
6514    struct coding_system coding;    struct coding_system coding;
6515    
6516    CHECK_STRING (string, 0);    CHECK_STRING (string);
6517    CHECK_SYMBOL (coding_system, 1);    CHECK_SYMBOL (coding_system);
6518    
6519    if (NILP (coding_system))    if (NILP (coding_system))
6520      return (NILP (nocopy) ? Fcopy_sequence (string) : string);      return (NILP (nocopy) ? Fcopy_sequence (string) : string);
# Line 6572  code_convert_string_norecord (string, co Line 6572  code_convert_string_norecord (string, co
6572  {  {
6573    struct coding_system coding;    struct coding_system coding;
6574    
6575    CHECK_STRING (string, 0);    CHECK_STRING (string);
6576    CHECK_SYMBOL (coding_system, 1);    CHECK_SYMBOL (coding_system);
6577    
6578    if (NILP (coding_system))    if (NILP (coding_system))
6579      return string;      return string;
# Line 6597  Return the corresponding character.") Line 6597  Return the corresponding character.")
6597    unsigned char c1, c2, s1, s2;    unsigned char c1, c2, s1, s2;
6598    Lisp_Object val;    Lisp_Object val;
6599    
6600    CHECK_NUMBER (code, 0);    CHECK_NUMBER (code);
6601    s1 = (XFASTINT (code)) >> 8, s2 = (XFASTINT (code)) & 0xFF;    s1 = (XFASTINT (code)) >> 8, s2 = (XFASTINT (code)) & 0xFF;
6602    if (s1 == 0)    if (s1 == 0)
6603      {      {
# Line 6628  Return the corresponding code in SJIS.") Line 6628  Return the corresponding code in SJIS.")
6628    int charset, c1, c2, s1, s2;    int charset, c1, c2, s1, s2;
6629    Lisp_Object val;    Lisp_Object val;
6630    
6631    CHECK_NUMBER (ch, 0);    CHECK_NUMBER (ch);
6632    SPLIT_CHAR (XFASTINT (ch), charset, c1, c2);    SPLIT_CHAR (XFASTINT (ch), charset, c1, c2);
6633    if (charset == CHARSET_ASCII)    if (charset == CHARSET_ASCII)
6634      {      {
# Line 6660  Return the corresponding character.") Line 6660  Return the corresponding character.")
6660    unsigned char b1, b2, c1, c2;    unsigned char b1, b2, c1, c2;
6661    Lisp_Object val;    Lisp_Object val;
6662    
6663    CHECK_NUMBER (code, 0);    CHECK_NUMBER (code);
6664    b1 = (XFASTINT (code)) >> 8, b2 = (XFASTINT (code)) & 0xFF;    b1 = (XFASTINT (code)) >> 8, b2 = (XFASTINT (code)) & 0xFF;
6665    if (b1 == 0)    if (b1 == 0)
6666      {      {
# Line 6688  Return the corresponding character code Line 6688  Return the corresponding character code
6688    int charset, c1, c2, b1, b2;    int charset, c1, c2, b1, b2;
6689    Lisp_Object val;    Lisp_Object val;
6690    
6691    CHECK_NUMBER (ch, 0);    CHECK_NUMBER (ch);
6692    SPLIT_CHAR (XFASTINT (ch), charset, c1, c2);    SPLIT_CHAR (XFASTINT (ch), charset, c1, c2);
6693    if (charset == CHARSET_ASCII)    if (charset == CHARSET_ASCII)
6694      {      {
# Line 6713  DEFUN ("set-terminal-coding-system-inter Line 6713  DEFUN ("set-terminal-coding-system-inter
6713    (coding_system)    (coding_system)
6714       Lisp_Object coding_system;       Lisp_Object coding_system;
6715  {  {
6716    CHECK_SYMBOL (coding_system, 0);    CHECK_SYMBOL (coding_system);
6717    setup_coding_system (Fcheck_coding_system (coding_system), &terminal_coding);    setup_coding_system (Fcheck_coding_system (coding_system), &terminal_coding);
6718    /* We had better not send unsafe characters to terminal.  */    /* We had better not send unsafe characters to terminal.  */
6719    terminal_coding.flags |= CODING_FLAG_ISO_SAFE;    terminal_coding.flags |= CODING_FLAG_ISO_SAFE;
# Line 6732  DEFUN ("set-safe-terminal-coding-system- Line 6732  DEFUN ("set-safe-terminal-coding-system-
6732    (coding_system)    (coding_system)
6733       Lisp_Object coding_system;       Lisp_Object coding_system;
6734  {  {
6735    CHECK_SYMBOL (coding_system, 0);    CHECK_SYMBOL (coding_system);
6736    setup_coding_system (Fcheck_coding_system (coding_system),    setup_coding_system (Fcheck_coding_system (coding_system),
6737                         &safe_terminal_coding);                         &safe_terminal_coding);
6738    /* Character composition should be disabled.  */    /* Character composition should be disabled.  */
# Line 6758  DEFUN ("set-keyboard-coding-system-inter Line 6758  DEFUN ("set-keyboard-coding-system-inter
6758    (coding_system)    (coding_system)
6759       Lisp_Object coding_system;       Lisp_Object coding_system;
6760  {  {
6761    CHECK_SYMBOL (coding_system, 0);    CHECK_SYMBOL (coding_system);
6762    setup_coding_system (Fcheck_coding_system (coding_system), &keyboard_coding);    setup_coding_system (Fcheck_coding_system (coding_system), &keyboard_coding);
6763    /* Character composition should be disabled.  */    /* Character composition should be disabled.  */
6764    keyboard_coding.composing = COMPOSITION_DISABLED;    keyboard_coding.composing = COMPOSITION_DISABLED;

Legend:
Removed from v.1.226  
changed lines
  Added in v.1.227

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