chiark
/
gitweb
/
~mdw
/
mLib
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bug which discarded initial portions of incomplete lines.
[mLib]
/
lbuf.c
diff --git
a/lbuf.c
b/lbuf.c
index 63eb4471bbd8c8023661d63c71117412a9dea258..118250d43f40c3d7d9b93c851d7c0dfa78e22af6 100644
(file)
--- a/
lbuf.c
+++ b/
lbuf.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-c-*-
*
- * $Id: lbuf.c,v 1.
2 1999/05/17 20:36:08
mdw Exp $
+ * $Id: lbuf.c,v 1.
3 1999/05/22 13:38:50
mdw Exp $
*
* Block-to-line buffering
*
*
* Block-to-line buffering
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: lbuf.c,v $
/*----- Revision history --------------------------------------------------*
*
* $Log: lbuf.c,v $
+ * Revision 1.3 1999/05/22 13:38:50 mdw
+ * Fix bug which discarded initial portions of incomplete lines.
+ *
* Revision 1.2 1999/05/17 20:36:08 mdw
* Make the magical constants for the buffer flags uppercase.
*
* Revision 1.2 1999/05/17 20:36:08 mdw
* Make the magical constants for the buffer flags uppercase.
*
@@
-207,7
+210,7
@@
size_t lbuf_free(lbuf *b, char **p)
* reason this routine exists.
*/
* reason this routine exists.
*/
- if (b->len
== 0 || b->len =
= sizeof(b->buf)) {
+ if (b->len
!= 0 && b->len !
= sizeof(b->buf)) {
*p = b->buf + b->len;
return (sizeof(b->buf) - b->len);
} else {
*p = b->buf + b->len;
return (sizeof(b->buf) - b->len);
} else {