From long-morrow@CS.YALE.EDU Sat Jan 15 01:00:53 1994
Return-Path: <long-morrow@CS.YALE.EDU>
Received: from newton.ncsa.uiuc.edu by void.ncsa.uiuc.edu (4.1/NCSA-4.1)
	id AA05763; Sat, 15 Jan 94 01:00:52 CST
Received: from RT-GW.CS.YALE.EDU by newton.ncsa.uiuc.edu with SMTP id AA17324
  (5.65a/IDA-1.4.2 for robm@void.ncsa.uiuc.edu); Sat, 15 Jan 94 01:00:55 -0600
Received: from SPARKY.CF.CS.YALE.EDU by ALABAMA.CF.CS.YALE.EDU via SMTP; Sat, 15 Jan 1994 02:00:43 -0500
Received: by SPARKY.CF.CS.YALE.EDU (Sendmail-5.65c/res.client.cf-3.7)
	id AA03869; Sat, 15 Jan 1994 02:00:52 -0500
Date: Sat, 15 Jan 1994 02:00:52 -0500
From: long-morrow@CS.YALE.EDU (H Morrow Long)
Message-Id: <199401150700.AA03869@SPARKY.CF.CS.YALE.EDU>
To: robm@ncsa.uiuc.edu
Subject: 2 scripts uploaded to ftp.ncsa.uiuc.edu:/incoming/cgi/.
Status: OR


They are both based on your 'date' cgi script.

saytime.au	- call's "saytime" program modified to send to stdout.
gmt-saytime.au	- Universal Time version of above.

These both rely on Jef Poskanzer's saytime program.  I modified a 1990
version that we had so that it would output to standard out when given
the argument '-'.  The code mods are trivial:


*** saytime.c.old	Thu Jul 12 13:37:06 1990
--- saytime.c	Fri Jan 14 14:12:25 1994
***************
*** 70,76 ****
--- 70,80 ----
      {
      long clock;
      struct tm *t;
+ 	extern int	audiofd;
  
+ 	if (( argc > 1 ) && ( argv[1][0] == '-' ) && ( argv[1][1] == '\0' ))
+ 		audiofd = 1;		/* send audio to std output */
+ 
      clock = time( (long *) 0 );
      t = localtime( &clock );
  
***************
*** 438,450 ****
  	    exit( 1 );
  	    }
  	}
!     close( filefd );
      }
  
  void
  sayclose( )
      {
!     if ( audiofd != -1 )
  	close( audiofd );
      audiofd = -1;
      }
--- 442,455 ----
  	    exit( 1 );
  	    }
  	}
!     	close( filefd );
      }
  
  void
  sayclose( )
      {
!     if ( ( audiofd != -1 ) || ( audiofd != 1 ) )	/* ! err && ! stdout */
  	close( audiofd );
      audiofd = -1;
      }
+ 

					- Morrow


