98
122
* added whole_word parameter to FindInEntity and FindInEntityX, and protected
99
123
* against multiple ObjMgrAlsoSelects on a single itemID
101
* Revision 5.1 1996/09/06 20:20:41 kans
102
* keeps going even if ObjMgrTypeFind returns NULL (e.g., on OBJ_BIOSEQ_SEG),
103
* and adds a case_counts parameter for case sensitive/insensitive searches.
105
* Revision 5.0 1996/05/28 13:23:23 ostell
106
* Set to revision 5.0
108
* Revision 1.7 1996/02/28 04:53:06 ostell
109
* fix to prevernt recursion on substring replaces
111
* Revision 1.6 1996/02/26 20:24:05 kans
112
* replace needs MemCopy instead of StringMove (JO), and set dirty flag
114
* Revision 1.5 1996/01/03 23:06:32 ostell
115
* support for longer replaces, controlled updating
117
* Revision 1.3 1996/01/02 18:40:07 ostell
120
* Revision 1.2 1996/01/01 00:05:14 kans
121
* replaced StringStr with StringISearch to ignore case
123
* Revision 1.1 1995/12/31 18:13:14 kans
125
* Revision 5.1 1996/09/06 20:20:41 kans
126
* keeps going even if ObjMgrTypeFind returns NULL (e.g., on OBJ_BIOSEQ_SEG),
127
* and adds a case_counts parameter for case sensitive/insensitive searches.
129
* Revision 5.0 1996/05/28 13:23:23 ostell
130
* Set to revision 5.0
132
* Revision 1.7 1996/02/28 04:53:06 ostell
133
* fix to prevernt recursion on substring replaces
135
* Revision 1.6 1996/02/26 20:24:05 kans
136
* replace needs MemCopy instead of StringMove (JO), and set dirty flag
138
* Revision 1.5 1996/01/03 23:06:32 ostell
139
* support for longer replaces, controlled updating
141
* Revision 1.3 1996/01/02 18:40:07 ostell
144
* Revision 1.2 1996/01/01 00:05:14 kans
145
* replaced StringStr with StringISearch to ignore case
147
* Revision 1.1 1995/12/31 18:13:14 kans
126
150
* Revision 1.1.1.1 1995/10/19 18:42:10 sad
127
151
* Initial version
251
271
ptr = FindSubString (str, sub, case_counts, strLen, subLen, d);
252
272
if (ptr == NULL) return NULL;
255
while (keep_looking && ptr != NULL)
257
keep_looking = FALSE;
260
if (! IS_WHITESP (*tmp))
267
tmp = ptr + StringLen (sub);
268
if (*tmp != '\0' && (! IS_WHITESP (*tmp)))
275
ptr = FindSubString (ptr + subLen, sub, case_counts, strLen, subLen, d);
274
if (! whole_word) return ptr;
276
while (keep_looking && ptr != NULL) {
277
keep_looking = FALSE;
280
if (! IS_WHITESP (*tmp)) {
284
if (! keep_looking) {
285
tmp = ptr + StringLen (sub);
286
if (*tmp != '\0' && (! IS_WHITESP (*tmp)) && (! ispunct (*tmp))) {
291
ptr = FindSubString (ptr + subLen, sub, case_counts, strLen, subLen, d);
283
/*=======================================================================*/
285
/* FindReplString () - Does a search and replace in a given string. */
287
/* Main Parameters: */
289
/* strp : The string to operate on. Passed as a pointer to */
290
/* a string so that it can be replaced by the */
291
/* resulting string. */
293
/* fsp->find_string : The substring that is being replaced */
296
/* fsp->replace_string : The substring that is replacing */
297
/* find_string in strp. */
299
/*=======================================================================*/
301
static Boolean FindReplString (
312
CharPtr workingBuffer;
313
CharPtr searchString;
314
CharPtr substringPtr;
316
if (strp == NULL || fsp == NULL) return FALSE;
318
replaceLen = StringLen (fsp->replace_string);
319
findLen = StringLen (fsp->find_string);
320
searchLen = StringLen (*strp);
322
searchString = *strp;
298
static void BoyerMooreFindString (
305
CharPtr searchString;
307
if (strp == NULL || userdata == NULL) return;
308
fsp = (FindStructPtr) userdata;
310
searchString = *strp;
311
if (SearchForString (searchString, fsp->find_string, fsp->case_counts,
312
fsp->whole_word, fsp->findLen, fsp->d) != NULL) {
313
fsp->did_find = TRUE;
317
static void BoyerMooreReplaceString (
326
CharPtr searchString;
327
CharPtr substringPtr;
329
CharPtr workingBuffer;
331
if (strp == NULL || userdata == NULL) return;
332
fsp = (FindStructPtr) userdata;
334
searchString = *strp;
335
searchLen = StringLen (searchString);
323
337
wasChanged = FALSE;
325
if (! fsp->do_replace) {
326
if (SearchForString (searchString, fsp->find_string,
327
fsp->case_counts, fsp->whole_word,
328
findLen, fsp->d) != NULL) {
330
fsp->did_find = TRUE;
335
339
/*------------------------------------------------*/
336
340
/* Make a guess of how big a working buffer we'll */
337
341
/* need based on a worst case scenario. */
369
372
/*----------------------------------------*/
371
374
while ((substringPtr = SearchForString (searchString, fsp->find_string,
372
fsp->case_counts, fsp->whole_word,
373
findLen, fsp->d)) != NULL)
376
substringPtr[0] = '\0';
378
if (StringLen (workingBuffer) + StringLen (searchString) > buffSize)
381
StringCat (workingBuffer, searchString);
382
StringCat (workingBuffer, fsp->replace_string);
383
substringPtr[0] = 'x';
384
searchString = substringPtr + findLen;
387
if (searchString != NULL)
388
StringCat (workingBuffer, searchString);
375
fsp->case_counts, fsp->whole_word, fsp->findLen, fsp->d)) != NULL) {
377
substringPtr [0] = '\0';
379
if (StringLen (workingBuffer) + StringLen (searchString) > buffSize) return;
381
StringCat (workingBuffer, searchString);
382
StringCat (workingBuffer, fsp->replace_string);
383
substringPtr [0] = 'x';
384
searchString = substringPtr + fsp->findLen;
387
if (searchString != NULL) {
388
StringCat (workingBuffer, searchString);
390
391
/*-------------------------------------*/
391
392
/* If any replacements were made, then */
392
393
/* swap in the new string for the old. */
393
394
/*-------------------------------------*/
398
(*strp) = workingBuffer;
398
(*strp) = workingBuffer;
400
fsp->did_replace = TRUE;
400
fsp->did_replace = TRUE;
404
403
MemFree (workingBuffer);
406
/*---------------------*/
407
/* Return successfully */
408
/*---------------------*/
407
/* FINITE-STATE AUTOMATON SEARCH FUNCTION */
409
static void FSAFindStrings (
418
CharPtr searchString;
422
if (strp == NULL || userdata == NULL) return;
423
fsp = (FindStructPtr) userdata;
425
searchString = *strp;
426
if (searchString == NULL) return;
434
state = TextFsaNext (fsp->fsa, state, ch, &matches);
435
if (matches != NULL) {
436
fsp->did_find = TRUE;
444
/* MASTER SEARCH FUNCTION CALLS DESIGNATED FUNC CALLBACK */
446
/*=======================================================================*/
448
/* FindReplString () - Does a search and replace in a given string. */
450
/* Main Parameters: */
452
/* strp : The string to operate on. Passed as a pointer to */
453
/* a string so that it can be replaced by the */
454
/* resulting string. */
456
/* fsp->find_string : The substring that is being replaced */
459
/* fsp->replace_string : The substring that is replacing */
460
/* find_string in strp. */
462
/*=======================================================================*/
464
static void FindReplString (
470
if (strp == NULL || fsp == NULL || fsp->func == NULL) return;
472
fsp->func (strp, (Pointer) fsp);
413
475
/*=======================================================================*/
465
527
static void FindReplAffil (
467
FindStructPtr pFindStruct
533
if (pAffil == NULL) return;
474
535
if (pAffil->choice == 1) {
475
FindReplString (&(pAffil->affil) , pFindStruct);
536
FindReplString (&(pAffil->affil) , fsp);
477
FindReplString (&(pAffil->affil) , pFindStruct);
478
FindReplString (&(pAffil->div) , pFindStruct);
479
FindReplString (&(pAffil->city) , pFindStruct);
480
FindReplString (&(pAffil->sub) , pFindStruct);
481
FindReplString (&(pAffil->country) , pFindStruct);
482
FindReplString (&(pAffil->street) , pFindStruct);
483
FindReplString (&(pAffil->email) , pFindStruct);
484
FindReplString (&(pAffil->fax) , pFindStruct);
485
FindReplString (&(pAffil->phone) , pFindStruct);
486
FindReplString (&(pAffil->postal_code), pFindStruct);
538
FindReplString (&(pAffil->affil) , fsp);
539
FindReplString (&(pAffil->div) , fsp);
540
FindReplString (&(pAffil->city) , fsp);
541
FindReplString (&(pAffil->sub) , fsp);
542
FindReplString (&(pAffil->country) , fsp);
543
FindReplString (&(pAffil->street) , fsp);
544
FindReplString (&(pAffil->email) , fsp);
545
FindReplString (&(pAffil->fax) , fsp);
546
FindReplString (&(pAffil->phone) , fsp);
547
FindReplString (&(pAffil->postal_code), fsp);
503
578
CharPtr pNameStr;
504
579
ValNodePtr pDbxref;
581
if (pAuthor == NULL) return;
509
FindReplAffil (pAuthor->affil, pFindStruct);
583
FindReplAffil (pAuthor->affil, fsp);
511
switch (pAuthor->name->choice)
585
switch (pAuthor->name->choice) {
513
586
case PID_NOTSET :
516
589
pDbxref = pAuthor->name->data;
517
FindReplDbxrefs (pDbxref, pFindStruct);
590
FindReplDbxrefs (pDbxref, fsp);
520
593
pNameStandard = pAuthor->name->data;
521
if (pNameStandard != NULL)
523
FindReplString (&(pNameStandard->names [NAMESTD_LAST]) , pFindStruct);
524
FindReplString (&(pNameStandard->names [NAMESTD_FIRST]) , pFindStruct);
525
FindReplString (&(pNameStandard->names [NAMESTD_MIDDLE]) , pFindStruct);
526
FindReplString (&(pNameStandard->names [NAMESTD_FULL]) , pFindStruct);
527
FindReplString (&(pNameStandard->names [NAMESTD_INITIALS]), pFindStruct);
528
FindReplString (&(pNameStandard->names [NAMESTD_SUFFIX]) , pFindStruct);
529
FindReplString (&(pNameStandard->names [NAMESTD_TITLE]) , pFindStruct);
594
if (pNameStandard != NULL) {
595
FindReplString (&(pNameStandard->names [NAMESTD_LAST]) , fsp);
596
FindReplString (&(pNameStandard->names [NAMESTD_FIRST]) , fsp);
597
FindReplString (&(pNameStandard->names [NAMESTD_MIDDLE]) , fsp);
598
FindReplString (&(pNameStandard->names [NAMESTD_FULL]) , fsp);
599
FindReplString (&(pNameStandard->names [NAMESTD_INITIALS]), fsp);
600
FindReplString (&(pNameStandard->names [NAMESTD_SUFFIX]) , fsp);
601
FindReplString (&(pNameStandard->names [NAMESTD_TITLE]) , fsp);
534
606
pNameStr = pAuthor->name->data;
535
FindReplString (&pNameStr, pFindStruct);
607
FindReplString (&pNameStr, fsp);
608
678
static void FindReplImprint (
609
679
ImprintPtr pImprint,
610
FindStructPtr pFindStruct
615
/*------------------*/
616
/* Check parameters */
617
/*------------------*/
619
if (pImprint == NULL)
622
/*-------------------------*/
623
/* Do the find and replace */
624
/*-------------------------*/
626
FindReplString (&(pImprint->volume) , pFindStruct);
627
FindReplString (&(pImprint->issue) , pFindStruct);
628
FindReplString (&(pImprint->pages) , pFindStruct);
629
FindReplString (&(pImprint->section) , pFindStruct);
630
FindReplString (&(pImprint->part_sup) , pFindStruct);
631
FindReplString (&(pImprint->language) , pFindStruct);
632
FindReplString (&(pImprint->part_supi), pFindStruct);
634
FindReplAffil (pImprint->pub, pFindStruct);
635
FindReplCitRetract (pImprint->retract, pFindStruct);
684
if (pImprint == NULL) return;
686
FindReplString (&(pImprint->volume) , fsp);
687
FindReplString (&(pImprint->issue) , fsp);
688
FindReplString (&(pImprint->pages) , fsp);
689
FindReplString (&(pImprint->section) , fsp);
690
FindReplString (&(pImprint->part_sup) , fsp);
691
FindReplString (&(pImprint->language) , fsp);
692
FindReplString (&(pImprint->part_supi), fsp);
694
FindReplAffil (pImprint->pub, fsp);
695
FindReplCitRetract (pImprint->retract, fsp);
638
698
/*=======================================================================*/
728
787
MedlineRnPtr pRn;
731
if (pMedlineEntry == NULL)
790
if (pMedlineEntry == NULL) return;
734
FindReplCitArt(pMedlineEntry->cit, pFindStruct);
735
FindReplString (&(pMedlineEntry->abstract), pFindStruct);
792
FindReplCitArt(pMedlineEntry->cit, fsp);
793
FindReplString (&(pMedlineEntry->abstract), fsp);
737
795
pRn = pMedlineEntry->substance;
740
FindReplString (&(pRn->cit), pFindStruct);
741
FindReplString (&(pRn->name), pFindStruct);
796
while (pRn != NULL) {
797
FindReplString (&(pRn->cit), fsp);
798
FindReplString (&(pRn->name), fsp);
745
802
pMesh = pMedlineEntry->mesh;
746
while (pMesh != NULL)
748
FindReplString (&(pMesh->term), pFindStruct);
752
if (pMedlineEntry->xref != NULL)
754
tmpStr = (CharPtr) pMedlineEntry->xref->data.ptrvalue;
755
FindReplString (&tmpStr, pFindStruct);
756
pMedlineEntry->xref->data.ptrvalue = tmpStr;
759
if (pMedlineEntry->idnum != NULL)
761
tmpStr = (CharPtr) pMedlineEntry->idnum->data.ptrvalue;
762
FindReplString (&tmpStr, pFindStruct);
763
pMedlineEntry->idnum->data.ptrvalue = tmpStr;
766
if (pMedlineEntry->pub_type != NULL)
768
tmpStr = (CharPtr) pMedlineEntry->pub_type->data.ptrvalue;
769
FindReplString (&tmpStr, pFindStruct);
770
pMedlineEntry->pub_type->data.ptrvalue = tmpStr;
773
if (pMedlineEntry->gene != NULL)
775
tmpStr = (CharPtr) pMedlineEntry->gene->data.ptrvalue;
776
FindReplString (&tmpStr, pFindStruct);
777
pMedlineEntry->gene->data.ptrvalue = tmpStr;
803
while (pMesh != NULL) {
804
FindReplString (&(pMesh->term), fsp);
808
if (pMedlineEntry->xref != NULL) {
809
tmpStr = (CharPtr) pMedlineEntry->xref->data.ptrvalue;
810
FindReplString (&tmpStr, fsp);
811
pMedlineEntry->xref->data.ptrvalue = tmpStr;
814
if (pMedlineEntry->idnum != NULL) {
815
tmpStr = (CharPtr) pMedlineEntry->idnum->data.ptrvalue;
816
FindReplString (&tmpStr, fsp);
817
pMedlineEntry->idnum->data.ptrvalue = tmpStr;
820
if (pMedlineEntry->pub_type != NULL) {
821
tmpStr = (CharPtr) pMedlineEntry->pub_type->data.ptrvalue;
822
FindReplString (&tmpStr, fsp);
823
pMedlineEntry->pub_type->data.ptrvalue = tmpStr;
826
if (pMedlineEntry->gene != NULL) {
827
tmpStr = (CharPtr) pMedlineEntry->gene->data.ptrvalue;
828
FindReplString (&tmpStr, fsp);
829
pMedlineEntry->gene->data.ptrvalue = tmpStr;
780
832
pField = pMedlineEntry->mlfield;
781
while (pField != NULL)
783
FindReplString (&(pField->str), pFindStruct);
784
pField = pField->next;
833
while (pField != NULL) {
834
FindReplString (&(pField->str), fsp);
835
pField = pField->next;
788
839
/*=======================================================================*/
1698
1736
MemSet ((Pointer) &fs, 0, sizeof (FindStruct));
1700
1738
fs.entityID = entityID;
1740
fs.func = BoyerMooreReplaceString;
1742
fs.func = BoyerMooreFindString;
1744
fs.callback = callback;
1745
fs.userdata = userdata;
1701
1747
fs.find_string = find_string;
1702
1748
fs.replace_string = replace_string;
1703
1749
fs.case_counts = case_counts;
1704
1750
fs.whole_word = whole_word;
1705
fs.do_replace = do_replace;
1751
fs.findLen = StringLen (find_string);
1752
fs.replaceLen = StringLen (replace_string);
1706
1754
fs.select_item = select_item;
1707
1755
fs.send_update = send_update;
1709
1756
fs.did_find = FALSE;
1710
1757
fs.did_replace = FALSE;
1711
1758
fs.dirty = FALSE;
1713
1760
/* build Boyer-Moore displacement array in advance */
1715
fs.subLen = StringLen (find_string);
1762
subLen = StringLen (find_string);
1717
1764
for (ch = 0; ch < 256; ch++) {
1718
fs.d [ch] = fs.subLen;
1720
for (j = 0; j < (int) (fs.subLen - 1); j++) {
1767
for (j = 0; j < (int) (subLen - 1); j++) {
1721
1768
ch = (int) (case_counts ? find_string [j] : TO_UPPER (find_string [j]));
1722
1769
if (ch >= 0 && ch <= 255) {
1723
fs.d [ch] = fs.subLen - j - 1;
1727
/* if desc or feat filter arrays not supplied, default to all TRUE */
1729
if (descFilter != NULL) {
1730
MemCopy ((Pointer) &fs.descFilter, (Pointer) descFilter, sizeof (fs.descFilter));
1732
MemSet ((Pointer) &fs.descFilter, (int) TRUE, sizeof (fs.descFilter));
1735
if (featFilter != NULL) {
1736
MemCopy ((Pointer) &fs.featFilter, (Pointer) featFilter, sizeof (fs.featFilter));
1738
MemSet ((Pointer) &fs.featFilter, (int) TRUE, sizeof (fs.featFilter));
1741
/* if seqid filter array not supplied, default to all FALSE */
1743
if (seqidFilter != NULL) {
1744
MemCopy ((Pointer) &fs.seqidFilter, (Pointer) seqidFilter, sizeof (fs.seqidFilter));
1745
} else if (do_seqid_local) {
1746
MemSet ((Pointer) &fs.seqidFilter, (int) FALSE, sizeof (fs.seqidFilter));
1747
fs.seqidFilter [SEQID_LOCAL] = TRUE;
1749
MemSet ((Pointer) &fs.seqidFilter, (int) FALSE, sizeof (fs.seqidFilter));
1752
/* ensure feature subtype is set in sfp->idx block */
1754
AssignIDsInEntity (entityID, 0, NULL);
1756
/* visit callbacks that find/replace specific fields */
1758
VisitBioseqsInSep (sep, (Pointer) &fs, FindReplBioseqs);
1760
VisitFeaturesInSep (sep, (Pointer) &fs, FindReplFeats);
1762
VisitAlignmentsInSep (sep, (Pointer) &fs, FindReplAligns);
1764
VisitGraphsInSep (sep, (Pointer) &fs, FindReplGraphs);
1766
VisitDescriptorsInSep (sep, (Pointer) &fs, FindReplDescs);
1769
FindReplSubmitBlock (ssp, &fs);
1770
fs.d [ch] = subLen - j - 1;
1774
/* if desc or feat filter arrays not supplied, default to all TRUE */
1776
if (descFilter != NULL) {
1777
MemCopy ((Pointer) &fs.descFilter, (Pointer) descFilter, sizeof (fs.descFilter));
1779
MemSet ((Pointer) &fs.descFilter, (int) TRUE, sizeof (fs.descFilter));
1782
if (featFilter != NULL) {
1783
MemCopy ((Pointer) &fs.featFilter, (Pointer) featFilter, sizeof (fs.featFilter));
1785
MemSet ((Pointer) &fs.featFilter, (int) TRUE, sizeof (fs.featFilter));
1788
/* if seqid filter array not supplied, default to all FALSE */
1790
if (seqidFilter != NULL) {
1791
MemCopy ((Pointer) &fs.seqidFilter, (Pointer) seqidFilter, sizeof (fs.seqidFilter));
1792
} else if (do_seqid_local) {
1793
MemSet ((Pointer) &fs.seqidFilter, (int) FALSE, sizeof (fs.seqidFilter));
1794
fs.seqidFilter [SEQID_LOCAL] = TRUE;
1796
MemSet ((Pointer) &fs.seqidFilter, (int) FALSE, sizeof (fs.seqidFilter));
1799
/* ensure feature subtype is set in sfp->idx block */
1801
AssignIDsInEntity (entityID, 0, NULL);
1803
/* visit callbacks that find/replace specific fields */
1805
VisitBioseqsInSep (sep, (Pointer) &fs, FindReplBioseqs);
1807
VisitFeaturesInSep (sep, (Pointer) &fs, FindReplFeats);
1809
VisitAlignmentsInSep (sep, (Pointer) &fs, FindReplAligns);
1811
VisitGraphsInSep (sep, (Pointer) &fs, FindReplGraphs);
1813
VisitDescriptorsInSep (sep, (Pointer) &fs, FindReplDescs);
1816
FindReplSubmitBlock (ssp, &fs);
1819
/* send select message, if applicable */
1821
if (fs.send_update == UPDATE_ONCE && fs.dirty) {
1822
ObjMgrSetDirtyFlag (entityID, TRUE);
1823
ObjMgrSendMsg (OM_MSG_UPDATE, entityID, 0, 0);
1827
/*=======================================================================*/
1829
/* FindStringsInEntity() - Multi-string find function. */
1831
/*=======================================================================*/
1833
NLM_EXTERN void FindStringsInEntity (
1835
CharPtr PNTR find_strings,
1836
Boolean case_counts,
1838
Boolean select_item,
1842
BoolPtr seqidFilter,
1843
Boolean do_seqid_local,
1844
FindReplProc callback,
1852
SeqEntryPtr sep = NULL;
1853
SeqSubmitPtr ssp = NULL;
1855
if (entityID == 0 || find_strings == NULL) return;
1857
omdp = ObjMgrGetData (entityID);
1859
switch (omdp->datatype) {
1861
ssp = (SeqSubmitPtr) omdp->dataptr;
1862
if (ssp != NULL && ssp->datatype == 1) {
1863
sep = (SeqEntryPtr) ssp->data;
1867
sep = (SeqEntryPtr) omdp->choice;
1868
case OBJ_BIOSEQSET :
1869
sep = (SeqEntryPtr) omdp->choice;
1874
/* sep = GetTopSeqEntryForEntityID (entityID); */
1875
if (sep == NULL) return;
1877
MemSet ((Pointer) &fs, 0, sizeof (FindStruct));
1879
fs.entityID = entityID;
1880
fs.func = FSAFindStrings;
1881
fs.callback = callback;
1882
fs.userdata = userdata;
1884
fs.find_string = NULL;
1885
fs.replace_string = NULL;
1886
fs.case_counts = case_counts;
1887
fs.whole_word = whole_word;
1891
fs.select_item = select_item;
1892
fs.send_update = send_update;
1893
fs.did_find = FALSE;
1894
fs.did_replace = FALSE;
1897
/* build finite state machine in advance */
1899
fs.fsa = TextFsaNew ();
1901
for (j = 0; find_strings [j] != NULL; j++) {
1902
TextFsaAdd (fs.fsa, find_strings [j]);
1905
/* if desc or feat filter arrays not supplied, default to all TRUE */
1907
if (descFilter != NULL) {
1908
MemCopy ((Pointer) &fs.descFilter, (Pointer) descFilter, sizeof (fs.descFilter));
1910
MemSet ((Pointer) &fs.descFilter, (int) TRUE, sizeof (fs.descFilter));
1913
if (featFilter != NULL) {
1914
MemCopy ((Pointer) &fs.featFilter, (Pointer) featFilter, sizeof (fs.featFilter));
1916
MemSet ((Pointer) &fs.featFilter, (int) TRUE, sizeof (fs.featFilter));
1919
/* if seqid filter array not supplied, default to all FALSE */
1921
if (seqidFilter != NULL) {
1922
MemCopy ((Pointer) &fs.seqidFilter, (Pointer) seqidFilter, sizeof (fs.seqidFilter));
1923
} else if (do_seqid_local) {
1924
MemSet ((Pointer) &fs.seqidFilter, (int) FALSE, sizeof (fs.seqidFilter));
1925
fs.seqidFilter [SEQID_LOCAL] = TRUE;
1927
MemSet ((Pointer) &fs.seqidFilter, (int) FALSE, sizeof (fs.seqidFilter));
1930
/* ensure feature subtype is set in sfp->idx block */
1932
AssignIDsInEntity (entityID, 0, NULL);
1934
/* visit callbacks that find/replace specific fields */
1936
VisitBioseqsInSep (sep, (Pointer) &fs, FindReplBioseqs);
1938
VisitFeaturesInSep (sep, (Pointer) &fs, FindReplFeats);
1940
VisitAlignmentsInSep (sep, (Pointer) &fs, FindReplAligns);
1942
VisitGraphsInSep (sep, (Pointer) &fs, FindReplGraphs);
1944
VisitDescriptorsInSep (sep, (Pointer) &fs, FindReplDescs);
1947
FindReplSubmitBlock (ssp, &fs);
1950
/* clean up finite state machine */
1952
TextFsaFree (fs.fsa);
1772
1954
/* send select message, if applicable */