[BACK]Return to util.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ftp

Diff for /src/usr.bin/ftp/util.c between version 1.37 and 1.38

version 1.37, 2003/12/16 21:46:22 version 1.38, 2004/07/20 03:50:26
Line 106 
Line 106 
  * auto-login, if possible.   * auto-login, if possible.
  */   */
 void  void
 setpeer(argc, argv)  setpeer(int argc, char *argv[])
         int argc;  
         char *argv[];  
 {  {
         char *host;          char *host;
         char *port;          char *port;
Line 248 
Line 246 
  * login to remote host, using given username & password if supplied   * login to remote host, using given username & password if supplied
  */   */
 int  int
 ftp_login(host, user, pass)  ftp_login(const char *host, char *user, char *pass)
         const char *host;  
         char *user, *pass;  
 {  {
         char tmp[80];          char tmp[80];
         char *acct;          char *acct;
Line 365 
Line 361 
  * Returns false if no new arguments have been added.   * Returns false if no new arguments have been added.
  */   */
 int  int
 another(pargc, pargv, prompt)  another(int *pargc, char ***pargv, const char *prompt)
         int *pargc;  
         char ***pargv;  
         const char *prompt;  
 {  {
         int len = strlen(line), ret;          int len = strlen(line), ret;
   
Line 396 
Line 389 
  * of writing to the screen.   * of writing to the screen.
  */   */
 char *  char *
 remglob(argv, doswitch, errbuf)  remglob(char *argv[], int doswitch, char **errbuf)
         char *argv[];  
         int doswitch;  
         char **errbuf;  
 {  {
         char temp[MAXPATHLEN];          char temp[MAXPATHLEN];
         static char buf[MAXPATHLEN];          static char buf[MAXPATHLEN];
Line 486 
Line 476 
 }  }
   
 int  int
 confirm(cmd, file)  confirm(const char *cmd, const char *file)
         const char *cmd, *file;  
 {  {
         char line[BUFSIZ];          char line[BUFSIZ];
   
Line 527 
Line 516 
  * from the expression, we return only the first.   * from the expression, we return only the first.
  */   */
 int  int
 globulize(cpp)  globulize(char **cpp)
         char **cpp;  
 {  {
         glob_t gl;          glob_t gl;
         int flags;          int flags;
Line 558 
Line 546 
  * determine size of remote file   * determine size of remote file
  */   */
 off_t  off_t
 remotesize(file, noisy)  remotesize(const char *file, int noisy)
         const char *file;  
         int noisy;  
 {  {
         int overbose;          int overbose;
         off_t size;          off_t size;
Line 591 
Line 577 
  * determine last modification time (in GMT) of remote file   * determine last modification time (in GMT) of remote file
  */   */
 time_t  time_t
 remotemodtime(file, noisy)  remotemodtime(const char *file, int noisy)
         const char *file;  
         int noisy;  
 {  {
         int overbose;          int overbose;
         time_t rtime;          time_t rtime;
Line 656 
Line 640 
  * Returns true if this is the controlling/foreground process, else false.   * Returns true if this is the controlling/foreground process, else false.
  */   */
 int  int
 foregroundproc()  foregroundproc(void)
 {  {
         static pid_t pgrp = -1;          static pid_t pgrp = -1;
         int ctty_pgrp;          int ctty_pgrp;
Line 669 
Line 653 
 }  }
   
 static void  static void
 updateprogressmeter(dummy)  updateprogressmeter(int dummy)
         int dummy;  
 {  {
         int save_errno = errno;          int save_errno = errno;
   
Line 693 
Line 676 
 static struct timeval start;  static struct timeval start;
   
 void  void
 progressmeter(flag)  progressmeter(int flag)
         int flag;  
 {  {
         /*          /*
          * List of order of magnitude prefixes.           * List of order of magnitude prefixes.
Line 819 
Line 801 
  * instead of TTYOUT.   * instead of TTYOUT.
  */   */
 void  void
 ptransfer(siginfo)  ptransfer(int siginfo)
         int siginfo;  
 {  {
         struct timeval now, td;          struct timeval now, td;
         double elapsed;          double elapsed;
Line 860 
Line 841 
  * List words in stringlist, vertically arranged   * List words in stringlist, vertically arranged
  */   */
 void  void
 list_vertical(sl)  list_vertical(StringList *sl)
         StringList *sl;  
 {  {
         int i, j, w;          int i, j, w;
         int columns, width, lines, items;          int columns, width, lines, items;
Line 902 
Line 882 
  * Update the global ttywidth value, using TIOCGWINSZ.   * Update the global ttywidth value, using TIOCGWINSZ.
  */   */
 void  void
 setttywidth(a)  setttywidth(int a)
         int a;  
 {  {
         int save_errno = errno;          int save_errno = errno;
         struct winsize winsize;          struct winsize winsize;
Line 919 
Line 898 
  * Set the SIGALRM interval timer for wait seconds, 0 to disable.   * Set the SIGALRM interval timer for wait seconds, 0 to disable.
  */   */
 void  void
 alarmtimer(wait)  alarmtimer(int wait)
         int wait;  
 {  {
         struct itimerval itv;          struct itimerval itv;
   
Line 935 
Line 913 
  */   */
 #ifndef SMALL  #ifndef SMALL
 void  void
 controlediting()  controlediting(void)
 {  {
         HistEvent hev;          HistEvent hev;
   

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38