summaryrefslogtreecommitdiffstats
path: root/src/sliding_buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sliding_buffer.c')
-rw-r--r--src/sliding_buffer.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/sliding_buffer.c b/src/sliding_buffer.c
index 2b5ef33..f93ebe0 100644
--- a/src/sliding_buffer.c
+++ b/src/sliding_buffer.c
@@ -1,17 +1,22 @@
-/*
- * --------------------------------------------------------------------------
- * Sliding Buffer functions for haserl Copyright (c) 2007 Nathan Angelacos
- * (nangel@users.sourceforge.net) This program is free software; you can
- * redistribute it and/or modify it under the terms of the GNU General Public
- * License, version 2, as published by the Free Software Foundation. This
- * program is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details. You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- * -------------------------------------------------------------------------
- */
+/* --------------------------------------------------------------------------
+ * Copyright 2003-2011 (inclusive) Nathan Angelacos
+ * (nangel@users.sourceforge.net)
+ *
+ * This file is part of haserl.
+ *
+ * Haserl is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2,
+ * as published by the Free Software Foundation.
+ *
+ * Haserl is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with haserl. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * ------------------------------------------------------------------------ */
#if HAVE_CONFIG_H
#include <config.h>
@@ -100,7 +105,7 @@ s_buffer_read (sliding_buffer_t * sbuf, char *matchstr)
else
{
size_t n = sbuf->maxsize - len;
- if ( sbuf->maxread && sbuf->maxread < sbuf->nrread + n)
+ if (sbuf->maxread && sbuf->maxread < sbuf->nrread + n)
n = sbuf->maxread - sbuf->nrread;
r = read (sbuf->fh, sbuf->buf + len, n);
}