-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AUTOPR] Tidy up code and update dependencies. (#27)
* Tidy up source code and update dependencies --------- Co-authored-by: nicolaasuni-vonage <[email protected]>
- Loading branch information
1 parent
c345825
commit 962040f
Showing
20 changed files
with
286 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.5.26 | ||
1.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
// @category Libraries | ||
// @author Nicola Asuni <[email protected]> | ||
// @link https://github.com/tecnickcom/binsearch | ||
// @license MIT (see https://raw.githubusercontent.com/tecnickcom/binsearch/main/LICENSE) | ||
// @license MIT (see LICENSE file) | ||
// @copyright (c) 2017-2024 Nicola Asuni - Tecnick.com | ||
|
||
/** | ||
|
@@ -179,7 +179,7 @@ | |
#define order_le_uint64_t(x) (x) //!< Return LE uint64_t in the correct endianness order | ||
#endif | ||
|
||
#define MAXCOLS 256 //!< Maximum number of indexable columns | ||
#define MAXCOLS 256 //!< Maximum number of columns indexable | ||
|
||
/** | ||
* Returns the absolute file address position of the specified item (binary block). | ||
|
@@ -915,7 +915,7 @@ define_col_has_prev_sub(uint64_t) | |
|
||
static inline void parse_col_offset(mmfile_t *mf) | ||
{ | ||
uint8_t i; | ||
uint8_t i = 0; | ||
uint64_t b = 0; | ||
mf->index[0] = mf->doffset; | ||
for (i = 0; i < mf->ncols; i++) | ||
|
@@ -941,13 +941,13 @@ static inline void parse_info_binsrc(mmfile_t *mf) | |
mf->doffset = (uint64_t)9 + mf->ncols + ((8 - ((mf->ncols + 1) & 7)) & 7); // account for 8-byte padding | ||
const uint64_t *op = (const uint64_t *)(mf->src + mf->doffset); | ||
mf->nrows = *op++; | ||
uint8_t i; | ||
uint8_t i = 0; | ||
for (i = 0; i < mf->ncols; i++) | ||
{ | ||
mf->ctbytes[i] = *tp++; | ||
mf->index[i] = *op++; | ||
} | ||
mf->doffset += ((mf->ncols + 1) * 8); // skip column offsets section | ||
mf->doffset += ((uint64_t)(mf->ncols + 1) * 8); // skip column offsets section | ||
mf->dlength -= mf->doffset; | ||
} | ||
|
||
|
@@ -1017,6 +1017,8 @@ static inline void mmap_binfile(const char *file, mmfile_t *mf) | |
case 0x0000000031414546: // magic number "FEA1" in LE | ||
parse_info_feather(mf); | ||
break; | ||
default: | ||
break; | ||
} | ||
parse_col_offset(mf); | ||
} | ||
|
@@ -1039,4 +1041,4 @@ static inline int munmap_binfile(mmfile_t mf) | |
return close(mf.fd); | ||
} | ||
|
||
#endif // NUMKEY_BINSEARCH_H | ||
#endif // NUMKEY_BINSEARCH_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
// @category Libraries | ||
// @author Nicola Asuni <[email protected]> | ||
// @link https://github.com/tecnickcom/variantkey | ||
// @license MIT (see https://github.com/tecnickcom/variantkey/blob/main/LICENSE) | ||
// @license MIT [LICENSE](https://raw.githubusercontent.com/tecnickcom/variantkey/main/LICENSE) | ||
|
||
/** | ||
* @file hex.h | ||
|
@@ -44,8 +44,8 @@ static inline size_t hex_uint64_t(uint64_t n, char *str) | |
static inline uint64_t parse_hex_uint64_t(const char *s) | ||
{ | ||
uint64_t v = 0; | ||
uint8_t b; | ||
size_t i; | ||
uint8_t b = 0; | ||
size_t i = 0; | ||
for (i = 0; i < 16; i++) | ||
{ | ||
b = s[i]; | ||
|
@@ -69,4 +69,4 @@ static inline uint64_t parse_hex_uint64_t(const char *s) | |
return v; | ||
} | ||
|
||
#endif // NUMKEY_HEX_H | ||
#endif // NUMKEY_HEX_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
// @category Libraries | ||
// @author Nicola Asuni <[email protected]> | ||
// @link https://github.com/tecnickcom/variantkey | ||
// @license MIT (see https://github.com/tecnickcom/variantkey/blob/main/LICENSE) | ||
// @license MIT [LICENSE](https://raw.githubusercontent.com/tecnickcom/variantkey/main/LICENSE) | ||
|
||
/** | ||
* @file set.h | ||
|
@@ -69,19 +69,19 @@ | |
#define RADIX_SORT_ITERATION_BLOCK(A, B, BYTE, SHIFT) \ | ||
for (i = 0; i < nitems; i++) \ | ||
{ \ | ||
v = A[i]; \ | ||
B[c##BYTE[((v >> SHIFT) & 0xff)]++] = v; \ | ||
v = (A)[i]; \ | ||
(B)[c##BYTE[((v >> (SHIFT)) & 0xff)]++] = v; \ | ||
} | ||
|
||
#define RADIX_SORT_ITERATION_INDEX_BLOCK(A, B, BYTE, SHIFT, ADX, BDX) \ | ||
for (i = 0; i < nitems; i++) \ | ||
{ \ | ||
v = A[i]; \ | ||
t##BYTE = ((v >> SHIFT) & 0xff); \ | ||
v = (A)[i]; \ | ||
t##BYTE = ((v >> (SHIFT)) & 0xff); \ | ||
j = c##BYTE[t##BYTE]; \ | ||
B[j] = v; \ | ||
(B)[j] = v; \ | ||
c##BYTE[t##BYTE]++; \ | ||
ADX = BDX; \ | ||
(ADX) = (BDX); \ | ||
} | ||
|
||
/** | ||
|
@@ -115,7 +115,7 @@ static inline void sort_uint64_t(uint64_t *arr, uint64_t *tmp, uint32_t nitems) | |
*/ | ||
static inline void order_uint64_t(uint64_t *arr, uint64_t *tmp, uint32_t *idx, uint32_t *tdx, uint32_t nitems) | ||
{ | ||
uint32_t j; | ||
uint32_t j = 0; | ||
RADIX_SORT_COUNT_BLOCK | ||
RADIX_SORT_ITERATION_INDEX_BLOCK(arr, tmp, 7, 0, tdx[j], i) | ||
RADIX_SORT_ITERATION_INDEX_BLOCK(tmp, arr, 6, 8, idx[j], tdx[i]) | ||
|
@@ -136,7 +136,7 @@ static inline void order_uint64_t(uint64_t *arr, uint64_t *tmp, uint32_t *idx, u | |
static inline void reverse_uint64_t(uint64_t *arr, uint64_t nitems) | ||
{ | ||
uint64_t *last = (arr + nitems); | ||
uint64_t tmp; | ||
uint64_t tmp = 0; | ||
while ((arr != last) && (arr != --last)) | ||
{ | ||
tmp = *last; | ||
|
@@ -243,4 +243,4 @@ static inline uint64_t *union_uint64_t(uint64_t *a_arr, uint64_t a_nitems, uint6 | |
return o_arr; | ||
} | ||
|
||
#endif // NUMKEY_SET_H | ||
#endif // NUMKEY_SET_H |
Oops, something went wrong.