[BACK]Return to sftp-glob.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sftp-glob.c between version 1.2.4.2 and 1.2.4.3

version 1.2.4.2, 2001/05/07 21:09:34 version 1.2.4.3, 2001/09/27 00:15:42
Line 27 
Line 27 
   
 #include <glob.h>  #include <glob.h>
   
 #include "ssh.h"  
 #include "buffer.h"  #include "buffer.h"
 #include "bufaux.h"  #include "bufaux.h"
 #include "getput.h"  
 #include "xmalloc.h"  #include "xmalloc.h"
 #include "log.h"  #include "log.h"
 #include "atomicio.h"  
 #include "pathnames.h"  
   
 #include "sftp.h"  #include "sftp.h"
 #include "sftp-common.h"  #include "sftp-common.h"
Line 51 
Line 47 
         int fd_out;          int fd_out;
 } cur;  } cur;
   
 void *fudge_opendir(const char *path)  static void *
   fudge_opendir(const char *path)
 {  {
         struct SFTP_OPENDIR *r;          struct SFTP_OPENDIR *r;
   
Line 65 
Line 62 
         return((void*)r);          return((void*)r);
 }  }
   
 struct dirent *fudge_readdir(struct SFTP_OPENDIR *od)  static struct dirent *
   fudge_readdir(struct SFTP_OPENDIR *od)
 {  {
         static struct dirent ret;          static struct dirent ret;
   
Line 79 
Line 77 
         return(&ret);          return(&ret);
 }  }
   
 void fudge_closedir(struct SFTP_OPENDIR *od)  static void
   fudge_closedir(struct SFTP_OPENDIR *od)
 {  {
         free_sftp_dirents(od->dir);          free_sftp_dirents(od->dir);
         xfree(od);          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));          memset(st, 0, sizeof(*st));
   
Line 103 
Line 103 
         }          }
 }  }
   
 int fudge_lstat(const char *path, struct stat *st)  static int
   fudge_lstat(const char *path, struct stat *st)
 {  {
         Attrib *a;          Attrib *a;
   
Line 115 
Line 116 
         return(0);          return(0);
 }  }
   
 int fudge_stat(const char *path, struct stat *st)  static int
   fudge_stat(const char *path, struct stat *st)
 {  {
         Attrib *a;          Attrib *a;
   
Line 131 
Line 133 
 remote_glob(int fd_in, int fd_out, const char *pattern, int flags,  remote_glob(int fd_in, int fd_out, const char *pattern, int flags,
     int (*errfunc)(const char *, int), glob_t *pglob)      int (*errfunc)(const char *, int), glob_t *pglob)
 {  {
         pglob->gl_opendir = (void*)fudge_opendir;          pglob->gl_opendir = fudge_opendir;
         pglob->gl_readdir = (void*)fudge_readdir;          pglob->gl_readdir = (struct dirent *(*)(void *))fudge_readdir;
         pglob->gl_closedir = (void*)fudge_closedir;          pglob->gl_closedir = (void (*)(void *))fudge_closedir;
         pglob->gl_lstat = fudge_lstat;          pglob->gl_lstat = fudge_lstat;
         pglob->gl_stat = fudge_stat;          pglob->gl_stat = fudge_stat;
   
Line 141 
Line 143 
         cur.fd_in = fd_in;          cur.fd_in = fd_in;
         cur.fd_out = fd_out;          cur.fd_out = fd_out;
   
         return(glob(pattern, flags | GLOB_ALTDIRFUNC, (void*)errfunc,          return(glob(pattern, flags | GLOB_ALTDIRFUNC, errfunc,
             pglob));              pglob));
 }  }

Legend:
Removed from v.1.2.4.2  
changed lines
  Added in v.1.2.4.3