[5645] in Athena Bugs

home help back first fref pref prev next nref lref last post

olc: clients/lib/init.c

daemon@ATHENA.MIT.EDU (John Carr)
Wed Aug 1 02:47:26 1990

To: bugs@ATHENA.MIT.EDU
Date: Wed, 01 Aug 90 02:47:15 EDT
From: John Carr <jfc@ATHENA.MIT.EDU>


2 changes to this olc source file:

	1. If a compiled in server name is to be used, don't waste time trying
	   to use hesiod (since it will be ignored).

	2. Don't call index twice; save the return value instead.

*** init.c.71R	Mon Jul 16 08:15:28 1990
--- init.c	Wed Aug  1 02:44:43 1990
***************
*** 53,59 ****
  #ifdef LAVIN
    char type[BUF_SIZE];
  #endif LAVIN
! 
    h = getenv ("OLCD_HOST");
  
    if (!h) {
--- 53,59 ----
  #ifdef LAVIN
    char type[BUF_SIZE];
  #endif LAVIN
! #if !defined(COURSE) || defined(OLZ)
    h = getenv ("OLCD_HOST");
  
    if (!h) {
***************
*** 86,92 ****
    }
  
    strcpy (DaemonHost, h);
! 
  #ifdef LAVIN
    if(OLC)
      printf("Please choose which type of question you wish to ask:\n\n");
--- 86,92 ----
    }
  
    strcpy (DaemonHost, h);
! #endif /* !COURSE || OLZ */
  #ifdef LAVIN
    if(OLC)
      printf("Please choose which type of question you wish to ask:\n\n");
***************
*** 137,145 ****
         (void) strcpy(User.username, pwent->pw_name);
         (void) strcpy(User.realname, pwent->pw_gecos);
       }
! 
!   if (index(User.realname, ',') != 0)
!     *index(User.realname, ',') = '\0';
    
    gethostname(hostname, LINE_SIZE);
    host = gethostbyname(hostname);
--- 137,147 ----
         (void) strcpy(User.username, pwent->pw_name);
         (void) strcpy(User.realname, pwent->pw_gecos);
       }
!   {
!     char *cp;
!     if ((cp = index(User.realname, ',')) != 0)
!       *cp = '\0';
!   }
    
    gethostname(hostname, LINE_SIZE);
    host = gethostbyname(hostname);

home help back first fref pref prev next nref lref last post