/*********************************************************************
This file is part of Siworin. Copyright © 2021 by Ruud Harmsen.
Siworin is a simple word indexer and local search engine. See
https://rudhar.com/sfreview/siworin/#siw04 and
https://rudhar.com/sfreview/siworin/toolsrc/siworin .
Siworin is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
Siworin is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Siworin. If not, see .
********************************************************************/
#ifndef _SIWORIN_SRCHIND_H
#define _SIWORIN_SRCHIND_H
#include
struct siworin_formdata_s
{
/* 0 = no (default),
non-zero = yes, use extended egrep style regular expressions. */
int regexp;
int combin;
/* Reason for having two separate strings: see function against_XSS
in siworin-cgi.c */
char searchstring[200];
char dsplaystring[200];
char *words_sepd_by_nulls;
char **words_pointers;
int numwords;
};
void siworin_handle_srchwrds (struct siworin_formdata_s *p_formdata);
void siworin_index_srchwrds (struct siworin_formdata_s *p_formdata);
void siworin_free_index (struct siworin_formdata_s *p_formdata);
void lowercase_searchstring (char *pat);
#endif