diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-03-10 18:06:26 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-03-10 18:06:26 (GMT) |
commit | 634343c3e8c395318d4b6d9e90d97f2a59ec3ae7 (patch) | |
tree | c057576ccfa77d9f6dea07215f4ea3d9de1eb3d5 /Source/cmCPluginAPI.h | |
parent | f01afc89f50e68af3f652437dc350d181fd097b7 (diff) | |
download | CMake-634343c3e8c395318d4b6d9e90d97f2a59ec3ae7.zip CMake-634343c3e8c395318d4b6d9e90d97f2a59ec3ae7.tar.gz CMake-634343c3e8c395318d4b6d9e90d97f2a59ec3ae7.tar.bz2 |
STYLE: Fix some style issues
Diffstat (limited to 'Source/cmCPluginAPI.h')
-rw-r--r-- | Source/cmCPluginAPI.h | 78 |
1 files changed, 41 insertions, 37 deletions
diff --git a/Source/cmCPluginAPI.h b/Source/cmCPluginAPI.h index 2910028..76dbe4c 100644 --- a/Source/cmCPluginAPI.h +++ b/Source/cmCPluginAPI.h @@ -9,18 +9,18 @@ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ /* This header file defines the API that loadable commands can use. In many - of these commands C++ instances of cmMakefile of cmSourceFile are passed - in as arguments or returned. In these cases they are passed as a void * - argument. In the function prototypes mf is used to represent a makefile - and sf is used to represent a source file. The functions are grouped - loosely into four groups 1) Utility 2) cmMakefile 3) cmSourceFile 4) - cmSystemTools. Within each grouping functions are listed alphabetically */ + of these commands C++ instances of cmMakefile of cmSourceFile are passed + in as arguments or returned. In these cases they are passed as a void * + argument. In the function prototypes mf is used to represent a makefile + and sf is used to represent a source file. The functions are grouped + loosely into four groups 1) Utility 2) cmMakefile 3) cmSourceFile 4) + cmSystemTools. Within each grouping functions are listed alphabetically */ /*=========================================================================*/ #ifndef cmCPluginAPI_h #define cmCPluginAPI_h @@ -42,7 +42,7 @@ this is the structure of function entry points that a plugin may call. This structure must be kept in sync with the static decaled at the bottom of cmCPLuginAPI.cxx =========================================================================*/ -typedef struct +typedef struct { /*========================================================================= Here we define the set of functions that a plugin may call. The first goup @@ -62,14 +62,14 @@ typedef struct void (CCONV *SetClientData) (void *info, void *cd); /* when an error occurs, call this function to set the error string */ void (CCONV *SetError) (void *info, const char *err); - + /*========================================================================= The following functions all directly map to methods in the cmMakefile class. See cmMakefile.h for descriptions of what each method does. All of these methods take the void * makefile pointer as their first argument. =========================================================================*/ - void (CCONV *AddCacheDefinition) (void *mf, const char* name, - const char* value, + void (CCONV *AddCacheDefinition) (void *mf, const char* name, + const char* value, const char* doc, int cachetype); void (CCONV *AddCustomCommand) (void *mf, const char* source, const char* command, @@ -78,26 +78,28 @@ typedef struct int numOutputs, const char **outputs, const char *target); void (CCONV *AddDefineFlag) (void *mf, const char* definition); - void (CCONV *AddDefinition) (void *mf, const char* name, const char* value); - void (CCONV *AddExecutable) (void *mf, const char *exename, + void (CCONV *AddDefinition) (void *mf, const char* name, + const char* value); + void (CCONV *AddExecutable) (void *mf, const char *exename, int numSrcs, const char **srcs, int win32); - void (CCONV *AddLibrary) (void *mf, const char *libname, + void (CCONV *AddLibrary) (void *mf, const char *libname, int shared, int numSrcs, const char **srcs); - void (CCONV *AddLinkDirectoryForTarget) (void *mf, const char *tgt, + void (CCONV *AddLinkDirectoryForTarget) (void *mf, const char *tgt, const char* d); - void (CCONV *AddLinkLibraryForTarget) (void *mf, const char *tgt, + void (CCONV *AddLinkLibraryForTarget) (void *mf, const char *tgt, const char *libname, int libtype); void (CCONV *AddUtilityCommand) (void *mf, const char* utilityName, const char *command, const char *arguments, int all, int numDepends, const char **depends, int numOutputs, const char **outputs); int (CCONV *CommandExists) (void *mf, const char* name); - int (CCONV *ExecuteCommand) (void *mf, const char *name, + int (CCONV *ExecuteCommand) (void *mf, const char *name, int numArgs, const char **args); - void (CCONV *ExpandSourceListArguments) (void *mf,int argc, const char **argv, + void (CCONV *ExpandSourceListArguments) (void *mf,int argc, + const char **argv, int *resArgc, char ***resArgv, unsigned int startArgumentIndex); - char *(CCONV *ExpandVariablesInString) (void *mf, const char *source, + char *(CCONV *ExpandVariablesInString) (void *mf, const char *source, int escapeQuotes, int atOnly); unsigned int (CCONV *GetCacheMajorVersion) (void *mf); unsigned int (CCONV *GetCacheMinorVersion) (void *mf); @@ -112,14 +114,14 @@ typedef struct const char* (CCONV *GetStartDirectory) (void *mf); const char* (CCONV *GetStartOutputDirectory) (void *mf); int (CCONV *IsOn) (void *mf, const char* name); - - + + /*========================================================================= The following functions are designed to operate or manipulate cmSourceFiles. Please see cmSourceFile.h for additional information on many of these methods. Some of these methods are in cmMakefile.h. =========================================================================*/ - void *(CCONV *AddSource) (void *mf, void *sf); + void *(CCONV *AddSource) (void *mf, void *sf); void *(CCONV *CreateSourceFile) (); void (CCONV *DestroySourceFile) (void *sf); void *(CCONV *GetSource) (void *mf, const char* sourceName); @@ -128,17 +130,19 @@ typedef struct int (CCONV *SourceFileGetPropertyAsBool) (void *sf, const char *prop); const char *(CCONV *SourceFileGetSourceName) (void *sf); const char *(CCONV *SourceFileGetFullPath) (void *sf); - void (CCONV *SourceFileSetName) (void *sf, const char* name, const char* dir, + void (CCONV *SourceFileSetName) (void *sf, const char* name, + const char* dir, int numSourceExtensions, const char **sourceExtensions, int numHeaderExtensions, const char **headerExtensions); - void (CCONV *SourceFileSetName2) (void *sf, const char* name, const char* dir, + void (CCONV *SourceFileSetName2) (void *sf, const char* name, + const char* dir, const char *ext, int headerFileOnly); void (CCONV *SourceFileSetProperty) (void *sf, const char *prop, const char *value); - - + + /*========================================================================= The following methods are from cmSystemTools.h see that file for specific documentation on each method. @@ -149,7 +153,7 @@ typedef struct char *(CCONV *GetFilenamePath)(const char *); void (CCONV *RemoveFile)(const char *f1); void (CCONV *Free)(void *); - + /*========================================================================= The following are new functions added after 1.6 =========================================================================*/ @@ -162,21 +166,21 @@ typedef struct const char* command, int numArgs, const char **args, int commandType); - + /* display status information */ void (CCONV *DisplaySatus) (void *info, const char *message); - /* this is the end of the C function stub API structure */ + /* this is the end of the C function stub API structure */ } cmCAPI; - + /*========================================================================= CM_PLUGIN_EXPORT should be used by plugins =========================================================================*/ #ifdef _WIN32 #define CM_PLUGIN_EXPORT __declspec( dllexport ) #else -#define CM_PLUGIN_EXPORT +#define CM_PLUGIN_EXPORT #endif /*========================================================================= @@ -203,16 +207,16 @@ define the different types of custom commands for a target #define CM_PRE_BUILD 0 #define CM_PRE_LINK 1 #define CM_POST_BUILD 2 - + /*========================================================================= Finally we define the key data structures and function prototypes =========================================================================*/ typedef const char* (CCONV *CM_DOC_FUNCTION)(); - typedef int (CCONV *CM_INITIAL_PASS_FUNCTION)(void *info, void *mf, + typedef int (CCONV *CM_INITIAL_PASS_FUNCTION)(void *info, void *mf, int argc, char *[]); typedef void (CCONV *CM_FINAL_PASS_FUNCTION)(void *info, void *mf); typedef void (CCONV *CM_DESTRUCTOR_FUNCTION)(void *info); - + typedef struct { unsigned long reserved1; /* Reserved for future use. DO NOT USE. */ unsigned long reserved2; /* Reserved for future use. DO NOT USE. */ @@ -222,14 +226,14 @@ Finally we define the key data structures and function prototypes CM_FINAL_PASS_FUNCTION FinalPass; CM_DESTRUCTOR_FUNCTION Destructor; CM_DOC_FUNCTION GetTerseDocumentation; - CM_DOC_FUNCTION GetFullDocumentation; + CM_DOC_FUNCTION GetFullDocumentation; const char *Name; char *Error; void *ClientData; } cmLoadedCommandInfo; typedef void (CCONV *CM_INIT_FUNCTION)(cmLoadedCommandInfo *); - + #ifdef __cplusplus } #endif |