summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2003-08-23 07:44:12 +0000
committerwlemb <wlemb>2003-08-23 07:44:12 +0000
commitc645530aeed3f085d53552337d51ac3ce2d6359c (patch)
tree6a02c317699d63bbdd13ccaf1caf620efe345495
parent95b90495275dce54843371885c1a5c1672cb902e (diff)
downloadgroff-c645530aeed3f085d53552337d51ac3ce2d6359c.tar.gz
* src/preproc/ref/ref.cpp (reference::compute_sort_key): Always
insert SORT_SEP. With certain combinations of sort specifications, refer sorted entries in the wrong order. In particular, entries with a missing field should be be sorted before all entries that have that field, before refer looks to the next field.
-rw-r--r--ChangeLog8
-rw-r--r--src/preproc/refer/ref.cpp3
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index b9425ed8..7ca76716 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2003-08-23 Stephen Gildea <gildea@stop.mail-abuse.org>
+
+ * src/preproc/ref/ref.cpp (reference::compute_sort_key): Always
+ insert SORT_SEP. With certain combinations of sort specifications,
+ refer sorted entries in the wrong order. In particular, entries
+ with a missing field should be be sorted before all entries that
+ have that field, before refer looks to the next field.
+
2003-08-23 Werner LEMBERG <wl@gnu.org>
* src/utils/pfbtops/Makefile.sub (LINK.c): Define it so that the
diff --git a/src/preproc/refer/ref.cpp b/src/preproc/refer/ref.cpp
index 9c040789..86ceed05 100644
--- a/src/preproc/refer/ref.cpp
+++ b/src/preproc/refer/ref.cpp
@@ -420,8 +420,7 @@ void reference::compute_sort_key()
sort_fields += '\0';
const char *sf = sort_fields.contents();
while (*sf != '\0') {
- if (sf > sort_fields)
- sort_key += SORT_SEP;
+ sort_key += SORT_SEP;
char f = *sf++;
int n = 1;
if (*sf == '+') {