standardize uint type names

This commit is contained in:
Eric Coissac
2024-05-24 14:26:22 +02:00
parent 8c1668faa4
commit 9a9fb383ad
5 changed files with 18 additions and 16 deletions

View File

@ -21,8 +21,8 @@ typedef struct {
int32_t taxid;
char AC[20];
int32_t DE_length;
u_int32_t SQ_length;
u_int32_t CSQ_length; /*what is this CSQ_length ? */
uint32_t SQ_length;
uint32_t CSQ_length; /*what is this CSQ_length ? */
char data[1];
@ -30,7 +30,7 @@ typedef struct {
typedef struct {
int32_t taxid;
u_int32_t SQ_length;
uint32_t SQ_length;
int32_t isexample;
char *AC;
char *DE;

View File

@ -1567,7 +1567,7 @@ size_t primers_changeSortedArray (ppair_t ** pairs,
size_t sorted_count, poptions_t options)
{
int32_t i, k, total_links;
u_int32_t j;
uint32_t j;
int *owi;
int *iwi;
int allowedtaxa;
@ -1580,14 +1580,14 @@ size_t primers_changeSortedArray (ppair_t ** pairs,
idx_set = ECOMALLOC(slots*sizeof (int32_t),
"Could not allocate memory for index set.");
for (i=0; ((u_int32_t)i)<sorted_count; i++)
for (i=0; ((uint32_t)i)<sorted_count; i++)
{
owi = sortedpairs[i]->wellIdentifiedSeqs;
passed = FALSE;
for (j=0; j<sorted_count; j++)
{
if ((u_int32_t)i == j) continue;
if ((uint32_t)i == j) continue;
iwi = sortedpairs[j]->wellIdentifiedSeqs;
total_links = 0;
@ -1632,7 +1632,7 @@ size_t primers_changeSortedArray (ppair_t ** pairs,
for (j=0; j<sorted_count; j++)
{
for (k=0; k<index; k++)
if (j == (u_int32_t)(idx_set[k])) break;
if (j == (uint32_t)(idx_set[k])) break;
//need to remove this element
if (k == index)
{
@ -1714,7 +1714,7 @@ size_t primers_filterWithGivenLinks (ppair_t ** pairs,
size_t sorted_count, poptions_t options)
{
int32_t i, k;
u_int32_t j;
uint32_t j;
ppair_t *sortedpairs = *pairs;
int32_t *idx_set = NULL;
@ -1734,7 +1734,7 @@ size_t primers_filterWithGivenLinks (ppair_t ** pairs,
for (j=0; j<sorted_count; j++)
{
for (k=0; k<index; k++)
if (j == (u_int32_t) (idx_set[k])) break;
if (j == (uint32_t) (idx_set[k])) break;
//need to remove this element
if (k == index)
{
@ -1757,7 +1757,7 @@ size_t primers_filterWithGivenLinks (ppair_t ** pairs,
else i=sorted_count;
for (j=0; j<(u_int32_t)i; j++)
for (j=0; j<(uint32_t)i; j++)
for (k=0; k<options->dbsize; k++)
if ((*pairs)[j]->coveredSeqs[k] == 1)
cov[k] = 1;

View File

@ -36,7 +36,7 @@ int32_t ManberNoErr(pecoseq_t pseq,ppattern_t pat,
ppatternParam_t param,
StackiPtr stkpos)
{
u_int32_t pos;
uint32_t pos;
uint32_t smask, r;
uint8_t *data;
uint32_t end;
@ -84,7 +84,7 @@ int32_t ManberSub(pecoseq_t pseq,ppattern_t pat,
StackiPtr stkpos)
{
int e, found;
u_int32_t pos;
uint32_t pos;
uint32_t smask, cmask, sindx;
uint32_t *pr, r[2 * MAX_PAT_ERR + 2];
uint8_t *data;

View File

@ -542,7 +542,7 @@ double nparam_CalcSelfTM(PNNParams nparm, const char* seq, size_t len)
c4 = GETNUMCODE(useq[i]);
thedH += nparm->dH[(u_int8_t) c3][(u_int8_t)c4][(u_int8_t)c1][(u_int8_t)c2];//nparam_GetEnthalpy(nparm, c3,c4,c1,c2);
thedH += nparm->dH[(uint8_t) c3][(uint8_t)c4][(uint8_t)c1][(uint8_t)c2];//nparam_GetEnthalpy(nparm, c3,c4,c1,c2);
thedS += nparam_GetEntropy(nparm, c3,c4,c1,c2);
}
//printf("------------------\n");
@ -584,7 +584,7 @@ double nparam_CalcTwoTM(PNNParams nparm, const char* seq1, const char* seq2, siz
//fprintf (stderr,"Primer : %s %f %f %d %d, %d %d %f\n",useq,thedH,thedS,(int)c3,(int)c4,(int)c1,(int)c2,nparam_GetEnthalpy(nparm, c3,c4,c1,c2));
thedH += nparm->dH[(u_int8_t)c3][(u_int8_t)c4][(u_int8_t)c1][(u_int8_t)c2];//nparam_GetEnthalpy(nparm, c3,c4,c1,c2);
thedH += nparm->dH[(uint8_t)c3][(uint8_t)c4][(uint8_t)c1][(uint8_t)c2];//nparam_GetEnthalpy(nparm, c3,c4,c1,c2);
thedS += nparam_GetEntropy(nparm, c3,c4,c1,c2);
}
//fprintf(stderr,"------------------\n");

View File

@ -13,11 +13,13 @@
#include <math.h>
#include <string.h>
#include <stdint.h>
//#include "../libecoprimer/ecoprimer.h"
// following defines to simplify coding...
#define ndH(a,b,c,d) nparm->dH[(u_int8_t) a][(u_int8_t) b][(u_int8_t) c][(u_int8_t) d]
#define ndS(a,b,c,d) nparm->dS[(u_int8_t) a][(u_int8_t) b][(u_int8_t) c][(u_int8_t) d]
#define ndH(a,b,c,d) nparm->dH[(uint8_t) a][(uint8_t) b][(uint8_t) c][(uint8_t) d]
#define ndS(a,b,c,d) nparm->dS[(uint8_t) a][(uint8_t) b][(uint8_t) c][(uint8_t) d]
#define forbidden_enthalpy 1000000000000000000.0f
#define R 1.987f
#define SALT_METHOD_SANTALUCIA 1