* Interface routines for dungeon.
* These routines are for functions expected by the game
* that are not available in the Unix/f77 library.
/* routine to get time in hours minutes and seconds */
itime_(hrptr
,minptr
,secptr
)
int *hrptr
,*minptr
,*secptr
;
tmptr
= localtime(&timebuf
);
/* idate - return day (1-31), month (1-12) and year (AD) */
/* by Dave Newkirk, ihnp4!ihlpm!dcn */
struct tm
*t
, *localtime();
tloc
= &loc
; /* get pointer to time in seconds */
t
= localtime(tloc
); /* get time structure filled in */
date
[2] = t
->tm_year
+ 1900;
/* random number initializer */
/* random number generator */
/* note: returned random number ranges from 0 to maxval */
rndval
= rndval
% *maxval
;
/* thanks to Dave Newkirk, ihnp4!ihlpm!dcn for the following routines */
/* getuid - fortran callable getuid */
/* unbuf - make output completely unbuffered */