1 | /* |
---|
2 | * This file is generated by aisc_mkpt. |
---|
3 | * Any changes you make here will be overwritten later! |
---|
4 | * |
---|
5 | */ |
---|
6 | |
---|
7 | #ifndef PT_PROTOTYPES_H |
---|
8 | #define PT_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 | |
---|
21 | /* PTP_new_design.cxx */ |
---|
22 | extern "C" int pt_init_bond_matrix P_((PT_pdc *THIS)); |
---|
23 | extern "C" char *get_design_info P_((PT_tprobes *tprobe)); |
---|
24 | extern "C" char *get_design_hinfo P_((PT_tprobes *tprobe)); |
---|
25 | ULONG MarkSpeciesGroup P_((struct PTPanGlobal *pg, STRPTR specnames)); |
---|
26 | struct DesignQuery *AllocDesignQuery P_((struct PTPanGlobal *pg)); |
---|
27 | void FreeDesignQuery P_((struct DesignQuery *dq)); |
---|
28 | struct DesignHit *AddDesignHit P_((struct DesignQuery *dq)); |
---|
29 | void RemDesignHit P_((struct DesignHit *dh)); |
---|
30 | void CalcProbeQuality P_((struct DesignQuery *dq)); |
---|
31 | BOOL FindProbeInPartition P_((struct DesignQuery *dq)); |
---|
32 | extern "C" int PT_start_design P_((PT_pdc *pdc, int dummy_1x)); |
---|
33 | |
---|
34 | /* PTP_main.cxx */ |
---|
35 | struct PTPanGlobal *AllocPTPanGlobal P_((void)); |
---|
36 | void FreePTPanGlobal P_((struct PTPanGlobal *pg)); |
---|
37 | extern "C" int server_shutdown P_((PT_main *, aisc_string passwd)); |
---|
38 | extern "C" int broadcast P_((PT_main *main, int dummy_1x)); |
---|
39 | |
---|
40 | /* PTP_io.cxx */ |
---|
41 | ULONG BenchTimePassed P_((struct PTPanGlobal *pg)); |
---|
42 | void BenchOutput P_((struct PTPanGlobal *pg)); |
---|
43 | ULONG CalcLengthForFilteredSequence P_((struct PTPanGlobal *pg, STRPTR srcseq)); |
---|
44 | ULONG FilterSequenceTo P_((struct PTPanGlobal *pg, STRPTR srcstr, STRPTR filtptr)); |
---|
45 | STRPTR FilterSequence P_((struct PTPanGlobal *pg, STRPTR srcseq)); |
---|
46 | ULONG CompressSequenceTo P_((struct PTPanGlobal *pg, STRPTR srcseq, ULONG *seqptr)); |
---|
47 | ULONG *CompressSequence P_((struct PTPanGlobal *pg, STRPTR srcseq)); |
---|
48 | ULONG GetLengthOfCompressedSequence P_((struct PTPanGlobal *pg, ULONG *seqptr)); |
---|
49 | UWORD GetCompressedLongSize P_((struct PTPanGlobal *pg, ULONG pval)); |
---|
50 | ULONG DecompressSequenceTo P_((struct PTPanGlobal *pg, ULONG *seqptr, STRPTR tarseq)); |
---|
51 | ULONG DecompressCompressedLongTo P_((struct PTPanGlobal *pg, ULONG pval, STRPTR tarseq)); |
---|
52 | STRPTR DecompressSequence P_((struct PTPanGlobal *pg, ULONG *seqptr)); |
---|
53 | LONG DecompressSequencePartTo P_((struct PTPanGlobal *pg, ULONG *seqptr, ULONG seqpos, ULONG length, STRPTR tarseq)); |
---|
54 | UBYTE GetNextCharacter P_((struct PTPanGlobal *pg, UBYTE *buffer, ULONG &bitpos, ULONG &count)); |
---|
55 | ULONG WriteManyChars P_((UBYTE *buffer, ULONG bitpos, BYTE c, ULONG i)); |
---|
56 | ULONG CompressSequenceWithDotsAndHyphens P_((struct PTPanGlobal *pg, struct PTPanSpecies *ps)); |
---|
57 | void ComplementSequence P_((struct PTPanGlobal *pg, STRPTR seqstr)); |
---|
58 | void ReverseSequence P_((struct PTPanGlobal *, STRPTR seqstr)); |
---|
59 | BOOL OpenDataBase P_((struct PTPanGlobal *pg)); |
---|
60 | BOOL LoadEcoliSequence P_((struct PTPanGlobal *pg)); |
---|
61 | void FreeAllSpecies P_((struct PTPanGlobal *pg)); |
---|
62 | BOOL CacheSpeciesLoad P_((struct CacheHandler *, struct PTPanSpecies *ps)); |
---|
63 | BOOL CacheSpeciesUnload P_((struct CacheHandler *, struct PTPanSpecies *ps)); |
---|
64 | ULONG CacheSpeciesSize P_((struct CacheHandler *, struct PTPanSpecies *ps)); |
---|
65 | BOOL LoadSpecies P_((struct PTPanGlobal *pg)); |
---|
66 | BOOL LoadIndexHeader P_((struct PTPanGlobal *pg)); |
---|
67 | BOOL LoadAllPartitions P_((struct PTPanGlobal *pg)); |
---|
68 | void FreeAllPartitions P_((struct PTPanGlobal *pg)); |
---|
69 | |
---|
70 | /* PTP_etc.cxx */ |
---|
71 | void SetARBErrorMsg P_((PT_local *locs, const STRPTR error)); |
---|
72 | extern "C" STRPTR virt_name P_((PT_probematch *ml)); |
---|
73 | extern "C" STRPTR virt_fullname P_((PT_probematch *ml)); |
---|
74 | extern "C" bytestring *PT_unknown_names P_((struct_PT_pdc *pdc)); |
---|
75 | |
---|
76 | /* PTP_family.cxx */ |
---|
77 | extern "C" int ff_find_family P_((PT_local *locs, bytestring *species)); |
---|
78 | extern "C" int find_family P_((PT_local *locs, bytestring *species)); |
---|
79 | |
---|
80 | /* PT_lowlevel.cxx */ |
---|
81 | ULONG WriteBits P_((UBYTE *adr, ULONG bitpos, ULONG code, UWORD len)); |
---|
82 | ULONG ReadBits P_((UBYTE *adr, ULONG bitpos, UWORD len)); |
---|
83 | |
---|
84 | /* PT_huffman.cxx */ |
---|
85 | void BuildHuffmanCodeRec P_((struct HuffCode *hcbase, struct HuffCodeInternal *hc, ULONG len, ULONG rootidx, ULONG codelen, ULONG code)); |
---|
86 | BOOL BuildHuffmanCode P_((struct HuffCode *hcbase, ULONG len, LONG threshold)); |
---|
87 | void WriteHuffmanTree P_((struct HuffCode *hc, ULONG size, FILE *fh)); |
---|
88 | struct HuffTree *ReadHuffmanTree P_((FILE *fh)); |
---|
89 | struct HuffTree *BuildHuffmanTreeFromTable P_((struct HuffCode *hc, ULONG maxid)); |
---|
90 | void FreeHuffmanTree P_((struct HuffTree *root)); |
---|
91 | struct HuffTree *FindHuffTreeID P_((struct HuffTree *ht, UBYTE *adr, ULONG bitpos)); |
---|
92 | |
---|
93 | /* PT_treepack.cxx */ |
---|
94 | BOOL WriteIndexHeader P_((struct PTPanGlobal *pg)); |
---|
95 | BOOL WriteTreeHeader P_((struct PTPanPartition *pp)); |
---|
96 | BOOL CachePartitionLoad P_((struct CacheHandler *, struct PTPanPartition *pp)); |
---|
97 | void CachePartitionUnload P_((struct CacheHandler *, struct PTPanPartition *pp)); |
---|
98 | ULONG CachePartitionSize P_((struct CacheHandler *, struct PTPanPartition *pp)); |
---|
99 | BOOL WriteStdSuffixTreeHeader P_((struct PTPanPartition *pp)); |
---|
100 | BOOL CacheStdSuffixPartitionLoad P_((struct CacheHandler *, struct PTPanPartition *pp)); |
---|
101 | void CacheStdSuffixPartitionUnload P_((struct CacheHandler *, struct PTPanPartition *pp)); |
---|
102 | ULONG FixRelativePointersRec P_((struct PTPanPartition *pp, ULONG pos, ULONG level, ULONG elen)); |
---|
103 | LONG ULONGCompare P_((const ULONG *node1, const ULONG *node2)); |
---|
104 | ULONG CalcPackedNodeSize P_((struct PTPanPartition *pp, ULONG pos)); |
---|
105 | ULONG CalcPackedLeafSize P_((struct PTPanPartition *pp, ULONG pos)); |
---|
106 | void DebugTreeNode P_((struct TreeNode *tn)); |
---|
107 | void GetTreePath P_((struct TreeNode *tn, STRPTR strptr, ULONG len)); |
---|
108 | struct TreeNode *GoDownStdSuffixNodeChild P_((struct TreeNode *oldtn, UWORD seqcode)); |
---|
109 | struct TreeNode *GoDownNodeChild P_((struct TreeNode *oldtn, UWORD seqcode)); |
---|
110 | struct TreeNode *GoDownNodeChildNoEdge P_((struct TreeNode *oldtn, UWORD seqcode)); |
---|
111 | struct TreeNode *ReadPackedNode P_((struct PTPanPartition *pp, ULONG pos)); |
---|
112 | struct TreeNode *ReadPackedNodeNoEdge P_((struct PTPanPartition *pp, ULONG pos)); |
---|
113 | struct TreeNode *ReadPackedLeaf P_((struct PTPanPartition *pp, ULONG pos)); |
---|
114 | ULONG WritePackedNode P_((struct PTPanPartition *pp, ULONG pos, UBYTE *buf)); |
---|
115 | ULONG WritePackedLeaf P_((struct PTPanPartition *pp, ULONG pos, UBYTE *buf)); |
---|
116 | struct SearchQuery *CloneSearchQuery P_((struct SearchQuery *oldsq)); |
---|
117 | struct SearchQuery *AllocSearchQuery P_((struct PTPanGlobal *pg)); |
---|
118 | void FreeSearchQuery P_((struct SearchQuery *sq)); |
---|
119 | void SearchTree P_((struct SearchQuery *sq)); |
---|
120 | void PostFilterQueryHits P_((struct SearchQuery *sq)); |
---|
121 | BOOL AddQueryHit P_((struct SearchQuery *sq, ULONG hitpos)); |
---|
122 | void RemQueryHit P_((struct QueryHit *qh)); |
---|
123 | void MergeQueryHits P_((struct SearchQuery *tarsq, struct SearchQuery *srcsq)); |
---|
124 | void PrintSearchQueryState P_((const char *s1, const char *s2, struct SearchQuery *sq)); |
---|
125 | void SearchTreeRec P_((struct SearchQuery *sq)); |
---|
126 | void CollectTreeRec P_((struct SearchQuery *sq)); |
---|
127 | BOOL MatchSequence P_((struct SearchQuery *sq)); |
---|
128 | BOOL MatchSequenceRec P_((struct SearchQuery *sq)); |
---|
129 | BOOL FindSequenceMatch P_((struct SearchQuery *sq, struct QueryHit *qh, STRPTR tarstr)); |
---|
130 | BOOL FindSequenceMatchRec P_((struct SearchQuery *sq, struct QueryHit *qh, STRPTR tarptr)); |
---|
131 | |
---|
132 | /* PTP_buildtree.cxx */ |
---|
133 | BOOL BuildStdSuffixTree P_((struct PTPanGlobal *pg)); |
---|
134 | BOOL BuildMemoryStdSuffixTree P_((struct PTPanPartition *pp)); |
---|
135 | ULONG SplitStdSfxNode P_((struct PTPanPartition *pp, ULONG leafnum)); |
---|
136 | ULONG FindStdSfxNode P_((struct PTPanPartition *pp, ULONG snum, ULONG &sfxstart, ULONG sfxend)); |
---|
137 | ULONG FastFindStdSfxNode P_((struct PTPanPartition *pp, ULONG snum, ULONG sfxstart, ULONG sfxend)); |
---|
138 | ULONG InsertStdSfxNode P_((struct PTPanPartition *pp, ULONG sfxstart, ULONG sfxend, ULONG parnum)); |
---|
139 | BOOL WriteStdSuffixTreeToDisk P_((struct PTPanPartition *pp)); |
---|
140 | BOOL BuildPTPanIndex P_((struct PTPanGlobal *pg)); |
---|
141 | BOOL BuildMergedDatabase P_((struct PTPanGlobal *pg)); |
---|
142 | BOOL PartitionPrefixScan P_((struct PTPanGlobal *pg)); |
---|
143 | BOOL CreateTreeForPartition P_((struct PTPanPartition *pp)); |
---|
144 | BOOL BuildMemoryTree P_((struct PTPanPartition *pp)); |
---|
145 | ULONG CommonSequenceLength P_((struct PTPanPartition *pp, ULONG spos1, ULONG spos2, ULONG maxlen)); |
---|
146 | LONG CompareCompressedSequence P_((struct PTPanGlobal *pg, ULONG spos1, ULONG spos2)); |
---|
147 | BOOL InsertTreePos P_((struct PTPanPartition *pp, ULONG pos, ULONG window)); |
---|
148 | BOOL CalculateTreeStats P_((struct PTPanPartition *pp)); |
---|
149 | void GetTreeStatsDebugRec P_((struct PTPanPartition *pp, ULONG pos, ULONG level)); |
---|
150 | void GetTreeStatsTreeDepthRec P_((struct PTPanPartition *pp, ULONG pos, ULONG level)); |
---|
151 | void GetTreeStatsLevelRec P_((struct PTPanPartition *pp, ULONG pos, ULONG level)); |
---|
152 | void GetTreeStatsShortEdgesRec P_((struct PTPanPartition *pp, ULONG pos, ULONG level, ULONG elen)); |
---|
153 | void GetTreeStatsLongEdgesRec P_((struct PTPanPartition *pp, ULONG pos, ULONG level, ULONG elen)); |
---|
154 | void GetTreeStatsBranchHistoRec P_((struct PTPanPartition *pp, ULONG pos, ULONG level, ULONG elen)); |
---|
155 | void GetTreeStatsVerifyRec P_((struct PTPanPartition *pp, ULONG pos, ULONG treepos, ULONG hash)); |
---|
156 | ULONG GetTreeStatsLeafCountRec P_((struct PTPanPartition *pp, ULONG pos)); |
---|
157 | void GetTreeStatsLeafCollectRec P_((struct PTPanPartition *pp, ULONG pos)); |
---|
158 | LONG LongEdgeLengthCompare P_((const struct SfxNode **node1, const struct SfxNode **node2)); |
---|
159 | LONG LongEdgePosCompare P_((const struct SfxNode **node1, const struct SfxNode **node2)); |
---|
160 | LONG LongEdgeLabelCompare P_((struct SfxNode **node1, struct SfxNode **node2)); |
---|
161 | ULONG GetSeqHash P_((struct PTPanGlobal *pg, ULONG seqpos, ULONG len, ULONG hash)); |
---|
162 | ULONG GetSeqHashBackwards P_((struct PTPanGlobal *pg, ULONG seqpos, ULONG len, ULONG hash)); |
---|
163 | BOOL CheckLongEdgeMatch P_((struct PTPanPartition *pp, ULONG seqpos, ULONG edgelen, ULONG dictpos)); |
---|
164 | BOOL BuildLongEdgeDictionary P_((struct PTPanPartition *pp)); |
---|
165 | BOOL WriteTreeToDisk P_((struct PTPanPartition *pp)); |
---|
166 | BOOL CreatePartitionLookup P_((struct PTPanGlobal *pg)); |
---|
167 | |
---|
168 | /* PTP_match.cxx */ |
---|
169 | void SearchPartition P_((struct PTPanPartition *pp, struct SearchQuery *sq)); |
---|
170 | void QueryTests P_((struct PTPanGlobal *pg)); |
---|
171 | void PP_convertBondMatrix P_((PT_pdc *pdc, PTPanGlobal *pg)); |
---|
172 | void PP_buildPosWeight P_((SearchQuery *sq)); |
---|
173 | extern "C" int probe_match P_((PT_local *locs, aisc_string probestring)); |
---|
174 | void SortHitsList P_((struct SearchQuery *sq)); |
---|
175 | void CreateHitsGUIList P_((struct SearchQuery *sq)); |
---|
176 | extern "C" STRPTR get_match_info P_((PT_probematch *ml)); |
---|
177 | STRPTR GetMatchListHeader P_((STRPTR seq)); |
---|
178 | extern "C" STRPTR get_match_hinfo P_((PT_probematch *)); |
---|
179 | extern "C" STRPTR c_get_match_hinfo P_((PT_probematch *)); |
---|
180 | extern "C" bytestring *match_string P_((PT_local *locs)); |
---|
181 | extern "C" bytestring *MP_match_string P_((PT_local *locs)); |
---|
182 | extern "C" bytestring *MP_all_species_string P_((PT_local *)); |
---|
183 | extern "C" int MP_count_all_species P_((PT_local *)); |
---|
184 | |
---|
185 | /* PTP_findEx.cxx */ |
---|
186 | extern "C" int PT_find_exProb P_((PT_exProb *pep)); |
---|
187 | |
---|
188 | /* PT_cachehandler.cxx */ |
---|
189 | struct CacheHandler *AllocCacheHandler P_((void)); |
---|
190 | void FreeCacheHandler P_((struct CacheHandler *ch)); |
---|
191 | struct CacheNode *CacheLoadData P_((struct CacheHandler *ch, struct CacheNode *cn, APTR ud)); |
---|
192 | ULONG CacheMemUsage P_((struct CacheHandler *ch)); |
---|
193 | void DisableCache P_((struct CacheHandler *ch)); |
---|
194 | void EnableCache P_((struct CacheHandler *ch)); |
---|
195 | BOOL CacheDataLoaded P_((struct CacheNode *cn)); |
---|
196 | void FreeCacheNode P_((struct CacheHandler *ch, struct CacheNode *cn)); |
---|
197 | BOOL CacheUnloadData P_((struct CacheHandler *ch, struct CacheNode *cn)); |
---|
198 | ULONG FlushCache P_((struct CacheHandler *ch)); |
---|
199 | |
---|
200 | /* PT_hashing.cxx */ |
---|
201 | struct HashArray *AllocHashArray P_((ULONG size)); |
---|
202 | void FreeHashArray P_((struct HashArray *ha)); |
---|
203 | void ClearHashArray P_((struct HashArray *ha)); |
---|
204 | struct HashEntry *GetHashEntry P_((struct HashArray *ha, ULONG hashkey)); |
---|
205 | BOOL EnlargeHashArray P_((struct HashArray *ha)); |
---|
206 | BOOL InsertHashEntry P_((struct HashArray *ha, ULONG hashkey, ULONG data)); |
---|
207 | |
---|
208 | /* dlist.cxx */ |
---|
209 | void NewList P_((struct List *lh)); |
---|
210 | void AddHead P_((struct List *lh, struct Node *nd)); |
---|
211 | void AddTail P_((struct List *lh, struct Node *nd)); |
---|
212 | void Remove P_((struct Node *nd)); |
---|
213 | LONG NodePriCompare P_((const struct Node **node1, const struct Node **node2)); |
---|
214 | BOOL SortList P_((struct List *lh)); |
---|
215 | struct BinTree *BuildBinTreeRec P_((struct Node **nodearr, ULONG left, ULONG right)); |
---|
216 | struct BinTree *BuildBinTree P_((struct List *list)); |
---|
217 | void FreeBinTree P_((struct BinTree *root)); |
---|
218 | struct Node *FindBinTreeLowerKey P_((struct BinTree *root, LLONG key)); |
---|
219 | |
---|
220 | #undef P_ |
---|
221 | |
---|
222 | #else |
---|
223 | #error pt_prototypes.h included twice |
---|
224 | #endif /* PT_PROTOTYPES_H */ |
---|