Browse Source

libdpkg: Make all internal buffer functions static

Guillem Jover 15 years ago
parent
commit
7b4de87652
3 changed files with 7 additions and 22 deletions
  1. 6 6
      lib/dpkg/buffer.c
  2. 1 11
      lib/dpkg/buffer.h
  3. 0 5
      lib/dpkg/libdpkg.Versions

+ 6 - 6
lib/dpkg/buffer.c

@@ -4,7 +4,7 @@
  *
  * Copyright © 1999, 2000 Wichert Akkerman <wakkerma@debian.org>
  * Copyright © 2000-2003 Adam Heath <doogie@debian.org>
- * Copyright © 2008, 2009 Guillem Jover <guillem@debian.org>
+ * Copyright © 2008-2011 Guillem Jover <guillem@debian.org>
  *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -52,7 +52,7 @@ buffer_md5_init(struct buffer_data *data)
 	MD5Init(&ctx->ctx);
 }
 
-off_t
+static off_t
 buffer_init(struct buffer_data *read_data, struct buffer_data *write_data)
 {
 	switch (write_data->type) {
@@ -82,7 +82,7 @@ buffer_md5_done(struct buffer_data *data)
 	free(ctx);
 }
 
-off_t
+static off_t
 buffer_done(struct buffer_data *read_data, struct buffer_data *write_data)
 {
 	switch (write_data->type) {
@@ -93,7 +93,7 @@ buffer_done(struct buffer_data *read_data, struct buffer_data *write_data)
 	return 0;
 }
 
-off_t
+static off_t
 buffer_write(struct buffer_data *data, const void *buf, off_t length)
 {
 	off_t ret = length;
@@ -122,7 +122,7 @@ buffer_write(struct buffer_data *data, const void *buf, off_t length)
 	return ret;
 }
 
-off_t
+static off_t
 buffer_read(struct buffer_data *data, void *buf, off_t length)
 {
 	off_t ret;
@@ -152,7 +152,7 @@ buffer_hash(const void *input, void *output, int type, off_t limit)
 	return ret;
 }
 
-off_t
+static off_t
 buffer_copy(struct buffer_data *read_data, struct buffer_data *write_data,
             off_t limit, const char *desc)
 {

+ 1 - 11
lib/dpkg/buffer.h

@@ -5,7 +5,7 @@
  * Copyright © 1999, 2000 Wichert Akkerman <wakkerma@debian.org>
  * Copyright © 2000-2003 Adam Heath <doogie@debian.org>
  * Copyright © 2005 Scott James Remnant
- * Copyright © 2008, 2009 Guillem Jover <guillem@debian.org>
+ * Copyright © 2008-2011 Guillem Jover <guillem@debian.org>
  *
  * This is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -84,16 +84,6 @@ off_t buffer_copy_IntInt(int i1, int typeIn, int i2, int typeOut,
                          ...) DPKG_ATTR_PRINTF(6);
 off_t buffer_hash(const void *buf, void *hash, int typeOut, off_t length);
 
-off_t buffer_write(struct buffer_data *data, const void *buf, off_t length);
-off_t buffer_read(struct buffer_data *data, void *buf, off_t length);
-off_t buffer_init(struct buffer_data *read_data,
-                  struct buffer_data *write_data);
-off_t buffer_done(struct buffer_data *read_data,
-                  struct buffer_data *write_data);
-off_t buffer_copy(struct buffer_data *read_data,
-                  struct buffer_data *write_data,
-                  off_t limit, const char *desc);
-
 DPKG_END_DECLS
 
 #endif /* LIBDPKG_BUFFER_H */

+ 0 - 5
lib/dpkg/libdpkg.Versions

@@ -82,13 +82,8 @@ LIBDPKG_PRIVATE {
 	namevalue_find_by_name;
 
 	# Buffer I/O functions
-	buffer_init;
-	buffer_read;
-	buffer_write;
 	buffer_hash;
-	buffer_copy;
 	buffer_copy_*;
-	buffer_done;
 
 	# Subprocess and command handling
 	subproc_signals_setup;