Merge branch '2.4.x'
authorMark Wooding <mdw@distorted.org.uk>
Tue, 8 Oct 2019 10:29:17 +0000 (11:29 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 8 Oct 2019 10:29:17 +0000 (11:29 +0100)
* 2.4.x:
  utils/str.3: Fix typeface for mathematics.
  sys/tests.at: Add full stops after header comments.
  codec/codec.3: Fix spacing after ellipsis.
  utils/t/bits-testgen.py: Set the `SEED' from the command-line correctly.
  utils/t/bits-testgen.py: Make `arg' return arguments in the right order.

codec/codec.3
sys/tests.at
utils/str.3
utils/t/bits-testgen.py

index 8af0f8e..fd797c5 100644 (file)
@@ -136,7 +136,7 @@ Ignore all `junk' in the input.  This should suppress almost all
 decoding errors.
 .PP
 If you do not set any of the
-.BR CDCF_IGN ...
+.BR CDCF_IGN ...\&
 flags, a decoder should only accept the exact encoding that the
 corresponding encoder would produce (with
 .I maxline
index d5759bc..da79143 100644 (file)
@@ -51,14 +51,14 @@ mdup=BUILDDIR/t/mdup.t
 AT_CHECK([$mdup 3:4])
 AT_CHECK([$mdup 4:3])
 
-## Overlapping sources and destinations
+## Overlapping sources and destinations.
 AT_CHECK([$mdup 4:3 3:5 5:6])
 
-## Repeated sources
+## Repeated sources.
 AT_CHECK([$mdup 3:4 3:3 3:-1])
 AT_CHECK([$mdup 5:8 3:4 3:5 4:6])
 
-## Cycles
+## Cycles.
 AT_CHECK([$mdup 5:7 3:4 3:5 4:6 5:3])
 AT_CHECK([$mdup 5:8 3:4 3:5 4:6 5:3])
 
index 13bc18f..09a6f24 100644 (file)
@@ -151,7 +151,8 @@ with a zero flags word, which is the normal case.
 The function
 .B str_sanitize
 copies at most
-.I sz \- 1
+.I sz
+\- 1
 characters from the string
 .I p
 to
index 6bb9f88..05e4baf 100644 (file)
@@ -12,15 +12,15 @@ WD = 64
 LIMIT = 1 << WD
 MASK = LIMIT - 1
 
-SYS.argv.pop()
+ARGS = SYS.argv[1:]; ARGS.reverse()
 def arg(default = None):
-  if len(SYS.argv):
-    return SYS.argv.pop()
-  else:
-    return default
+  if len(ARGS): return ARGS.pop()
+  else: return default
 
 R.seed(None)
-SEED = int(arg(R.randrange(0, 1 << 32)))
+seed = arg()
+if seed is None: SEED = R.randrange(0, 1 << 32)
+else: SEED = int(seed, 0)
 R.seed(SEED)
 
 print '### Test vectors for 64-bit arithmetic macros'