|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T p
Length: 1619 (0x653)
Types: TextFile
Names: »patches02«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Tess/patches02«
*** tess.c.sav Sat Dec 17 09:00:35 1988
--- tess.c Sat Dec 17 09:20:54 1988
***************
*** 87,93 ****
--- 87,98 ----
#include "tess-def.c"
#include "parser.c"
+ #ifdef SYSV
+ #include <sys/types.h>
+ #include <time.h>
+ #else /* !SYSV */
#include <sys/time.h>
+ #endif /* !SYSV */
/*------------------------------------------------------------*/
***************
*** 126,133 ****
--- 131,143 ----
InitAdv()
{
int i;
+ #ifdef SYSV
+ time_t now;
+ struct tm *tp;
+ #else /* !SYSV */
struct timeval tp;
struct timezone tzp;
+ #endif /* !SYSV */
for ( i=1; i<MaxObjs; i++ )
{
***************
*** 143,155 ****
--- 153,176 ----
zap = cc = wa = ep = dr = af = gp = mi = ti = kp = 0;
+ #ifdef SYSV
+ time(&now);
+ if ((tp = localtime(&now))==NULL) {
+ #else /* !SYSV */
if (gettimeofday(&tp,&tzp)==-1) {
+ #endif /* !SYSV */
perror("gettimeofday");
exit(1);
}
+ #ifdef SYSV
+ (void)srand48 ((long)tp->tm_sec);
+ for ( sum=0, i=0; i<3; i++ )
+ sum += (dc [i] = drand48() & 31);
+ #else /* !SYSV */
(void)srand ((int)tp.tv_sec);
for ( sum=0, i=0; i<3; i++ )
sum += (dc [i] = rand() & 31);
+ #endif /* !SYSV */
print_room = 1;
}
*** Makefile.orig Tue Nov 29 17:26:32 1988
--- Makefile Tue Dec 20 08:52:26 1988
***************
*** 1,6 ****
# simple makefile for tess
! CFLAGS = -O
tess: tess.c tess-def.c parser.c
cc -o tess $(CFLAGS) tess.c
--- 1,7 ----
# simple makefile for tess
! DEFINES = #-DSYSV
! CFLAGS = -O $(DEFINES)
tess: tess.c tess-def.c parser.c
cc -o tess $(CFLAGS) tess.c