Lines Matching refs:pss
66 struct pss_fts_demo *pss = (struct pss_fts_demo *)user;
90 pss->first = 1;
91 pss->ac_done = 0;
125 pss->result = params.results_head;
126 pss->ac = result->autocomplete_head;
127 pss->fp = result->filepath_head;
154 if (pss && pss->result)
155 lwsac_free(&pss->result);
160 if (!pss)
164 if (pss->first)
166 "{\"indexed\": %d, \"ac\": [", !!pss->result);
168 while (pss->ac && lws_ptr_diff(end, p) > 256) {
172 pss->first ? ' ' : ',', (char *)(pss->ac + 1),
173 pss->ac->instances, pss->ac->agg_instances,
174 pss->ac->elided);
176 pss->first = 0;
177 pss->ac = pss->ac->next;
180 if (!pss->ac_done && !pss->ac && pss->fp) {
181 pss->ac_done = 1;
187 while (pss->fp && lws_ptr_diff_size_t(end, p) > 256) {
188 if (!pss->fp_init_done) {
193 "\"hits\": [", pss->first ? ' ' : ',',
194 ((char *)(pss->fp + 1)) +
195 pss->fp->matches_length,
196 pss->fp->matches,
197 pss->fp->lines_in_file);
199 pss->li = ((uint32_t *)(pss->fp + 1));
200 pss->done = 0;
201 pss->fp_init_done = 1;
202 pss->first = 0;
204 while (pss->done < pss->fp->matches &&
211 !pss->done ? ' ' : ',',
212 pss->li[0], pss->li[1],
213 *((const char **)&pss->li[2]));
214 pss->li += 2 + (sizeof(const char *) /
216 pss->done++;
219 if (pss->done == pss->fp->matches) {
221 pss->fp_init_done = 0;
222 pss->fp = pss->fp->next;
223 if (!pss->fp)
229 if (!pss->ac && !pss->fp) {
241 if (pss->result)
242 lwsac_free(&pss->result);