From cf528ce64522746428b6c7ca0c72cd1d5fb168c2 Mon Sep 17 00:00:00 2001 From: Calvin Morrison Date: Sat, 1 Feb 2014 18:18:52 -0500 Subject: update types of functions, remove non existant include and se size_t for strnstrip --- kmer_utils.c | 9 ++++----- 1 file 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 #include -#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) { -- cgit v1.2.3