libcm is a C development framework with an emphasis on audio signal processing applications.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cmTagFile.h 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. //| Copyright: (C) 2009-2020 Kevin Larke <contact AT larke DOT org>
  2. //| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
  3. #ifndef cmTagFile_h
  4. #define cmTagFile_h
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. //( { file_desc:"Read a 'ctags' output file." kw:[file] }
  9. // Read a ctags file generated by:
  10. //
  11. // ctags --c-kinds=+p --fields=+n file.h
  12. //
  13. // --c-kinds=+px
  14. // p - turns on function prototype reporting.
  15. // x - turns on external and forward decl
  16. // --field=+n turns on line number reporting
  17. enum
  18. {
  19. kOkTfRC = cmOkRC,
  20. kFileFailTfRC,
  21. kLHeapFailTfRC,
  22. kSyntaxErrTfRC,
  23. kFileInvalidTfRC
  24. };
  25. typedef unsigned cmTfRC_t;
  26. typedef cmHandle_t cmTfH_t;
  27. extern cmTfH_t cmTfNullHandle;
  28. enum
  29. {
  30. kFuncProtoTfFl = 0x001,
  31. kFuncDefnTfFl = 0x002,
  32. kEnumTfFl = 0x004,
  33. kMacroTfFl = 0x008,
  34. kTypedefTfFl = 0x010,
  35. kFieldTfFl = 0x020,
  36. kExternTfFl = 0x040, // extern var's and forward declarations
  37. kStructTagTfFl = 0x080,
  38. kUnionTagTfFl = 0x100
  39. // be sure to add new flags to _cmTfFlagsToLabel()
  40. };
  41. typedef struct
  42. {
  43. unsigned flags;
  44. unsigned line;
  45. const cmChar_t* label;
  46. } cmTfTag_t;
  47. cmTfRC_t cmTfOpenFile( cmCtx_t* ctx, cmTfH_t* hp, const cmChar_t* fn );
  48. cmTfRC_t cmTfCloseFile( cmTfH_t* hp );
  49. bool cmTfIsValid( cmTfH_t h );
  50. unsigned cmTfCount( cmTfH_t h );
  51. const cmTfTag_t* cmTfRecd( cmTfH_t h, unsigned index );
  52. cmTfRC_t cmTfReport( cmTfH_t h, cmRpt_t* rpt );
  53. cmTfRC_t cmTfTest( cmCtx_t* ctx, const cmChar_t* fn );
  54. //)
  55. #ifdef __cplusplus
  56. }
  57. #endif
  58. #endif