Index: pod/SWISH-LIBRARY.pod =================================================================== --- pod/SWISH-LIBRARY.pod (revision 1884) +++ pod/SWISH-LIBRARY.pod (working copy) @@ -164,10 +164,18 @@ searches to parts of HTML files (such as to the title or headers). The default is to not limit. This provides the functionality of the -H command line switch. +=item int SwishGetStructure( SW_SEARCH srch ); + +Returns the "structure" flag of the search object passed or 0 if the search object is NULL. + =item void SwishPhraseDelimiter( SW_SEARCH srch, char delimiter ); Sets the phrase delimiter character. The default is double-quotes. +=item char SwishGetPhraseDelimiter( SW_SEARCH srch ); + +Returns the phrase delimiter character used in the search object or 0 if the search object is NULL. + =item void SwishSetSort( SW_SEARCH srch, char *sort ); Sets the sort order of the results. This is the same as the -s switch used Index: pod/CHANGES.pod =================================================================== --- pod/CHANGES.pod (revision 1884) +++ pod/CHANGES.pod (working copy) @@ -6,6 +6,15 @@ This document contains list of bug fixes and feature additions to Swish-e. +=head2 Version 2.4.6 - ?? ??? 2007 + +=over 4 + +=item New API functions added + +Added SwishGetStructure() and SwishGetPhraseDelimiter() functions whih return +relevant properties of the search object. + =head2 Version 2.4.5 - 22 Jan 2007 =over 4 Index: src/search.c =================================================================== --- src/search.c (revision 1884) +++ src/search.c (working copy) @@ -290,6 +290,13 @@ srch->structure = structure; } +int SwishGetStructure( SEARCH_OBJECT *srch ) +{ + if ( srch ) { + return srch->structure; + } + return 0; +} void SwishPhraseDelimiter( SEARCH_OBJECT *srch, char delimiter ) { @@ -297,8 +304,13 @@ srch->PhraseDelimiter = (int)delimiter; } +char SwishGetPhraseDelimiter(SEARCH_OBJECT *srch) { + if ( srch ) { + return srch->PhraseDelimiter; + } + return 0; +} - void SwishSetSort( SEARCH_OBJECT *srch, char *sort ) { StringList *slsort = NULL; Index: src/swish-e.h =================================================================== --- src/swish-e.h (revision 1884) +++ src/swish-e.h (working copy) @@ -129,7 +129,9 @@ void ResultsSetRefPtr( SW_RESULTS results, void *address ); void SwishSetStructure( SW_SEARCH srch, int structure ); +int SwishGetStructure( SW_SEARCH srch); void SwishPhraseDelimiter( SW_SEARCH srch, char delimiter ); +char SwishGetPhraseDelimiter( SW_SEARCH srch ); void SwishSetSort( SW_SEARCH srch, char *sort ); void SwishSetQuery( SW_SEARCH srch, char *query );