comparison src/fileio.c @ 13451:3a69848f7892

(Fwrite_region): Move the code that writes annotations for empty files.
author Richard M. Stallman <rms@gnu.org>
date Fri, 10 Nov 1995 06:44:54 +0000
parents 994440ef957f
children 2178c4d6a427
comparison
equal deleted inserted replaced
13450:9a1e7191803f 13451:3a69848f7892
3425 failure = 0 > a_write (desc, &FETCH_CHAR (tem), XINT (end) - tem, 3425 failure = 0 > a_write (desc, &FETCH_CHAR (tem), XINT (end) - tem,
3426 tem, &annotations); 3426 tem, &annotations);
3427 nwritten += XINT (end) - tem; 3427 nwritten += XINT (end) - tem;
3428 save_errno = errno; 3428 save_errno = errno;
3429 } 3429 }
3430 3430 }
3431 if (nwritten == 0) 3431 else
3432 { 3432 {
3433 /* If file was empty, still need to write the annotations */ 3433 /* If file was empty, still need to write the annotations */
3434 failure = 0 > a_write (desc, "", 0, XINT (start), &annotations); 3434 failure = 0 > a_write (desc, "", 0, XINT (start), &annotations);
3435 save_errno = errno; 3435 save_errno = errno;
3436 }
3437 } 3436 }
3438 3437
3439 immediate_quit = 0; 3438 immediate_quit = 0;
3440 3439
3441 #ifdef HAVE_FSYNC 3440 #ifdef HAVE_FSYNC