(inittables, sort_buffer_size, getmonth, mergefps,
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 5 Nov 2004 23:02:09 +0000 (23:02 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 5 Nov 2004 23:02:09 +0000 (23:02 +0000)
commit8a0f42dff9aa916bf2361a9347dafdd669a1f528
tree78120fc60323d61ec8947a3a818712abde6c9bea
parent5312181e5b23be99eb5cb2649f5f3d973133f17d
(inittables, sort_buffer_size, getmonth, mergefps,
first_same_file, merge, sort, main): Use size_t for indexes into arrays.
This fixes some unlikely havoc-wreaking bugs (e.g., more than INT_MAX
temporary files).
(getmonth, keycompare, compare): Rewrite to avoid need for alloca,
thus avoiding unchecked stack overflow in some cases.  As a side
effect this improve the performance of "sort -M" by a factor of 4
on my benchmarks.
src/sort.c