Mercurial > emacs
comparison lib-src/etags.c @ 15772:eb1cef7102e3
(readline_internal) [DOS_NT]: Don't include CRs when
computing character positions in source files.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 23 Jul 1996 16:32:24 +0000 |
parents | 5f9426e991a3 |
children | 33519c691e63 |
comparison
equal
deleted
inserted
replaced
15771:ac60bc3e89cd | 15772:eb1cef7102e3 |
---|---|
4103 if (c == '\n') | 4103 if (c == '\n') |
4104 { | 4104 { |
4105 if (p > buffer && p[-1] == '\r') | 4105 if (p > buffer && p[-1] == '\r') |
4106 { | 4106 { |
4107 *--p = '\0'; | 4107 *--p = '\0'; |
4108 #ifdef DOS_NT | |
4109 /* Assume CRLF->LF translation will be performed by Emacs | |
4110 when loading this file, so CRs won't appear in the buffer. | |
4111 It would be cleaner to compensate within Emacs; | |
4112 however, Emacs does not know how many CRs were deleted | |
4113 before any given point in the file. */ | |
4114 chars_deleted = 1; | |
4115 #else | |
4108 chars_deleted = 2; | 4116 chars_deleted = 2; |
4117 #endif | |
4109 } | 4118 } |
4110 else | 4119 else |
4111 { | 4120 { |
4112 *p = '\0'; | 4121 *p = '\0'; |
4113 chars_deleted = 1; | 4122 chars_deleted = 1; |