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

Diff for /src/usr.bin/ssh/misc.c between version 1.11 and 1.12

version 1.11, 2001/06/16 08:58:34 version 1.12, 2001/06/26 17:27:24
Line 31 
Line 31 
 #include "log.h"  #include "log.h"
 #include "xmalloc.h"  #include "xmalloc.h"
   
   /* remove newline at end of string */
 char *  char *
 chop(char *s)  chop(char *s)
 {  {
Line 46 
Line 47 
   
 }  }
   
   /* set/unset filedescriptor to non-blocking */
 void  void
 set_nonblock(int fd)  set_nonblock(int fd)
 {  {
Line 93 
Line 95 
 /* Characters considered whitespace in strsep calls. */  /* Characters considered whitespace in strsep calls. */
 #define WHITESPACE " \t\r\n"  #define WHITESPACE " \t\r\n"
   
   /* return next token in configuration line */
 char *  char *
 strdelim(char **s)  strdelim(char **s)
 {  {
Line 139 
Line 142 
         return copy;          return copy;
 }  }
   
 int a2port(const char *s)  /*
    * Convert ASCII string to TCP/IP port number.
    * Port must be >0 and <=65535.
    * Return 0 if invalid.
    */
   int
   a2port(const char *s)
 {  {
         long port;          long port;
         char *endp;          char *endp;
Line 160 
Line 169 
 #define DAYS            (HOURS * 24)  #define DAYS            (HOURS * 24)
 #define WEEKS           (DAYS * 7)  #define WEEKS           (DAYS * 7)
   
 long convtime(const char *s)  /*
    * Convert a time string into seconds; format is
    * a sequence of:
    *      time[qualifier]
    *
    * Valid time qualifiers are:
    *      <none>  seconds
    *      s|S     seconds
    *      m|M     minutes
    *      h|H     hours
    *      d|D     days
    *      w|W     weeks
    *
    * Examples:
    *      90m     90 minutes
    *      1h30m   90 minutes
    *      2d      2 days
    *      1w      1 week
    *
    * Return -1 if time string is invalid.
    */
   long
   convtime(const char *s)
 {  {
         long total, secs;          long total, secs;
         const char *p;          const char *p;
Line 247 
Line 278 
         return (0);          return (0);
 }  }
   
   /* function to assist building execv() arguments */
 void  void
 addargs(arglist *args, char *fmt, ...)  addargs(arglist *args, char *fmt, ...)
 {  {

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12