whitespace cleanup in VMD plugin headers

This commit is contained in:
Axel Kohlmeyer
2017-04-18 11:46:19 -04:00
parent 8d390100e0
commit 25e8ed63a2
2 changed files with 132 additions and 132 deletions

View File

@ -17,20 +17,20 @@
/** @file
* This header must be included by every VMD plugin library. It defines the
* API for every plugin so that VMD can organize the plugins it finds.
* API for every plugin so that VMD can organize the plugins it finds.
*/
#ifndef VMD_PLUGIN_H
#define VMD_PLUGIN_H
/*
/*
* Preprocessor tricks to make it easier for us to redefine the names of
* functions when building static plugins.
*/
#if !defined(VMDPLUGIN)
/**
* macro defining VMDPLUGIN if it hasn't already been set to the name of
/**
* macro defining VMDPLUGIN if it hasn't already been set to the name of
* a static plugin that is being compiled. This is the catch-all case.
*/
#define VMDPLUGIN vmdplugin
@ -38,11 +38,11 @@
/** concatenation macro, joins args x and y together as a single string */
#define xcat(x, y) cat(x, y)
/** concatenation macro, joins args x and y together as a single string */
#define cat(x, y) x ## y
#define cat(x, y) x ## y
/*
* macros to correctly define plugin function names depending on whether
* the plugin is being compiled for static linkage or dynamic loading.
* macros to correctly define plugin function names depending on whether
* the plugin is being compiled for static linkage or dynamic loading.
* When compiled for static linkage, each plugin needs to have unique
* function names for all of its entry points. When compiled for dynamic
* loading, the plugins must name their entry points consistently so that
@ -59,13 +59,13 @@
/** "WIN32" is defined on both WIN32 and WIN64 platforms... */
#if (defined(WIN32))
#if (defined(WIN32))
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if !defined(STATIC_PLUGIN)
#if defined(VMDPLUGIN_EXPORTS)
/**
/**
* Only define DllMain for plugins, not in VMD or in statically linked plugins
* VMDPLUGIN_EXPORTS is only defined when compiling dynamically loaded plugins
*/
@ -86,7 +86,7 @@ BOOL APIENTRY DllMain( HANDLE hModule,
#endif /* ! STATIC_PLUGIN */
#else
/** If we're not compiling on Windows, then this macro is defined empty */
#define VMDPLUGIN_API
#define VMDPLUGIN_API
#endif
/** define plugin linkage correctly for both C and C++ based plugins */
@ -96,13 +96,13 @@ BOOL APIENTRY DllMain( HANDLE hModule,
#define VMDPLUGIN_EXTERN extern VMDPLUGIN_API
#endif /* __cplusplus */
/*
* Plugin API functions start here
/*
* Plugin API functions start here
*/
/**
* Init routine: called the first time the library is loaded by the
/**
* Init routine: called the first time the library is loaded by the
* application and before any other API functions are referenced.
* Return 0 on success.
*/
@ -110,15 +110,15 @@ VMDPLUGIN_EXTERN int VMDPLUGIN_init(void);
/**
* Macro for creating a struct header used in all plugin structures.
*
* This header should be placed at the top of every plugin API definition
*
* This header should be placed at the top of every plugin API definition
* so that it can be treated as a subtype of the base plugin type.
*
* abiversion: Defines the ABI for the base plugin type (not for other plugins)
* type: A string descriptor of the plugin type.
* name: A name for the plugin.
* author: A string identifier, possibly including newlines.
* Major and minor version.
* Major and minor version.
* is_reentrant: Whether this library can be run concurrently with itself.
*/
#define vmdplugin_HEAD \
@ -129,12 +129,12 @@ VMDPLUGIN_EXTERN int VMDPLUGIN_init(void);
const char *author; \
int majorv; \
int minorv; \
int is_reentrant;
int is_reentrant;
/**
/**
* Typedef for generic plugin header, individual plugins can
* make their own structures as long as the header info remains
* the same as the generic plugin header, most easily done by
* make their own structures as long as the header info remains
* the same as the generic plugin header, most easily done by
* using the vmdplugin_HEAD macro.
*/
typedef struct {
@ -158,7 +158,7 @@ typedef struct {
#define VMDPLUGIN_ERROR -1
/*@}*/
/**
/**
* Function pointer typedef for register callback functions
*/
typedef int (*vmdplugin_register_cb)(void *, vmdplugin_t *);
@ -175,16 +175,16 @@ typedef int (*vmdplugin_register_cb)(void *, vmdplugin_t *);
VMDPLUGIN_EXTERN int VMDPLUGIN_register(void *, vmdplugin_register_cb);
/**
* Allow the library to register Tcl extensions.
* Allow the library to register Tcl extensions.
* This API is optional; if found by dlopen, it will be called after first
* calling init and register.
* calling init and register.
*/
VMDPLUGIN_EXTERN int VMDPLUGIN_register_tcl(void *, void *tcl_interp,
VMDPLUGIN_EXTERN int VMDPLUGIN_register_tcl(void *, void *tcl_interp,
vmdplugin_register_cb);
/**
* The Fini method is called when the application will no longer use
* any plugins in the library.
* The Fini method is called when the application will no longer use
* any plugins in the library.
*/
VMDPLUGIN_EXTERN int VMDPLUGIN_fini(void);