/[hurd]/hurd/utils/ftpdir.c
ViewVC logotype

Diff of /hurd/utils/ftpdir.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by miles, Thu Jul 3 17:09:55 1997 UTC revision 1.3 by roland, Tue Jun 11 21:41:28 2002 UTC
# Line 1  Line 1 
1  /* Get a directory listing using the ftp protocol  /* Get a directory listing using the ftp protocol
2    
3     Copyright (C) 1997 Free Software Foundation, Inc.     Copyright (C) 1997,2002 Free Software Foundation, Inc.
4       Written by Miles Bader <miles@gnu.org>
    Written by Miles Bader <miles@gnu.ai.mit.edu>  
5    
6     This program is free software; you can redistribute it and/or     This program is free software; you can redistribute it and/or
7     modify it under the terms of the GNU General Public License as     modify it under the terms of the GNU General Public License as
# Line 37  static struct argp_option options[] = Line 36  static struct argp_option options[] =
36  {  {
37    {"user",     'u', "USER",0, "User to login as on ftp server"},    {"user",     'u', "USER",0, "User to login as on ftp server"},
38    {"password", 'p', "PWD", 0, "USER's password"},    {"password", 'p', "PWD", 0, "USER's password"},
39    {"account",  'a', "ACCT",0, "Account to login as"},    {"account",  'a', "ACCT",0, "Account to login as"},
40    {"separator",'S', "SEP", 0, "String to separate multiple listings"},    {"separator",'S', "SEP", 0, "String to separate multiple listings"},
41    {"prefix",   'P', "PFX", 0, "String to proceed listings; the first and second"    {"prefix",   'P', "PFX", 0, "String to proceed listings; the first and second"
42                                " occurances of %s are replace by HOST and DIR"},                                " occurances of %s are replace by HOST and DIR"},
# Line 203  pdirent (const char *name, const struct Line 202  pdirent (const char *name, const struct
202  {  {
203    char timebuf[20];    char timebuf[20];
204    strftime (timebuf, sizeof timebuf, "%Y-%m-%d %H:%M", localtime (&st->st_mtime));    strftime (timebuf, sizeof timebuf, "%Y-%m-%d %H:%M", localtime (&st->st_mtime));
205    printf ("%6o %2d %5d %5d %6ld  %s  %s\n",    printf ("%6o %2d %5d %5d %6lld  %s  %s\n",
206            st->st_mode, st->st_nlink, st->st_uid, st->st_gid, st->st_size,            st->st_mode, st->st_nlink, st->st_uid, st->st_gid, st->st_size,
207            timebuf, name);            timebuf, name);
208    if (symlink_target)    if (symlink_target)
# Line 223  ftpdir2 (char *dir, struct ftpdir_host * Line 222  ftpdir2 (char *dir, struct ftpdir_host *
222    return err;    return err;
223  }  }
224    
225  int  int
226  main (int argc, char **argv)  main (int argc, char **argv)
227  {  {
228    struct ftpdir_host *hosts = 0;    struct ftpdir_host *hosts = 0;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26