Skip to content

Commit

Permalink
src: Comply with C99 definition of 'inline'.
Browse files Browse the repository at this point in the history
Previously, compilation failed with clang and thus on recent OSX versions.

Reported by Rasmus Ågren at <#5>.
  • Loading branch information
wwood committed Dec 12, 2016
1 parent 8df72e3 commit 3582fff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/orfm.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,22 +133,22 @@ void translate(char* begin, int num, bool reverse, char* codonTable){
puts(for_printing);
}

inline void print_sequence_header(kseq_t* seq_struct, int start_position, int frame, int orf_counter){
static inline void print_sequence_header(kseq_t* seq_struct, int start_position, int frame, int orf_counter){
if (seq_struct->comment.l > 0){
printf(">%s_%i_%i_%i %s\n", seq_struct->name.s, start_position+1, frame, orf_counter, seq_struct->comment.s);
} else {
printf(">%s_%i_%i_%i\n", seq_struct->name.s, start_position+1, frame, orf_counter);
}
}
inline void print_transcript_sequence_header(kseq_t* seq_struct, int start_position, int frame, int orf_counter, FILE* transcript_output_fp){
static inline void print_transcript_sequence_header(kseq_t* seq_struct, int start_position, int frame, int orf_counter, FILE* transcript_output_fp){
if (seq_struct->comment.l > 0){
fprintf(transcript_output_fp, ">%s_%i_%i_%i %s\n", seq_struct->name.s, start_position+1, frame, orf_counter, seq_struct->comment.s);
} else {
fprintf(transcript_output_fp, ">%s_%i_%i_%i\n", seq_struct->name.s, start_position+1, frame, orf_counter);
}
}

inline void print_sequence(kseq_t* sequence,
static inline void print_sequence(kseq_t* sequence,
FILE* transcript_output_fp,
char* codonTable,
int *orf_counter,
Expand Down

0 comments on commit 3582fff

Please sign in to comment.