summaryrefslogtreecommitdiff
path: root/usr.bin/mg/fileio.c
diff options
context:
space:
mode:
authorKjell Wooding <kjell@cvs.openbsd.org>2006-12-24 01:20:54 +0000
committerKjell Wooding <kjell@cvs.openbsd.org>2006-12-24 01:20:54 +0000
commit4d5358fd7c257f9f2610a68567e988f001a69287 (patch)
tree2392c3e51afb0494630a3271595517f7ff06bea2 /usr.bin/mg/fileio.c
parentb18c2eb6dbffaecb00c0d437c38db98d75734a5a (diff)
Fix a bug where inserting a file resulted in an incorrect
line-number count for a buffer (M-X insert-file, M-> to reproduce). While here, fix a number of bugs with incorrect line numbers after swap point-and-mark Originally reported via debian's bug tracking system. Fix tested by Han Boetes and Deanna Phillips.
Diffstat (limited to 'usr.bin/mg/fileio.c')
-rw-r--r--usr.bin/mg/fileio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mg/fileio.c b/usr.bin/mg/fileio.c
index 82e8d978fc5..9a148063ffa 100644
--- a/usr.bin/mg/fileio.c
+++ b/usr.bin/mg/fileio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fileio.c,v 1.79 2006/11/19 16:51:19 deraadt Exp $ */
+/* $OpenBSD: fileio.c,v 1.80 2006/12/24 01:20:53 kjell Exp $ */
/* This file is in the public domain. */
@@ -139,6 +139,7 @@ ffputbuf(struct buffer *bp)
* in the supplied buffer. Stop on end of file or end of
* line. When FIOEOF is returned, there is a valid line
* of data without the normally implied \n.
+ * If the line length exceeds nbuf, FIOLONG is returned.
*/
int
ffgetline(char *buf, int nbuf, int *nbytes)