🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #955

port finger-1.35 to SONY NEWS

#955
From: TANAKA Satoshi
Date: Tue, 29 Sep 1992 06:12
133 lines
4168 bytes
* Title
Porting GNU finger 1.35 to SONY NEWS.

* Changes
for SONY NEWS
Keyboard device name -> "/dev/keyboard". (config.h, lib/tty.c)
Read modify-time of "keyboard device". (lib/tty.c)
generic
Read access-time of "mouse device" for application user who uses only mouse. (lib/tty.c)

* The Finger version and where you obtained the distribution
GNU finger version 1.35 from sh.wide.ad.jp

* Your hardware
SONY RISC-NEWS 3460

* Operating system
NEWS-OS Release 4.1R #0: Fri Jul  5 16:44:29 JST 1991

* C Compiler used
@(#)MIPS RISCompiler 2.11 (from NEWS-OS 4.0R) Sat Jun 29 22:02:06 JST 1991

* Your network configuration; don't forget to mention what
  hardware, operating systems, and C compilers are used on each
  node where the bug manifests itself.
No relation.

* Patches if you have any
*** config.h	Mon Sep 28 20:53:01 1992
--- config.h.orig	Mon Sep 28 20:55:15 1992
***************
*** 80,93 ****
  /*#define MAILDIR "/usr/mail"*/
  #define MAILDIR "/usr/spool/mail"
  
- /* keyboard & mouse device name */
- #ifdef sony_news
- #define KEYBOARD_DEVICE_NAME "keyboard"
- #else
- #define KEYBOARD_DEVICE_NAME "kbd"
- #endif
- #define MOUSE_DEVICE_NAME "mouse"
- 
  /* Define USE_DATABASE if you want to keep information about users in
     a DBM database.  You can define the format of this database by simply
     editing ./lib/site/userformat.  The installation instructions should
--- 80,85 ----
*** lib/tty.c	Mon Sep 28 20:53:24 1992
--- lib/tty.c.orig	Fri Aug 21 01:54:49 1992
***************
*** 45,53 ****
    char device[1024];
    struct stat stats;
  
-   if (!strcmp (":0", tty))
-        tty = "console";    /* XXX, but useful for xdm(X11R5). */
- 
    sprintf (device, "%s/%s", TTYPATH, tty);
  
    /* If we cannot stat "/dev/console", then use "/dev/kbd".  Some
--- 45,50 ----
***************
*** 64,103 ****
        return (time ((time_t *)0));
  
    /* If the user is on the console, then return the read time of
!      /dev/kbd or /dev/mouse if that is newer. */
  
    if (strcmp (tty, "console") == 0)
      {
        time_t console = stats.st_atime;
-       time_t keyboard = (time_t)0;
-       time_t mouse = (time_t)0;
- 
-       /* first get time of /dev/kbd or /dev/keyboard */
  
!       sprintf (device, "%s/%s", TTYPATH, KEYBOARD_DEVICE_NAME); 
  
!       if (stat (device, &stats) != -1)
! #ifdef sony_news
!         keyboard = stats.st_mtime;
! #else
!         keyboard = stats.st_atime;
! #endif
! 
!       /* next get time of /dev/mouse */
! 
!       sprintf (device, "%s/%s", TTYPATH, MOUSE_DEVICE_NAME);
! 
!       if (stat (device, &stats) != -1)
!         mouse = stats.st_atime;
! 
!       if (console > keyboard)
! 	if (console > mouse)
! 	  return (console);
! 	else
! 	  return (mouse);
!       else
! 	return (keyboard);
! 	  
      }
  
    return (stats.st_atime);
--- 61,78 ----
        return (time ((time_t *)0));
  
    /* If the user is on the console, then return the read time of
!      /dev/kbd if that is newer. */
  
    if (strcmp (tty, "console") == 0)
      {
        time_t console = stats.st_atime;
  
!       sprintf (device, "%s/%s", TTYPATH, "kbd");
!       if (stat (device, &stats) == -1)
! 	return (console);
  
!       if (console > stats.st_atime)
! 	return (console);
      }
  
    return (stats.st_atime);

* Anything else you think is relevant
Reading time of "/dev/mouse" is redundant for most systems, 
others may be useful.

It's better that we check whether "/dev/keyboard" or "/dev/kbd" in 'configure'.


$@EDCf(J $@Ao(J
TANAKA Satoshi
qtanaka@cs.uec.ac.jp 
Technical Details
Message-ID: <9209281212.AA21278@kappa.cs.uec.ac.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cs.uec.ac.JP!qtanaka

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cs.uec.ac.JP!qtanaka
From: qtanaka@cs.uec.ac.JP (TANAKA Satoshi)
Subject: port finger-1.35 to SONY NEWS
Message-ID: <9209281212.AA21278@kappa.cs.uec.ac.jp>
Sender: gnulists@ai.mit.edu
Reply-To: qtanaka@cs.uec.ac.jp (TANAKA Satoshi)
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 29 Sep 1992 06:12:15 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 134