diff options
author | Kaz Kyheku <kaz@kylheku.com> | 2020-03-04 22:09:02 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-03-04 22:09:02 -0800 |
commit | ecfabca467f9c8253d1a1b8dc73db92bfcc8ecb5 (patch) | |
tree | 8fe198b2c6aa94a890821146700f0260fa6d9003 /signal.c | |
parent | f9185f425f8e62b4a3b8103b5d94a434196c5038 (diff) | |
download | txr-ecfabca467f9c8253d1a1b8dc73db92bfcc8ecb5.tar.gz txr-ecfabca467f9c8253d1a1b8dc73db92bfcc8ecb5.tar.bz2 txr-ecfabca467f9c8253d1a1b8dc73db92bfcc8ecb5.zip |
less: fix broken semantics for symbols.
If a and b are symbols, then it's possible for (equal a b),
(less a b) and (less b a) to all yield false, which makes
no sense. This happens in the case when a and b are distinct
symbols (thus not equal), and have the same name (so the
stringwise comparison finds them to be equal and hence
neither less than the other).
* lib.c (less): Implement more complicated requirements for
comparing symbols. If two distinct symbols have the same name,
then one must be less than the other, and we use other
information to determine this. If at least one of them has a
home package, then we go by comparing packages: package
names are compared as strings, and a missing package is less
than a present package. If both same-named symbols have no
package, then they are compared as pointers.
* txr.1: Documented the properties of less as an
antisymmetric, antireflexive and transitive relation.
Documented the relationship with equal. Documented the
treatment of symbols. Cleaned up some wording.
Diffstat (limited to 'signal.c')
0 files changed, 0 insertions, 0 deletions