[TUHS] Date madness

Wolfgang Helbig helbig at mailbox.org
Thu Dec 14 01:39:24 AEST 2017


years ago I fixed some overflow bugs in v6. The file ctime.README
This tape (see enb.README) fixes some y2k and integer overflow issues
in V6.

ctime.c: Use Central European Timezone
	Don't blindly assume "19" to be the first two digits of the year. 
	The division of the current time by 8 hours overflows nowadays.
	Instead divide by
	24 hours, and use a routine which computes the quotient and remainder
	with unsigned double word arithmetic. (ludiv())
	If you want to understand ludiv and know modern program notations
	have a look at ludiv.README.
date.c: Interpret the user entered year "00" as "2000", not as "1900”.

The fixes are distributed on v6-tar tapes enblocked for simh (*.enb)

I think, the enb-directory is archived at tuhs. If not, let me know.

Here is the enb.README:

The contents of this directory are .README and .enb files with the
following basenames:

ctime:	Some y2k related changes to V6.
dcheck: Bug fix and enhancement of dcheck. 
dist:	The V6 distribution tape: dist.README explains how to install
	and setup V6 in the Supnik simulator. The file dist.enb is missing
	for copyright and space reasons, you have to prepare it yourself.
	(see enb.README). 
dotdot: Kernel enhancement: If in a root directoy of a mounted filesystem,
	let ".." mean the parent of the mount point, not the root directory.
enb:	Conventions and usage of .enb files. Contains C-source of a program
	which prepares tape files for the Supnik simulator and tells you
	how to get the V6 distribution tape.
ludiv:	Derivation of a double word unsigned division algorithm, which is used
	in ctime. (no corresponding .enb)
man:	The man command, which was missing from the distribution, and some
	changes do make nroff output readable on an xterm.

Have fun,

Wolfgang Helbig
Stauferstr. 22

71334 Waiblingen

More information about the TUHS mailing list