static int
comparecfg(const void *a, const void *b)
{
- if ( ((TSCfgInfo *) a)->id == ((TSCfgInfo *) b)->id )
+ if (((TSCfgInfo *) a)->id == ((TSCfgInfo *) b)->id)
return 0;
- return ( ((TSCfgInfo *) a)->id < ((TSCfgInfo *) b)->id ) ? -1 : 1;
+ return (((TSCfgInfo *) a)->id < ((TSCfgInfo *) b)->id) ? -1 : 1;
}
TSCfgInfo *
prsobj->prs = (void *) DatumGetPointer(
FunctionCall2(
- &(prsobj->start_info),
- PointerGetDatum(buf),
- Int32GetDatum(buflen)
+ &(prsobj->start_info),
+ PointerGetDatum(buf),
+ Int32GetDatum(buflen)
)
);
while ((type = DatumGetInt32(FunctionCall3(
&(prsobj->getlexeme_info),
- PointerGetDatum(prsobj->prs),
+ PointerGetDatum(prsobj->prs),
PointerGetDatum(&lemm),
- PointerGetDatum(&lenlemm)))) != 0)
+ PointerGetDatum(&lenlemm)))) != 0)
{
if (lenlemm >= MAXSTRLEN)
for (i = 0; i < cfg->map[type].len; i++)
{
DictInfo *dict = finddict(DatumGetObjectId(cfg->map[type].dict_id[i]));
- TSLexeme *norms,
- *ptr;
+ TSLexeme *norms,
+ *ptr;
norms = ptr = (TSLexeme *) DatumGetPointer(
- FunctionCall3(
- &(dict->lexize_info),
- PointerGetDatum(dict->dictionary),
- PointerGetDatum(lemm),
- PointerGetDatum(lenlemm)
- )
+ FunctionCall3(
+ &(dict->lexize_info),
+ PointerGetDatum(dict->dictionary),
+ PointerGetDatum(lemm),
+ PointerGetDatum(lenlemm)
+ )
);
if (!norms) /* dictionary doesn't know this lexem */
continue;
prs->curwords++;
}
pfree(norms);
- break; /* lexem already normalized or is stop
- * word */
+ break; /* lexem already normalized or is stop word */
}
}
prsobj->prs = (void *) DatumGetPointer(
FunctionCall2(
- &(prsobj->start_info),
- PointerGetDatum(buf),
- Int32GetDatum(buflen)
+ &(prsobj->start_info),
+ PointerGetDatum(buf),
+ Int32GetDatum(buflen)
)
);
while ((type = DatumGetInt32(FunctionCall3(
&(prsobj->getlexeme_info),
- PointerGetDatum(prsobj->prs),
+ PointerGetDatum(prsobj->prs),
PointerGetDatum(&lemm),
- PointerGetDatum(&lenlemm)))) != 0)
+ PointerGetDatum(&lenlemm)))) != 0)
{
if (lenlemm >= MAXSTRLEN)
for (i = 0; i < cfg->map[type].len; i++)
{
DictInfo *dict = finddict(DatumGetObjectId(cfg->map[type].dict_id[i]));
- TSLexeme *norms,
- *ptr;
+ TSLexeme *norms,
+ *ptr;
norms = ptr = (TSLexeme *) DatumGetPointer(
- FunctionCall3(
- &(dict->lexize_info),
- PointerGetDatum(dict->dictionary),
- PointerGetDatum(lemm),
- PointerGetDatum(lenlemm)
- )
+ FunctionCall3(
+ &(dict->lexize_info),
+ PointerGetDatum(dict->dictionary),
+ PointerGetDatum(lemm),
+ PointerGetDatum(lenlemm)
+ )
);
if (!norms) /* dictionary doesn't know this lexem */
continue;
ptr++;
}
pfree(norms);
- break; /* lexem already normalized or is stop
- * word */
+ break; /* lexem already normalized or is stop word */
}
}