The actual bug in sccs2rcs is not that is gets the test the wrong way round, the problem is that it is testing the wrong part of the string:

set date = `sccs prs -r$rev $file | @AWK@ '/^D / {print 
(substr($3,0,2)+0<70?20:19) $3, $4; exit}'`


It's testing the two character substring of the date starting at position zero.

But in awk strings start at position 1.

gawk interprets position zero as being the same as position 1, mawk doesn't:

$ mawk 'BEGIN{X="ABC"; print substr(X,0,2)}'
A

$ gawk 'BEGIN{X="ABC"; print substr(X,0,2)}'
AB

So if the script is run with @AWK@ == mawk then all years are treated as being in the 21st century.








--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to