|
cmEngine
0.1.1
A library for interpreting CMake code.
|
Internal functions and declarations used within the library to implement the library interface. More...
Data Structures | |
| struct | cmArgument |
| struct | cmArgumentToken |
| struct | cmArgumentLexer |
| struct | cmArgumentList |
| struct | cmCache |
| struct | cmCacheVariable |
| struct | cmCommand |
| struct | cmDiagnostic |
| struct | cmBuiltinFunction |
| struct | cmEngine |
| struct | cmExpansion |
| struct | cmExpansionEvaluator |
| struct | cmExpansionList |
| struct | cmExpansionParser |
| struct | cmExpansionVisitor |
| struct | cmFmtParser |
| struct | cmFunctionContext |
| struct | cmInterpreter |
| struct | cmLexer |
| struct | cmTokenSpec |
| struct | cmLoop |
| struct | cmLoopObject |
| struct | cmOptionParser |
| struct | cmWarningOption |
| struct | cmDefineOption |
| struct | cmParser |
| struct | cmPosition |
| struct | cmQuery |
| struct | cmQueryHandler |
| struct | cmReader |
| struct | cmScriptContext |
| struct | cmStringList |
| struct | cmSymbol |
| struct | cmScope |
| struct | cmToken |
| struct | cmWarningConfig |
Macros | |
| #define | CM_TRUE 1 |
| #define | CM_FALSE 0 |
Typedefs | |
| typedef unsigned short int | cmChar16 |
| typedef unsigned long int | cmChar32 |
| typedef unsigned char | cmBool |
Functions | |
| struct cmArgument * | cmNewArgument (struct cmHost *host, size_t size) |
| void | cmReleaseArgument (struct cmArgument *argument) |
| void | cmResetArgument (struct cmArgument *argument) |
| struct cmArgument * | cmCopyArgument (struct cmArgument *dst, const struct cmArgument *src) |
| void | cmAddArgumentContent (struct cmArgument *argument, const char *content, size_t content_size) |
| struct cmArgument * | cmResizeArgument (struct cmArgument *argument, size_t size) |
| void | cmSetArgumentType (struct cmArgument *argument, enum cmArgumentType type) |
| struct cmArgumentLexer * | cmNewArgumentLexer (struct cmHost *host) |
| void | cmReleaseArgumentLexer (struct cmArgumentLexer *lexer) |
| cmBool | cmArgumentLexerIsDone (const struct cmArgumentLexer *lexer) |
| void | cmSetArgumentLexerInput (struct cmArgumentLexer *lexer, const struct cmStringView *input) |
| const struct cmArgumentToken * | cmPeekArgumentToken (struct cmArgumentLexer *lexer) |
| void | cmConsumeArgumentToken (struct cmArgumentLexer *lexer) |
| struct cmArgumentList * | cmNewArgumentList (struct cmHost *host, size_t size) |
| void | cmReleaseArgumentList (struct cmArgumentList *argument_list) |
| void | cmResetArgumentList (struct cmArgumentList *argument_list) |
| struct cmArgumentList * | cmPushArgument (struct cmArgumentList *argument_list, const struct cmArgument *argument) |
| const struct cmArgument * | cmGetArgument (const struct cmArgumentList *argument_list, size_t index) |
| size_t | cmGetArgumentCount (const struct cmArgumentList *argument_list) |
| enum cmArgumentTokenType | cmGetArgumentTokenType (const struct cmArgumentToken *token) |
| const struct cmStringView * | cmGetArgumentTokenContentView (const struct cmArgumentToken *token) |
| const struct cmPosition * | cmGetArgumentTokenPosition (const struct cmArgumentToken *token) |
| struct cmCache * | cmNewCache (struct cmHost *host) |
| void | cmReleaseCache (struct cmCache *cache) |
| const struct cmCacheVariable * | cmFindCacheVariable (const struct cmCache *cache, const struct cmStringView *name) |
| struct cmCacheVariable * | cmNewCacheVariable (struct cmHost *host) |
| void | cmReleaseCacheVariable (struct cmCacheVariable *var) |
| struct cmCacheVariable * | cmCopyCacheVariable (const struct cmCacheVariable *other) |
| int CM_WARN_UNUSED_RESULT | cmSetCacheVariableDoc (struct cmCacheVariable *var, const char *doc) |
| void | cmSetCacheVariableType (struct cmCacheVariable *var, enum cmCacheType type) |
| int CM_WARN_UNUSED_RESULT | cmSetCacheVariableName (struct cmCacheVariable *var, const char *name) |
| int CM_WARN_UNUSED_RESULT | cmSetCacheVariableValue (struct cmCacheVariable *var, const char *value) |
| struct cmCommand * | cmNewCommand (struct cmHost *host) |
| void | cmReleaseCommand (struct cmCommand *command) |
| const struct cmToken * | cmGetCommandIdentifier (const struct cmCommand *command) |
| int CM_WARN_UNUSED_RESULT | cmSetCommandIdentifier (struct cmCommand *command, const struct cmToken *identifier) |
| int CM_WARN_UNUSED_RESULT | cmPushCommandArgument (struct cmCommand *command, const struct cmArgument *argument) |
| const struct cmArgument * | cmGetCommandArgument (const struct cmCommand *command, size_t index) |
| size_t | cmGetCommandArgumentCount (const struct cmCommand *command) |
| const struct cmDiagnostic * | cmOutOfMemoryDiagnostic (void) |
| struct cmDiagnostic * | cmNewDiagnostic (struct cmHost *host) |
| void | cmReleaseDiagnostic (struct cmDiagnostic *diagnostic) |
| void | cmSetDiagnosticSeverity (struct cmDiagnostic *diagnostic, enum cmDiagnosticSeverity severity) |
| void | cmSetDiagnosticID (struct cmDiagnostic *diagnostic, enum cmDiagnosticID id) |
| void | cmSetDiagnosticFilename (struct cmDiagnostic *diagnostic, const char *filename) |
| void | cmSetDiagnosticPosition (struct cmDiagnostic *diagnostic, const struct cmPosition *position) |
| void | cmFormatDiagnostic (struct cmDiagnostic *diagnostic, const char *fmt,...) cmFormatDiagnostic_ATTRIBUTES |
| struct cmEngine * | cmNewEngine (struct cmHost *host) |
| void | cmReleaseEngine (struct cmEngine *engine) |
| struct cmLoop * | cmGetLoop (struct cmEngine *engine) |
| const struct cmLoop * | cmGetConstLoop (const struct cmEngine *engine) |
| struct cmSymbolTable * | cmGetFunctionTable (struct cmEngine *engine) |
| struct cmSymbolTable * | cmGetVariableTable (struct cmEngine *engine) |
| const struct cmWarningConfig * | cmGetWarningConfig (const struct cmEngine *engine) |
| void | cmSetWarningOption (struct cmEngine *engine, const struct cmWarningOption *warning_option) |
| void | cmInitExpansion (struct cmExpansion *expansion) |
| void | cmClearExpansion (struct cmExpansion *expansion) |
| void | cmAcceptExpansionVisitor (const struct cmExpansion *expansion, struct cmExpansionVisitor *visitor) |
| struct cmExpansionEvaluator * | cmNewExpansionEvaluator (struct cmHost *host) |
| void | cmReleaseExpansionEvaluator (struct cmExpansionEvaluator *evaluator) |
| void | cmResetExpansionEvaluator (struct cmExpansionEvaluator *evaluator) |
| cmBool | cmExpansionEvaluatorAborted (const struct cmExpansionEvaluator *evaluator) |
| void | cmSetExpansionEvaluatorMode (struct cmExpansionEvaluator *evaluator, enum cmExpansionEvaluatorMode mode) |
| void | cmSetExpansionEvaluatorInput (struct cmExpansionEvaluator *evaluator, const struct cmStringView *input) |
| const struct cmArgument * | cmEvaluateExpansions (struct cmExpansionEvaluator *evaluator) |
| void | cmSetExpansionEvaluatorQueryHandler (struct cmExpansionEvaluator *evaluator, struct cmQueryHandler *query_handler) |
| struct cmExpansionList * | cmNewExpansionList (struct cmHost *host) |
| void | cmReleaseExpansionList (struct cmExpansionList *expansion_list) |
| int | cmAddExpansion (struct cmExpansionList *expansion_list, struct cmExpansion *expansion) |
| size_t | cmGetExpansionCount (const struct cmExpansionList *expansion_list) |
| struct cmExpansionParser * | cmNewExpansionParser (struct cmHost *host) |
| void | cmReleaseExpansionParser (struct cmExpansionParser *parser) |
| void | cmSetExpansionParserInput (struct cmExpansionParser *parser, const struct cmStringView *input) |
| void | cmAllowParsingExpansionSeparator (struct cmExpansionParser *parser, cmBool separator_flag) |
| struct cmExpansion * | cmParseExpansion (struct cmExpansionParser *parser) |
| void | cmInitExpansionVisitor (struct cmExpansionVisitor *expansion_visitor) |
| void | cmVisitLiteralExpansion (struct cmExpansionVisitor *expansion_visitor, const struct cmLiteralExpansion *literal_expansion) |
| void | cmVisitReferenceExpansion (struct cmExpansionVisitor *expansion_visitor, const struct cmReferenceExpansion *reference_expansion) |
| void | cmVisitSeparatorExpansion (struct cmExpansionVisitor *expansion_visitor, const struct cmSeparatorExpansion *separator_expansion) |
| char * | cmFormatString (struct cmHost *host, const char *fmt,...) cmFormatString_ATTRIBUTES |
| char * | cmFormatStringV (struct cmHost *host, const char *fmt, va_list args) |
| struct cmFunctionContext * | cmNewFunctionContext (struct cmHost *host) |
| void | cmReleaseFunctionContext (struct cmFunctionContext *function_context) |
| void | cmResetFunctionContext (struct cmFunctionContext *function_context) |
| int CM_WARN_UNUSED_RESULT | cmEvaluateFunctionArguments (struct cmFunctionContext *function_context) |
| void | cmSetFunctionCache (struct cmFunctionContext *function_context, struct cmCache *cache) |
| void | cmSetFunctionVariableTable (struct cmFunctionContext *function_context, struct cmSymbolTable *variable_table) |
| int CM_WARN_UNUSED_RESULT | cmPushFunctionArgument (struct cmFunctionContext *function_context, const struct cmArgument *argument) |
| void | cmFunctionToSymbol (struct cmFunction *function, struct cmSymbol *symbol) |
| const char * | cmGetExtensionOf (const char *path, size_t path_size) |
| void | cmClearHost (struct cmHost *host) |
| void | cmInitHostFile (struct cmHostFile *host_file) |
| void | cmReleaseHostFile (struct cmHostFile *host_file) |
| size_t | cmReadFromHostFile (struct cmHostFile *host_file, void *data, size_t size) |
| struct cmInterpreter * | cmNewInterpreter (struct cmHost *host) |
| void | cmReleaseInterpreter (struct cmInterpreter *interpreter) |
| int | cmOpenForInterpretation (struct cmInterpreter *interpreter, const char *filename) |
| int | cmImportVariableTable (struct cmInterpreter *interpreter, const struct cmSymbolTable *variable_table) |
| int | cmImportFunctionTable (struct cmInterpreter *interpreter, const struct cmSymbolTable *function_table) |
| cmBool | cmInterpreterIsDone (const struct cmInterpreter *interpreter) |
| int | cmContinueInterpreter (struct cmInterpreter *interpreter) |
| void | cmAbortInterpreter (struct cmInterpreter *interpreter) |
| int | cmIsTTY (enum cmStdioFile file) |
| struct cmLexer * | cmNewLexer (struct cmHost *host) |
| void | cmReleaseLexer (struct cmLexer *lexer) |
| void | cmAbortLexer (struct cmLexer *lexer) |
| cmBool | cmLexerAborted (const struct cmLexer *lexer) |
| int | cmOpenForScanning (struct cmLexer *lexer, const char *filename) |
| cmBool | cmLexerIsDone (struct cmLexer *lexer) |
| const struct cmToken * | cmScanToken (struct cmLexer *lexer) |
| const struct cmToken * | cmPeekToken (struct cmLexer *lexer) |
| void | cmConsumeToken (struct cmLexer *lexer) |
| struct cmLiteralExpansion * | cmNewLiteralExpansion (struct cmHost *host) |
| void | cmReleaseLiteralExpansion (struct cmLiteralExpansion *literal_expansion) |
| int CM_WARN_UNUSED_RESULT | cmAddLiteralExpansionContent (struct cmLiteralExpansion *literal_expansion, const struct cmStringView *content_view) |
| const char * | cmGetLiteralExpansionContent (const struct cmLiteralExpansion *literal_expansion) |
| size_t | cmGetLiteralExpansionSize (const struct cmLiteralExpansion *literal_expansion) |
| void | cmLiteralExpansionToExpansion (struct cmLiteralExpansion *literal_expansion, struct cmExpansion *expansion) |
| struct cmLoop * | cmNewLoop (struct cmHost *host) |
| void | cmReleaseLoop (struct cmLoop *loop) |
| int | cmAddLoopObject (struct cmLoop *loop, struct cmLoopObject *loop_object) CM_WARN_UNUSED_RESULT |
| int | cmRunOnce (struct cmLoop *loop) |
| int | cmRunDefault (struct cmLoop *loop) |
| cmBool | cmLoopIsEmpty (const struct cmLoop *loop) |
| struct cmOptionParser * | cmNewOptionParser (struct cmHost *host, int argc, char **argv) |
| void | cmReleaseOptionParser (struct cmOptionParser *option_parser) |
| const struct cmDefineOption * | cmParseDefineOption (struct cmOptionParser *parser) |
| const char * | cmParseNonOption (struct cmOptionParser *parser) |
| cmBool | cmOptionParserIsDone (const struct cmOptionParser *parser) |
| struct cmParser * | cmNewParser (struct cmHost *host) |
| void | cmReleaseParser (struct cmParser *parser) |
| int | cmOpenForParsing (struct cmParser *parser, const char *filename) |
| void | cmAbortParser (struct cmParser *parser) |
| cmBool | cmParserFailed (const struct cmParser *parser) |
| const struct cmCommand * | cmParse (struct cmParser *parser) |
| void | cmInitPosition (struct cmPosition *position) |
| void | cmMoveRight (struct cmPosition *position) |
| void | cmMoveDown (struct cmPosition *position) |
| void | cmInitQueryHandler (struct cmQueryHandler *query_handler) |
| const struct cmStringView * | cmIssueQuery (struct cmQueryHandler *query_handler, const struct cmQuery *query) |
| struct cmReader * | cmNewReader (struct cmHost *host) |
| void | cmReleaseReader (struct cmReader *reader) |
| void | cmAbortReader (struct cmReader *reader) |
| cmBool | cmReaderAborted (const struct cmReader *reader) |
| int CM_WARN_UNUSED_RESULT | cmOpenForReading (struct cmReader *reader, const char *filename) |
| char | cmCharAt (struct cmReader *reader, size_t offset) |
| int CM_WARN_UNUSED_RESULT | cmFillReaderTo (struct cmReader *reader, size_t count) |
| void | cmConsume (struct cmReader *reader, size_t count) |
| const char * | cmGetReaderBuffer (const struct cmReader *reader) |
| size_t | cmGetReaderBufferSize (const struct cmReader *reader) |
| struct cmReferenceExpansion * | cmNewReferenceExpansion (struct cmHost *host) |
| void | cmReleaseReferenceExpansion (struct cmReferenceExpansion *reference_expansion) |
| int CM_WARN_UNUSED_RESULT | cmAddReferenceExpansionLeaf (struct cmReferenceExpansion *reference_expansion, struct cmExpansion *leaf) |
| const struct cmExpansionList * | cmGetReferenceExpansionBody (const struct cmReferenceExpansion *reference_expansion) |
| enum cmReferenceExpansionType | cmGetReferenceExpansionType (const struct cmReferenceExpansion *reference_expansion) |
| void | cmSetReferenceExpansionType (struct cmReferenceExpansion *reference_expansion, enum cmReferenceExpansionType type) |
| void | cmReferenceExpansionToExpansion (struct cmReferenceExpansion *reference_expansion, struct cmExpansion *expansion) |
| void | cmReportDiagnostic (struct cmHost *host, const struct cmDiagnostic *diagnostic) |
| void | cmReportMessage (struct cmHost *host, const struct cmMessage *message) |
| struct cmScriptContext * | cmNewScriptContext (struct cmHost *host) |
| void | cmReleaseScriptContext (struct cmScriptContext *script_context) |
| void | cmSetScriptWarningConfig (struct cmScriptContext *script_context, const struct cmWarningConfig *warning_config) |
| int | cmOpenScriptFile (struct cmScriptContext *script_context, const char *filename) CM_WARN_UNUSED_RESULT |
| int | cmCopyVariablesToScript (struct cmScriptContext *script_context, const struct cmSymbolTable *symbol_table) CM_WARN_UNUSED_RESULT |
| int | cmCopyFunctionsToScript (struct cmScriptContext *script_context, const struct cmSymbolTable *symbol_table) CM_WARN_UNUSED_RESULT |
| cmBool | cmScriptIsDone (const struct cmScriptContext *script_context) |
| int | cmContinueScript (struct cmScriptContext *script_context) |
| void | cmSeparatorExpansionToExpansion (struct cmSeparatorExpansion *separator_expansion, struct cmExpansion *expansion) |
| char * | cmStrdupFromHost (struct cmHost *host, const char *str) |
| struct cmStringList * | cmNewStringList (struct cmHost *host) |
| void | cmReleaseStringList (struct cmStringList *string_list) |
| int | cmPushString (struct cmStringList *string_list, const char *str) CM_WARN_UNUSED_RESULT |
| const char * | cmGetString (const struct cmStringList *string_list, size_t index) |
| size_t | cmGetStringCount (const struct cmStringList *string_list) |
| char ** | cmStringListToArgv (struct cmStringList *string_list) |
| void | cmInitStringView (struct cmStringView *string_view) |
| void | cmInitSymbol (struct cmSymbol *symbol, struct cmHost *host) |
| void | cmClearSymbol (struct cmSymbol *symbol) |
| int | cmCopySymbol (const struct cmSymbol *src, struct cmSymbol *dst) |
| void | cmMoveSymbol (struct cmSymbol *src, struct cmSymbol *dst) |
| int CM_WARN_UNUSED_RESULT | cmSetSymbolKey (struct cmSymbol *symbol, const char *key) |
| int | cmCompareSymbols (const struct cmSymbol *a, const struct cmSymbol *b, cmBool ignore_case) |
| struct cmSymbolTable * | cmNewSymbolTable (struct cmHost *host, cmBool ignore_case) |
| struct cmSymbolTable * | cmCopySymbolTable (const struct cmSymbolTable *other) |
| void | cmReleaseSymbolTable (struct cmSymbolTable *symbol_table) |
| cmBool | cmSymbolTableHasParentScope (const struct cmSymbolTable *symbol_table) |
| int CM_WARN_UNUSED_RESULT | cmAddSymbol (struct cmSymbolTable *symbol_table, struct cmSymbol *symbol) |
| void | cmRemoveSymbol (struct cmSymbolTable *symbol_table, const char *key) |
| void | cmRemoveSymbolFromParentScope (struct cmSymbolTable *symbol_table, const char *key) |
| void * | cmFindSymbol (const struct cmSymbolTable *symbol_table, const struct cmStringView *key_view) |
| int CM_WARN_UNUSED_RESULT | cmPushScope (struct cmSymbolTable *symbol_table) |
| int CM_WARN_UNUSED_RESULT | cmPopScope (struct cmSymbolTable *symbol_table) |
| struct cmToken * | cmNewToken (struct cmHost *host, size_t size) |
| void | cmReleaseToken (struct cmToken *token) |
| struct cmToken * | cmCopyToken (struct cmToken *token, const struct cmToken *other) |
| const char * | cmGetTokenContent (const struct cmToken *token) |
| size_t | cmGetTokenSize (const struct cmToken *token) |
| enum cmTokenType | cmGetTokenType (const struct cmToken *token) |
| const struct cmPosition * | cmGetTokenPosition (const struct cmToken *token) |
| struct cmToken * | cmResizeToken (struct cmToken *token, size_t size) |
| void | cmSetTokenContent (struct cmToken *token, const char *content, size_t size) |
| void | cmSetTokenPosition (struct cmToken *token, const struct cmPosition *position) |
| void | cmSetTokenType (struct cmToken *token, enum cmTokenType type) |
| void | cmPushTokenChar (struct cmToken *token, char c) |
| int CM_WARN_UNUSED_RESULT | cmVariableToSymbol (const char *value, struct cmSymbol *symbol) |
| void | cmInitWarningConfig (struct cmWarningConfig *warning_config) |
| void | cmTestCache (struct cmTestDriver *test_driver) |
| void | cmTestExpansionEvaluator (struct cmTestDriver *test_driver) |
| void | cmTestGetExtensionOf (struct cmTestDriver *test_driver) |
Variables | |
| const struct cmBuiltinFunction | builtin_function_table [] |
Internal functions and declarations used within the library to implement the library interface.
| #define CM_FALSE 0 |
This is the value for false in boolean types.
| #define CM_TRUE 1 |
This is the value for true in boolean types.
| typedef unsigned char cmBool |
A type definition for a boolean variable. This type definition uses 'unsigned char' as the underlying type.
| typedef unsigned short int cmChar16 |
A type definition for a 16-bit character. This type definition uses 'unsigned short int' as the underlying type.
| typedef unsigned long int cmChar32 |
A type definition of a 32-bit character. This type definition uses an 'unsigned long int' as the underlying type.
| enum cmArgumentTokenType |
Enumerates the several types of tokens.
| enum cmBOM |
| enum cmDiagnosticID |
Identifiers the diagnostic that is being issued.
| enum cmDiagnosticSeverity |
| enum cmQueryType |
| enum cmScriptStatus |
Enumerates the possible status values of a script.
| enum cmStdioFile |
| enum cmTokenType |
Enumerates the several types of tokens.
| enum cmWarningID |
Enumerates the several warnings that can be specified from command line arguments.
| void cmAbortInterpreter | ( | struct cmInterpreter * | interpreter | ) |
Aborts the interpreter. The interpreter will no longer execute code after this function is called.
| interpreter | The interpreter to abort. |
| void cmAbortLexer | ( | struct cmLexer * | lexer | ) |
Aborts the lexer. After calling this function, no more tokens can be scanned. This is used after encountering a fatal error, to ensure that the script can no longer be executed.
| lexer | The lexer to abort. |
| void cmAbortParser | ( | struct cmParser * | parser | ) |
Ensures that the parser stops parsing commands. This function is used when a script encounters a fatal error and can't be executed anymore.
| parser | The parser to abort. |
| void cmAbortReader | ( | struct cmReader * | reader | ) |
Aborts the reader. After calling this function, the file can no longer be read from. This is used when a fatal error is encountered, to ensure that the script can no longer be executed.
| reader | The reader to abort. |
| void cmAcceptExpansionVisitor | ( | const struct cmExpansion * | expansion, |
| struct cmExpansionVisitor * | visitor | ||
| ) |
Accepts an expansion visitor.
| expansion | The expansion to visit. |
| visitor | The visitor that is visiting the expansion type. |
| void cmAddArgumentContent | ( | struct cmArgument * | argument, |
| const char * | content, | ||
| size_t | content_size | ||
| ) |
Appends content to an argument. If the content is too large, then it is truncated to fit.
| argument | The argument to append content to. |
| content | The content to append. |
| content_size | The number of characters to append. |
| int cmAddExpansion | ( | struct cmExpansionList * | expansion_list, |
| struct cmExpansion * | expansion | ||
| ) |
Adds an expansion to the expansion list.
| expansion_list | The expansion list to add an expansion to. |
| expansion | The expansion to add. After calling this function, the list has ownership of the expansion data. |
| int CM_WARN_UNUSED_RESULT cmAddLiteralExpansionContent | ( | struct cmLiteralExpansion * | literal_expansion, |
| const struct cmStringView * | content_view | ||
| ) |
Adds content to the literal expansion.
| literal_expansion | The literal expansion to receive the content. |
| content_view | A view of the content to be added. |
| int cmAddLoopObject | ( | struct cmLoop * | loop, |
| struct cmLoopObject * | loop_object | ||
| ) |
Adds an object to the loop.
| loop | The loop to add the object to. |
| loop_object | The object to add. |
| int CM_WARN_UNUSED_RESULT cmAddReferenceExpansionLeaf | ( | struct cmReferenceExpansion * | reference_expansion, |
| struct cmExpansion * | leaf | ||
| ) |
Adds an expansion leaf to the reference expansion. An expansion leaf is considered to be nested expansion within the brackets of the reference expansion.
| reference_expansion | The reference expansion to receive the content. |
| leaf | The expansion leaf to add to the reference expansion body. |
| int CM_WARN_UNUSED_RESULT cmAddSymbol | ( | struct cmSymbolTable * | symbol_table, |
| struct cmSymbol * | symbol | ||
| ) |
Adds a object to the symbol table.
| symbol_table | The symbol table to add the object to. |
| symbol | The object to add to the symbol table. |
| void cmAllowParsingExpansionSeparator | ( | struct cmExpansionParser * | parser, |
| cmBool | separator_flag | ||
| ) |
Indicates to the expansion parser whether or not to parse expansion separators. Expansion separators are parsed by default and cause the evaluator to separate arguments. If no expansion separators are parsed, and instead passed as expansion literals, then the evaluator will concatenate all expansions into a single argument.
| cmBool cmArgumentLexerIsDone | ( | const struct cmArgumentLexer * | lexer | ) |
| char cmCharAt | ( | struct cmReader * | reader, |
| size_t | offset | ||
| ) |
Accesses a character at a specified location within the reader's buffer.
| reader | The reader to read from. |
| offset | The offset within the current position of the reader. |
| void cmClearExpansion | ( | struct cmExpansion * | expansion | ) |
Releases memory allocated by an expansion.
| expansion | The expansion to release the memory of. |
| void cmClearHost | ( | struct cmHost * | host | ) |
Releases memory allocated by the host interface.
| host | The host to release the memory for. |
| void cmClearSymbol | ( | struct cmSymbol * | symbol | ) |
Releases memory allocated by the symbol.
| symbol | The symbol to release the memory of. |
Compares two symbols.
| a | The left hand symbol. |
| b | The right hand symbol. |
| ignore_case | Whether or not to ignore the case. |
a is greater than b. Negative one if a is less than b. | void cmConsume | ( | struct cmReader * | reader, |
| size_t | count | ||
| ) |
Erases characters within the reader's buffer and moves the reader postiion forward. This is used when the lexer finishes scanning a token, and the characters in the reader no longer need to be used.
| reader | The reader to consume characters. |
| count | The number of characters to consume. |
| void cmConsumeArgumentToken | ( | struct cmArgumentLexer * | lexer | ) |
When the last scanned token is no longer needed, this function discards it from the lexer. After calling this function, then next call to cmPeekArgumentToken will return a newly scanned token.
| lexer | The lexer to scan with. |
| void cmConsumeToken | ( | struct cmLexer * | lexer | ) |
When the last scanned token no longer needs to be used, this function discards it from the lexer. After calling this function, the next call to cmPeekToken will produce a new token.
| lexer | The lexer to consume the token of. |
| int cmContinueInterpreter | ( | struct cmInterpreter * | interpreter | ) |
Executes a command within the file that the interpreter is currently on.
| interpreter | The interpreter to continue running. |
Don't bother parsing if the parser has already failed.
| int cmContinueScript | ( | struct cmScriptContext * | script_context | ) |
Executes another command within the script.
| script_context | The script to continue executing. |
| struct cmArgument* cmCopyArgument | ( | struct cmArgument * | dst, |
| const struct cmArgument * | src | ||
| ) |
Makes a copy of an argument.
| dst | If the argument already exists in memory, passing it to this parameter may avoid allocating extra memory. Otherwise, it may be a null pointer. |
| src | The argument to copy the data from. |
| struct cmCacheVariable* cmCopyCacheVariable | ( | const struct cmCacheVariable * | other | ) |
Makes a copy of the specified cache variable.
| other | The cache variable to copy. |
| int cmCopyFunctionsToScript | ( | struct cmScriptContext * | script_context, |
| const struct cmSymbolTable * | symbol_table | ||
| ) |
Copies a function table to a script context. This allows the script to receive all functions defined in another symbol table. It is used to copy the function table defined in cmEngine so that functions defined by the end user get seen by the script context.
| script_context | The script context to receive the symbol table. |
| symbol_table | The function table to copy. |
Creates a copy of the symbol.
| src | The symbol to copy. |
| dst | The symbol to put the copy into. This structure must already be initialized with cmInitSymbol |
| struct cmSymbolTable* cmCopySymbolTable | ( | const struct cmSymbolTable * | other | ) |
Creates a copy of a symbol table.
| other | The symbol table to copy. |
other. Makes a copy of the token.
| token | An existing token to receive the data. This parameter may be null, in which case a new token is allocated. |
| other | The token to copy. |
other. | int cmCopyVariablesToScript | ( | struct cmScriptContext * | script_context, |
| const struct cmSymbolTable * | symbol_table | ||
| ) |
Copies a variable table to a script context. This allows the script to receive all variables defined in another symbol table. It is used to copy the variable table defined in cmEngine so that variables defined by the end user get seen by the script context.
| script_context | The script context to receive the symbol table. |
| symbol_table | The variable table to copy. |
| const struct cmArgument* cmEvaluateExpansions | ( | struct cmExpansionEvaluator * | evaluator | ) |
Evaluates expansions, until an argument is completed.
| evaluator | The expansion evaluator to use. |
| int CM_WARN_UNUSED_RESULT cmEvaluateFunctionArguments | ( | struct cmFunctionContext * | function_context | ) |
Evaluates the arguments passed to the function.
| function_context | The function context containing the arguments to evaluate. |
| cmBool cmExpansionEvaluatorAborted | ( | const struct cmExpansionEvaluator * | evaluator | ) |
| int CM_WARN_UNUSED_RESULT cmFillReaderTo | ( | struct cmReader * | reader, |
| size_t | count | ||
| ) |
Fills the reader's buffer to a specified number of characters.
| reader | The reader to fill. |
| count | The number of characters to fill. |
| const struct cmCacheVariable* cmFindCacheVariable | ( | const struct cmCache * | cache, |
| const struct cmStringView * | name | ||
| ) |
Attempts to locate a cache variable.
| cache | The cache to search the variable for. |
| name | The name of the variable to search for. |
| void* cmFindSymbol | ( | const struct cmSymbolTable * | symbol_table, |
| const struct cmStringView * | key_view | ||
| ) |
Locates an object within the symbol table by searching its key.
| symbol_table | The symbol table to search. |
| key_view | The key to search for within the symbol table. |
| void cmFormatDiagnostic | ( | struct cmDiagnostic * | diagnostic, |
| const char * | fmt, | ||
| ... | |||
| ) |
Formats the diagnostic message.
| diagnostic | The diagnostic to format. |
| fmt | The format specifier for the message. |
| char* cmFormatString | ( | struct cmHost * | host, |
| const char * | fmt, | ||
| ... | |||
| ) |
Formats a string, dynamically allocating the required memory for it.
| host | The host used to allocate the memory. |
| fmt | The string format specification. |
| char* cmFormatStringV | ( | struct cmHost * | host, |
| const char * | fmt, | ||
| va_list | args | ||
| ) |
Formats a string, dynamically allocating the required memory for it.
| host | The host used to allocate the memory. |
| fmt | The format specification of the string. |
| args | The arguments to pass to the format function. |
| void cmFunctionToSymbol | ( | struct cmFunction * | function, |
| struct cmSymbol * | symbol | ||
| ) |
Converts a function to a symbol structure. This can be used to add a new function to a symbol table.
| function | A pointer to the function callbacks. |
| symbol | The symbol structure to put the function into. |
| const struct cmArgument* cmGetArgument | ( | const struct cmArgumentList * | argument_list, |
| size_t | index | ||
| ) |
Accesses an argument from the argument list.
| argument_list | The argument list to get the argument from. |
| index | The index of the argument to get. |
| size_t cmGetArgumentCount | ( | const struct cmArgumentList * | argument_list | ) |
Accesses the number of arguments in the argument list.
| argument_list | The list to get the argument count of. |
| const struct cmStringView* cmGetArgumentTokenContentView | ( | const struct cmArgumentToken * | token | ) |
Accesses the content view of an argument token.
| token | The token to get the content view of. |
| const struct cmPosition* cmGetArgumentTokenPosition | ( | const struct cmArgumentToken * | token | ) |
Accesses the position of an argument token.
| token | The token to get the position of. |
| enum cmArgumentTokenType cmGetArgumentTokenType | ( | const struct cmArgumentToken * | token | ) |
Accesses the type of an argument token.
| token | The argument token to get the type of. |
| const struct cmArgument* cmGetCommandArgument | ( | const struct cmCommand * | command, |
| size_t | index | ||
| ) |
Accesses an argument at a specified location.
| command | The command to get the argument from. |
| index | The index of the argument to get. |
| size_t cmGetCommandArgumentCount | ( | const struct cmCommand * | command | ) |
Accesses the number of arguments in the command.
| command | The command to get the argument count from. |
Accesses the identifier of a command.
| command | The command to get the identifier of. |
Accesses a constant pointer to the engine's loop.
| engine | The engine to get the loop from. |
| size_t cmGetExpansionCount | ( | const struct cmExpansionList * | expansion_list | ) |
Accesses the number of expansions in an expansion list.
| expansion_list | The list to get the size of. |
| const char* cmGetExtensionOf | ( | const char * | path, |
| size_t | path_size | ||
| ) |
Gets the extension of a path.
| path | The path to get the extension of. |
| path_size | The number of characters in the path. |
| struct cmSymbolTable* cmGetFunctionTable | ( | struct cmEngine * | engine | ) |
Accesses the function table of the engine.
| engine | The engine to get the function table from. |
| const char* cmGetLiteralExpansionContent | ( | const struct cmLiteralExpansion * | literal_expansion | ) |
Accesses the string containing the literal expansion content.
| literal_expansion | The literal expansion to get the content of. |
| size_t cmGetLiteralExpansionSize | ( | const struct cmLiteralExpansion * | literal_expansion | ) |
Accesses the size of a literal expansion.
| literal_expansion | The literal expansion to get the size of. |
Accesses the loop from the engine structure.
| engine | The engine to get the loop from. |
| const char* cmGetReaderBuffer | ( | const struct cmReader * | reader | ) |
Accesses the reader buffer. This is useful in some cases for faster scanning when used with cmFillReaderTo.
| reader | The reader to get the buffer from. |
| size_t cmGetReaderBufferSize | ( | const struct cmReader * | reader | ) |
Accesses the size of the reader's buffer.
| reader | The reader to get the buffer size of. |
| const struct cmExpansionList* cmGetReferenceExpansionBody | ( | const struct cmReferenceExpansion * | reference_expansion | ) |
Accesses the body of the reference expansion.
| reference_expansion | The reference expansion to get the body of. |
| enum cmReferenceExpansionType cmGetReferenceExpansionType | ( | const struct cmReferenceExpansion * | reference_expansion | ) |
Accesses the type of a reference expansion.
| reference_expansion | The type to get the expansion of. |
| const char* cmGetString | ( | const struct cmStringList * | string_list, |
| size_t | index | ||
| ) |
Accesses a string from a string list.
| string_list | The string list to get the string from. |
| index | The index of the string to get. |
| size_t cmGetStringCount | ( | const struct cmStringList * | string_list | ) |
Accesses the number of strings in a string list.
| string_list | The string list to get the count of. |
| const char* cmGetTokenContent | ( | const struct cmToken * | token | ) |
Accesses the string content of the token.
| token | The token to get the content of. |
| const struct cmPosition* cmGetTokenPosition | ( | const struct cmToken * | token | ) |
Accesses the token position.
| token | The token to get the position of. |
| size_t cmGetTokenSize | ( | const struct cmToken * | token | ) |
Accesses the token size. In other words, returns the number of characters in the token (not including the null terminator.)
| token | The token to get the size of. |
| enum cmTokenType cmGetTokenType | ( | const struct cmToken * | token | ) |
Accesses the type of the token.
| token | The token to get the type of. |
| struct cmSymbolTable* cmGetVariableTable | ( | struct cmEngine * | engine | ) |
Accesses the variable table of the engine.
| engine | The engine to get the variable table from. |
| const struct cmWarningConfig* cmGetWarningConfig | ( | const struct cmEngine * | engine | ) |
Accesses the warning configuration for the engine.
| engine | The engine to get the warning config from. |
| int cmImportFunctionTable | ( | struct cmInterpreter * | interpreter, |
| const struct cmSymbolTable * | function_table | ||
| ) |
Copies a function symbol table and puts it into the interpreter.
| interpreter | The interpreter to receive the function symbols. |
| function_table | The function table to import. |
| int cmImportVariableTable | ( | struct cmInterpreter * | interpreter, |
| const struct cmSymbolTable * | variable_table | ||
| ) |
Copies a variable symbol table and puts it into the interpreter.
| interpreter | The interpreter to receive the variable symbols. |
| variable_table | The variable table to import. |
| void cmInitExpansion | ( | struct cmExpansion * | expansion | ) |
Initializes the expansion.
| expansion | The expansion to initialize. |
| void cmInitExpansionVisitor | ( | struct cmExpansionVisitor * | expansion_visitor | ) |
Initializes an expansion visitor.
| expansion_visitor | The expansion visitor to initialize. |
| void cmInitHostFile | ( | struct cmHostFile * | host_file | ) |
Initializes members of the host file structure.
| host_file | The host file structure to initialize. |
| void cmInitPosition | ( | struct cmPosition * | position | ) |
Initializes a position structure. After calling this function, the line and column members have a value of one.
| position | The position structure to initialize. |
| void cmInitQueryHandler | ( | struct cmQueryHandler * | query_handler | ) |
Initializes the interface of the query handler to its default values.
| query_handler | The query handler to initialize. |
| void cmInitStringView | ( | struct cmStringView * | string_view | ) |
Initializes a string view.
| string_view | The string view to initialize. |
Initializes the symbol for use.
| host | The host used for memory allocation. |
| symbol | The symbol to initialize. |
| void cmInitWarningConfig | ( | struct cmWarningConfig * | warning_config | ) |
Initializes the warning config to default values.
| warning_config | The warning config to initialize. |
| cmBool cmInterpreterIsDone | ( | const struct cmInterpreter * | interpreter | ) |
| const struct cmStringView* cmIssueQuery | ( | struct cmQueryHandler * | query_handler, |
| const struct cmQuery * | query | ||
| ) |
Issues a query.
| query_handler | The query handler responding to the request. |
| query | The query being issued. |
| int cmIsTTY | ( | enum cmStdioFile | file | ) |
Indicates whether or not a certain standard IO file is a TTY. This is used to determine if color can be printed or not.
| file | The file to check. |
Indicates whether or not the lexer has failed. It's good to check this function when a null pointer is returned from cmScanToken. Note that if this function returns CM_TRUE, then a diagnostic has already been issued.
| lexer | The lexer to check. |
Indicates whether or not the lexer is done scanning tokens from the input.
| lexer | A lexer returned by cmNewLexer. |
If the buffer can't be filled to a size of one, then EOF must have been reached.
| void cmLiteralExpansionToExpansion | ( | struct cmLiteralExpansion * | literal_expansion, |
| struct cmExpansion * | expansion | ||
| ) |
Converts the literal expansion to an expansion structure.
| literal_expansion | The literal expansion to convert. |
| expansion | The expansion structure to contain the literal expansion. |
| void cmMoveDown | ( | struct cmPosition * | position | ) |
Moves the position down by one line.
| position | The position to move. |
| void cmMoveRight | ( | struct cmPosition * | position | ) |
Moves the position right by one character.
| position | The position to move right. |
Moves a symbol from one location to another.
| src | The symbol structure to move. |
| dst | The destination to move the symbol to. |
| struct cmArgument* cmNewArgument | ( | struct cmHost * | host, |
| size_t | size | ||
| ) |
Creates a new argument type.
| host | The host used to allocate the memory. |
| size | The number of characters to reserve space for in the argument. This can be changed after calling this function. |
| struct cmArgumentLexer* cmNewArgumentLexer | ( | struct cmHost * | host | ) |
Creates a new argument lexer.
| host | The host to allocate memory with. |
| struct cmArgumentList* cmNewArgumentList | ( | struct cmHost * | host, |
| size_t | size | ||
| ) |
Creates a new argument list instance.
| host | A pointer to the host to allocate memory with. |
| size | The number of arguments to put into the list. |
Creates a new cache.
| host | The host to allocate memory with. |
| struct cmCacheVariable* cmNewCacheVariable | ( | struct cmHost * | host | ) |
Creates a new cache variable.
| host | The host to allocate memory with. |
Creates a new command.
| host | A pointer to the host for memory allocations. |
| struct cmDiagnostic* cmNewDiagnostic | ( | struct cmHost * | host | ) |
Allocates a new diagnostic structure.
| host | A pointer to the host to allocate the memory from. |
Creates a new engine structure.
| host | A pointer to the host interface, which may be a null. |
| struct cmExpansionEvaluator* cmNewExpansionEvaluator | ( | struct cmHost * | host | ) |
Creates a new expansion evaluator.
| host | The host used to allocate memory. |
| struct cmExpansionList* cmNewExpansionList | ( | struct cmHost * | host | ) |
Creates a new expansion list.
| host | A pointer to the host to allocate memory with. |
| struct cmExpansionParser* cmNewExpansionParser | ( | struct cmHost * | host | ) |
Creates a new expansion parser.
| host | The host used to allocate memory. |
| struct cmFunctionContext* cmNewFunctionContext | ( | struct cmHost * | host | ) |
Creates a new function context.
| host | The interface to the host system. |
| struct cmInterpreter* cmNewInterpreter | ( | struct cmHost * | host | ) |
Creates a new interpreter instance.
| host | The host used to allocate memory. |
Allocates a new lexer.
| host | A pointer to the host interface. This parameter is optional and may be null. |
| struct cmLiteralExpansion* cmNewLiteralExpansion | ( | struct cmHost * | host | ) |
Creates a new literal expansion.
| host | The host used to allocate memory. |
Creates an event loop.
| host | A pointer to the host interface, used to allocate memory for the loop. |
| struct cmOptionParser* cmNewOptionParser | ( | struct cmHost * | host, |
| int | argc, | ||
| char ** | argv | ||
| ) |
Creates a new option parser.
| host | A pointer to the host interface. |
| argc | The number of arguments to parse. |
| argv | The argument array. Ensure that the first argument to this parameter is not the first argument of the parameter in main. In other words, make sure the first argument isn't the program name. |
Creates a new parser instance.
| host | A pointer to the host interface. This parameter may be a null pointer. |
Allocates a new reader.
| host | A pointer to the host interface. This parameter may be a null pointer. |
| struct cmReferenceExpansion* cmNewReferenceExpansion | ( | struct cmHost * | host | ) |
Creates a new reference expansion.
| host | The host used to allocate memory. |
| struct cmScriptContext* cmNewScriptContext | ( | struct cmHost * | host | ) |
Creates a new script context.
| host | A pointer to the host interface. This parameter may be a null pointer. |
| struct cmStringList* cmNewStringList | ( | struct cmHost * | host | ) |
Creates a new string list.
| host | A pointer to the host interface, which is used to allocate memory for the string list. This parameter may be a null pointer. |
| struct cmSymbolTable* cmNewSymbolTable | ( | struct cmHost * | host, |
| cmBool | ignore_case | ||
| ) |
Creates a new symbol table instance.
| host | The host to allocate the memory with. |
| ignore_case | Whether or not to ignore case when comparing symbol keys. |
Creates a new token.
| host | A pointer to the host to allocate memory with. |
| size | The size, in terms of characters, of the token to create. |
| int cmOpenForInterpretation | ( | struct cmInterpreter * | interpreter, |
| const char * | filename | ||
| ) |
Opens a file for interpretation.
| interpreter | The interpreter to run the file. |
| filename | The filename to open. |
| int cmOpenForParsing | ( | struct cmParser * | parser, |
| const char * | filename | ||
| ) |
Opens a file for parsing.
| parser | The parser to open the file with. |
| filename | The name of the file to open. |
| int CM_WARN_UNUSED_RESULT cmOpenForReading | ( | struct cmReader * | reader, |
| const char * | filename | ||
| ) |
Opens a file for reading.
| reader | A reader returned by cmNewReader. |
| filename | The name of the file to read. |
| int cmOpenForScanning | ( | struct cmLexer * | lexer, |
| const char * | filename | ||
| ) |
Opens a file for the lexer to read.
| lexer | The lexer to scan the file with. |
| filename | The name of the file to open. |
| int cmOpenScriptFile | ( | struct cmScriptContext * | script_context, |
| const char * | filename | ||
| ) |
Opens the script file to be executed.
| script_context | The script context returned by cmNewScriptContext. |
| filename | The filename of the script to execute. |
| cmBool cmOptionParserIsDone | ( | const struct cmOptionParser * | parser | ) |
| const struct cmDiagnostic* cmOutOfMemoryDiagnostic | ( | void | ) |
Returns a pointer to the diagnostic that indicates an out of memory condition. This is a special diagnostic because it does not allocate memory when it is returned.
Parses a single command.
| parser | A parser created with cmNewParser. |
| const struct cmDefineOption* cmParseDefineOption | ( | struct cmOptionParser * | parser | ) |
Parses a define option. In other words, an option that starts with '-D'.
| parser | The parser containing the arguments to parse. |
| struct cmExpansion* cmParseExpansion | ( | struct cmExpansionParser * | parser | ) |
Parses an expansion.
| parser | The parser to parse the expansion with. |
| const char* cmParseNonOption | ( | struct cmOptionParser * | parser | ) |
Parses an argument that is not considered to be an option. This function should be called only after all other options have been parsed. If the next argument is an option, an unknown option diagnostic is passed and this function returns a null pointer.
| parser | The parser to parse the non-option with. |
Indicates whether or not the parser encountered a fatal error.
| parser | The parser returned by cmNewParser. |
| const struct cmArgumentToken* cmPeekArgumentToken | ( | struct cmArgumentLexer * | lexer | ) |
Attempts to scan a token, unless one has been scanned already. Successive calls to this function will return the same token.
| lexer | The lexer to scan with. |
Attempts to scan a token, unless one has been scanned already. If one has been scanned already, then it is returned by this function.
| lexer | The lexer to scan with. |
| int CM_WARN_UNUSED_RESULT cmPopScope | ( | struct cmSymbolTable * | symbol_table | ) |
Pops a scope from the symbol table. This function has no effect if there is only the global scope left.
| symbol_table | The symbol table to pop the scope from. |
| struct cmArgumentList* cmPushArgument | ( | struct cmArgumentList * | argument_list, |
| const struct cmArgument * | argument | ||
| ) |
Pushes an argument to the argument list.
| argument_list | The argument list to receive the argument. |
| argument | The argument to push to the list. |
| int CM_WARN_UNUSED_RESULT cmPushCommandArgument | ( | struct cmCommand * | command, |
| const struct cmArgument * | argument | ||
| ) |
Adds an argument to the commands argument list.
| command | The command to add the argument to. |
| argument | The argument to add to the command. |
| int CM_WARN_UNUSED_RESULT cmPushFunctionArgument | ( | struct cmFunctionContext * | function_context, |
| const struct cmArgument * | argument | ||
| ) |
Pushes an argument to the function context.
| function_context | The function context to push the argument to. |
| argument | The argument to push to the function call. |
| int CM_WARN_UNUSED_RESULT cmPushScope | ( | struct cmSymbolTable * | symbol_table | ) |
Pushes a new scope to the symbol table.
| symbol_table | The symbol table to push a scope to. |
| int cmPushString | ( | struct cmStringList * | string_list, |
| const char * | str | ||
| ) |
Adds a string to the string list.
| string_list | The string list to add the string to. |
| str | The string to add to the list. |
| void cmPushTokenChar | ( | struct cmToken * | token, |
| char | c | ||
| ) |
Adds a character to the end of the token content.
| token | The token to add the character to. |
| c | The character to add. |
| size_t cmReadFromHostFile | ( | struct cmHostFile * | host_file, |
| void * | data, | ||
| size_t | size | ||
| ) |
Reads data from a host file.
| host_file | The host file to read from. |
| data | The variable to put the data into. |
| size | The number of bytes to read. |
| void cmReferenceExpansionToExpansion | ( | struct cmReferenceExpansion * | reference_expansion, |
| struct cmExpansion * | expansion | ||
| ) |
Converts the reference expansion to an expansion structure.
| reference_expansion | The reference expansion to convert. |
| expansion | The expansion structure to contain the reference expansion. |
| void cmReleaseArgument | ( | struct cmArgument * | argument | ) |
Releases memory allocated by an argument.
| argument | The argument to release the memory for. |
| void cmReleaseArgumentLexer | ( | struct cmArgumentLexer * | lexer | ) |
Releases memory allocated by the argument lexer.
| lexer | The lexer to release the memory of. |
| void cmReleaseArgumentList | ( | struct cmArgumentList * | argument_list | ) |
Releases memory allocated by an argument list.
| argument_list | The argument list to release. |
| void cmReleaseCache | ( | struct cmCache * | cache | ) |
Releases memory allocated by a cache.
| cache | The cache to release the memory for. |
| void cmReleaseCacheVariable | ( | struct cmCacheVariable * | var | ) |
Releases memory allocated by a cache variable.
| var | The variable to release the memory for. |
| void cmReleaseCommand | ( | struct cmCommand * | command | ) |
Releases memory allocated by cmNewCommand.
| command | The command to release the memory of. |
| void cmReleaseDiagnostic | ( | struct cmDiagnostic * | diagnostic | ) |
Releases memory allocated by a diagnostic.
| diagnostic | The diagnostic to release the memory for. |
| void cmReleaseEngine | ( | struct cmEngine * | engine | ) |
Releases the engine structure.
| engine | The engine to release the resources for. |
| void cmReleaseExpansionEvaluator | ( | struct cmExpansionEvaluator * | evaluator | ) |
Releases memory allocated by an expansion evaluator.
| evaluator | The evaluator to release the memory for. |
| void cmReleaseExpansionList | ( | struct cmExpansionList * | expansion_list | ) |
Releases an expansion list.
| expansion_list | The expansion list to release. |
| void cmReleaseExpansionParser | ( | struct cmExpansionParser * | parser | ) |
Releases memory allocated by an expansion parser.
| parser | The parser to release the memory of. |
| void cmReleaseFunctionContext | ( | struct cmFunctionContext * | function_context | ) |
Releases memory allocated by the function context.
| function_context | The function to release the memory of. |
| void cmReleaseHostFile | ( | struct cmHostFile * | host_file | ) |
Releases memory allocated by a host file.
| host_file | The host file to release the memory for. |
| void cmReleaseInterpreter | ( | struct cmInterpreter * | interpreter | ) |
Releases memory allocated by an interpreter.
| interpreter | The interpreter to release the memory for. |
| void cmReleaseLexer | ( | struct cmLexer * | lexer | ) |
Releases memory allocated by a lexer.
| lexer | The lexer to release the memory of. |
| void cmReleaseLiteralExpansion | ( | struct cmLiteralExpansion * | literal_expansion | ) |
Releases memory allocated by the literal expansion.
| literal_expansion | The expansion to release the memory for. |
| void cmReleaseLoop | ( | struct cmLoop * | loop | ) |
Releases an event loop.
| loop | The event loop to release. |
| void cmReleaseOptionParser | ( | struct cmOptionParser * | option_parser | ) |
Releases memory allocated by an option parser.
| option_parser | The option parser to release the memory for. |
| void cmReleaseParser | ( | struct cmParser * | parser | ) |
Releases memory allocated by a parser.
| parser | The parser to release the memory for. This structure should have been returned by cmNewParser. |
| void cmReleaseReader | ( | struct cmReader * | reader | ) |
Releases memory allocated by a reader.
| reader | A reader returned by cmNewReader. |
| void cmReleaseReferenceExpansion | ( | struct cmReferenceExpansion * | reference_expansion | ) |
Releases memory allocated by the reference expansion.
| reference_expansion | The expansion to release the memory for. |
| void cmReleaseScriptContext | ( | struct cmScriptContext * | script_context | ) |
Releases memory allocated by a script context.
| script_context | The script context to release. |
| void cmReleaseStringList | ( | struct cmStringList * | string_list | ) |
Releases memory allocated by a string list.
| string_list | The string list to release the memory of. |
| void cmReleaseSymbolTable | ( | struct cmSymbolTable * | symbol_table | ) |
Releases memory allocated by a symbol table.
| symbol_table | The symbol table to release the memory for. This should be an instance returned by cmNewSymbolTable. |
| void cmReleaseToken | ( | struct cmToken * | token | ) |
Releases memory allocated by cmNewToken.
| token | A token created by cmNewToken. |
| void cmRemoveSymbol | ( | struct cmSymbolTable * | symbol_table, |
| const char * | key | ||
| ) |
Removes a symbol from a symbol table, specified by the name of the symbol.
| symbol_table | The symbol table to remove the variable from. |
| key | The name given to the symbol. |
| void cmRemoveSymbolFromParentScope | ( | struct cmSymbolTable * | symbol_table, |
| const char * | key | ||
| ) |
Removes a symbol from the parent scope.
| symbol_table | The symbol table to remove the variable from. |
| key | The name of the variable. |
| void cmReportDiagnostic | ( | struct cmHost * | host, |
| const struct cmDiagnostic * | diagnostic | ||
| ) |
Reports a diagnostic to the user.
| host | A pointer to the host interface, which may be null. |
| diagnostic | A pointer to the diagnostic to print. |
Reports a message to the user.
| host | A pointer to the host interface, which may be null. |
| message | A pointer to the message to print. |
| void cmResetArgument | ( | struct cmArgument * | argument | ) |
Erases the argument content so that the argument can be reused without allocating new memory.
| argument | The argument to reset. |
| void cmResetArgumentList | ( | struct cmArgumentList * | argument_list | ) |
Resets the argument list. Calling this function clears the argument list without releasing the memory. This way the argument list can be reused without allocating memory again.
| argument_list | The argument list to reset. |
| void cmResetExpansionEvaluator | ( | struct cmExpansionEvaluator * | evaluator | ) |
Resets the expansion evaluator, so that the memory doesn't have to be allocated again.
| evaluator | The evaluator to reset. |
| void cmResetFunctionContext | ( | struct cmFunctionContext * | function_context | ) |
Resets the function context. This is for reusing function contexts without allocating memory all over again.
| function_context | The function context to release. |
| struct cmArgument* cmResizeArgument | ( | struct cmArgument * | argument, |
| size_t | size | ||
| ) |
Resizes an argument.
| argument | The argument to resize. |
| size | The size to give the argument. |
Resizes token content. If the token size is reduced, the existing content is truncated to fit. current character content.
| token | The token to resize. If this parameter is null then a new token is created from scratch. |
| size | The new size of the token. |
token. | int cmRunDefault | ( | struct cmLoop * | loop | ) |
Runs the loop until all loop entries are completed.
| loop | The loop to run. |
| int cmRunOnce | ( | struct cmLoop * | loop | ) |
Runs the loop once.
| loop | The loop to run once. |
Attempts to scan a token from the input buffer.
| lexer | The lexer structure returned by cmNewLexer. |
| cmBool cmScriptIsDone | ( | const struct cmScriptContext * | script_context | ) |
| void cmSeparatorExpansionToExpansion | ( | struct cmSeparatorExpansion * | separator_expansion, |
| struct cmExpansion * | expansion | ||
| ) |
Converts a separator expansion to an expansion. The separator expansion has no actual data, but the callback functions are set appropriately to call the right visitor function.
| separator_expansion | The expansion to convert. |
| expansion | The expansion structure to fill. |
| void cmSetArgumentLexerInput | ( | struct cmArgumentLexer * | lexer, |
| const struct cmStringView * | input | ||
| ) |
Assigns the input to the argument lexer.
| lexer | The lexer to set the input of. |
| input | The input to assign the lexer. |
| void cmSetArgumentType | ( | struct cmArgument * | argument, |
| enum cmArgumentType | type | ||
| ) |
Assigns the type of the argument.
| argument | The argument to assign the type of. |
| type | The type to assign the argument. |
| int CM_WARN_UNUSED_RESULT cmSetCacheVariableDoc | ( | struct cmCacheVariable * | var, |
| const char * | doc | ||
| ) |
Assigns the documentation string to the cache variable.
| var | The variable to assign the documentation string to. |
| doc | The documentation string to assign. |
| int CM_WARN_UNUSED_RESULT cmSetCacheVariableName | ( | struct cmCacheVariable * | var, |
| const char * | name | ||
| ) |
Assigns the name of the variable.
| var | The variable to set the name of. |
| name | The name to give the cache variable. |
| void cmSetCacheVariableType | ( | struct cmCacheVariable * | var, |
| enum cmCacheType | type | ||
| ) |
Assigns the type of a cache variable.
| var | The variable to set the type of. |
| type | The type to assign the variable. |
| int CM_WARN_UNUSED_RESULT cmSetCacheVariableValue | ( | struct cmCacheVariable * | var, |
| const char * | value | ||
| ) |
Assigns the value of the variable.
| var | The variable to set the value of. |
| value | The value to give the cache variable. |
| int CM_WARN_UNUSED_RESULT cmSetCommandIdentifier | ( | struct cmCommand * | command, |
| const struct cmToken * | identifier | ||
| ) |
Assigns the command identifier.
| command | The command to set the identifier of. |
| identifier | The identifier to assign to the command. |
| void cmSetDiagnosticFilename | ( | struct cmDiagnostic * | diagnostic, |
| const char * | filename | ||
| ) |
Assigns the filename of the diagnostic.
| diagnostic | The diagnostic to assign the filename to. |
| filename | The filename to assign the diagnostic. If this parameter is null, then it is replaced by an empty string. |
| void cmSetDiagnosticID | ( | struct cmDiagnostic * | diagnostic, |
| enum cmDiagnosticID | id | ||
| ) |
Assigns the ID of the diagnostic.
| diagnostic | The diagnostic to assign the ID to. |
| id | The ID to assign the diagnostic. |
| void cmSetDiagnosticPosition | ( | struct cmDiagnostic * | diagnostic, |
| const struct cmPosition * | position | ||
| ) |
Assigns the position of the diagnostic. If the diagnostic has no position, then this function does not have to be called.
| diagnostic | The diagnostic to set the position for. |
| position | The position to give the diagnostic. |
| void cmSetDiagnosticSeverity | ( | struct cmDiagnostic * | diagnostic, |
| enum cmDiagnosticSeverity | severity | ||
| ) |
Assigns the severity of the diagnostic.
| diagnostic | The diagnostic to assign the severity to. |
| severity | The severity to assign the diagnostic. |
| void cmSetExpansionEvaluatorInput | ( | struct cmExpansionEvaluator * | evaluator, |
| const struct cmStringView * | input | ||
| ) |
Assigns the input to the expansion evaluator.
| evaluator | The evaluator to assign the input to. |
| input | The input to assign the evaluator. |
| void cmSetExpansionEvaluatorMode | ( | struct cmExpansionEvaluator * | evaluator, |
| enum cmExpansionEvaluatorMode | mode | ||
| ) |
Assigns the mode of the expansion evaluator.
| evaluator | The evaluator to set the mode of. |
| mode | The mode to assign the evaluator. |
| void cmSetExpansionEvaluatorQueryHandler | ( | struct cmExpansionEvaluator * | evaluator, |
| struct cmQueryHandler * | query_handler | ||
| ) |
Assigns the query handler to the expansion evaluator.
| evaluator | The evaluator to assign the query handler to. |
| query_handler | The query handler to assign. |
| void cmSetExpansionParserInput | ( | struct cmExpansionParser * | parser, |
| const struct cmStringView * | input | ||
| ) |
Assigns the input string to the expansion parser.
| parser | The parser to assign the input to. |
| input | The input string to assign the parser. |
| void cmSetFunctionCache | ( | struct cmFunctionContext * | function_context, |
| struct cmCache * | cache | ||
| ) |
Assigns the cache to be used by the function context.
| function_context | The function context to give the cache pointer to. |
| cache | The cache pointer to give the function context. |
| void cmSetFunctionVariableTable | ( | struct cmFunctionContext * | function_context, |
| struct cmSymbolTable * | variable_table | ||
| ) |
Assigns the variable table to be used by the function.
| function_context | The function context to assign the variable table to. |
| variable_table | The variable table to assign. |
| void cmSetReferenceExpansionType | ( | struct cmReferenceExpansion * | reference_expansion, |
| enum cmReferenceExpansionType | type | ||
| ) |
Assigns the reference expansion type to the expansion.
| reference_expansion | The reference expansion to set the type of. |
| type | The type to assign the reference expansion. |
| void cmSetScriptWarningConfig | ( | struct cmScriptContext * | script_context, |
| const struct cmWarningConfig * | warning_config | ||
| ) |
Assigns the warning configuration to the script.
| script_context | The script context to set the warning configuration for. |
| warning_config | The warning configuration to assign. |
| int CM_WARN_UNUSED_RESULT cmSetSymbolKey | ( | struct cmSymbol * | symbol, |
| const char * | key | ||
| ) |
Assigns the key of the symbol.
| symbol | The symbol to set the key of. |
| key | The key to give the symbol. |
| void cmSetTokenContent | ( | struct cmToken * | token, |
| const char * | content, | ||
| size_t | size | ||
| ) |
Assigns the content to the token.
| token | The token to assign the content to. |
| content | The content to assign. |
| size | The size of the content to assign. This is truncated to fit, based on the size in cmNewToken or cmResizeToken. |
| void cmSetTokenPosition | ( | struct cmToken * | token, |
| const struct cmPosition * | position | ||
| ) |
Assigns the token position.
| token | The token to assign the position of. |
| position | The position to assign the token. |
| void cmSetTokenType | ( | struct cmToken * | token, |
| enum cmTokenType | type | ||
| ) |
Assigns the type of the token.
| token | The token to assign the size of. |
| type | The type to give the token. |
| void cmSetWarningOption | ( | struct cmEngine * | engine, |
| const struct cmWarningOption * | warning_option | ||
| ) |
Sets a warning option.
| engine | The engine to set the warning option for. |
| warning_option | The warning option to assign. |
| char* cmStrdupFromHost | ( | struct cmHost * | host, |
| const char * | str | ||
| ) |
Creates a dynamically allocated copy of a string, using the memory allocating functions provided by the host interface.
| host | The host containing the memory allocation functions. |
| str | The string to copy. |
| char** cmStringListToArgv | ( | struct cmStringList * | string_list | ) |
Returns a compatible function to argv-like parsers.
| string_list | The string list to get the argv-like pointer to. |
| cmBool cmSymbolTableHasParentScope | ( | const struct cmSymbolTable * | symbol_table | ) |
| void cmTestCache | ( | struct cmTestDriver * | test_driver | ) |
Tests to ensure that the cache is working as expected.
| test_driver | The test driver to report failures to. |
| void cmTestExpansionEvaluator | ( | struct cmTestDriver * | test_driver | ) |
Tests for correct functionality of the expansion evaluator.
| test_driver | The test driver to report failures to. |
| void cmTestGetExtensionOf | ( | struct cmTestDriver * | test_driver | ) |
Tests to ensure that cmGetExtensionOf is working as expected.
| test_driver | The test driver to report failures with. |
| int CM_WARN_UNUSED_RESULT cmVariableToSymbol | ( | const char * | value, |
| struct cmSymbol * | symbol | ||
| ) |
Converts a variable to a symbol structure. This can be used to add a new variable to a symbol table.
| value | The value to give the variable. |
| symbol | The symbol structure to put the variable into. |
| void cmVisitLiteralExpansion | ( | struct cmExpansionVisitor * | expansion_visitor, |
| const struct cmLiteralExpansion * | literal_expansion | ||
| ) |
Visits a literal expansion.
| expansion_visitor | The visitor to visit the literal expansion. |
| literal_expansion | The literal expansion to visit. |
| void cmVisitReferenceExpansion | ( | struct cmExpansionVisitor * | expansion_visitor, |
| const struct cmReferenceExpansion * | reference_expansion | ||
| ) |
Visits a reference expansion.
| expansion_visitor | The expansion visitor to visit the reference expansion. |
| reference_expansion | The reference expansion to visit. |
| void cmVisitSeparatorExpansion | ( | struct cmExpansionVisitor * | expansion_visitor, |
| const struct cmSeparatorExpansion * | separator_expansion | ||
| ) |
Visits a separator expansion. A separator expansion is a pseudo expansion, it doesn't actually contain any data. It represents the space or semicolon between two arguments.
| expansion_visitor | The visitor to give the expansion to. |
| separator_expansion | The separator expansion to pass to the visitor. This can be a null pointer, since the separator expansion isn't a defined structure. |
| const struct cmBuiltinFunction builtin_function_table[] |
Contains the names and initialization functions of all builtin functions.
1.8.12