summaryrefslogtreecommitdiffstats
path: root/lib/libftp/FtpArchie.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libftp/FtpArchie.c')
-rw-r--r--lib/libftp/FtpArchie.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/libftp/FtpArchie.c b/lib/libftp/FtpArchie.c
index 7f039be..22a05e1 100644
--- a/lib/libftp/FtpArchie.c
+++ b/lib/libftp/FtpArchie.c
@@ -2,9 +2,9 @@
Library for ftpd clients.(libftp)
Copyright by Oleg Orel
All rights reserved.
-
-This library is desined for free, non-commercial software creation.
-It is changeable and can be improved. The author would greatly appreciate
+
+This library is desined for free, non-commercial software creation.
+It is changeable and can be improved. The author would greatly appreciate
any advises, new components and patches of the existing programs.
Commercial usage is also possible with participation of it's author.
@@ -21,18 +21,18 @@ int FtpArchie ( char *what, ARCHIE *result, int len)
FILE *archie;
String cmd,tmp;
int i;
-
+
bzero(result,sizeof(result[0])*len);
-
+
sprintf(cmd,"archie -l -m %d %s",len,what);
-
+
if ((archie = popen(cmd,"r"))==NULL)
return 0;
for(i=0;i<len;i++)
{
char *p, *pp;
-
+
if (fgets(tmp,sizeof (tmp), archie)==NULL)
break;
@@ -42,15 +42,15 @@ int FtpArchie ( char *what, ARCHIE *result, int len)
result[i].createtime.tm_hour = C2I (tmp[6 ])*10 + C2I(tmp[7]);
result[i].createtime.tm_min = C2I (tmp[8 ])*10 + C2I(tmp[9]);
result[i].createtime.tm_sec = C2I (tmp[10])*10 + C2I(tmp[11]);
-
+
for(p=tmp; *p!=' '; p++);
for(; *p==' '; p++);
-
+
result[i].size = atoi(p);
for(; *p!=' '; p++);
for(; *p==' '; p++);
-
+
for (pp=result[i].host;*p!=' ';p++,pp++) *pp=*p;
*pp=0;
for(; *p==' '; p++);
@@ -58,6 +58,6 @@ int FtpArchie ( char *what, ARCHIE *result, int len)
*pp=0;
}
-
+
return i;
}
OpenPOWER on IntegriCloud