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

Diff of /emacs/src/fns.c

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

revision 1.314.2.16 by miles, Mon Oct 25 04:19:35 2004 UTC revision 1.314.2.17 by miles, Fri Oct 29 02:05:10 2004 UTC
# Line 1012  string_make_multibyte (string) Line 1012  string_make_multibyte (string)
1012               0, 1);               0, 1);
1013    
1014    ret = make_multibyte_string (buf, SCHARS (string), nbytes);    ret = make_multibyte_string (buf, SCHARS (string), nbytes);
1015    SAFE_FREE (nbytes);    SAFE_FREE ();
1016    
1017    return ret;    return ret;
1018  }  }
# Line 1046  string_to_multibyte (string) Line 1046  string_to_multibyte (string)
1046    str_to_multibyte (buf, nbytes, SBYTES (string));    str_to_multibyte (buf, nbytes, SBYTES (string));
1047    
1048    ret = make_multibyte_string (buf, SCHARS (string), nbytes);    ret = make_multibyte_string (buf, SCHARS (string), nbytes);
1049    SAFE_FREE (nbytes);    SAFE_FREE ();
1050    
1051    return ret;    return ret;
1052  }  }
# Line 1073  string_make_unibyte (string) Line 1073  string_make_unibyte (string)
1073               1, 0);               1, 0);
1074    
1075    ret = make_unibyte_string (buf, nchars);    ret = make_unibyte_string (buf, nchars);
1076    SAFE_FREE (nchars);    SAFE_FREE ();
1077    
1078    return ret;    return ret;
1079  }  }
# Line 3030  SEQUENCE may be a list, a vector, a bool Line 3030  SEQUENCE may be a list, a vector, a bool
3030      args[i] = separator;      args[i] = separator;
3031    
3032    ret = Fconcat (nargs, args);    ret = Fconcat (nargs, args);
3033    SAFE_FREE_LISP (nargs);    SAFE_FREE ();
3034    
3035    return ret;    return ret;
3036  }  }
# Line 3056  SEQUENCE may be a list, a vector, a bool Line 3056  SEQUENCE may be a list, a vector, a bool
3056    mapcar1 (leni, args, function, sequence);    mapcar1 (leni, args, function, sequence);
3057    
3058    ret = Flist (leni, args);    ret = Flist (leni, args);
3059    SAFE_FREE_LISP (leni);    SAFE_FREE ();
3060    
3061    return ret;    return ret;
3062  }  }
# Line 3763  into shorter lines.  */) Line 3763  into shorter lines.  */)
3763    if (encoded_length < 0)    if (encoded_length < 0)
3764      {      {
3765        /* The encoding wasn't possible. */        /* The encoding wasn't possible. */
3766        SAFE_FREE (allength);        SAFE_FREE ();
3767        error ("Multibyte character in data for base64 encoding");        error ("Multibyte character in data for base64 encoding");
3768      }      }
3769    
# Line 3771  into shorter lines.  */) Line 3771  into shorter lines.  */)
3771       and delete the old.  (Insert first in order to preserve markers.)  */       and delete the old.  (Insert first in order to preserve markers.)  */
3772    SET_PT_BOTH (XFASTINT (beg), ibeg);    SET_PT_BOTH (XFASTINT (beg), ibeg);
3773    insert (encoded, encoded_length);    insert (encoded, encoded_length);
3774    SAFE_FREE (allength);    SAFE_FREE ();
3775    del_range_byte (ibeg + encoded_length, iend + encoded_length, 1);    del_range_byte (ibeg + encoded_length, iend + encoded_length, 1);
3776    
3777    /* If point was outside of the region, restore it exactly; else just    /* If point was outside of the region, restore it exactly; else just
# Line 3820  into shorter lines.  */) Line 3820  into shorter lines.  */)
3820    if (encoded_length < 0)    if (encoded_length < 0)
3821      {      {
3822        /* The encoding wasn't possible. */        /* The encoding wasn't possible. */
3823        SAFE_FREE (allength);        SAFE_FREE ();
3824        error ("Multibyte character in data for base64 encoding");        error ("Multibyte character in data for base64 encoding");
3825      }      }
3826    
3827    encoded_string = make_unibyte_string (encoded, encoded_length);    encoded_string = make_unibyte_string (encoded, encoded_length);
3828    SAFE_FREE (allength);    SAFE_FREE ();
3829    
3830    return encoded_string;    return encoded_string;
3831  }  }
# Line 3962  If the region can't be decoded, signal a Line 3962  If the region can't be decoded, signal a
3962    if (decoded_length < 0)    if (decoded_length < 0)
3963      {      {
3964        /* The decoding wasn't possible. */        /* The decoding wasn't possible. */
3965        SAFE_FREE (allength);        SAFE_FREE ();
3966        error ("Invalid base64 data");        error ("Invalid base64 data");
3967      }      }
3968    
# Line 3970  If the region can't be decoded, signal a Line 3970  If the region can't be decoded, signal a
3970       and delete the old.  (Insert first in order to preserve markers.)  */       and delete the old.  (Insert first in order to preserve markers.)  */
3971    TEMP_SET_PT_BOTH (XFASTINT (beg), ibeg);    TEMP_SET_PT_BOTH (XFASTINT (beg), ibeg);
3972    insert_1_both (decoded, inserted_chars, decoded_length, 0, 1, 0);    insert_1_both (decoded, inserted_chars, decoded_length, 0, 1, 0);
3973    SAFE_FREE (allength);    SAFE_FREE ();
3974    
3975    /* Delete the original text.  */    /* Delete the original text.  */
3976    del_range_both (PT, PT_BYTE, XFASTINT (end) + inserted_chars,    del_range_both (PT, PT_BYTE, XFASTINT (end) + inserted_chars,
# Line 4014  DEFUN ("base64-decode-string", Fbase64_d Line 4014  DEFUN ("base64-decode-string", Fbase64_d
4014    else    else
4015      decoded_string = Qnil;      decoded_string = Qnil;
4016    
4017    SAFE_FREE (length);    SAFE_FREE ();
4018    if (!STRINGP (decoded_string))    if (!STRINGP (decoded_string))
4019      error ("Invalid base64 data");      error ("Invalid base64 data");
4020    

Legend:
Removed from v.1.314.2.16  
changed lines
  Added in v.1.314.2.17

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