The following commit has been merged in the master branch:
commit 9ce2c0102f81074c43850319206aab0c62c7ce50
Author: Guillem Jover <[email protected]>
Date:   Fri Aug 28 19:55:46 2009 +0200

    libdpkg: Remove _setup from buffer_copy_setup_TYPE function names

diff --git a/lib/dpkg/buffer.c b/lib/dpkg/buffer.c
index 741945b..6949dc1 100644
--- a/lib/dpkg/buffer.c
+++ b/lib/dpkg/buffer.c
@@ -162,9 +162,9 @@ buffer_read(buffer_data_t data, void *buf, off_t length, 
const char *desc)
 
 #define buffer_copy_TYPE(name, type1, name1, type2, name2) \
 off_t \
-buffer_copy_setup_##name(type1 n1, int typeIn, \
-                         type2 n2, int typeOut, \
-                         off_t limit, const char *desc, ...) \
+buffer_copy_##name(type1 n1, int typeIn, \
+                   type2 n2, int typeOut, \
+                   off_t limit, const char *desc, ...) \
 { \
        va_list al; \
        struct buffer_data read_data, write_data; \
diff --git a/lib/dpkg/buffer.h b/lib/dpkg/buffer.h
index 1ff97f2..d81dcfc 100644
--- a/lib/dpkg/buffer.h
+++ b/lib/dpkg/buffer.h
@@ -55,104 +55,88 @@ struct buffer_data {
 
 #if HAVE_C99
 # define fd_md5(fd, hash, limit, ...) \
-       buffer_copy_setup_IntPtr(fd, BUFFER_READ_FD, \
-                                hash, BUFFER_WRITE_MD5, \
-                                limit, __VA_ARGS__)
+       buffer_copy_IntPtr(fd, BUFFER_READ_FD, hash, BUFFER_WRITE_MD5, \
+                          limit, __VA_ARGS__)
 # define stream_md5(file, hash, limit, ...) \
-       buffer_copy_setup_PtrPtr(file, BUFFER_READ_STREAM, \
-                                hash, BUFFER_WRITE_MD5, \
-                                limit, __VA_ARGS__)
+       buffer_copy_PtrPtr(file, BUFFER_READ_STREAM, hash, BUFFER_WRITE_MD5, \
+                          limit, __VA_ARGS__)
 # define fd_fd_copy(fd1, fd2, limit, ...) \
-       buffer_copy_setup_IntInt(fd1, BUFFER_READ_FD, \
-                                fd2, BUFFER_WRITE_FD, \
-                                limit, __VA_ARGS__)
+       buffer_copy_IntInt(fd1, BUFFER_READ_FD, fd2, BUFFER_WRITE_FD, \
+                          limit, __VA_ARGS__)
 # define fd_buf_copy(fd, buf, limit, ...) \
-       buffer_copy_setup_IntPtr(fd, BUFFER_READ_FD, \
-                                buf, BUFFER_WRITE_BUF, \
-                                limit, __VA_ARGS__)
+       buffer_copy_IntPtr(fd, BUFFER_READ_FD, buf, BUFFER_WRITE_BUF, \
+                          limit, __VA_ARGS__)
 # define fd_vbuf_copy(fd, buf, limit, ...) \
-       buffer_copy_setup_IntPtr(fd, BUFFER_READ_FD, \
-                                buf, BUFFER_WRITE_VBUF, \
-                                limit, __VA_ARGS__)
+       buffer_copy_IntPtr(fd, BUFFER_READ_FD, buf, BUFFER_WRITE_VBUF, \
+                          limit, __VA_ARGS__)
 # define fd_null_copy(fd, limit, ...) \
        if (lseek(fd, limit, SEEK_CUR) == -1) { \
                if (errno != ESPIPE) \
                        ohshite(__VA_ARGS__); \
-               buffer_copy_setup_IntPtr(fd, BUFFER_READ_FD, \
-                                        NULL, BUFFER_WRITE_NULL, \
-                                        limit, __VA_ARGS__); \
+               buffer_copy_IntPtr(fd, BUFFER_READ_FD, \
+                                  NULL, BUFFER_WRITE_NULL, \
+                                  limit, __VA_ARGS__); \
        }
 # define stream_null_copy(file, limit, ...) \
        if (fseek(file, limit, SEEK_CUR) == -1) { \
                if (errno != EBADF) \
                        ohshite(__VA_ARGS__); \
-               buffer_copy_setup_PtrPtr(file, BUFFER_READ_STREAM, \
-                                        NULL, BUFFER_WRITE_NULL, \
-                                        limit, __VA_ARGS__); \
+               buffer_copy_PtrPtr(file, BUFFER_READ_STREAM, \
+                                  NULL, BUFFER_WRITE_NULL, \
+                                  limit, __VA_ARGS__); \
        }
 # define stream_fd_copy(file, fd, limit, ...) \
-       buffer_copy_setup_PtrInt(file, BUFFER_READ_STREAM, \
-                                fd, BUFFER_WRITE_FD, \
-                                limit, __VA_ARGS__)
+       buffer_copy_PtrInt(file, BUFFER_READ_STREAM, fd, BUFFER_WRITE_FD, \
+                          limit, __VA_ARGS__)
 #else /* HAVE_C99 */
 # define fd_md5(fd, hash, limit, desc...) \
-       buffer_copy_setup_IntPtr(fd, BUFFER_READ_FD, \
-                                hash, BUFFER_WRITE_MD5, \
-                                limit, desc)
+       buffer_copy_IntPtr(fd, BUFFER_READ_FD, hash, BUFFER_WRITE_MD5, \
+                          limit, desc)
 # define stream_md5(file, hash, limit, desc...) \
-       buffer_copy_setup_PtrPtr(file, BUFFER_READ_STREAM, \
-                                hash, BUFFER_WRITE_MD5, \
-                                limit, desc)
+       buffer_copy_PtrPtr(file, BUFFER_READ_STREAM, hash, BUFFER_WRITE_MD5, \
+                          limit, desc)
 # define fd_fd_copy(fd1, fd2, limit, desc...) \
-       buffer_copy_setup_IntInt(fd1, BUFFER_READ_FD, \
-                                fd2, BUFFER_WRITE_FD, \
-                                limit, desc)
+       buffer_copy_IntInt(fd1, BUFFER_READ_FD, fd2, BUFFER_WRITE_FD, \
+                          limit, desc)
 # define fd_buf_copy(fd, buf, limit, desc...) \
-       buffer_copy_setup_IntPtr(fd, BUFFER_READ_FD, \
-                                buf, BUFFER_WRITE_BUF, \
-                                limit, desc)
+       buffer_copy_IntPtr(fd, BUFFER_READ_FD, buf, BUFFER_WRITE_BUF, \
+                          limit, desc)
 # define fd_vbuf_copy(fd, buf, limit, desc...) \
-       buffer_copy_setup_IntPtr(fd, BUFFER_READ_FD, \
-                                buf, BUFFER_WRITE_VBUF, \
-                                limit, desc)
+       buffer_copy_IntPtr(fd, BUFFER_READ_FD, buf, BUFFER_WRITE_VBUF, \
+                          limit, desc)
 # define fd_null_copy(fd, limit, desc...) \
        if (lseek(fd, limit, SEEK_CUR) == -1) { \
                if (errno != ESPIPE) \
                        ohshite(desc); \
-               buffer_copy_setup_IntPtr(fd, BUFFER_READ_FD, \
-                                        NULL, BUFFER_WRITE_NULL, \
-                                        limit, desc); \
+               buffer_copy_IntPtr(fd, BUFFER_READ_FD, \
+                                  NULL, BUFFER_WRITE_NULL, \
+                                  limit, desc); \
        }
 # define stream_null_copy(file, limit, desc...) \
        if (fseek(file, limit, SEEK_CUR) == -1) { \
                if (errno != EBADF) \
                        ohshite(desc); \
-               buffer_copy_setup_PtrPtr(file, BUFFER_READ_STREAM, \
-                                        NULL, BUFFER_WRITE_NULL, \
-                                        limit, desc); \
+               buffer_copy_PtrPtr(file, BUFFER_READ_STREAM, \
+                                  NULL, BUFFER_WRITE_NULL, \
+                                  limit, desc); \
        }
 # define stream_fd_copy(file, fd, limit, desc...)\
-       buffer_copy_setup_PtrInt(file, BUFFER_READ_STREAM, \
-                                fd, BUFFER_WRITE_FD, \
-                                limit, desc)
+       buffer_copy_PtrInt(file, BUFFER_READ_STREAM, fd, BUFFER_WRITE_FD, \
+                          limit, desc)
 #endif /* HAVE_C99 */
 
-off_t buffer_copy_setup_PtrInt(void *p, int typeIn,
-                               int i, int typeOut,
-                               off_t limit, const char *desc,
-                               ...) DPKG_ATTR_PRINTF(6);
-off_t buffer_copy_setup_PtrPtr(void *p1, int typeIn,
-                               void *p2, int typeOut,
-                               off_t limit, const char *desc,
-                               ...) DPKG_ATTR_PRINTF(6);
-off_t buffer_copy_setup_IntPtr(int i, int typeIn,
-                               void *p, int typeOut,
-                               off_t limit, const char *desc,
-                               ...) DPKG_ATTR_PRINTF(6);
-off_t buffer_copy_setup_IntInt(int i1, int typeIn,
-                               int i2, int typeOut,
-                               off_t limit, const char *desc,
-                               ...) DPKG_ATTR_PRINTF(6);
+off_t buffer_copy_PtrInt(void *p, int typeIn, int i, int typeOut,
+                         off_t limit, const char *desc,
+                         ...) DPKG_ATTR_PRINTF(6);
+off_t buffer_copy_PtrPtr(void *p1, int typeIn, void *p2, int typeOut,
+                         off_t limit, const char *desc,
+                         ...) DPKG_ATTR_PRINTF(6);
+off_t buffer_copy_IntPtr(int i, int typeIn, void *p, int typeOut,
+                         off_t limit, const char *desc,
+                         ...) DPKG_ATTR_PRINTF(6);
+off_t buffer_copy_IntInt(int i1, int typeIn, int i2, int typeOut,
+                         off_t limit, const char *desc,
+                         ...) DPKG_ATTR_PRINTF(6);
 
 off_t buffer_write(buffer_data_t data, void *buf,
                    off_t length, const char *desc);

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to