mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 10:18:31 +00:00
Make fatcosmocc good enough to build ncurses 6.4
This commit is contained in:
parent
399d14aadf
commit
3f2f0e3a74
20 changed files with 295 additions and 139 deletions
|
@ -34,23 +34,23 @@
|
|||
#define get_byte_2_flip_sign(v) (((unsigned)(v) >> 22) ^ 0x200)
|
||||
#define get_byte_5_flip_sign(v) ((((v) >> 55) & 0x7FF) ^ 0x400)
|
||||
|
||||
bool radix_sort_int64(int64_t *A, size_t n) {
|
||||
int radix_sort_int64(int64_t *A, size_t n) {
|
||||
int64_t *T, *reader, *writer;
|
||||
size_t *b0, *b1, *b2, *b3, *b4, *b5;
|
||||
size_t i, pos, sum0, sum1, sum2, sum3, sum4, sum5, tsum;
|
||||
|
||||
if (n < HIST_SIZE) {
|
||||
_longsort(A, n);
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(T = (int64_t *)malloc(n * sizeof(int64_t)))) {
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(b0 = (size_t *)calloc(HIST_SIZE * 6, sizeof(size_t)))) {
|
||||
free(T);
|
||||
return false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
b1 = b0 + HIST_SIZE;
|
||||
|
@ -140,5 +140,5 @@ bool radix_sort_int64(int64_t *A, size_t n) {
|
|||
|
||||
free(b0);
|
||||
free(T);
|
||||
return true;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue