]> code.delx.au - gnu-emacs/blobdiff - src/fileio.c
Declare Fuser_full_name as Lisp_Object in advance to
[gnu-emacs] / src / fileio.c
index f6541062f99ead463e494b3080ca7aabaab9ad9b..14b1ca0aa0e71e69d4477a8b62878a3de713ab1d 100644 (file)
@@ -3166,9 +3166,9 @@ This does code conversion according to the value of\n\
   if (!NILP (replace)
       && (! CODING_REQUIRE_CONVERSION (&coding)
          || (coding.type == coding_type_automatic
-             && ! CODING_REQUIRE_TEXT_CONVERSION (&coding))
+             && ! CODING_REQUIRE_EOL_CONVERSION (&coding))
          || (coding.eol_type == CODING_EOL_AUTOMATIC
-             && ! CODING_REQUIRE_EOL_CONVERSION (&coding))))
+             && ! CODING_REQUIRE_TEXT_CONVERSION (&coding))))
     {
       int same_at_start = BEGV;
       int same_at_end = ZV;
@@ -3336,7 +3336,7 @@ This does code conversion according to the value of\n\
       int bufpos;
       /* Make sure that the gap is large enough.  */
       int bufsize = 2 * st.st_size;
-      unsigned char *conversion_buffer = (unsigned char *) malloc (bufsize);
+      unsigned char *conversion_buffer = (unsigned char *) xmalloc (bufsize);
 
       /* First read the whole file, performing code conversion into
         CONVERSION_BUFFER.  */
@@ -3386,7 +3386,7 @@ This does code conversion according to the value of\n\
              if (inserted + require + 2 * (total - how_much) > bufsize)
                {
                  bufsize = inserted + require + 2 * (total - how_much);
-                 conversion_buffer = (unsigned char *) realloc (conversion_buffer, bufsize);
+                 conversion_buffer = (unsigned char *) xrealloc (conversion_buffer, bufsize);
                }
 
              /* Convert this batch with results in CONVERSION_BUFFER.  */