ICU mode (must be removed or controlled later).
-/* $Id: charsets.c,v 1.2 2007-05-23 14:44:18 marc Exp $
+/* $Id: charsets.c,v 1.3 2007-05-24 11:09:27 adam Exp $
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
Copyright (c) 2006-2007, Index Data.
This file is part of Pazpar2.
{
pp2_charset_t pct = xmalloc(sizeof(*pct));
{
pp2_charset_t pct = xmalloc(sizeof(*pct));
+ pct->icu_chn = 0;
+ pct->token_next_handler = pp2_relevance_token_a_to_z;
#ifdef HAVE_ICU
if (icu_chn){
pct->icu_chn = icu_chn;
pct->icu_sts = U_ZERO_ERROR;
pct->token_next_handler = pp2_relevance_token_icu;
}
#ifdef HAVE_ICU
if (icu_chn){
pct->icu_chn = icu_chn;
pct->icu_sts = U_ZERO_ERROR;
pct->token_next_handler = pp2_relevance_token_icu;
}
- else {
- pct->icu_chn = 0;
- pct->token_next_handler = pp2_relevance_token_a_to_z;
- }
-#else // HAVE_ICU
- pct->token_next_handler = pp2_relevance_token_a_to_z;
-#endif // HAVE_ICU
-
+ prt->norm_str = wrbuf_alloc();
+ prt->cp = buf;
+ prt->pct = pct;
+
pct->icu_sts = U_ZERO_ERROR;
int ok = 0;
ok = icu_chain_assign_cstr(pct->icu_chn, buf, &pct->icu_sts);
pct->icu_sts = U_ZERO_ERROR;
int ok = 0;
ok = icu_chain_assign_cstr(pct->icu_chn, buf, &pct->icu_sts);
//prt->cp = buf;
prt->pct = pct;
prt->norm_str = 0;
//prt->cp = buf;
prt->pct = pct;
prt->norm_str = 0;
-
- prt->norm_str = wrbuf_alloc();
- prt->cp = buf;
- prt->pct = pct;
-
-#ifdef HAVE_ICU
- }
-#endif // HAVE_ICU
return icu_chain_get_norm(prt->pct->icu_chn);
}
return icu_chain_get_norm(prt->pct->icu_chn);
}
return 0;
};
#endif // HAVE_ICU
return 0;
};
#endif // HAVE_ICU