🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sources.bugs
Article #2137

Official patch #13 for faces v1.3; please apply it.

#2137
From: Rich Burridge
Date: Thu, 09 Mar 1989 07:54
295 lines
10889 bytes
  It adds the following modification from Jim Knutson
                                          <knutson%sw.MCC.COM%MCC.COM>:

  Map all hostnames to lower case. Improve hostname and username parsing.
  The following formats have been tested and are now accepted:

  From knutson Mon Sep 26 13:39:53 1988
  From peterson@sw.mcc.com Wed Jul 27 08:53:27 1988
  From @MCC.COM:archive-server@rice.edu Fri Sep 23 18:13:15 1988
  From @MCC.COM:knutson%sw.MCC.COM@MCC.COM Tue Nov  1 14:04:05 1988
  From @MCC.COM,@OTTO.CAD.MCC.COM:dow@MCC.COM Thu Dec  8 14:38:55 1988
  From @MCC.COM:arisco%cadillac.cad.mcc.com@mcc.com Mon Dec 19 15:36:17 1988
  From @MCC.COM:bigtex!james@cs.utexas.edu Tue Dec 20 16:57:58 1988
  From uunet.UU.NET!zardoz!neil@cs.utexas.edu Thu Jan  5 03:44:17 1989
  From execu!cedar!dewey@cs.utexas.edu Mon Feb 27 13:50:41 1989

Thanks Jim.

Feed this file to Larry Walls' patch program, then recompile.

    Rich.

------CUT HERE------CUT HERE------
*** original/README	Wed Feb 22 15:21:25 1989
--- README	Thu Mar  9 17:42:00 1989
***************
*** 96,102 ****
  monitoring addition, and to everybody else who suggested enhancements, and
  fixed bugs in the previous version. Special thanks to C.P. Lai for the Sun386i
  icon code plus numerous bug reports, to Neil Crellin and Mark Andrews for a
! fix to the (0,0) redraw bug with the NeWS version, and to Dave Cohrs for
  several fixes and enhancements, the addition of X11 bitmap support, and
  generally sorting out most of the problems with the X11 version.
  
--- 96,103 ----
  monitoring addition, and to everybody else who suggested enhancements, and
  fixed bugs in the previous version. Special thanks to C.P. Lai for the Sun386i
  icon code plus numerous bug reports, to Neil Crellin and Mark Andrews for a
! fix to the (0,0) redraw bug with the NeWS version, to Jim Knutson for
! improving the hostname and username parsing, and to Dave Cohrs for
  several fixes and enhancements, the addition of X11 bitmap support, and
  generally sorting out most of the problems with the X11 version.
  
*** original/extern.h	Sun Feb 26 19:20:55 1989
--- extern.h	Thu Mar  9 17:41:59 1989
***************
*** 1,5 ****
  
! /*  @(#)extern.h 1.8 89/02/26
   *
   *  Contains the external variable definitions used by faces.
   *
--- 1,5 ----
  
! /*  @(#)extern.h 1.9 89/03/09
   *
   *  Contains the external variable definitions used by faces.
   *
***************
*** 14,20 ****
   *  reported to me then an attempt will be made to fix them.
   */
  
! extern char *get_field(), *getname() ;
  extern int do_check() ;
  struct recinfo *rec_exists() ;
  
--- 14,20 ----
   *  reported to me then an attempt will be made to fix them.
   */
  
! extern char *get_field(), *getname(), *strlower() ;
  extern int do_check() ;
  struct recinfo *rec_exists() ;
  
*** original/get.c	Wed Mar  8 15:03:50 1989
--- get.c	Thu Mar  9 17:41:57 1989
***************
*** 1,6 ****
  /*LINTLIBRARY*/
  #ifndef lint
! static char sccsid[] = "@(#)get.c 1.11 89/03/08" ;
  #endif
  	
  /*  Extraction routines used by faces.
--- 1,6 ----
  /*LINTLIBRARY*/
  #ifndef lint
