1 /*   sbtedit.c
2 * ===========================================================================
3 *
4 *                            PUBLIC DOMAIN NOTICE
5 *            National Center for Biotechnology Information (NCBI)
6 *
7 *  This software/database is a "United States Government Work" under the
8 *  terms of the United States Copyright Act.  It was written as part of
9 *  the author's official duties as a United States Government employee and
10 *  thus cannot be copyrighted.  This software/database is freely available
11 *  to the public for use. The National Library of Medicine and the U.S.
12 *  Government do not place any restriction on its use or reproduction.
13 *  We would, however, appreciate having the NCBI and the author cited in
14 *  any work or product based on this material
15 *
16 *  Although all reasonable efforts have been taken to ensure the accuracy
17 *  and reliability of the software and data, the NLM and the U.S.
18 *  Government do not and cannot warrant the performance or results that
19 *  may be obtained by using this software or data. The NLM and the U.S.
20 *  Government disclaim all warranties, express or implied, including
21 *  warranties of performance, merchantability or fitness for any particular
22 *  purpose.
23 *
24 * ===========================================================================
25 *
26 * File Name:  sbtedit.c
27 *
28 * Author:  Colleen Bollin
29 *
30 * Version Creation Date:   5/17/2005
31 *
32 * $Revision: 1.6 $
33 *
34 * File Description:
35 * This file provides the Main function for the standalone Submission Template
36 * Editor.
37 *
38 * Modifications:
39 * --------------------------------------------------------------------------
40 * Date     Name        Description of modification
41 * -------  ----------  -----------------------------------------------------
42 *
43 *
44 * ==========================================================================
45 */
46 
47 #ifndef CODECENTER
48 static char *date_of_compilation = __DATE__;
49 static char *time_of_compilation = __TIME__;
50 #else
51 static char *date_of_compilation = "today";
52 static char *time_of_compilation = "now";
53 #endif
54 
55 #include "sequin.h"
56 #include <biosrc.h>
57 #include <seqsub.h>
58 #include <pubdesc.h>
59 #include <explore.h>
60 #include <toasn3.h>
61 #include <tax3api.h>
62 
63 #ifndef WIN16
64 CharPtr objPrtMemStr = "PrintTemplateSet ::= {\n" \
65 "{ name \"StdSeqDesc\" ,\n" \
66 "format { asn1 \"Seqdesc\" , form block {\n" \
67 "components {\n" \
68 "{ asn1 \"Seqdesc.mol-type\" , label \"Molecule type\" , prefix \"\\n\" , form enum { } } ,\n" \
69 "{ asn1 \"Seqdesc.modif\" , label \"Modifiers\" , prefix \"\\n\" , form block {\n" \
70 "separator \", \" ,\n" \
71 "components {\n" \
72 "{ asn1 \"Seqdesc.modif.E\" , form enum { } } } } } ,\n" \
73 "{ asn1 \"Seqdesc.method\" , label \"Method\" , prefix \"\\n\" , form enum { } } ,\n" \
74 "{ asn1 \"Seqdesc.name\" , label \"Name\" , prefix \"\\n\" , form text { } } ,\n" \
75 "{ asn1 \"Seqdesc.title\" , label \"Title\" , prefix \"\\n\" , form text { } } ,\n" \
76 "{ asn1 \"Seqdesc.org\" , label \"Organism\" , prefix \"\\n\" , form use-template \"StdOrgRef\" } ,\n" \
77 "{ asn1 \"Seqdesc.comment\" , label \"Comment\" , prefix \"\\n\" , form text { } } ,\n" \
78 "{ asn1 \"Seqdesc.num\" , label \"Numbering\" , prefix \"\\n\" , form use-template \"StdNumbering\" } ,\n" \
79 "{ asn1 \"Seqdesc.maploc\" , label \"Map location\" , prefix \"\\n\" , form use-template \"StdDbtag\" } ,\n" \
80 "{ asn1 \"Seqdesc.pir\" , label \"PIR block\" , prefix \"\\n\" , form null NULL } ,\n" \
81 "{ asn1 \"Seqdesc.genbank\" , label \"GenBank block\" , prefix \"\\n\" , form use-template \"StdGBBlock\" } ,\n" \
82 "{ asn1 \"Seqdesc.pub\" , label \"Citation\" , prefix \"\\n\" , form use-template \"StdPubdesc\" } ,\n" \
83 "{ asn1 \"Seqdesc.region\" , label \"Region\" , prefix \"\\n\" , form text { } } ,\n" \
84 "{ asn1 \"Seqdesc.user\" , label \"User Type\" , prefix \"\\n\" , form use-template \"StdUserObj\" } ,\n" \
85 "{ asn1 \"Seqdesc.sp\" , label \"SWISS-PROT block\" , prefix \"\\n\" , form null NULL } ,\n" \
86 "{ asn1 \"Seqdesc.dbxref\" , label \"Cross reference\" , prefix \"\\n\" , form use-template \"StdDbtag\"  } ,\n" \
87 "{ asn1 \"Seqdesc.embl\" , label \"EMBL block\" , prefix \"\\n\" , form null NULL } ,\n" \
88 "{ asn1 \"Seqdesc.create-date\" , label \"Create date\" , prefix \"\\n\" , form user { printfunc \"StdDatePrint\" } } ,\n" \
89 "{ asn1 \"Seqdesc.update-date\" , label \"Update date\" , prefix \"\\n\" , form user { printfunc \"StdDatePrint\" } } ,\n" \
90 "{ asn1 \"Seqdesc.prf\" , label \"PRF block\" , prefix \"\\n\" , form null NULL } ,\n" \
91 "{ asn1 \"Seqdesc.pdb\" , label \"PDB block\" , prefix \"\\n\" , form null NULL } ,\n" \
92 "{ asn1 \"Seqdesc.het\" , label \"Heterogen\" , prefix \"\\n\" , form text { } } ,\n" \
93 "{ asn1 \"Seqdesc.source\" , label \"Biological Source\" , prefix \"\\n\" , form use-template \"StdBioSource\" } ,\n" \
94 "{ asn1 \"Seqdesc.molinfo\" , label \"Molecule Information\" , prefix \"\\n\" , form block {\n" \
95 "separator \", \" ,\n" \
96 "components {\n" \
97 "{ asn1 \"MolInfo.biomol\" , form enum { } } ,\n" \
98 "{ asn1 \"MolInfo.tech\" , form enum { } } ,\n" \
99 "{ asn1 \"MolInfo.completeness\" , form enum { } } } } } } } } } ,\n" \
100 "{ name \"StdSeqFeatLocation\" ,\n" \
101 "format { asn1 \"Seq-feat.location\" , label \"Location\" , prefix \"\\t\" , form user { printfunc \"StdSeqLocPrint\" } } } ,\n" \
102 "{ name \"StdSeqFeatProduct\" ,\n" \
103 "format { asn1 \"Seq-feat.product\" , label \"Product\" , prefix \"\\t\" , form user { printfunc \"StdSeqLocPrint\" } } } ,\n" \
104 "{ name \"EntrySeqFeatData\" ,\n" \
105 "labelfrom \"Seq-feat.data\" ,\n" \
106 "format { asn1 \"Seq-feat.data\" , prefix \"\\t\" , form use-template \"StdSeqFeatData\" } } ,\n" \
107 "{ name \"StdSeqFeat\" ,\n" \
108 "labelfrom \"Seq-feat.data\" ,\n" \
109 "format { asn1 \"Seq-feat\" , prefix \"\\n\" , suffix \"\\n\" , form block {\n" \
110 "separator \"\\n\" ,\n" \
111 "components {\n" \
112 "{ asn1 \"Seq-feat.data\" , form use-template \"StdSeqFeatData\" } ,\n" \
113 "{ asn1 \"Seq-feat\" , form use-template \"StdSeqFeatCommon\" } ,\n" \
114 "{ asn1 \"Seq-feat.product\" , label \"Product\" , prefix \" \" , form user { printfunc \"StdSeqLocPrint\" } } ,\n" \
115 "{ asn1 \"Seq-feat.location\" , label \"Location\" , prefix \" \" , form user { printfunc \"StdSeqLocPrint\" } } ,\n" \
116 "{ asn1 \"Seq-feat.cit\" , label \"Citations\" , prefix \"\\n\" , form block {\n" \
117 "separator \"\\n\" ,\n" \
118 "components {\n" \
119 "{ asn1 \"Seq-feat.cit.pub.E\" , form use-template \"StdPub\" } } } } ,\n" \
120 "{ asn1 \"Seq-feat.xref\" , label \"Cross-reference\" , prefix \"\\n\" , form block {\n" \
121 "separator \"\\n\" ,\n" \
122 "components {\n" \
123 "{ asn1 \"Seq-feat.xref.E\" , form use-template \"StdSeqFeatXref\" } } } } } } } } ,\n" \
124 "{ name \"StdSeqFeatData\" ,\n" \
125 "format { asn1 \"SeqFeatData\" , form block {\n" \
126 "components {\n" \
127 "{ asn1 \"SeqFeatData.gene\" , label \"Gene\" , form use-template \"StdGeneRef\" } ,\n" \
128 "{ asn1 \"SeqFeatData.org\" , label \"Organism\" , form use-template \"StdOrgRef\" } ,\n" \
129 "{ asn1 \"SeqFeatData.cdregion\" , label \"Coding Region\" , form use-template \"StdCdRegion\" } ,\n" \
130 "{ asn1 \"SeqFeatData.prot\" , label \"Protein\" , form use-template \"StdProtRef\" } ,\n" \
131 "{ asn1 \"SeqFeatData.rna\" , label \"RNA\" , form use-template \"StdRNARef\" } ,\n" \
132 "{ asn1 \"SeqFeatData.pub\" , label \"Citation\" , form use-template \"StdPubdesc\" } ,\n" \
133 "{ asn1 \"SeqFeatData.seq\" , label \"Sequence\" , form user { printfunc \"StdSeqLocPrint\" } } ,\n" \
134 "{ asn1 \"SeqFeatData.imp.key\" , label \"Import\" , form use-template \"StdImpFeat\" } ,\n" \
135 "{ asn1 \"SeqFeatData.region\" , label \"Region\" , form text { } } ,\n" \
136 "{ asn1 \"SeqFeatData.comment\" , label \"Comment\" , form null NULL } ,\n" \
137 "{ asn1 \"SeqFeatData.bond\" , label \"Bond\" , form enum { } } ,\n" \
138 "{ asn1 \"SeqFeatData.site\" , label \"Site\" , form enum { } } ,\n" \
139 "{ asn1 \"SeqFeatData.rsite\" , label \"Rest. Site\" , form use-template \"StdRsiteRef\" } ,\n" \
140 "{ asn1 \"SeqFeatData.user\" , label \"User Type\" , form use-template \"StdUserObj\" } ,\n" \
141 "{ asn1 \"SeqFeatData.txinit\" , label \"TxInit\" , form use-template \"StdTxInit\" } ,\n" \
142 "{ asn1 \"SeqFeatData.num\" , label \"Numbering\" , form use-template \"StdNumbering\" } ,\n" \
143 "{ asn1 \"SeqFeatData.psec-str\" , label \"Sec. Struct\" , form enum { } } ,\n" \
144 "{ asn1 \"SeqFeatData.non-std-residue\" , label \"NonStd Residue\" , form text { } } ,\n" \
145 "{ asn1 \"SeqFeatData.het\" , label \"Heterogen\" , form text { } } ,\n" \
146 "{ asn1 \"SeqFeatData.biosrc\" , label \"Biological Source\" , prefix \"\\n\" , form use-template \"StdBioSource\" } } } } } ,\n" \
147 "{ name \"StdGeneRef\" ,\n" \
148 "format { asn1 \"Gene-ref\" , form block {\n" \
149 "separator \"\\n\" ,\n" \
150 "components {\n" \
151 "{ asn1 \"Gene-ref\" , form block {\n" \
152 "components {\n" \
153 "{ asn1 \"Gene-ref.locus\" , form text { } } ,\n" \
154 "{ asn1 \"Gene-ref.allele\" , prefix \" \" , form text { } } } } } ,\n" \
155 "{ asn1 \"Gene-ref.desc\" , prefix \"[\" , suffix \"]\" , form text { } } ,\n" \
156 "{ asn1 \"Gene-ref.pseudo\" , form boolean {\n" \
157 "true \"This is a pseudogene.\" } } ,\n" \
158 "{ asn1 \"Gene-ref.syn\" , label \"Synonyms\" , prefix \" (\" , suffix \")\" , form block {\n" \
159 "separator \", \" ,\n" \
160 "components {\n" \
161 "{ asn1 \"Gene-ref.syn.E\" , form text { } } } } } ,\n" \
162 "{ asn1 \"Gene-ref.maploc\" , label \"Map Location\" , prefix \" \" , form text { } } ,\n" \
163 "{ asn1 \"Gene-ref.db\" , label \"Cross Reference\" , prefix \" \" , form block {\n" \
164 "separator \", \" ,\n" \
165 "components {\n" \
166 "{ asn1 \"Gene-ref.db.E\" , prefix \"(\" , suffix \")\" , form use-template \"StdDbtag\" } } } } } } } } ,\n" \
167 "{ name \"StdUserObj\" ,\n" \
168 "format { asn1 \"User-object\" , label \"User-object\" , prefix \"\\n\" , form block {\n" \
169 "separator \": \" ,\n" \
170 "components {\n" \
171 "{ asn1 \"User-object.class\" , form text { } } ,\n" \
172 "{ asn1 \"User-object.type\" , form use-template \"StdObjectId\" } } } } } ,\n" \
173 "{ name \"StdPubOnFeat\" ,\n" \
174 "format { asn1 \"Pub\" , label \"Citation\" , prefix \"\\n\" , form block {\n" \
175 "separator \"\\n\" ,\n" \
176 "components {\n" \
177 "{ asn1 \"Pub\" , form use-template \"StdPub\" } } } } } ,\n" \
178 "{ name \"StdPub\" ,\n" \
179 "format { asn1 \"Pub\" , form block {\n" \
180 "separator \"\\n\" ,\n" \
181 "components {\n" \
182 "{ asn1 \"Pub.gen\" , form use-template \"StdCitGen\" } ,\n" \
183 "{ asn1 \"Pub.sub\" , form use-template \"StdCitSub\" } ,\n" \
184 "{ asn1 \"Pub.medline\" , form use-template \"StdMedlineEntry\" } ,\n" \
185 "{ asn1 \"Pub.muid\" , label \"MEDLINE uid: \" , form text { } } ,\n" \
186 "{ asn1 \"Pub.pmid\" , label \"PubMed id: \" , form text { } } ,\n" \
187 "{ asn1 \"Pub.article\" , form use-template \"StdCitArt\" } ,\n" \
188 "{ asn1 \"Pub.journal\" , form use-template \"StdCitJour\" } ,\n" \
189 "{ asn1 \"Pub.book\" , form use-template \"StdCitBook\" } ,\n" \
190 "{ asn1 \"Pub.proc\" , form use-template \"StdCitProc\" } ,\n" \
191 "{ asn1 \"Pub.patent\" , form use-template \"StdCitPat\" } ,\n" \
192 "{ asn1 \"Pub.pat-id\" , form use-template \"StdIdPat\" } ,\n" \
193 "{ asn1 \"Pub.man\" , form use-template \"StdCitLet\" } ,\n" \
194 "{ asn1 \"Pub.equiv\" , form use-template \"StdPubEquiv\" } } } } } ,\n" \
195 "{ name \"StdCitGen\" ,\n" \
196 "format { asn1 \"Cit-gen\" , form block {\n" \
197 "separator \"\\n\" ,\n" \
198 "components {\n" \
199 "{ asn1 \"Cit-gen.serial-number\" , prefix \"[\" , suffix \"]\" , form text { } } ,\n" \
200 "{ asn1 \"Cit-gen.authors\" , form use-template \"StdAuthList\" } ,\n" \
201 "{ asn1 \"Cit-gen.date\" , prefix \"(\" , suffix \")\" , form user { printfunc \"StdDatePrint\" } } ,\n" \
202 "{ asn1 \"Cit-gen.title\" , form text { } } ,\n" \
203 "{ asn1 \"Cit-gen.cit\" , form text { } } ,\n" \
204 "{ asn1 \"Cit-gen\" , form block {\n" \
205 "separator \" \" ,\n" \
206 "components {\n" \
207 "{ asn1 \"Cit-gen.journal\" , suffix \":\" , form use-template \"StdTitle\" } ,\n" \
208 "{ asn1 \"Cit-gen.issue\" , suffix \";\" , form text { } } ,\n" \
209 "{ asn1 \"Cit-gen.pages\" , form text { } } } } } } } } } ,\n" \
210 "{ name \"StdCitSub\" ,\n" \
211 "format { asn1 \"Cit-sub\" , prefix \"Data Submission \" , form block {\n" \
212 "components {\n" \
213 "{ asn1 \"Cit-sub.medium\" , prefix \"on \" , suffix \" \" , form enum { } } ,\n" \
214 "{ asn1 \"Cit-sub.imp.date\" , prefix \"(\" , suffix \")\" , form user { printfunc \"StdDatePrint\" } } ,\n" \
215 "{ asn1 \"Cit-sub.authors\" , prefix \"\\n\" , form use-template \"StdAuthList\" } } } } } ,\n" \
216 "{ name \"StdMedlineEntry\" ,\n" \
217 "format { asn1 \"Medline-entry\" , form block {\n" \
218 "separator \"\\n\" ,\n" \
219 "components {\n" \
220 "{ asn1 \"Medline-entry\" , form block {\n" \
221 "separator \"   \" ,\n" \
222 "components {\n" \
223 "{ asn1 \"Medline-entry.uid\" , label \"uid\" , prefix \": \" , form text { } } ,\n" \
224 "{ asn1 \"Medline-entry.em\" , label \"entry month\" , prefix \": \" , form user { printfunc \"StdDatePrint\" } } } } } ,\n" \
225 "{ asn1 \"Medline-entry.cit\" , form use-template \"StdCitArt\" } ,\n" \
226 "{ asn1 \"Medline-entry.abstract\" , label \"abstract\" , prefix \": \" , form text { } } ,\n" \
227 "{ asn1 \"Medline-entry.mesh\" , label \"Mesh Terms\" , prefix \"\\n\" , form block {\n" \
228 "separator \"\\n\" ,\n" \
229 "components {\n" \
230 "{ asn1 \"Medline-entry.mesh.E\" , form block {\n" \
231 "components {\n" \
232 "{ asn1 \"Medline-mesh.term\" , form text { } } ,\n" \
233 "{ asn1 \"Medline-mesh.mp\" , form boolean {\n" \
234 "true \" (Main Point)\" } } ,\n" \
235 "{ asn1 \"Medline-mesh.qual\" , form block {\n" \
236 "separator \"\\n\" ,\n" \
237 "components {\n" \
238 "{ asn1 \"Medline-mesh.qual.E\" , form block {\n" \
239 "components {\n" \
240 "{ asn1 \"Medline-qual.subh\" , form text { } } ,\n" \
241 "{ asn1 \"Medline-qual.mp\" , form boolean {\n" \
242 "true \" (Main Point)\" } } } } } } } } } } } } } } ,\n" \
243 "{ asn1 \"Medline-entry.substance\" , label \"Substance\" , prefix \"\\n\" , form block {\n" \
244 "separator \"\\n\" ,\n" \
245 "components {\n" \
246 "{ asn1 \"Medline-entry.substance.E\" , form block {\n" \
247 "components {\n" \
248 "{ asn1 \"Medline-rn.name\" , form text { } } ,\n" \
249 "{ asn1 \"Medline-rn.type\" , form enum {\n" \
250 "values {\n" \
251 "\"\" ,\n" \
252 "\" CAS: \" ,\n" \
253 "\"EC \" } } } ,\n" \
254 "{ asn1 \"Medline-rn.cit\" , form text { } } } } } } } } ,\n" \
255 "{ asn1 \"Medline-entry.xref\" , label \"Cross Reference\" , prefix \"\\n\" , form block {\n" \
256 "separator \"\\n\" ,\n" \
257 "components {\n" \
258 "{ asn1 \"Medline-entry.xref.E\" , form block {\n" \
259 "separator \": \" ,\n" \
260 "components {\n" \
261 "{ asn1 \"Medline-si.type\" , form enum { } } ,\n" \
262 "{ asn1 \"Medline-si.cit\" , form text { } } } } } } } } ,\n" \
263 "{ asn1 \"Medline-entry.gene\" , label \"Possible Gene Symbols\" , prefix \": \" , form block {\n" \
264 "separator \", \" ,\n" \
265 "components {\n" \
266 "{ asn1 \"Medline-entry.gene.E\" , form text { } } } } } ,\n" \
267 "{ asn1 \"Medline-entry.idnum\" , label \"Support\" , prefix \": \" , form block {\n" \
268 "separator \", \" ,\n" \
269 "components {\n" \
270 "{ asn1 \"Medline-entry.idnum.E\" , form text { } } } } } } } } } ,\n" \
271 "{ name \"StdCitArt\" ,\n" \
272 "format { asn1 \"Cit-art\" , form block {\n" \
273 "separator \"\\n\" ,\n" \
274 "components {\n" \
275 "{ asn1 \"Cit-art.title\" , form use-template \"StdTitle\" } ,\n" \
276 "{ asn1 \"Cit-art.authors\" , form use-template \"StdAuthList\" } ,\n" \
277 "{ asn1 \"Cit-art.from.journal\" , form use-template \"StdCitJour\" } ,\n" \
278 "{ asn1 \"Cit-art.from.book\" , prefix \"(in) \" , form use-template \"StdCitBook\" } ,\n" \
279 "{ asn1 \"Cit-art.from.proc\" , prefix \"(in) \" , form use-template \"StdCitProc\" } } } } } ,\n" \
280 "{ name \"StdCitJour\" ,\n" \
281 "format { asn1 \"Cit-jour\" , form block {\n" \
282 "separator \" \" ,\n" \
283 "components {\n" \
284 "{ asn1 \"Cit-jour.title\" , form use-template \"StdTitle\" } ,\n" \
285 "{ asn1 \"Cit-jour.imp\" , form use-template \"StdImprint\" } } } } } ,\n" \
286 "{ name \"StdCitBook\" ,\n" \
287 "format { asn1 \"Cit-book\" , form block {\n" \
288 "separator \"\\n\" ,\n" \
289 "components {\n" \
290 "{ asn1 \"Cit-book.title\" , form use-template \"StdTitle\" } ,\n" \
291 "{ asn1 \"Cit-book.coll\" , prefix \"Collection: \" , form use-template \"StdTitle\" } ,\n" \
292 "{ asn1 \"Cit-book.authors\" , form use-template \"StdAuthList\" } ,\n" \
293 "{ asn1 \"Cit-book.imp\" , form use-template \"StdImprint\" } } } } } ,\n" \
294 "{ name \"StdCitProc\" ,\n" \
295 "format { asn1 \"Cit-proc\" , form block {\n" \
296 "separator \"\\n\" ,\n" \
297 "components {\n" \
298 "{ asn1 \"Cit-proc.book\" , form use-template \"StdCitBook\" } ,\n" \
299 "{ asn1 \"Cit-proc.meet\" , label \"Meeting \" , form block {\n" \
300 "separator \", \" ,\n" \
301 "components {\n" \
302 "{ asn1 \"Meeting.number\" , form text { } } ,\n" \
303 "{ asn1 \"Meeting.date\" , form user { printfunc \"StdDatePrint\" } } ,\n" \
304 "{ asn1 \"Meeting.place\" , form use-template \"StdAffil\" } } } } } } } } ,\n" \
305 "{ name \"StdCitPat\" ,\n" \
306 "format { asn1 \"Cit-pat\" , form block {\n" \
307 "separator \"\\n\" ,\n" \
308 "components {\n" \
309 "{ asn1 \"Cit-pat.title\" , form text { } } ,\n" \
310 "{ asn1 \"Cit-pat.authors\" , form use-template \"StdAuthList\" } ,\n" \
311 "{ asn1 \"Cit-pat\" , form block {\n" \
312 "components {\n" \
313 "{ asn1 \"Cit-pat.country\" , suffix \" \" , form text { } } ,\n" \
314 "{ asn1 \"Cit-pat.doc-type\" , form text { } } ,\n" \
315 "{ asn1 \"Cit-pat.number\" , form text { } } ,\n" \
316 "{ asn1 \"Cit-pat.date-issue\" , prefix \" (\" , suffix \")\" , form user { printfunc \"StdDatePrint\" } } ,\n" \
317 "{ asn1 \"Cit-pat.app-number\" , prefix \" Appl: \" , form text { } } ,\n" \
318 "{ asn1 \"Cit-pat.app-date\" , prefix \" (\" , suffix \")\" , form user { printfunc \"StdDatePrint\" } } } } } } } } } ,\n" \
319 "{ name \"StdIdPat\" ,\n" \
320 "format { asn1 \"Id-pat\" , form block {\n" \
321 "components {\n" \
322 "{ asn1 \"Id-pat.country\" , suffix \" \" , form text { } } ,\n" \
323 "{ asn1 \"Id-pat.id.number\" , form text { } } ,\n" \
324 "{ asn1 \"Id-pat.id.app-number\" , prefix \"Appl: \" , form text { } } } } } } ,\n" \
325 "{ name \"StdCitLet\" ,\n" \
326 "format { asn1 \"Cit-let\" , form block {\n" \
327 "separator \"\\n\" ,\n" \
328 "components {\n" \
329 "{ asn1 \"Cit-let.type\" , prefix \"[\" , suffix \"]\" , form enum { } } ,\n" \
330 "{ asn1 \"Cit-let.man-id\" , form text { } } ,\n" \
331 "{ asn1 \"Cit-let.cit\" , form use-template \"StdCitBook\" } } } } } ,\n" \
332 "{ name \"StdPubEquiv\" ,\n" \
333 "format { asn1 \"Pub-equiv\" , form block {\n" \
334 "separator \"\\n\" ,\n" \
335 "components {\n" \
336 "{ asn1 \"Pub-equiv.E\" , form use-template \"StdPub\" } } } } } ,\n" \
337 "{ name \"StdTitle\" ,\n" \
338 "format { asn1 \"Title\" , form block {\n" \
339 "separator \", \" ,\n" \
340 "components {\n" \
341 "{ asn1 \"Title.E.trans\" , prefix \"[\" , suffix \"]\" , form text { } } ,\n" \
342 "{ asn1 \"Title.E.name\" , form text { } } ,\n" \
343 "{ asn1 \"Title.E.tsub\" , form text { } } ,\n" \
344 "{ asn1 \"Title.E.abr\" , form text { } } ,\n" \
345 "{ asn1 \"Title.E.iso-jta\" , form text { } } ,\n" \
346 "{ asn1 \"Title.E.ml-jta\" , label \"MEDLINE\" , prefix \": \" , form text { } } ,\n" \
347 "{ asn1 \"Title.E.jta\" , label \"jta\" , prefix \": \" , form text { } } ,\n" \
348 "{ asn1 \"Title.E.issn\" , label \"ISSN\" , prefix \": \" , form text { } } ,\n" \
349 "{ asn1 \"Title.E.coden\" , label \"CODEN\" , prefix \": \" , form text { } } ,\n" \
350 "{ asn1 \"Title.E.isbn\" , label \"ISBN\" , prefix \": \" , form text { } } } } } } ,\n" \
351 "{ name \"StdAuthList\" ,\n" \
352 "format { asn1 \"Auth-list\" , form block {\n" \
353 "separator \"\\n\" ,\n" \
354 "components {\n" \
355 "{ asn1 \"Auth-list\" , form user { printfunc \"StdAuthListNamesPrint\" } } ,\n" \
356 "{ asn1 \"Auth-list.affil\" , form use-template \"StdAffil\" } } } } } ,\n" \
357 "{ name \"StdAffil\" ,\n" \
358 "format { asn1 \"Affil\" , form block {\n" \
359 "separator \"\\n\" ,\n" \
360 "components {\n" \
361 "{ asn1 \"Affil.str\" , form text { } } ,\n" \
362 "{ asn1 \"Affil.std.affil\" , form text { } } ,\n" \
363 "{ asn1 \"Affil.std.div\" , form text { } } ,\n" \
364 "{ asn1 \"Affil.std.street\" , form text { } } ,\n" \
365 "{ asn1 \"Affil.std\" , form block {\n" \
366 "separator \" \" ,\n" \
367 "components {\n" \
368 "{ asn1 \"Affil.std.city\" , form text { } } ,\n" \
369 "{ asn1 \"Affil.std.sub\" , form text { } } ,\n" \
370 "{ asn1 \"Affil.std.country\" , form text { } } } } } } } } } ,\n" \
371 "{ name \"StdImprint\" ,\n" \
372 "format { asn1 \"Imprint\" , form block {\n" \
373 "components {\n" \
374 "{ asn1 \"Imprint.date\" , prefix \"(\" , suffix \") \" , form user { printfunc \"StdDatePrint\" } } ,\n" \
375 "{ asn1 \"Imprint.volume\" , form text { } } ,\n" \
376 "{ asn1 \"Imprint.issue\" , prefix \" (\" , suffix \")\" , form text { } } ,\n" \
377 "{ asn1 \"Imprint.section\" , prefix \" (\" , suffix \")\" , form text { } } ,\n" \
378 "{ asn1 \"Imprint.part-sup\" , prefix \" (\" , suffix \")\" , form text { } } ,\n" \
379 "{ asn1 \"Imprint.pages\" , prefix \": \" , form text { } } ,\n" \
380 "{ asn1 \"Imprint.prepub\" , prefix \" (\" , suffix \")\" , form enum { } } ,\n" \
381 "{ asn1 \"Imprint.pub\" , label \"\nPublisher: \" , form use-template \"StdAffil\" } ,\n" \
382 "{ asn1 \"Imprint.cprt\" , label \" Copyright: \" , form user { printfunc \"StdDatePrint\" } } } } } } ,\n" \
383 "{ name \"StdSeqFeatXref\" ,\n" \
384 "format { asn1 \"SeqFeatXref\" , form block {\n" \
385 "separator \"\\n\" ,\n" \
386 "components {\n" \
387 "{ asn1 \"SeqFeatXref.id\" , label \"Id=\" , form use-template \"StdFeatId\" } ,\n" \
388 "{ asn1 \"SeqFeatXref.data\" , form use-template \"StdSeqFeatData\" } } } } } ,\n" \
389 "{ name \"StdOrgRef\" ,\n" \
390 "format { asn1 \"Org-ref\" , label \"Org-ref\" , prefix \"\\n\" , form block {\n" \
391 "separator \"\\n\" ,\n" \
392 "components {\n" \
393 "{ asn1 \"Org-ref\" , form block {\n" \
394 "separator \" \" ,\n" \
395 "components {\n" \
396 "{ asn1 \"Org-ref.taxname\" , form text { } } ,\n" \
397 "{ asn1 \"Org-ref.common\" , prefix \"(\" , suffix \")\" , form text { } } } } } ,\n" \
398 "{ asn1 \"Org-ref.mod\" , label \"Modifiers\" , prefix \" (\" , suffix \")\" , form block {\n" \
399 "separator \", \" ,\n" \
400 "components {\n" \
401 "{ asn1 \"Org-ref.mod.E\" , form text { } } } } } ,\n" \
402 "{ asn1 \"Org-ref.db\" , label \"Cross Reference\" , prefix \" \" , form block {\n" \
403 "separator \", \" ,\n" \
404 "components {\n" \
405 "{ asn1 \"Org-ref.db.E\" , prefix \"(\" , suffix \")\" , form use-template \"StdDbtag\" } } } } ,\n" \
406 "{ asn1 \"Org-ref.syn\" , label \"Synonyms\" , prefix \" (\" , suffix \")\" , form block {\n" \
407 "separator \", \" ,\n" \
408 "components {\n" \
409 "{ asn1 \"Org-ref.syn.E\" , form text { } } } } } } } } } ,\n" \
410 "{ name \"StdBioSource\" ,\n" \
411 "format { asn1 \"BioSource\" , label \"BioSource\" , form block {\n" \
412 "separator \"\\n\" ,\n" \
413 "components {\n" \
414 "{ asn1 \"BioSource.genome\" , form enum { } } ,\n" \
415 "{ asn1 \"BioSource.org\" , label \"Organism\" , form use-template \"StdOrgRef\" } } } } } ,\n" \
416 "{ name \"StdCdRegion\" ,\n" \
417 "format { asn1 \"Cdregion\" , label \"Cdregion\" , form block {\n" \
418 "separator \"\\n\" ,\n" \
419 "components {\n" \
420 "{ asn1 \"Cdregion.orf\" , form boolean {\n" \
421 "true \"Uncharacterized Open Reading Frame\" } } ,\n" \
422 "{ asn1 \"Cdregion.frame\" , label \"Reading Frame = \" , form enum { } } ,\n" \
423 "{ asn1 \"Cdregion.code\" , label \"Genetic Code: \" , suffix \";\" , form block {\n" \
424 "separator \", \" ,\n" \
425 "components {\n" \
426 "{ asn1 \"Genetic-code.E.name\" , form text { } } ,\n" \
427 "{ asn1 \"Genetic-code.E.id\" , label \"id= \" , form text { } } } } } ,\n" \
428 "{ asn1 \"Cdregion.conflict\" , form boolean {\n" \
429 "true \"Translation conflicts with protein sequence\" } } ,\n" \
430 "{ asn1 \"Cdregion.stops\" , prefix \"Translation contains \" , suffix \" stop codons\" , form text { } } ,\n" \
431 "{ asn1 \"Cdregion.gaps\" , prefix \"Translation contains \" , suffix \" gaps when aligned to protein\" , form text { } } ,\n" \
432 "{ asn1 \"Cdregion.mismatch\" , prefix \"Translation contains \" , suffix \" mismatches when aligned to protein\" , form text { } } } } } } ,\n" \
433 "{ name \"StdProtRef\" ,\n" \
434 "format { asn1 \"Prot-ref\" , label \"Prot-ref\" , form block {\n" \
435 "separator \"\\n\" ,\n" \
436 "components {\n" \
437 "{ asn1 \"Prot-ref.name\" , form block {\n" \
438 "separator \", \" ,\n" \
439 "components {\n" \
440 "{ asn1 \"Prot-ref.name.E\" , form text { } } } } } ,\n" \
441 "{ asn1 \"Prot-ref.desc\" , prefix \"[\" , suffix \"]\" , form text { } } ,\n" \
442 "{ asn1 \"Prot-ref.processed\" , form enum { } } ,\n" \
443 "{ asn1 \"Prot-ref.ec\" , label \"ec\" , prefix \": \" , form block {\n" \
444 "separator \", \" ,\n" \
445 "components {\n" \
446 "{ asn1 \"Prot-ref.ec.E\" , form text { } } } } } ,\n" \
447 "{ asn1 \"Prot-ref.activity\" , label \"activity\" , prefix \": \" , form block {\n" \
448 "separator \", \" ,\n" \
449 "components {\n" \
450 "{ asn1 \"Prot-ref.activity.E\" , form text { } } } } } ,\n" \
451 "{ asn1 \"Prot-ref.db\" , label \"Cross Reference\" , prefix \" \" , form block {\n" \
452 "separator \", \" ,\n" \
453 "components {\n" \
454 "{ asn1 \"Prot-ref.db.E\" , prefix \"(\" , suffix \")\" , form use-template \"StdDbtag\" } } } } } } } } ,\n" \
455 "{ name \"StdRNARef\" ,\n" \
456 "format { asn1 \"RNA-ref\" , label \"RNA-ref\" , form block {\n" \
457 "separator \"\\n\" ,\n" \
458 "components {\n" \
459 "{ asn1 \"RNA-ref.type\" , form enum { } } ,\n" \
460 "{ asn1 \"RNA-ref.pseudo\" , form boolean {\n" \
461 "true \"This is an RNA pseudogene.\" } } ,\n" \
462 "{ asn1 \"RNA-ref.ext.name\" , form text { } } } } } } ,\n" \
463 "{ name \"StdPubdesc\" ,\n" \
464 "format { asn1 \"Pubdesc\" , label \"Pubdesc\" , form block {\n" \
465 "separator \"\\n\" ,\n" \
466 "components {\n" \
467 "{ asn1 \"Pubdesc.pub\" , form use-template \"StdPubEquiv\" } ,\n" \
468 "{ asn1 \"Pubdesc\" , prefix \"In this article:\n\" , form block {\n" \
469 "separator \"\\n\" ,\n" \
470 "components {\n" \
471 "{ asn1 \"Pubdesc.name\" , label \"name=\" , form text { } } ,\n" \
472 "{ asn1 \"Pubdesc.fig\" , label \"figure=\" , form text { } } ,\n" \
473 "{ asn1 \"Pubdesc.poly-a\" , form boolean {\n" \
474 "true \"poly(A) shown\" } } ,\n" \
475 "{ asn1 \"Pubdesc.maploc\" , label \"map location=\" , form text { } } ,\n" \
476 "{ asn1 \"Pubdesc.num\" , form use-template \"StdNumbering\" } ,\n" \
477 "{ asn1 \"Pubdesc.numexc\" , form boolean {\n" \
478 "true \"numbering inconsistent\" } } } } } ,\n" \
479 "{ asn1 \"Pubdesc.comment\" , form text { } } } } } } ,\n" \
480 "{ name \"StdImpFeat\" ,\n" \
481 "format { asn1 \"Imp-feat.key\" , label \"Imp-feat\" , form text { } } } ,\n" \
482 "{ name \"StdRsiteRef\" ,\n" \
483 "format { asn1 \"Rsite-ref\" , label \"Rsite-ref\" , form block {\n" \
484 "components {\n" \
485 "{ asn1 \"Rsite-ref.str\" , form text { } } ,\n" \
486 "{ asn1 \"Rsite-ref.std\" , form use-template \"StdDbtag\" } } } } } ,\n" \
487 "{ name \"StdTxInit\" ,\n" \
488 "format { asn1 \"Txinit\" , label \"TxInit\" , form block {\n" \
489 "components {\n" \
490 "{ asn1 \"Txinit.name\" , form text { } } } } } } ,\n" \
491 "{ name \"StdNumbering\" ,\n" \
492 "format { asn1 \"Numbering\" , label \"Numbering\" , form null NULL } } ,\n" \
493 "{ name \"StdGBBlock\" ,\n" \
494 "format { asn1 \"GB-block\" , label \"GenBank-block\" , form block {\n" \
495 "separator \"\\n\" ,\n" \
496 "components {\n" \
497 "{ asn1 \"GB-block.extra-accessions\" , label \"Extra accessions\" , prefix \" (\" , suffix \")\" , form block {\n" \
498 "separator \", \" ,\n" \
499 "components {\n" \
500 "{ asn1 \"GB-block.extra-accessions.E\" , form text { } } } } } ,\n" \
501 "{ asn1 \"GB-block.keywords\" , label \"Keywords\" , prefix \" (\" , suffix \")\" , form block {\n" \
502 "separator \", \" ,\n" \
503 "components {\n" \
504 "{ asn1 \"GB-block.keywords.E\" , form text { } } } } } ,\n" \
505 "{ asn1 \"GB-block.source\" , label \"Source: \" , form text { } } ,\n" \
506 "{ asn1 \"GB-block.origin\" , label \"Origin: \" , form text { } } ,\n" \
507 "{ asn1 \"GB-block.div\" , label \"Division: \" , form text { } } ,\n" \
508 "{ asn1 \"GB-block.taxonomy\" , label \"Taxonomy: \" , form text { } } ,\n" \
509 "{ asn1 \"GB-block.date\" , label \"Date: \" , form text { } } ,\n" \
510 "{ asn1 \"GB-block.entry-date\" , label \"Entry date: \" , form user { printfunc \"StdDatePrint\" } } } } } } ,\n" \
511 "{ name \"StdFeatId\" ,\n" \
512 "format { asn1 \"Feat-id\" , form block {\n" \
513 "components {\n" \
514 "{ asn1 \"Feat-id.gibb\" , label \"GenInfo Backbone: \" , form text { } } ,\n" \
515 "{ asn1 \"Feat-id.giim.id\" , label \"GenInfo Import Id: \" , form text { } } ,\n" \
516 "{ asn1 \"Feat-id.local\" , label \"Local: \" , form use-template \"StdObjectId\" } ,\n" \
517 "{ asn1 \"Feat-id.general\" , form use-template \"StdDbtag\" } } } } } ,\n" \
518 "{ name \"StdSeqFeatCommon\" ,\n" \
519 "format { asn1 \"Seq-feat\" , form block {\n" \
520 "separator \"\\n\" ,\n" \
521 "components {\n" \
522 "{ asn1 \"Seq-feat.id\" , label \"Id=\" , form use-template \"StdFeatId\" } ,\n" \
523 "{ asn1 \"Seq-feat.title\" , form text { } } ,\n" \
524 "{ asn1 \"Seq-feat\" , suffix \";\" , form block {\n" \
525 "separator \", \" ,\n" \
526 "components {\n" \
527 "{ asn1 \"Seq-feat.partial\" , form boolean {\n" \
528 "true \"Partial\" } } ,\n" \
529 "{ asn1 \"Seq-feat.except\" , form boolean {\n" \
530 "true \"Biological Exception\" } } ,\n" \
531 "{ asn1 \"Seq-feat.exp-ev\" , label \"Evidence\" , prefix \" is \" , form enum { } } } } } ,\n" \
532 "{ asn1 \"Seq-feat.comment\" , form text { } } ,\n" \
533 "{ asn1 \"Seq-feat.ext\" , form use-template \"StdUserObj\" } ,\n" \
534 "{ asn1 \"Seq-feat.qual\" , label \"Qualifiers\" , prefix \"\\n\" , form block {\n" \
535 "separator \"\\n\" ,\n" \
536 "components {\n" \
537 "{ asn1 \"Seq-feat.qual.E\" , prefix \"/\" , form block {\n" \
538 "separator \"= \" ,\n" \
539 "components {\n" \
540 "{ asn1 \"Gb-qual.qual\" , form text { } } ,\n" \
541 "{ asn1 \"Gb-qual.val\" , form text { } } } } } } } } } } } } ,\n" \
542 "{ name \"StdDbtag\" ,\n" \
543 "format { asn1 \"Dbtag\" , form block {\n" \
544 "components {\n" \
545 "{ asn1 \"Dbtag.db\" , suffix \": \" , form text { } } ,\n" \
546 "{ asn1 \"Dbtag.tag\" , form use-template \"StdObjectId\" } } } } } ,\n" \
547 "{ name \"StdObjectId\" ,\n" \
548 "format { asn1 \"Object-id\" , form block {\n" \
549 "components {\n" \
550 "{ asn1 \"Object-id.id\" , form text { } } ,\n" \
551 "{ asn1 \"Object-id.str\" , form text { } } } } } } };\n";
552 #else
553 CharPtr objPrtMemStr = "";
554 #endif
555 
556 Boolean  useTaxon = FALSE;
557 
558 static PubdescEditProcs    pubedprocs;
559 static BioSourceEditProcs  biosrcedprocs;
560 Boolean  useEntrez = FALSE;
561 Boolean  indexerVersion = FALSE;
562 
563 
564 static Int2  taxonCount;
565 
TaxLookup(SeqEntryPtr sep,Boolean strip,Boolean correct,MonitorPtr mon)566 static Int4 TaxLookup (SeqEntryPtr sep, Boolean strip, Boolean correct,
567                               MonitorPtr mon)
568 
569 {
570   BioseqSetPtr  bssp;
571   SeqEntryPtr   oldscope;
572   Int4          rsult;
573   Char          str [32];
574 
575   rsult = 0;
576   if (IS_Bioseq_set (sep)) {
577     bssp = (BioseqSetPtr) sep->data.ptrvalue;
578     if (bssp != NULL && (bssp->_class == 7 ||
579                          (IsPopPhyEtcSet (bssp->_class)))) {
580       for (sep = bssp->seq_set; sep != NULL; sep = sep->next) {
581         rsult += TaxLookup (sep, strip, correct, mon);
582       }
583       return rsult;
584     }
585   }
586   if (mon != NULL) {
587     taxonCount++;
588     sprintf (str, "Processing Component %d", (int) taxonCount);
589     MonitorStrValue (mon, str);
590   }
591 
592   oldscope = SeqEntrySetScope (sep);
593   rsult = SeqEntryToAsn3Ex (sep, strip, correct, TRUE, NULL, Tax3MergeSourceDescr, FALSE, FALSE);
594   DeleteMarkedObjects (0, OBJ_SEQENTRY, sep);
595   SeqEntrySetScope (oldscope);
596   return rsult;
597 }
598 
LookupTaxonomyFunc(Uint2 entityID)599 static Boolean LookupTaxonomyFunc (Uint2 entityID)
600 
601 {
602   SeqEntryPtr  sep;
603   MonitorPtr   mon;
604   Int4        rsult;
605   ErrSev      sev;
606 
607   if (entityID < 1) return FALSE;
608   sep = GetTopSeqEntryForEntityID (entityID);
609   if (sep == NULL) return FALSE;
610 
611   rsult = 0;
612   sev = ErrSetMessageLevel (SEV_FATAL);
613 
614   taxonCount = 0;
615   WatchCursor ();
616   mon = MonitorStrNewEx ("Taxonomy Lookup", 40, FALSE);
617   MonitorStrValue (mon, "Processing Organism Info");
618   Update ();
619 
620   ObjMgrSetDirtyFlag (entityID, TRUE);
621 
622   EntryMergeDupBioSources (sep); /* do before and after SE2A3 */
623 
624   Taxon3ReplaceOrgInSeqEntry (sep, FALSE);
625   rsult = TaxLookup (sep, TRUE, FALSE, mon);
626   MonitorStrValue (mon, "Closing Taxon");
627   Update ();
628   MonitorFree (mon);
629   ArrowCursor ();
630   Update ();
631 
632   ErrSetMessageLevel (sev);
633   ErrClear ();
634   ErrShow ();
635 
636   return TRUE;
637 }
638 
LclGetSequinAppParam(CharPtr section,CharPtr type,CharPtr dflt,CharPtr buf,Int2 buflen)639 static Int2 LclGetSequinAppParam (CharPtr section, CharPtr type, CharPtr dflt, CharPtr buf, Int2 buflen)
640 
641 {
642   Int2  rsult;
643 
644   rsult = GetAppParam ("SEQUINCUSTOM", section, type, NULL, buf, buflen);
645   if (rsult) return rsult;
646   rsult = GetAppParam ("SEQUIN", section, type, dflt, buf, buflen);
647   return rsult;
648 }
649 
LoadReaderData()650 static Boolean LoadReaderData ()
651 {
652   Char  str [64];
653 
654   if (! AllObjLoad ()) {
655     Message (MSG_FATAL, "AllObjLoad failed");
656     return FALSE;
657   }
658   if (! SubmitAsnLoad ()) {
659     Message (MSG_FATAL, "SubmitAsnLoad failed");
660     return FALSE;
661   }
662   if (! FeatDefSetLoad ()) {
663     Message (MSG_FATAL, "FeatDefSetLoad failed");
664     return FALSE;
665   }
666   if (! SeqCodeSetLoad ()) {
667     Message (MSG_FATAL, "SeqCodeSetLoad failed");
668     return FALSE;
669   }
670   if (! GeneticCodeTableLoad ()) {
671     Message (MSG_FATAL, "GeneticCodeTableLoad failed");
672     return FALSE;
673   }
674 
675   if (! PrintTemplateSetLoadEx ("objprt.prt", objPrtMemStr)) {
676     ArrowCursor ();
677     Message (MSG_FATAL, "PrintTemplateSetLoad objprt.prt failed");
678     return 0;
679   }
680 
681 
682   SetupGeneticCodes ();
683 
684   if (! LoadOrganismTable ()) {
685     ArrowCursor ();
686     Message (MSG_POSTERR, "LoadOrganismTable failed");
687   }
688 
689   MemSet ((Pointer) (&pubedprocs), 0, sizeof (PubdescEditProcs));
690   pubedprocs.replaceThis = TRUE;
691   SetAppProperty ("PubdescEditForm", &pubedprocs);
692 
693   useTaxon = FALSE;
694  #ifdef USE_TAXON
695   useTaxon = TRUE;
696 #endif
697   if (LclGetSequinAppParam ("SETTINGS", "USETAXON", NULL, str, sizeof (str))) {
698     if (StringICmp (str, "TRUE") == 0) {
699       useTaxon = TRUE;
700     }
701   }
702 
703   if (LclGetSequinAppParam ("SETTINGS", "INDEXERVERSION", NULL, str, sizeof (str))) {
704       SetAppProperty ("InternalNcbiSequin", (void *) 1024);
705   }
706 #ifdef INTERNAL_NCBI_SEQUIN
707   SetAppProperty ("InternalNcbiSequin", (void *) 1024);
708 #endif
709 
710 
711   MemSet ((Pointer) (&biosrcedprocs), 0, sizeof (BioSourceEditProcs));
712   if (useTaxon) {
713     biosrcedprocs.lookupTaxonomy = LookupTaxonomyFunc;
714   }
715   SetAppProperty ("BioSourcEditForm", &biosrcedprocs);
716 
717   return TRUE;
718 }
719 
CloseSubmitTemplateEditorForm(Pointer userdata,WindoW w)720 static void CloseSubmitTemplateEditorForm (Pointer userdata, WindoW w)
721 {
722   QuitProgram ();
723 }
724 
Main(void)725 Int2 Main (void)
726 
727 {
728 
729   WindoW w;
730 
731 #if defined(OS_MAC) && !defined(OS_UNIX_DARWIN)
732   long           sysVer;
733 #endif
734 
735   ErrSetFatalLevel (SEV_MAX);
736   ErrClearOptFlags (EO_SHOW_USERSTR);
737   ProcessUpdatesFirst (FALSE);
738 
739   UseLocalAsnloadDataAndErrMsg ();
740   ErrPathReset ();
741 
742 #if defined(OS_MAC) && !defined(OS_UNIX_DARWIN)
743   if ( Gestalt (gestaltSystemVersion, &sysVer) == noErr) {
744     /* system version in low order word is hexadecimal */
745     if (sysVer >= 4096) {
746       Message (MSG_OK, "You are running on MacOS X and should use the native version of Sequin, not SequinOS9");
747     }
748   }
749 #endif
750 
751   if (! LoadReaderData ())
752   {
753     QuitProgram ();
754   }
755   w = (WindoW) CreateSubmitTemplateEditorForm (-50, -33, "Submission Template Editor",
756                                       CloseSubmitTemplateEditorForm, NULL);
757 
758   Show (w);
759 
760   ProcessEvents ();
761 
762 
763   ArrowCursor ();
764   Update ();
765 
766 
767   return 0;
768 }
769 
770 
771