updates
authorPekka Riikonen <priikone@silcnet.org>
Fri, 8 Feb 2002 13:17:38 +0000 (13:17 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 8 Feb 2002 13:17:38 +0000 (13:17 +0000)
TODO
lib/silcsftp/sftp_fs_memory.c

diff --git a/TODO b/TODO
index 7eca1b9cb059f740c546f43959562dc6902ed460..6f5438277314bc2ed740055d309fc6122d0dda1c 100644 (file)
--- a/TODO
+++ b/TODO
@@ -110,6 +110,9 @@ TODO/bugs In SILC Libraries
  o Rewrite the lib/silcsim/silcsim.h.  The SilcSimContext should be
    private and silc_sim_alloc should take necessary arguments.
 
+ o lib/silcsftp/sftp_fs_memory.c use directly open(), close() etc. 
+   routines.  Change to use silc_file_* routines.
+
 
 TODO in SILC Protocol
 =====================
index 04979b720f90a84995c7ec00b5462869eed1f6b1..17f3293e668955b9e909ef4a1f8ea3c475004e59 100644 (file)
@@ -661,7 +661,7 @@ void mem_opendir(void *context, SilcSFTP sftp,
   MemFSFileHandle handle;
 
   if (!path || !strlen(path))
-    path = (const char *)strdup("/");
+    path = (const char *)DIR_SEPARATOR;
 
   /* Find such directory */
   entry = mem_find_entry_path(fs->root, path);
@@ -730,12 +730,12 @@ void mem_readdir(void *context, SilcSFTP sftp,
       *strrchr(date, ':') = '\0';
 
     if (!entry->directory)
-#ifndef SILC_WIN32\r
+#ifndef SILC_WIN32
                if (!lstat(entry->data + 7, &stats))
-#else\r
-               if (!stat(entry->data + 7, &stats))\r
-#endif\r
-                       filesize = stats.st_size;\r
+#else
+               if (!stat(entry->data + 7, &stats))
+#endif
+                       filesize = stats.st_size;
 
     /* Long name format is:
        drwx------   1   324210 Apr  8 08:40 mail/
@@ -800,7 +800,7 @@ void mem_stat(void *context, SilcSFTP sftp,
   struct stat stats;
 
   if (!path || !strlen(path))
-    path = (const char *)strdup("/");
+    path = (const char *)DIR_SEPARATOR;
 
   /* Find such directory */
   entry = mem_find_entry_path(fs->root, path);
@@ -850,7 +850,7 @@ void mem_lstat(void *context, SilcSFTP sftp,
   struct stat stats;
 
   if (!path || !strlen(path))
-    path = (const char *)strdup("/");
+    path = (const char *)DIR_SEPARATOR;
 
   /* Find such directory */
   entry = mem_find_entry_path(fs->root, path);
@@ -865,11 +865,11 @@ void mem_lstat(void *context, SilcSFTP sftp,
   }    
 
   /* Get real stat */
-#ifndef SILC_WIN32\r
+#ifndef SILC_WIN32
   ret = lstat(entry->data + 7, &stats);
-#else\r
-  ret = stat(entry->data + 7, &stats);\r
-#endif\r
+#else
+  ret = stat(entry->data + 7, &stats);
+#endif
   if (ret == -1) {
     (*callback)(sftp, silc_sftp_map_errno(errno), NULL, callback_context);
     return;
@@ -984,7 +984,7 @@ void mem_realpath(void *context, SilcSFTP sftp,
   SilcSFTPName name;
 
   if (!path || !strlen(path))
-    path = (const char *)strdup("/");
+    path = (const char *)DIR_SEPARATOR;
 
   realpath = mem_expand_path(fs->root, path);
   if (!realpath) {