]> git.meshlink.io Git - meshlink/blobdiff - src/buffer.h
Update all header guards.
[meshlink] / src / buffer.h
index 73c1f69e407493112f8a445dc2802d20782638be..493d3293c593ca3c9035ae8f72ce1b25b73eff99 100644 (file)
@@ -1,5 +1,24 @@
-#ifndef __TINC_BUFFER_H__
-#define __TINC_BUFFER_H__
+#ifndef MESHLINK_BUFFER_H
+#define MESHLINK_BUFFER_H
+
+/*
+    conf.h -- header for conf.c
+    Copyright (C) 2014, 2017 Guus Sliepen <guus@meshlink.io>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
 
 typedef struct buffer_t {
        char *data;
@@ -8,7 +27,7 @@ typedef struct buffer_t {
        int offset;
 } buffer_t;
 
-extern void buffer_compact(buffer_t *buffer);
+extern void buffer_compact(buffer_t *buffer, int maxsize);
 extern char *buffer_prepare(buffer_t *buffer, int size);
 extern void buffer_add(buffer_t *buffer, const char *data, int size);
 extern char *buffer_readline(buffer_t *buffer);