comparison src/fileio.c @ 14036:621a575db6f7

Comment fixes.
author Karl Heuer <kwzh@gnu.org>
date Fri, 05 Jan 1996 10:03:17 +0000
parents 31e37f3d8ccd
children f15db8536fdd
comparison
equal deleted inserted replaced
14035:09cb73d0ec41 14036:621a575db6f7
2934 bufpos = 0; 2934 bufpos = 0;
2935 while (bufpos < nread && same_at_start < ZV 2935 while (bufpos < nread && same_at_start < ZV
2936 && FETCH_CHAR (same_at_start) == buffer[bufpos]) 2936 && FETCH_CHAR (same_at_start) == buffer[bufpos])
2937 same_at_start++, bufpos++; 2937 same_at_start++, bufpos++;
2938 /* If we found a discrepancy, stop the scan. 2938 /* If we found a discrepancy, stop the scan.
2939 Otherwise loop around and scan the next bufferfull. */ 2939 Otherwise loop around and scan the next bufferful. */
2940 if (bufpos != nread) 2940 if (bufpos != nread)
2941 break; 2941 break;
2942 } 2942 }
2943 immediate_quit = 0; 2943 immediate_quit = 0;
2944 /* If the file matches the buffer completely, 2944 /* If the file matches the buffer completely,
2977 if (nread <= 0) 2977 if (nread <= 0)
2978 error ("IO error reading %s: %s", 2978 error ("IO error reading %s: %s",
2979 XSTRING (filename)->data, strerror (errno)); 2979 XSTRING (filename)->data, strerror (errno));
2980 total_read += nread; 2980 total_read += nread;
2981 } 2981 }
2982 /* Scan this bufferfull from the end, comparing with 2982 /* Scan this bufferful from the end, comparing with
2983 the Emacs buffer. */ 2983 the Emacs buffer. */
2984 bufpos = total_read; 2984 bufpos = total_read;
2985 /* Compare with same_at_start to avoid counting some buffer text 2985 /* Compare with same_at_start to avoid counting some buffer text
2986 as matching both at the file's beginning and at the end. */ 2986 as matching both at the file's beginning and at the end. */
2987 while (bufpos > 0 && same_at_end > same_at_start 2987 while (bufpos > 0 && same_at_end > same_at_start
2988 && FETCH_CHAR (same_at_end - 1) == buffer[bufpos - 1]) 2988 && FETCH_CHAR (same_at_end - 1) == buffer[bufpos - 1])
2989 same_at_end--, bufpos--; 2989 same_at_end--, bufpos--;
2990 /* If we found a discrepancy, stop the scan. 2990 /* If we found a discrepancy, stop the scan.
2991 Otherwise loop around and scan the preceding bufferfull. */ 2991 Otherwise loop around and scan the preceding bufferful. */
2992 if (bufpos != 0) 2992 if (bufpos != 0)
2993 break; 2993 break;
2994 /* If display current starts at beginning of line, 2994 /* If display current starts at beginning of line,
2995 keep it that way. */ 2995 keep it that way. */
2996 if (XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer) 2996 if (XBUFFER (XWINDOW (selected_window)->buffer) == current_buffer)