Changeset 1906

Show
Ignore:
Timestamp:
02/07/07 14:25:16 (2 years ago)
Author:
moseley
Message:

Patch provided by Antony Dovgal to get the structure and phrase delimiter via the C api.
Not implemented in SWISH::API, but I'm not clear why you would need to get it if you just set
the value.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • swish-e/trunk/pod/CHANGES.pod

    r1903 r1906  
    1515Fixed a leak if a limit was set and then reset but not prepared. 
    1616Patch provided by Antony Dovgal. 
     17 
     18=item New API functions added 
     19 
     20Added SwishGetStructure() and SwishGetPhraseDelimiter() functions which return 
     21relevant properties of the search object. 
     22Patch provided by Antony Dovgal. 
     23 
    1724 
    1825 
  • swish-e/trunk/pod/SWISH-LIBRARY.pod

    r1613 r1906  
    159159object until change. 
    160160 
     161=item int SwishGetStructure( SW_SEARCH srch ); 
     162 
     163Returns the "structure" flag of the search object passed or 0 if the search 
     164object is NULL. 
     165 
     166=item void SwishPhraseDelimiter( SW_SEARCH srch, char delimiter ); 
     167 
     168Sets the phrase delimiter character.  The default is double-quotes. 
     169 
     170=item char SwishGetPhraseDelimiter( SW_SEARCH srch ); 
     171 
     172Returns the phrase delimiter character used in the search object or 0 if the 
     173search object is NULL. 
     174 
     175 
     176 
    161177=item void SwishSetStructure( SW_SEARCH srch, int structure ); 
    162178 
  • swish-e/trunk/src/search.c

    r1840 r1906  
    291291} 
    292292 
     293int SwishGetStructure( SEARCH_OBJECT *srch ) 
     294{ 
     295    return srch ? srch->structure : 0; 
     296} 
    293297 
    294298void SwishPhraseDelimiter( SEARCH_OBJECT *srch, char delimiter ) 
     
    298302} 
    299303 
     304 
     305char SwishGetPhraseDelimiter(SEARCH_OBJECT *srch) 
     306{ 
     307    return srch ? srch->PhraseDelimiter : 0; 
     308} 
    300309 
    301310 
  • swish-e/trunk/src/swish-e.h

    r1775 r1906  
    130130 
    131131void SwishSetStructure( SW_SEARCH srch, int structure ); 
     132int  SwishGetStructure( SW_SEARCH srch); 
    132133void SwishPhraseDelimiter( SW_SEARCH srch, char delimiter ); 
     134char SwishGetPhraseDelimiter( SW_SEARCH srch ); 
    133135void SwishSetSort( SW_SEARCH srch, char *sort ); 
    134136void SwishSetQuery( SW_SEARCH srch, char *query );