94a9a92f83
Complete C implementation of the indexing pipeline (src/), parallel worker pool, graph buffer with merge support, SQLite writer, and 1893-test suite. Linter setup: zero warnings from clang-tidy (all checks enabled, no NOLINT suppressions), cppcheck, and clang-format. All issues fixed at source — proper headers for external linkage, GROW_ARRAY macro restructured to eliminate type parameter, null-deref paths guarded, named intermediates for suspicious-argument checks.
26 lines
853 B
C
26 lines
853 B
C
#ifndef CBM_PREPROCESSOR_H
|
|
#define CBM_PREPROCESSOR_H
|
|
|
|
#include <stddef.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// Preprocess C/C++ source: expand macros, evaluate #ifdef, resolve #include.
|
|
// Returns malloc-allocated expanded source, or NULL if no expansion needed/on failure.
|
|
// extra_defines: NULL-terminated array of "NAME=VALUE" strings (can be NULL).
|
|
// include_paths: NULL-terminated array of directory paths for #include resolution (can be NULL).
|
|
// The returned string must be freed with cbm_preprocess_free().
|
|
char *cbm_preprocess(const char *source, int source_len, const char *filename,
|
|
const char **extra_defines, const char **include_paths, int cpp_mode);
|
|
|
|
// Free preprocessed source returned by cbm_preprocess.
|
|
void cbm_preprocess_free(char *expanded);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // CBM_PREPROCESSOR_H
|