--- gendb.c.old 2009-11-14 16:03:21.000000000 -0800 +++ gendb.c 2009-11-14 16:01:43.000000000 -0800 @@ -7,10 +7,13 @@ * DESCRIPTION: Generate sequences using a Markov model. **************************************************************************/ +#ifndef MAIN #define DEFINE_GLOBALS +#endif #include "macros.h" #include "fcodon.h" #include "background.h" +#include "gendb.h" #include "hash_alph.h" #include "seq.h" @@ -19,6 +22,7 @@ #define SEQS 10 /* number of sequences */ #define MAX_ORDER 10 // largest Markov model order +#ifndef MAIN /**************************************************************************/ /* get_letters @@ -301,7 +305,7 @@ Generate a file of synthetic sequences. */ /**************************************************************************/ -extern SEQ_T *gendb( +SEQ_T *gendb( FILE *out, // Output stream; return output if null. int type, // Type of alphabet. // 0: protein w/ambigs @@ -336,6 +340,7 @@ // Print the random sequences. return (print_random_seqs(out, seed, nseqs, min, max, letters, r, c, order, cum)); } // gendb +#endif #ifdef MAIN @@ -416,7 +421,7 @@ } } if (option_index + 1 != argc) { - fprintf(stderr, usage); + fprintf(stderr, "%s", usage); exit(EXIT_FAILURE); } int nseqs = atoi(argv[option_index]);