Changeset 63d246bfa1ad0af79d78e35671481fbfa7ad3129
- Timestamp:
- 04/26/08 08:30:15 (9 months ago)
- Author:
- krayouva <krayouva@…>
- Parents:
- 4640c75a8385ecb909a2b09d28eca23a6c4f6130
- Children:
- d6dd39b080e1233923cadd56d686820dbbb8ca5d
- git-committer:
- krayouva <krayouva@gmail.com> / 2008-04-25T18:30:15Z-0400
- Message:
-
* Added extern "C" guards around all C headers when using a c++ compiler
- Needed to do this so that the benchmark task builds with g++
- Location:
- c
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r76c5d7
|
r63d246
|
|
| 2 | 2 | #define ALL_BENCHMARKS_H |
| 3 | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| | 7 | |
| 4 | 8 | #include "benchmark.h" |
| 5 | | |
| 6 | 9 | |
| 7 | 10 | void bm_vint_io(BenchMark *bm); |
| … |
… |
|
| 25 | 28 | }; |
| 26 | 29 | |
| | 30 | #ifdef __cplusplus |
| | 31 | } // extern "C" |
| 27 | 32 | #endif |
| | 33 | |
| | 34 | #endif |
-
|
r4640c7
|
r63d246
|
|
| 1 | 1 | #ifndef BENCHMARK_H |
| 2 | 2 | #define BENCHMARK_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include "global.h" |
| … |
… |
|
| 9 | 13 | |
| 10 | 14 | #define BM_RUN_COUNT 6 |
| 11 | | #ifdef __cplusplus |
| 12 | | #define BENCH(name) extern "C" void bm_##name(BenchMark *bm) |
| 13 | | #else |
| 14 | | #define BENCH(name) void bm_##name(BenchMark *bm) |
| 15 | | #endif |
| | 15 | #define BENCH(name) FRT_EXTERNC void bm_##name(BenchMark *bm) |
| 16 | 16 | |
| 17 | 17 | extern const char *WORD_LIST[]; |
| … |
… |
|
| 50 | 50 | #define BM_DISCARD(num) bm->discard = num; |
| 51 | 51 | |
| | 52 | #ifdef __cplusplus |
| | 53 | } // extern "C" |
| 52 | 54 | #endif |
| | 55 | |
| | 56 | #endif |
-
|
r442a23
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_ANALYSIS_H |
| 2 | 2 | #define FRT_ANALYSIS_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include "global.h" |
| … |
… |
|
| 228 | 232 | extern void frt_pfa_add_field(FrtAnalyzer *self, char *field, FrtAnalyzer *analyzer); |
| 229 | 233 | |
| | 234 | #ifdef __cplusplus |
| | 235 | } // extern "C" |
| 230 | 236 | #endif |
| | 237 | |
| | 238 | #endif |
-
|
r2eff78
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_ARRAY_H |
| 2 | 2 | #define FRT_ARRAY_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| | 7 | |
| 3 | 8 | #include "global.h" |
| 4 | 9 | |
| … |
… |
|
| 51 | 56 | extern void frt_ary_destroy_i(void **ary, frt_free_ft p); |
| 52 | 57 | |
| | 58 | #ifdef __cplusplus |
| | 59 | } // extern "C" |
| 53 | 60 | #endif |
| | 61 | |
| | 62 | #endif |
-
|
r5a8e6f
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_DEFINES_H |
| 2 | 2 | #define FRT_DEFINES_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include <sys/types.h> |
| … |
… |
|
| 42 | 46 | #endif |
| 43 | 47 | |
| | 48 | #ifdef __cplusplus |
| | 49 | } // extern "C" |
| 44 | 50 | #endif |
| | 51 | |
| | 52 | #endif |
-
|
r48290f
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_DOCUMENT_H |
| 2 | 2 | #define FRT_DOCUMENT_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include "global.h" |
| … |
… |
|
| 52 | 56 | extern void frt_doc_destroy(FrtDocument *doc); |
| 53 | 57 | |
| | 58 | #ifdef __cplusplus |
| | 59 | } // extern "C" |
| 54 | 60 | #endif |
| | 61 | |
| | 62 | #endif |
-
|
ra3ed62
|
r63d246
|
|
| 70 | 70 | #ifndef FRT_EXCEPT_H |
| 71 | 71 | #define FRT_EXCEPT_H |
| | 72 | |
| | 73 | #ifdef __cplusplus |
| | 74 | extern "C" { |
| | 75 | #endif |
| 72 | 76 | |
| 73 | 77 | #include <setjmp.h> |
| … |
… |
|
| 166 | 170 | extern char frt_xmsg_buffer_final[FRT_XMSG_BUFFER_SIZE]; |
| 167 | 171 | |
| | 172 | #ifdef __cplusplus |
| | 173 | } // extern "C" |
| 168 | 174 | #endif |
| | 175 | |
| | 176 | #endif |
-
|
r86714d
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_FIELD_INDEX_H |
| 2 | 2 | #define FRT_FIELD_INDEX_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include "index.h" |
| … |
… |
|
| 41 | 45 | extern float frt_get_float_value(FrtFieldIndex *field_index, long doc_num); |
| 42 | 46 | extern long frt_get_integer_value(FrtFieldIndex *field_index, long doc_num); |
| | 47 | |
| | 48 | #ifdef __cplusplus |
| | 49 | } // extern "C" |
| 43 | 50 | #endif |
| | 51 | |
| | 52 | #endif |
-
|
r48290f
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_HASH_H |
| 2 | 2 | #define FRT_HASH_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include "global.h" |
| … |
… |
|
| 126 | 130 | */ |
| 127 | 131 | extern FrtHash *frt_h_new(frt_hash_ft hash, |
| 128 | | frt_eq_ft eq, |
| | 132 | frt_eq_ft eq, |
| 129 | 133 | frt_free_ft free_key, |
| 130 | 134 | frt_free_ft free_value); |
| … |
… |
|
| 480 | 484 | extern void frt_h_str_print_keys(FrtHash *ht); |
| 481 | 485 | |
| | 486 | #ifdef __cplusplus |
| | 487 | } // extern "C" |
| 482 | 488 | #endif |
| | 489 | |
| | 490 | #endif |
-
|
r48290f
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_HASHSET_H |
| 2 | 2 | #define FRT_HASHSET_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include "hash.h" |
| … |
… |
|
| 192 | 196 | */ |
| 193 | 197 | |
| | 198 | #ifdef __cplusplus |
| | 199 | } // extern "C" |
| 194 | 200 | #endif |
| | 201 | |
| | 202 | #endif |
-
|
r5a8e6f
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_HELPER_H |
| 2 | 2 | #define FRT_HELPER_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include "config.h" |
| … |
… |
|
| 11 | 15 | extern unsigned char frt_float2byte(float f); |
| 12 | 16 | |
| | 17 | #ifdef __cplusplus |
| | 18 | } // extern "C" |
| 13 | 19 | #endif |
| | 20 | |
| | 21 | #endif |
-
|
r6a5a9e
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_IND_H |
| 2 | 2 | #define FRT_IND_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include "search.h" |
| … |
… |
|
| 65 | 69 | extern FRT_INLINE void frt_ensure_writer_open(FrtIndex *self); |
| 66 | 70 | |
| | 71 | #ifdef __cplusplus |
| | 72 | } // extern "C" |
| 67 | 73 | #endif |
| | 74 | |
| | 75 | #endif |
-
|
r48290f
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_INDEX_H |
| 2 | 2 | #define FRT_INDEX_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include "global.h" |
| … |
… |
|
| 941 | 945 | extern void frt_iw_delete_term(FrtIndexWriter *iw, const char *field, |
| 942 | 946 | const char *term); |
| 943 | | extern void frt_iw_delete_terms(FrtIndexWriter *iw, const char *field, |
| | 947 | extern void frt_iw_delete_terms(FrtIndexWriter *iw, const char *field, |
| 944 | 948 | char **terms, const int term_cnt); |
| 945 | 949 | extern void frt_iw_close(FrtIndexWriter *iw); |
| … |
… |
|
| 976 | 980 | extern void frt_cw_close(FrtCompoundWriter *cw); |
| 977 | 981 | |
| 978 | | |
| | 982 | #ifdef __cplusplus |
| | 983 | } // extern "C" |
| 979 | 984 | #endif |
| | 985 | |
| | 986 | #endif |
-
|
r442a23
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_INTERNAL_H |
| 2 | 2 | #define FRT_INTERNAL_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | /* Constants */ |
| … |
… |
|
| 974 | 978 | #define xraise frt_xraise |
| 975 | 979 | |
| | 980 | #ifdef __cplusplus |
| | 981 | } // extern "C" |
| 976 | 982 | #endif |
| | 983 | |
| | 984 | #endif |
-
|
r603e2a
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_LANG_H |
| 2 | 2 | #define FRT_LANG_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include <stdarg.h> |
| … |
… |
|
| 40 | 44 | extern void FRT_VEXIT(const char *err_type, const char *fmt, va_list args); |
| 41 | 45 | #endif |
| | 46 | |
| | 47 | #ifdef __cplusplus |
| | 48 | } // extern "C" |
| 42 | 49 | #endif |
| | 50 | |
| | 51 | #endif |
-
|
r682015
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_MEM_POOL_H |
| 2 | 2 | #define FRT_MEM_POOL_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #define FRT_MP_BUF_SIZE 65536 |
| … |
… |
|
| 33 | 37 | (type*)FRT_ZEROSET_N(frt_mp_alloc(mp, sizeof(type)*(n)), type, n) |
| 34 | 38 | |
| | 39 | #ifdef __cplusplus |
| | 40 | } // extern "C" |
| 35 | 41 | #endif |
| | 42 | |
| | 43 | #endif |
-
|
r48290f
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_MAPPER_H |
| 2 | 2 | #define FRT_MAPPER_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include "hash.h" |
| … |
… |
|
| 50 | 54 | extern void frt_mulmap_destroy(FrtMultiMapper *self); |
| 51 | 55 | |
| | 56 | #ifdef __cplusplus |
| | 57 | } // extern "C" |
| 52 | 58 | #endif |
| | 59 | |
| | 60 | #endif |
-
|
rf7adc4
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_PRIORITYQUEUE_H |
| 2 | 2 | #define FRT_PRIORITYQUEUE_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include "global.h" |
| … |
… |
|
| 145 | 149 | #define frt_pq_full(pq) ((pq)->size == (pq)->capa) |
| 146 | 150 | |
| | 151 | #ifdef __cplusplus |
| | 152 | } // extern "C" |
| 147 | 153 | #endif |
| | 154 | |
| | 155 | #endif |
-
|
rf75f58
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_SCANNER_H |
| 2 | 2 | #define FRT_SCANNER_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | /* |
| … |
… |
|
| 21 | 25 | int *token_length); |
| 22 | 26 | |
| | 27 | #ifdef __cplusplus |
| | 28 | } // extern "C" |
| | 29 | #endif |
| | 30 | |
| 23 | 31 | #endif /* FRT_SCANNER */ |
-
|
r48290f
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_SEARCH_H |
| 2 | 2 | #define FRT_SEARCH_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | typedef struct FrtQuery FrtQuery; |
| … |
… |
|
| 24 | 28 | struct FrtExplanation **details; |
| 25 | 29 | } FrtExplanation; |
| 26 | | |
| | 30 | |
| 27 | 31 | extern FrtExplanation *frt_expl_new(float value, const char *description, ...); |
| 28 | 32 | extern void frt_expl_destroy(FrtExplanation *expl); |
| … |
… |
|
| 259 | 263 | /* *** FrtBooleanClause *** */ |
| 260 | 264 | |
| 261 | | typedef enum |
| | 265 | typedef enum |
| 262 | 266 | { |
| 263 | 267 | FRT_BC_SHOULD, |
| … |
… |
|
| 695 | 699 | extern char *frt_sort_field_to_s(FrtSortField *self); |
| 696 | 700 | |
| 697 | | extern const FrtSortField FRT_SORT_FIELD_SCORE; |
| 698 | | extern const FrtSortField FRT_SORT_FIELD_SCORE_REV; |
| 699 | | extern const FrtSortField FRT_SORT_FIELD_DOC; |
| 700 | | extern const FrtSortField FRT_SORT_FIELD_DOC_REV; |
| | 701 | extern const FrtSortField FRT_SORT_FIELD_SCORE; |
| | 702 | extern const FrtSortField FRT_SORT_FIELD_SCORE_REV; |
| | 703 | extern const FrtSortField FRT_SORT_FIELD_DOC; |
| | 704 | extern const FrtSortField FRT_SORT_FIELD_DOC_REV; |
| 701 | 705 | |
| 702 | 706 | /*************************************************************************** |
| … |
… |
|
| 760 | 764 | { |
| 761 | 765 | float (*filter_func)(int doc_num, float score, FrtSearcher *self, void *arg); |
| 762 | | void *arg; |
| | 766 | void *arg; |
| 763 | 767 | } FrtPostFilter; |
| 764 | 768 | |
| … |
… |
|
| 792 | 796 | * Scan the index for all documents that match a query and write the |
| 793 | 797 | * results to a buffer. It will stop scanning once the limit is reached |
| 794 | | * and it starts scanning from offset_docnum. |
| | 798 | * and it starts scanning from offset_docnum. |
| 795 | 799 | * |
| 796 | 800 | * Note: Unlike the offset_docnum in other search methods, this |
| … |
… |
|
| 935 | 939 | extern int frt_qp_default_fuzzy_pre_len; |
| 936 | 940 | |
| 937 | | |
| | 941 | #ifdef __cplusplus |
| | 942 | } // extern "C" |
| 938 | 943 | #endif |
| | 944 | |
| | 945 | #endif |
-
|
r5167b9
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_SIMILARITY_H |
| 2 | 2 | #define FRT_SIMILARITY_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | typedef struct FrtSearcher FrtSearcher; |
| … |
… |
|
| 80 | 84 | FrtSimilarity *frt_sim_create_default(); |
| 81 | 85 | |
| | 86 | #ifdef __cplusplus |
| | 87 | } // extern "C" |
| 82 | 88 | #endif |
| | 89 | |
| | 90 | #endif |
-
|
r86714d
|
r63d246
|
|
| 1 | 1 | #ifndef FRT_THREADING_H |
| 2 | 2 | #define FRT_THREADING_H |
| | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| 3 | 7 | |
| 4 | 8 | #include <pthread.h> |
| … |
… |
|
| 22 | 26 | #define frt_thread_once(a, b) pthread_once(a, b) |
| 23 | 27 | |
| | 28 | #ifdef __cplusplus |
| | 29 | } // extern "C" |
| 24 | 30 | #endif |
| | 31 | |
| | 32 | #endif |
-
|
r603e2a
|
r63d246
|
|
| 1 | | #include "global.h" |
| 2 | | |
| 3 | 1 | #ifndef FRT_WIN32_H |
| 4 | 2 | #define FRT_WIN32_H |
| 5 | 3 | |
| | 4 | #ifdef __cplusplus |
| | 5 | extern "C" { |
| | 6 | #endif |
| | 7 | |
| | 8 | #include "global.h" |
| 6 | 9 | #include <io.h> |
| 7 | 10 | |
| … |
… |
|
| 52 | 55 | free(d); |
| 53 | 56 | } |
| | 57 | |
| | 58 | #ifdef __cplusplus |
| | 59 | } // extern "C" |
| 54 | 60 | #endif |
| | 61 | |
| | 62 | #endif |