! static char sccsid[] = "@(#)get.c 1.12 89/03/09" ;
  #endif
  	
  /*  Extraction routines used by faces.
***************
*** 14,19 ****
--- 14,35 ----
   *  No responsibility is taken for any errors on inaccuracies inherent
   *  either to the comments or the code of this program, but if reported
   *  to me, then an attempt will be made to fix them.
+  *
+  * Modifications:
+  *     3/7/89 - knutson@mcc.com
+  *              Map all hostnames to lower case.  Improve hostname and 
+  *              username parsing.  The following formats have been tested
+  *              and are now accepted:
+  *
+  * From knutson Mon Sep 26 13:39:53 1988
+  * From peterson@sw.mcc.com Wed Jul 27 08:53:27 1988
+  * From @MCC.COM:archive-server@rice.edu Fri Sep 23 18:13:15 1988
+  * From @MCC.COM:knutson%sw.MCC.COM@MCC.COM Tue Nov  1 14:04:05 1988
+  * From @MCC.COM,@OTTO.CAD.MCC.COM:dow@MCC.COM Thu Dec  8 14:38:55 1988
+  * From @MCC.COM:arisco%cadillac.cad.mcc.com@mcc.com Mon Dec 19 15:36:17 1988
+  * From @MCC.COM:bigtex!james@cs.utexas.edu Tue Dec 20 16:57:58 1988
+  * From uunet.UU.NET!zardoz!neil@cs.utexas.edu Thu Jan  5 03:44:17 1989
+  * From execu!cedar!dewey@cs.utexas.edu Mon Feb 27 13:50:41 1989
   */
  
  #include "faces.h"
***************
*** 74,85 ****
                             while (ptr2 != ptr1)
                               {
                                 *ptr2-- ;
!                                if (*ptr2 == '!') return(ptr2+1) ;
                               }
!                            return(ptr2) ;
                           }
!                        else if ((ptr2 = index(str2,'@')) != NULL)
!                          return(ptr2+1) ;
                         else return(NULL) ;
   
        case TIMESTAMP : str6[5] = '\0' ;
--- 90,115 ----
                             while (ptr2 != ptr1)
                               {
                                 *ptr2-- ;
!                                if (*ptr2 == '!' || *ptr2 == ':')
!                                  return(ptr2+1) ;
                               }
!                            return(strlower(ptr2)) ;
                           }
!                        else if ((ptr2 = index(str2, '%')) != NULL)
!                          {
!                            ptr1 = ptr2+1 ;
!                            while (*(++ptr2) != '\0')
!                              {
!                                if (*ptr2 == '%' || *ptr2 == '@')
!                                  {
!                                    *ptr2 = '\0' ;
!                                    break ;
!                                  }
!                              }
!                            return(strlower(ptr1)) ;
!                          }
!                        else if ((ptr2 = rindex(str2,'@')) != NULL)
!                          return(strlower(ptr2+1)) ;
                         else return(NULL) ;
   
        case TIMESTAMP : str6[5] = '\0' ;
***************
*** 87,96 ****
   
        case USERNAME  : if ((ptr2 = rindex(str2,'!')) != NULL)
                           {
!                            if (ptr1 = index(ptr2,'@')) *ptr1 = '\0' ;
                             return(ptr2+1) ;
                           }
