www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/23/03:25:45

Date: Sun, 23 Jun 1996 10:20:40 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Eric Domazlicky <DHGW39B AT prodigy DOT com>
Cc: djgpp AT delorie DOT com
Subject: Re: How to get a good value for srand?
In-Reply-To: <4qeg2q$327k@usenetz1.news.prodigy.com>
Message-Id: <Pine.SUN.3.91.960623101843.1039L-100000@is>
Mime-Version: 1.0

On 21 Jun 1996, Eric Domazlicky wrote:

> BTW the reason I have the typedef there is because DJGPP never seems to 
> define the struct type that gettime is supposed to use except in the info 
> file, so you have to type it yerself.
> 
> typedef struct {
> unsigned char ti_min;
> unsigned char ti_hour;
> unsigned char ti_hund;
> unsigned char ti_sec;
> } time_data;
> 
> time_data t;
> gettime(&t);
> srand(t.ti_hund*0xff+t.ti_sec);

Did you look well enough?  The struct that `gettime' accepts is defined 
on <dos.h>, exactly as the on-line docs tell you.  At least, that is how 
the things are in DJGPP v2.0 (you didn't tell what version did you use).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019