summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-01-27 23:00:39 +0200
committerArnold D. Robbins <arnold@skeeve.com>2011-01-27 23:00:39 +0200
commited816b945b9725b26aa7f44fdab5bec0c48a8507 (patch)
tree874f7b292af74e7c76c0af4656cdf51547157e9b /debug.c
parenta5f230f0ac5eb4f1d720ba743bc2538057cd8258 (diff)
downloadgawk-ed816b945b9725b26aa7f44fdab5bec0c48a8507.tar.gz
Add controlled array sorting in for loop. Needs documenting.
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/debug.c b/debug.c
index 3932d73b..9573e1fb 100644
--- a/debug.c
+++ b/debug.c
@@ -1056,36 +1056,6 @@ print_field(long field_num)
}
}
-/* comp_func --- array index comparison function for qsort */
-
-static int
-comp_func(const void *p1, const void *p2)
-{
- size_t len1, len2;
- const char *str1, *str2;
- const NODE *t1, *t2;
- int cmp1;
-
- t1 = *((const NODE *const *) p1);
- t2 = *((const NODE *const *) p2);
-
-/*
- t1 = force_string(t1);
- t2 = force_string(t2);
-*/
- len1 = t1->ahname_len;
- str1 = t1->ahname_str;
-
- len2 = t2->ahname_len;
- str2 = t2->ahname_str;
-
- /* Array indexes are strings, compare as such, always! */
- cmp1 = memcmp(str1, str2, len1 < len2 ? len1 : len2);
- /* if prefixes are equal, size matters */
- return (cmp1 != 0 ? cmp1 :
- len1 < len2 ? -1 : (len1 > len2));
-}
-
/* print_array --- print the contents of an array */
static int