aboutsummaryrefslogtreecommitdiff
path: root/kmer_utils.c
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2014-02-01 18:18:52 -0500
committerCalvin Morrison <mutantturkey@gmail.com>2014-02-01 18:18:52 -0500
commitcf528ce64522746428b6c7ca0c72cd1d5fb168c2 (patch)
tree3e3bcf1db7e98b9d8f614769bd61fa48d9632494 /kmer_utils.c
parentc9886ed211e28beb6f0f27203a28a98db7139d45 (diff)
update types of functions, remove non existant include and se size_t for strnstrip
Diffstat (limited to 'kmer_utils.c')
-rw-r--r--kmer_utils.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/kmer_utils.c b/kmer_utils.c
index b0cab47..e557e4a 100644
--- a/kmer_utils.c
+++ b/kmer_utils.c
@@ -4,7 +4,6 @@
#include <stdlib.h>
#include <string.h>
-#include "kmer_total_count.h"
const unsigned char alpha[256] =
{5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
@@ -20,13 +19,13 @@ const unsigned char alpha[256] =
const char reverse_alpha[4] = { 'A', 'C', 'G', 'T' };
-inline unsigned long long pow_four(unsigned long long x) {
+unsigned long long pow_four(unsigned long long x) {
return (unsigned long long)1 << (x * 2);
}
// convert a string of k-mer size base-4 values into a
// base-10 index
-inline unsigned long num_to_index(const char *str, const int kmer, const long error_pos, size_t *current_position) {
+inline unsigned long num_to_index(const char *str, const int kmer, const long error_pos, long long *current_position) {
int i = 0;
unsigned long out = 0;
@@ -141,8 +140,8 @@ char *index_to_kmer(unsigned long long index, long kmer) {
// need to allocate that) and copy only len characters.
char *strnstrip(const char *s, char *dest, int c, unsigned long long len) {
- unsigned long long i = 0;
- unsigned long long j = 0;
+ size_t i = 0;
+ size_t j = 0;
for(i = 0; i < len; i++) {
if(s[i] != c) {