]> andersk Git - openssh.git/blobdiff - sftp-glob.c
- (stevesk) use X/Open socket interface for HP-UX 10.X also
[openssh.git] / sftp-glob.c
index 208efeb1528344f24d660271908aced76dd3eeec..18b44f82e56bb56c00c2691dae35580739e68376 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sftp-glob.c,v 1.3 2001/04/03 13:56:11 stevesk Exp $");
+RCSID("$OpenBSD: sftp-glob.c,v 1.6 2001/06/23 15:12:20 itojun Exp $");
 
 #include "ssh.h"
 #include "buffer.h"
@@ -49,7 +49,8 @@ static struct {
        int fd_out;
 } cur;
 
-void *fudge_opendir(const char *path)
+static void *
+fudge_opendir(const char *path)
 {
        struct SFTP_OPENDIR *r;
        
@@ -63,7 +64,8 @@ void *fudge_opendir(const char *path)
        return((void*)r);
 }
 
-struct dirent *fudge_readdir(struct SFTP_OPENDIR *od)
+static struct dirent *
+fudge_readdir(struct SFTP_OPENDIR *od)
 {
        /* Solaris needs sizeof(dirent) + path length (see below) */
        static char buf[sizeof(struct dirent) + MAXPATHLEN];
@@ -84,7 +86,7 @@ struct dirent *fudge_readdir(struct SFTP_OPENDIR *od)
 #ifdef BROKEN_ONE_BYTE_DIRENT_D_NAME
        strlcpy(ret->d_name, od->dir[od->offset++]->filename, MAXPATHLEN);
 #else
-       strlcpy(ret->d_name, od->dir[od->offset++]->filename, 
+       strlcpy(ret->d_name, od->dir[od->offset++]->filename,
            sizeof(ret->d_name));
 #endif
 #ifdef __GNU_LIBRARY__
@@ -101,13 +103,15 @@ struct dirent *fudge_readdir(struct SFTP_OPENDIR *od)
        return(ret);
 }
 
-void fudge_closedir(struct SFTP_OPENDIR *od)
+static void
+fudge_closedir(struct SFTP_OPENDIR *od)
 {
        free_sftp_dirents(od->dir);
        xfree(od);
 }
 
-void attrib_to_stat(Attrib *a, struct stat *st)
+static void
+attrib_to_stat(Attrib *a, struct stat *st)
 {
        memset(st, 0, sizeof(*st));
        
@@ -125,7 +129,8 @@ void attrib_to_stat(Attrib *a, struct stat *st)
        }
 }
 
-int fudge_lstat(const char *path, struct stat *st)
+static int
+fudge_lstat(const char *path, struct stat *st)
 {
        Attrib *a;
        
@@ -137,7 +142,8 @@ int fudge_lstat(const char *path, struct stat *st)
        return(0);
 }
 
-int fudge_stat(const char *path, struct stat *st)
+static int
+fudge_stat(const char *path, struct stat *st)
 {
        Attrib *a;
        
@@ -150,8 +156,8 @@ int fudge_stat(const char *path, struct stat *st)
 }
 
 int
-remote_glob(int fd_in, int fd_out, const char *pattern, int flags, 
-    const int (*errfunc)(const char *, int), glob_t *pglob)
+remote_glob(int fd_in, int fd_out, const char *pattern, int flags,
+    int (*errfunc)(const char *, int), glob_t *pglob)
 {
        pglob->gl_opendir = (void*)fudge_opendir;
        pglob->gl_readdir = (void*)fudge_readdir;
@@ -163,6 +169,6 @@ remote_glob(int fd_in, int fd_out, const char *pattern, int flags,
        cur.fd_in = fd_in;
        cur.fd_out = fd_out;
 
-       return(glob(pattern, flags | GLOB_ALTDIRFUNC, (void*)errfunc, 
+       return(glob(pattern, flags | GLOB_ALTDIRFUNC, (void*)errfunc,
            pglob));
 }
This page took 0.040812 seconds and 4 git commands to generate.