| 1 | /* |
|---|
| 2 | * This file is generated by aisc_mkpt. |
|---|
| 3 | * Any changes you make here will be overwritten later! |
|---|
| 4 | * |
|---|
| 5 | */ |
|---|
| 6 | |
|---|
| 7 | #ifndef PROTOTYPES_H |
|---|
| 8 | #define PROTOTYPES_H |
|---|
| 9 | |
|---|
| 10 | #ifndef P_ |
|---|
| 11 | # if defined(__STDC__) || defined(__cplusplus) |
|---|
| 12 | # define P_(s) s |
|---|
| 13 | # else |
|---|
| 14 | # define P_(s) () |
|---|
| 15 | # endif |
|---|
| 16 | #else |
|---|
| 17 | # error P_ already defined elsewhere |
|---|
| 18 | #endif |
|---|
| 19 | |
|---|
| 20 | #ifdef __cplusplus |
|---|
| 21 | extern "C" { |
|---|
| 22 | #endif |
|---|
| 23 | |
|---|
| 24 | |
|---|
| 25 | /* main.c */ |
|---|
| 26 | int file_type P_((char *filename)); |
|---|
| 27 | int isnum P_((char *string)); |
|---|
| 28 | int file_exist P_((char *file_name)); |
|---|
| 29 | void change_file_suffix P_((char *old_file, char *file_name, int type)); |
|---|
| 30 | |
|---|
| 31 | /* fconv.c */ |
|---|
| 32 | void convert P_((char *inf, char *outf, int intype, int outype)); |
|---|
| 33 | void init P_((void)); |
|---|
| 34 | void init_seq_data P_((void)); |
|---|
| 35 | |
|---|
| 36 | /* mg.c */ |
|---|
| 37 | void init_gm_data P_((void)); |
|---|
| 38 | void genbank_to_macke P_((char *inf, char *outf)); |
|---|
| 39 | int gtom P_((void)); |
|---|
| 40 | void gtom_remarks P_((void)); |
|---|
| 41 | void gtom_copy_remark P_((char *string, const char *key, int *remnum)); |
|---|
| 42 | char *genbank_get_strain P_((void)); |
|---|
| 43 | char *genbank_get_subspecies P_((void)); |
|---|
| 44 | void correct_subspecies P_((char *subspecies)); |
|---|
| 45 | char *genbank_get_atcc P_((void)); |
|---|
| 46 | char *get_atcc P_((char *source)); |
|---|
| 47 | int paren_string P_((char *string, char *pstring, int index)); |
|---|
| 48 | int num_of_remark P_((void)); |
|---|
| 49 | void macke_to_genbank P_((char *inf, char *outf)); |
|---|
| 50 | int mtog P_((void)); |
|---|
| 51 | void mtog_decode_ref_and_remarks P_((void)); |
|---|
| 52 | void mtog_copy_remark P_((char **string, int *indi, int indj)); |
|---|
| 53 | char *macke_copyrem P_((char **strings, int *index, int maxline, int pointer)); |
|---|
| 54 | void mtog_genbank_def_and_source P_((void)); |
|---|
| 55 | void get_string P_((char *line, char *temp, int index)); |
|---|
| 56 | void get_atcc_string P_((char *line, char *temp, int index)); |
|---|
| 57 | |
|---|
| 58 | /* genbank.c */ |
|---|
| 59 | void init_genbank P_((void)); |
|---|
| 60 | char genbank_in P_((FILE_BUFFER fp)); |
|---|
| 61 | void genbank_key_word P_((char *line, int index, char *key, int length)); |
|---|
| 62 | int genbank_comment_subkey_word P_((char *line, int index, char *key, int length)); |
|---|
| 63 | int genbank_check_blanks P_((char *line, int numb)); |
|---|
| 64 | char *genbank_continue_line P_((char **string, char *line, int numb, FILE_BUFFER fp)); |
|---|
| 65 | char *genbank_one_entry_in P_((char **datastring, char *line, FILE_BUFFER fp)); |
|---|
| 66 | char *genbank_one_comment_entry P_((char **datastring, char *line, int start_index, FILE_BUFFER fp)); |
|---|
| 67 | char *genbank_source P_((char *line, FILE_BUFFER fp)); |
|---|
| 68 | char *genbank_reference P_((char *line, FILE_BUFFER fp)); |
|---|
| 69 | const char *genbank_comments P_((char *line, FILE_BUFFER fp)); |
|---|
| 70 | char *genbank_origin P_((char *line, FILE_BUFFER fp)); |
|---|
| 71 | char *genbank_skip_unidentified P_((char *line, FILE_BUFFER fp, int blank_num)); |
|---|
| 72 | void genbank_verify_accession P_((void)); |
|---|
| 73 | void genbank_verify_keywords P_((void)); |
|---|
| 74 | char genbank_in_locus P_((FILE_BUFFER fp)); |
|---|
| 75 | void genbank_out P_((FILE *fp)); |
|---|
| 76 | void genbank_out_one_entry P_((FILE *fp, char *string, const char *key, int flag, const char *patterns, int period)); |
|---|
| 77 | void genbank_out_one_comment P_((FILE *fp, char *string, const char *key, int skindent, int cnindent)); |
|---|
| 78 | void genbank_print_lines P_((FILE *fp, char *string, int flag, const char *separators)); |
|---|
| 79 | void genbank_print_comment P_((FILE *fp, const char *key, char *string, int offset, int indent)); |
|---|
| 80 | void genbank_out_origin P_((FILE *fp)); |
|---|
| 81 | void genbank_to_genbank P_((char *inf, char *outf)); |
|---|
| 82 | void init_reference P_((Reference *ref, int flag)); |
|---|
| 83 | |
|---|
| 84 | /* macke.c */ |
|---|
| 85 | void init_macke P_((void)); |
|---|
| 86 | char macke_in P_((FILE_BUFFER fp1, FILE_BUFFER fp2, FILE_BUFFER fp3)); |
|---|
| 87 | char *macke_one_entry_in P_((FILE_BUFFER fp, const char *key, char *oldname, char **var, char *line, int index)); |
|---|
| 88 | char *macke_continue_line P_((const char *key, char *oldname, char **var, char *line, FILE_BUFFER fp)); |
|---|
| 89 | char *macke_origin P_((char *key, char *line, FILE_BUFFER fp)); |
|---|
| 90 | int macke_abbrev P_((char *line, char *key, int index)); |
|---|
| 91 | int macke_rem_continue_line P_((char **strings, int index)); |
|---|
| 92 | char macke_in_name P_((FILE_BUFFER fp)); |
|---|
| 93 | void macke_out_header P_((FILE *fp)); |
|---|
| 94 | void macke_out0 P_((FILE *fp, int format)); |
|---|
| 95 | void macke_out1 P_((FILE *fp)); |
|---|
| 96 | void macke_print_keyword_rem P_((int index, FILE *fp)); |
|---|
| 97 | void macke_print_line_78 P_((FILE *fp, char *line1, char *line2)); |
|---|
| 98 | int macke_key_word P_((char *line, int index, char *key, int length)); |
|---|
| 99 | int macke_in_one_line P_((char *string)); |
|---|
| 100 | void macke_out2 P_((FILE *fp)); |
|---|
| 101 | |
|---|
| 102 | /* phylip.c */ |
|---|
| 103 | void init_phylip P_((void)); |
|---|
| 104 | void to_phylip P_((char *inf, char *outf, int informat, int readstdin)); |
|---|
| 105 | void to_phylip_1x1 P_((char *inf, char *outf, int informat)); |
|---|
| 106 | void phylip_print_line P_((char *name, char *sequence, int seq_length, int index, FILE *fp)); |
|---|
| 107 | |
|---|
| 108 | /* paup.c */ |
|---|
| 109 | void init_paup P_((void)); |
|---|
| 110 | void to_paup P_((char *inf, char *outf, int informat)); |
|---|
| 111 | void to_paup_1x1 P_((char *inf, char *outf, int informat)); |
|---|
| 112 | void paup_verify_name P_((char **string)); |
|---|
| 113 | void paup_print_line P_((char *string, char *sequence, int seq_length, int index, int first_line, FILE *fp)); |
|---|
| 114 | void paup_print_header P_((FILE *ofp)); |
|---|
| 115 | |
|---|
| 116 | /* util.c */ |
|---|
| 117 | int Cmpcasestr P_((const char *s1, const char *s2)); |
|---|
| 118 | int Cmpstr P_((const char *s1, const char *s2)); |
|---|
| 119 | void Freespace P_((void *pointer)); |
|---|
| 120 | void error P_((int error_num, const char *error_message)); |
|---|
| 121 | void warning P_((int warning_num, const char *warning_message)); |
|---|
| 122 | char *Reallocspace P_((void *block, unsigned size)); |
|---|
| 123 | char *Dupstr P_((const char *string)); |
|---|
| 124 | char *Catstr P_((char *s1, const char *s2)); |
|---|
| 125 | int Lenstr P_((const char *s1)); |
|---|
| 126 | void Cpystr P_((char *s1, const char *s2)); |
|---|
| 127 | int Skip_white_space P_((char *line, int index)); |
|---|
| 128 | int Reach_white_space P_((char *line, int index)); |
|---|
| 129 | char *Fgetline P_((char *line, size_t maxread, FILE_BUFFER fb)); |
|---|
| 130 | void Getstr P_((char *line, int linenum)); |
|---|
| 131 | void Append_char P_((char **string, int ch)); |
|---|
| 132 | void Append_rm_eoln P_((char **string1, const char *string2)); |
|---|
| 133 | void Append_rp_eoln P_((char **string1, char *string2)); |
|---|
| 134 | void Append P_((char **string1, const char *string2)); |
|---|
| 135 | int find_pattern P_((const char *text, const char *pattern)); |
|---|
| 136 | int not_ending_mark P_((int ch)); |
|---|
| 137 | int last_word P_((int ch)); |
|---|
| 138 | int is_separator P_((int ch, const char *separators)); |
|---|
| 139 | int same_char P_((int ch1, int ch2)); |
|---|
| 140 | void Upper_case P_((char *string)); |
|---|
| 141 | int Blank_num P_((char *string)); |
|---|
| 142 | |
|---|
| 143 | /* date.c */ |
|---|
| 144 | char *genbank_date P_((char *other_date)); |
|---|
| 145 | void find_date P_((char *date_string, int *month, int *day, int *year)); |
|---|
| 146 | int two_char P_((char *string, int determ)); |
|---|
| 147 | void find_date_long_form P_((char *date_string, int *month, int *day, int *year)); |
|---|
| 148 | int ismonth P_((char *string)); |
|---|
| 149 | int isdatenum P_((char *string)); |
|---|
| 150 | int is_genbank_date P_((char *string)); |
|---|
| 151 | char *today_date P_((void)); |
|---|
| 152 | char *gcg_date P_((char *date_string)); |
|---|
| 153 | |
|---|
| 154 | /* embl.c */ |
|---|
| 155 | void init_em_data P_((void)); |
|---|
| 156 | void init_embl P_((void)); |
|---|
| 157 | char embl_in P_((FILE_BUFFER fp)); |
|---|
| 158 | char embl_in_id P_((FILE_BUFFER fp)); |
|---|
| 159 | void embl_key_word P_((char *line, int index, char *key, int length)); |
|---|
| 160 | int embl_check_blanks P_((char *line, int numb)); |
|---|
| 161 | char *embl_continue_line P_((char *pattern, char **string, char *line, FILE_BUFFER fp)); |
|---|
| 162 | char *embl_one_entry P_((char *line, FILE_BUFFER fp, char **entry, char *key)); |
|---|
| 163 | void embl_verify_title P_((int refnum)); |
|---|
| 164 | char *embl_date P_((char *line, FILE_BUFFER fp)); |
|---|
| 165 | char *embl_version P_((char *line, FILE_BUFFER fp)); |
|---|
| 166 | char *embl_comments P_((char *line, FILE_BUFFER fp)); |
|---|
| 167 | char *embl_skip_unidentified P_((char *pattern, char *line, FILE_BUFFER fp)); |
|---|
| 168 | int embl_comment_key P_((char *line, char *key)); |
|---|
| 169 | char *embl_one_comment_entry P_((FILE_BUFFER fp, char **datastring, char *line, int start_index)); |
|---|
| 170 | char *embl_origin P_((char *line, FILE_BUFFER fp)); |
|---|
| 171 | void embl_out P_((FILE *fp)); |
|---|
| 172 | void embl_print_lines P_((FILE *fp, const char *key, char *Data, int flag, const char *separators)); |
|---|
| 173 | void embl_out_comments P_((FILE *fp)); |
|---|
| 174 | void embl_print_comment P_((FILE *fp, const char *key, char *string, int offset, int indent)); |
|---|
| 175 | void embl_out_origin P_((FILE *fp)); |
|---|
| 176 | void embl_to_macke P_((char *inf, char *outf, int format)); |
|---|
| 177 | int etom P_((void)); |
|---|
| 178 | void embl_to_embl P_((char *inf, char *outf)); |
|---|
| 179 | void embl_to_genbank P_((char *inf, char *outf)); |
|---|
| 180 | int etog P_((void)); |
|---|
| 181 | void etog_reference P_((void)); |
|---|
| 182 | char *etog_author P_((char *string)); |
|---|
| 183 | char *etog_journal P_((char *string)); |
|---|
| 184 | void etog_comments P_((void)); |
|---|
| 185 | void genbank_to_embl P_((char *inf, char *outf)); |
|---|
| 186 | int gtoe P_((void)); |
|---|
| 187 | void gtoe_reference P_((void)); |
|---|
| 188 | char *gtoe_author P_((char *author)); |
|---|
| 189 | char *gtoe_journal P_((char *string)); |
|---|
| 190 | void gtoe_comments P_((void)); |
|---|
| 191 | void macke_to_embl P_((char *inf, char *outf)); |
|---|
| 192 | int partial_mtoe P_((void)); |
|---|
| 193 | |
|---|
| 194 | /* gcg.c */ |
|---|
| 195 | void to_gcg P_((int intype, char *inf)); |
|---|
| 196 | void gcg_seq_out P_((FILE *ofp, char *key)); |
|---|
| 197 | void gcg_doc_out P_((char *line, FILE *ofp)); |
|---|
| 198 | int checksum P_((char *string, int numofstr)); |
|---|
| 199 | void gcg_out_origin P_((FILE *fp)); |
|---|
| 200 | void gcg_output_filename P_((char *prefix, char *name)); |
|---|
| 201 | int gcg_seq_length P_((void)); |
|---|
| 202 | |
|---|
| 203 | /* printable.c */ |
|---|
| 204 | void to_printable P_((char *inf, char *outf, int informat)); |
|---|
| 205 | void to_printable_1x1 P_((char *inf, char *outf, int informat)); |
|---|
| 206 | void printable_print_line P_((char *id, char *sequence, int start, int base_count, FILE *fp)); |
|---|
| 207 | |
|---|
| 208 | /* alma.c */ |
|---|
| 209 | void init_alma P_((void)); |
|---|
| 210 | void alma_to_macke P_((char *inf, char *outf)); |
|---|
| 211 | void alma_to_genbank P_((char *inf, char *outf)); |
|---|
| 212 | char alma_in P_((FILE_BUFFER fp)); |
|---|
| 213 | int alma_key_word P_((char *line, int index, char *key, int length)); |
|---|
| 214 | void alma_one_entry P_((char *line, int index, char **datastring)); |
|---|
| 215 | char *alma_in_gaps P_((FILE_BUFFER fp)); |
|---|
| 216 | void alma_in_sequence P_((void)); |
|---|
| 217 | void nbrf_in P_((FILE_BUFFER fp)); |
|---|
| 218 | void gcg_in P_((FILE_BUFFER fp)); |
|---|
| 219 | void staden_in P_((FILE_BUFFER fp)); |
|---|
| 220 | int atom P_((void)); |
|---|
| 221 | void embl_to_alma P_((char *inf, char *outf)); |
|---|
| 222 | void genbank_to_alma P_((char *inf, char *outf)); |
|---|
| 223 | void macke_to_alma P_((char *inf, char *outf)); |
|---|
| 224 | int etoa P_((void)); |
|---|
| 225 | void alma_out_header P_((FILE *fp)); |
|---|
| 226 | FILE *alma_out P_((FILE *fp, int format)); |
|---|
| 227 | FILE *alma_out_entry_header P_((FILE *fp, char *entry_id, char *filename, int format_type)); |
|---|
| 228 | void alma_out_gaps P_((FILE *fp)); |
|---|
| 229 | |
|---|
| 230 | /* routines.c */ |
|---|
| 231 | void count_base P_((int *base_a, int *base_t, int *base_g, int *base_c, int *base_other)); |
|---|
| 232 | void replace_entry P_((char **string1, const char *string2)); |
|---|
| 233 | |
|---|
| 234 | /* convert.c */ |
|---|
| 235 | int realloc_sequence_data P_((int total_seqs)); |
|---|
| 236 | void free_sequence_data P_((int used_entries)); |
|---|
| 237 | |
|---|
| 238 | #ifdef __cplusplus |
|---|
| 239 | } |
|---|
| 240 | #endif |
|---|
| 241 | |
|---|
| 242 | #undef P_ |
|---|
| 243 | |
|---|
| 244 | #else |
|---|
| 245 | #error prototypes.h included twice |
|---|
| 246 | #endif /* PROTOTYPES_H */ |
|---|