]> git.tuebingen.mpg.de Git - osl.git/blobdiff - osl.c
Make some functions static.
[osl.git] / osl.c
diff --git a/osl.c b/osl.c
index 5786939088bf9ef0147694fca40be43f320d6b7e..ded1e5327cd8bb175d629cf89820eeccb06b01ab 100644 (file)
--- a/osl.c
+++ b/osl.c
@@ -104,7 +104,7 @@ __printf_2_3 void __log(int ll, const char* fmt,...)
  *
  * \sa lseek(2).
  */
-int para_lseek(int fd, off_t *offset, int whence)
+static int __lseek(int fd, off_t *offset, int whence)
 {
        *offset = lseek(fd, *offset, whence);
        int ret = -E_LSEEK;
@@ -128,7 +128,7 @@ int para_lseek(int fd, off_t *offset, int whence)
  *
  * \sa write(2).
  */
-ssize_t para_write(int fd, const void *buf, size_t size)
+static ssize_t __write(int fd, const void *buf, size_t size)
 {
        ssize_t ret;
 
@@ -155,12 +155,12 @@ ssize_t para_write(int fd, const void *buf, size_t size)
  *
  * \sa para_write().
  */
-ssize_t para_write_all(int fd, const void *buf, size_t size)
+static ssize_t write_all(int fd, const void *buf, size_t size)
 {
 //     DEBUG_LOG("writing %zu bytes\n", size);
        const char *b = buf;
        while (size) {
-               ssize_t ret = para_write(fd, b, size);
+               ssize_t ret = __write(fd, b, size);
 //             DEBUG_LOG("ret: %zd\n", ret);
                if (ret < 0)
                        return ret;
@@ -189,7 +189,7 @@ int para_write_file(const char *filename, const void *buf, size_t size)
        if (ret < 0)
                return ret;
        fd = ret;
-       ret = para_write_all(fd, buf, size);
+       ret = write_all(fd, buf, size);
        if (ret < 0)
                goto out;
        ret = 1;
@@ -209,16 +209,16 @@ static int append_file(const char *filename, char *header, size_t header_size,
                return ret;
        fd = ret;
        if (header && header_size) {
-               ret = para_write_all(fd, header, header_size);
+               ret = write_all(fd, header, header_size);
                if (ret < 0)
                        goto out;
        }
-       ret = para_write_all(fd, data, data_size);
+       ret = write_all(fd, data, data_size);
        if (ret < 0)
                goto out;
        if (new_pos) {
                off_t offset = 0;
-               ret = para_lseek(fd, &offset, SEEK_END);
+               ret = __lseek(fd, &offset, SEEK_END);
                if (ret < 0)
                        goto out;
 //             DEBUG_LOG("new file size: " FMT_OFF_T "\n", offset);