#ifndef cmTagFile_h #define cmTagFile_h #ifdef __cplusplus extern "C" { #endif // Read a ctags file generated by: // // ctags --c-kinds=+p --fields=+n file.h // // --c-kinds=+p turns on function prototype reporting. // --field=+n turns on line number reporting enum { kOkTfRC = cmOkRC, kFileFailTfRC, kLHeapFailTfRC, kSyntaxErrTfRC, kFileInvalidTfRC }; typedef unsigned cmTfRC_t; typedef cmHandle_t cmTfH_t; extern cmTfH_t cmTfNullHandle; enum { kFuncTfFl = 0x01, kEnumTfFl = 0x02, kMacroTfFl = 0x04, kTypedefTfFl = 0x08, kFieldTfFl = 0x10, kExternTfFl = 0x20 // extern var's and forward declarations // be sure to add new flags to _cmTfFlagsToLabel() }; typedef struct { unsigned flags; unsigned line; const cmChar_t* label; } cmTfTag_t; cmTfRC_t cmTfOpenFile( cmCtx_t* ctx, cmTfH_t* hp, const cmChar_t* fn ); cmTfRC_t cmTfCloseFile( cmTfH_t* hp ); bool cmTfIsValid( cmTfH_t h ); unsigned cmTfCount( cmTfH_t h ); const cmTfTag_t* cmTfRecd( cmTfH_t h, unsigned index ); cmTfRC_t cmTfReport( cmTfH_t h, cmRpt_t* rpt ); cmTfRC_t cmTfTest( cmCtx_t* ctx, const cmChar_t* fn ); #ifdef __cplusplus } #endif #endif