From 9a9fb383ad82022b6f230970c899e9937391dd72 Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Fri, 24 May 2024 14:26:22 +0200 Subject: [PATCH] standardize uint type names --- src/libecoPCR/ecoPCR.h | 6 +++--- src/libecoprimer/PrimerSets.c | 14 +++++++------- src/libecoprimer/apat_search.c | 4 ++-- src/libthermo/nnparams.c | 4 ++-- src/libthermo/nnparams.h | 6 ++++-- 5 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/libecoPCR/ecoPCR.h b/src/libecoPCR/ecoPCR.h index c736167..51c8f4a 100644 --- a/src/libecoPCR/ecoPCR.h +++ b/src/libecoPCR/ecoPCR.h @@ -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; diff --git a/src/libecoprimer/PrimerSets.c b/src/libecoprimer/PrimerSets.c index 9725f9f..00e42f1 100644 --- a/src/libecoprimer/PrimerSets.c +++ b/src/libecoprimer/PrimerSets.c @@ -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)wellIdentifiedSeqs; passed = FALSE; for (j=0; jwellIdentifiedSeqs; total_links = 0; @@ -1632,7 +1632,7 @@ size_t primers_changeSortedArray (ppair_t ** pairs, for (j=0; jdbsize; k++) if ((*pairs)[j]->coveredSeqs[k] == 1) cov[k] = 1; diff --git a/src/libecoprimer/apat_search.c b/src/libecoprimer/apat_search.c index 3da4070..87b5e6e 100644 --- a/src/libecoprimer/apat_search.c +++ b/src/libecoprimer/apat_search.c @@ -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; diff --git a/src/libthermo/nnparams.c b/src/libthermo/nnparams.c index ab74604..2cfdb56 100644 --- a/src/libthermo/nnparams.c +++ b/src/libthermo/nnparams.c @@ -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"); diff --git a/src/libthermo/nnparams.h b/src/libthermo/nnparams.h index b88825e..9154a19 100644 --- a/src/libthermo/nnparams.h +++ b/src/libthermo/nnparams.h @@ -13,11 +13,13 @@ #include #include +#include + //#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