From: Adam Dickmeiss Date: Wed, 19 Sep 2012 13:37:35 +0000 (+0200) Subject: Reformat: delete trailing whitespace X-Git-Tag: v1.6.20~7^2~1 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=b837cdc3148bb4282cd1a5b874e9839ef44d71c0;p=pazpar2-moved-to-github.git Reformat: delete trailing whitespace --- diff --git a/src/marcmap.h b/src/marcmap.h index 982c3a4..9778e4d 100644 --- a/src/marcmap.h +++ b/src/marcmap.h @@ -21,7 +21,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define MARCMAP_H struct marcmap -{ +{ char *field; char subfield; char *pz; diff --git a/src/record.h b/src/record.h index 66df1af..5ac558e 100644 --- a/src/record.h +++ b/src/record.h @@ -45,12 +45,12 @@ struct record_metadata_attr { struct record_metadata { union data_types data; // next item of this name - struct record_metadata *next; + struct record_metadata *next; struct record_metadata_attr *attributes; }; -union data_types * data_types_assign(NMEM nmem, - union data_types ** data1, +union data_types * data_types_assign(NMEM nmem, + union data_types ** data1, union data_types data2); @@ -60,8 +60,8 @@ struct record { struct record_metadata **metadata; // Array mirrors list of sortkey fields in config union data_types **sortkeys; - // Next in cluster of merged records - struct record *next; + // Next in cluster of merged records + struct record *next; // client result set position; int position; // checksum @@ -79,7 +79,7 @@ int record_compare(struct record *r1, struct record *r2, struct conf_service *se struct record_cluster { // Array mirrors list of metadata fields in config - struct record_metadata **metadata; + struct record_metadata **metadata; union data_types **sortkeys; char *merge_key; int relevance_score; diff --git a/src/relevance.c b/src/relevance.c index a3ee82d..9ad953b 100644 --- a/src/relevance.c +++ b/src/relevance.c @@ -125,7 +125,7 @@ static void pull_terms(struct relevance *res, struct ccl_rpn_node *n) for (i = 0; i < numwords; i++) { const char *norm_str; - + ccl_field = nmem_strdup_null(res->nmem, n->u.t.qual); pp2_charset_token_first(res->prt, words[i], 0); @@ -160,12 +160,12 @@ struct relevance *relevance_create_ccl(pp2_charset_fact_t pft, res->vec_len = 1; res->rank_cluster = rank_cluster; res->prt = pp2_charset_token_create(pft, "relevance"); - + pull_terms(res, query); res->doc_frequency_vec = nmem_malloc(nmem, res->vec_len * sizeof(int)); for (i = 0; i < res->vec_len; i++) - res->doc_frequency_vec[i] = 0; + res->doc_frequency_vec[i] = 0; return res; } @@ -191,14 +191,14 @@ void relevance_newrec(struct relevance *r, struct record_cluster *rec) r->vec_len * sizeof(*rec->term_frequency_vec)); for (i = 0; i < r->vec_len; i++) rec->term_frequency_vec[i] = 0; - + // term frequency divided by length of field [1,...] rec->term_frequency_vecf = nmem_malloc(r->nmem, r->vec_len * sizeof(*rec->term_frequency_vecf)); for (i = 0; i < r->vec_len; i++) rec->term_frequency_vecf[i] = 0.0; - + // for relevance_countwords (so we don't have to xmalloc/xfree) rec->term_frequency_vec_tmp = nmem_malloc(r->nmem, @@ -256,7 +256,7 @@ void relevance_prepare_read(struct relevance *rel, struct reclist *reclist) for (record = rec->records; record; record = record->next) cluster_size++; - + relevance /= cluster_size; } rec->relevance_score = relevance; diff --git a/src/sel_thread.h b/src/sel_thread.h index ce35cef..5bc1c23 100644 --- a/src/sel_thread.h +++ b/src/sel_thread.h @@ -26,7 +26,7 @@ YAZ_BEGIN_CDECL /** \brief select thread handler type */ typedef struct sel_thread *sel_thread_t; -/** \brief creates select thread +/** \brief creates select thread \param work_handler handler that does work in worker thread \param work_destroy optional destroy handler for work (0 = no handler) \param read_fd pointer to readable socket upon completion @@ -42,7 +42,7 @@ sel_thread_t sel_thread_create(void (*work_handler)(void *work_data), void (*work_destroy)(void *work_data), int *read_fd, int no_of_threads); -/** \brief destorys select thread +/** \brief destorys select thread \param p select thread handler */ void sel_thread_destroy(sel_thread_t p); @@ -53,7 +53,7 @@ void sel_thread_destroy(sel_thread_t p); */ void sel_thread_add(sel_thread_t p, void *data); -/** \brief gets result of work +/** \brief gets result of work \param p select thread handler \returns data for work (which work_handler has been working on) */