From 075a82d59cb7a57283f5d4a692538ed7973eb34a Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 3 Mar 2005 19:47:42 +0000 Subject: Remove eol whitespace; nfc. --- src/fileio.c | 74 ++++++++++++++++++++++++++++++------------------------------ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 32deff96a71..219ad375e4d 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -845,13 +845,13 @@ static char make_temp_name_tbl[64] = static unsigned make_temp_name_count, make_temp_name_count_initialized_p; /* Value is a temporary file name starting with PREFIX, a string. - + The Emacs process number forms part of the result, so there is no danger of generating a name being used by another process. In addition, this function makes an attempt to choose a name which has no existing file. To make this work, PREFIX should be an absolute file name. - + BASE64_P non-zero means add the pid as 3 characters in base64 encoding. In this case, 6 characters will be added to PREFIX to form the file name. Otherwise, if Emacs is running on a system @@ -871,7 +871,7 @@ make_temp_name (prefix, base64_p) unsigned char *p, *data; char pidbuf[20]; int pidlen; - + CHECK_STRING (prefix, 0); /* VAL is created by adding 6 characters to PREFIX. The first @@ -900,7 +900,7 @@ make_temp_name (prefix, base64_p) pidlen = 3; #endif } - + len = XSTRING (prefix)->size; val = make_uninit_string (len + 3 + pidlen); data = XSTRING (val)->data; @@ -1171,7 +1171,7 @@ See also the function `substitute-in-file-name'.") && IS_DIRECTORY_SEP (p[0]) && IS_DIRECTORY_SEP (p[1])) lose = 1; - + #ifdef VMS if (p[0] == '\\') lose = 1; @@ -1514,7 +1514,7 @@ See also the function `substitute-in-file-name'.") absolute directory in nm produces "//", which will then be incorrectly treated as a network share. Ignore newdir in this case (keeping the drive letter). */ - if (!(drive && nm[0] && IS_DIRECTORY_SEP (newdir[0]) + if (!(drive && nm[0] && IS_DIRECTORY_SEP (newdir[0]) && newdir[1] == '\0')) #endif strcpy (target, newdir); @@ -2336,7 +2336,7 @@ A prefix arg makes KEEP-TIME non-nil.") #ifdef WINDOWSNT if (!CopyFile (XSTRING (encoded_file)->data, - XSTRING (encoded_newname)->data, + XSTRING (encoded_newname)->data, FALSE)) report_file_error ("Copying file", Fcons (file, Fcons (newname, Qnil))); else if (NILP (keep_time)) @@ -3116,7 +3116,7 @@ Otherwise returns nil.") bufsize *= 2; buf = (char *) xrealloc (buf, bufsize); bzero (buf, bufsize); - + errno = 0; valsize = readlink (XSTRING (filename)->data, buf, bufsize); if (valsize == -1) @@ -3134,7 +3134,7 @@ Otherwise returns nil.") } } while (valsize >= bufsize); - + val = make_string (buf, valsize); if (buf[0] == '/' && index (buf, ':')) val = concat2 (build_string ("/:"), val); @@ -3459,7 +3459,7 @@ static Lisp_Object read_non_regular () { int nbytes; - + immediate_quit = 1; QUIT; nbytes = emacs_read (non_regular_fd, @@ -3718,7 +3718,7 @@ actually used.") standard-output. */ count1 = specpdl_ptr - specpdl; temp_output_buffer_setup (" *code-converting-work*"); - + set_buffer_internal (XBUFFER (Vstandard_output)); current_buffer->enable_multibyte_characters = Qnil; insert_1_both (read_buf, nread, nread, 0, 0, 0); @@ -3729,7 +3729,7 @@ actually used.") /* Remove the binding for standard-output. */ unbind_to (count1, Qnil); - + /* Discard the unwind protect for recovering the current buffer. */ specpdl_ptr--; @@ -3894,11 +3894,11 @@ actually used.") break; total_read += nread; } - + /* Scan this bufferful from the end, comparing with the Emacs buffer. */ bufpos = total_read; - + /* Compare with same_at_start to avoid counting some buffer text as matching both at the file's beginning and at the end. */ while (bufpos > 0 && same_at_end > same_at_start @@ -4155,7 +4155,7 @@ actually used.") if (coding.cmp_data && coding.cmp_data->used) coding_restore_composition (&coding, Fcurrent_buffer ()); coding_free_composition_data (&coding); - + /* Set `inserted' to the number of inserted characters. */ inserted = PT - temp; @@ -4200,15 +4200,15 @@ actually used.") before exiting the loop, it is set to a negative value if I/O error occurs. */ how_much = 0; - + /* Total bytes inserted. */ inserted = 0; - + /* Here, we don't do code conversion in the loop. It is done by code_convert_region after all data are read into the buffer. */ { int gap_size = GAP_SIZE; - + while (how_much < total) { /* try is reserved in some compilers (Microsoft C) */ @@ -4252,7 +4252,7 @@ actually used.") this = emacs_read (fd, BEG_ADDR + PT_BYTE - 1 + inserted, trytry); immediate_quit = 0; } - + if (this <= 0) { how_much = this; @@ -4400,7 +4400,7 @@ actually used.") /* Use the conversion type to determine buffer-file-type (find-buffer-file-type is now used to help determine the conversion). */ - if ((coding.eol_type == CODING_EOL_UNDECIDED + if ((coding.eol_type == CODING_EOL_UNDECIDED || coding.eol_type == CODING_EOL_LF) && ! CODING_REQUIRE_DECODING (&coding)) current_buffer->buffer_file_type = Qt; @@ -4445,7 +4445,7 @@ actually used.") if (inserted > 0) { int empty_undo_list_p = 0; - + /* If we're anyway going to discard undo information, don't record it in the first place. The buffer's undo list at this point is either nil or t when visiting a file. */ @@ -4454,12 +4454,12 @@ actually used.") empty_undo_list_p = NILP (current_buffer->undo_list); current_buffer->undo_list = Qt; } - + insval = call3 (Qformat_decode, Qnil, make_number (inserted), visit); CHECK_NUMBER (insval, 0); inserted = XFASTINT (insval); - + if (!NILP (visit)) current_buffer->undo_list = empty_undo_list_p ? Qnil : Qt; } @@ -4630,7 +4630,7 @@ This does code conversion according to the value of\n\ if (NILP (current_buffer->enable_multibyte_characters)) force_raw_text = 1; } - + if (NILP (val)) { /* Check file-coding-system-alist. */ @@ -4652,7 +4652,7 @@ This does code conversion according to the value of\n\ val = current_buffer->buffer_file_coding_system; using_default_coding = 1; } - + if (!force_raw_text && !NILP (Ffboundp (Vselect_safe_coding_system_function))) /* Confirm that VAL can surely encode the current region. */ @@ -4852,7 +4852,7 @@ This does code conversion according to the value of\n\ if (!NILP (append) && !NILP (Ffile_regular_p (filename))) { long ret; - + if (NUMBERP (append)) ret = lseek (desc, XINT (append), 1); else @@ -4866,7 +4866,7 @@ This does code conversion according to the value of\n\ report_file_error ("Lseek error", Fcons (filename, Qnil)); } } - + UNGCPRO; #ifdef VMS @@ -5098,7 +5098,7 @@ build_annotations (start, end, pre_write_conversion) for (i = 0; !NILP (p); p = Fcdr (p), ++i) { struct buffer *given_buffer = current_buffer; - + Vwrite_region_annotations_so_far = annotations; /* Value is either a list of annotations or nil if the function @@ -5112,7 +5112,7 @@ build_annotations (start, end, pre_write_conversion) XSETFASTINT (end, ZV); annotations = Qnil; } - + if (CONSP (res)) annotations = merge (annotations, res, Qcar_less_than_car); } @@ -5387,9 +5387,9 @@ auto_save_error (error) Lisp_Object args[3], msg; int i, nbytes; struct gcpro gcpro1; - + ring_bell (); - + args[0] = build_string ("Auto-saving %s: %s"); args[1] = current_buffer->name; args[2] = Ferror_message_string (error); @@ -5472,7 +5472,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer.") int count = specpdl_ptr - specpdl; int orig_minibuffer_auto_raise = minibuffer_auto_raise; int message_p = push_message (); - + /* Ordinarily don't quit within this function, but don't make it impossible to quit (in case we get hung in I/O). */ oquit = Vquit_flag; @@ -5490,7 +5490,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer.") if (STRINGP (Vauto_save_list_file_name)) { Lisp_Object listfile; - + listfile = Fexpand_file_name (Vauto_save_list_file_name, Qnil); /* Don't try to create the directory when shutting down Emacs, @@ -5503,7 +5503,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer.") if (NILP (Ffile_directory_p (dir))) call2 (Qmake_directory, dir, Qt); } - + stream = fopen (XSTRING (listfile)->data, "w"); if (stream != NULL) { @@ -5885,7 +5885,7 @@ provides a file dialog box..") specbind (intern ("minibuffer-completing-file-name"), Qt); GCPRO2 (insdef, default_filename); - + #if defined (USE_MOTIF) || defined (HAVE_NTGUI) if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) && use_dialog_box @@ -5961,7 +5961,7 @@ provides a file dialog box..") Fset (Qfile_name_history, Fcons (val1, tem)); } - + return val; } @@ -6086,7 +6086,7 @@ same format as a regular save would use."); staticpro (&Qformat_decode); Qformat_annotate_function = intern ("format-annotate-function"); staticpro (&Qformat_annotate_function); - + Qcar_less_than_car = intern ("car-less-than-car"); staticpro (&Qcar_less_than_car); -- cgit v1.2.3