!                        else if ((ptr2 = index(str2,'@')) != NULL)
                           {
                             ptr1 = str2 ;
                             *ptr2 = '\0' ;
--- 117,138 ----
   
        case USERNAME  : if ((ptr2 = rindex(str2,'!')) != NULL)
                           {
!                            if (ptr1 = rindex(ptr2,'@')) *ptr1 = '\0' ;
                             return(ptr2+1) ;
                           }
!                        else if ((ptr2 = index(str2,'%')) != NULL)
!                           {
!                             ptr1 = str2 ;
!                             *ptr2 = '\0' ;
!                             while (ptr2 != ptr1)
!                               {
!                                 *ptr2-- ;
!                                 if (*ptr2 == '!' || *ptr2 == ':')
!                                   return(ptr2+1) ;
!                               }
!                             return(ptr2) ;
!                           }
!                         else if ((ptr2 = rindex(str2,'@')) != NULL)
                           {
                             ptr1 = str2 ;
                             *ptr2 = '\0' ;
***************
*** 97,103 ****
                             while (ptr2 != ptr1)
                               {
                                 *ptr2-- ;
!                                if (*ptr2 == '@') return(ptr2+1) ;
                               }
                             return(ptr2) ;
                           }
--- 139,146 ----
                             while (ptr2 != ptr1)
                               {
                                 *ptr2-- ;
!                                if (*ptr2 == '@' || *ptr2 == ':')
!                                  return(ptr2+1) ;
                               }
                             return(ptr2) ;
                           }
***************
*** 460,463 ****
--- 503,518 ----
      }    
    FCLOSE(fin) ;
    return(0) ;
+ }
+ 
+ 
+ char *
+ strlower(str)
+ char *str ;
+ {
+   char *c ;
+ 
+   for (c = str; *c != '\0'; c++) 
+     if (isupper(*c)) *c = tolower(*c) ;
+   return(str) ;
  }
*** original/mon.c	Wed Mar  8 15:03:50 1989
--- mon.c	Thu Mar  9 17:41:58 1989
***************
*** 1,6 ****
  /*LINTLIBRARY*/
  #ifndef lint
! static char sccsid[] = "@(#)mon.c 1.11 89/03/08" ;
  #endif
  
  /*  Monitoring routines used by the faces program.
--- 1,6 ----
  /*LINTLIBRARY*/
  #ifndef lint
! static char sccsid[] = "@(#)mon.c 1.12 89/03/09" ;
  #endif
  
  /*  Monitoring routines used by the faces program.
***************
*** 119,129 ****
          if ((ptr = get_field(HOSTNAME,nextline)) != NULL)
            STRCPY(host, ptr) ;
          if ((ptr = get_field(USERNAME,nextline)) != NULL)
!           {
!             STRCPY(user, ptr) ;
!             for (i = 0; i < strlen(user); i++)
!               if (isupper(user[i])) user[i] = tolower(user[i]) ;
!           }
          if ((ptr = get_field(TIMESTAMP,nextline)) != NULL)
            STRCPY(ts, ptr) ;
  
--- 119,125 ----
          if ((ptr = get_field(HOSTNAME,nextline)) != NULL)
            STRCPY(host, ptr) ;
          if ((ptr = get_field(USERNAME,nextline)) != NULL)
!           STRCPY(user, strlower(ptr)) ;
          if ((ptr = get_field(TIMESTAMP,nextline)) != NULL)
            STRCPY(ts, ptr) ;
  
*** original/patchlevel.h	Wed Mar  8 15:03:50 1989
--- patchlevel.h	Thu Mar  9 17:41:59 1989
***************
*** 1,5 ****
   
! /*  @(#)patchlevel.h 1.13 89/03/08
   *
   *  This is the current patch level for this version of faces.
   *
--- 1,5 ----
   
! /*  @(#)patchlevel.h 1.14 89/03/09
   *
   *  This is the current patch level for this version of faces.
   *
***************
*** 14,17 ****
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  12
--- 14,17 ----
   *  reported to me then an attempt will be made to fix them.
   */
  
! #define  PATCHLEVEL  13
Technical Details
Message-ID: <870@sunchat.oz>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari!otc!metro!sunaus!sunchat!richb

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari!otc!metro!sunaus!sunchat!richb
From: richb@sunchat.oz (Rich Burridge)
Newsgroups: comp.sources.bugs
Subject: Official patch #13 for faces v1.3; please apply it.
Message-ID: <870@sunchat.oz>
Date: 9 Mar 89 07:54:15 GMT
Organization: Sun Microsystems, Sydney
Lines: 295