Skip to content

Commit

Permalink
include: cleanup whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
vbmithr committed Mar 11, 2018
1 parent 36bdae3 commit 9286e25
Show file tree
Hide file tree
Showing 4 changed files with 559 additions and 561 deletions.
19 changes: 9 additions & 10 deletions include/ta_abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ extern "C" {
* well within Perl... see the project SWIG if you are
* interested by such things.
*
* The abstract interface is used within TA-Lib to perform at least
* The abstract interface is used within TA-Lib to perform at least
* the following:
* - used by gen_code to generate all the glue code.
* - used by the Excel interface to call all the TA functions.
Expand Down Expand Up @@ -140,7 +140,7 @@ TA_RetCode TA_GroupTableFree ( TA_StringTable *table );
* TA_FuncTableFree( table );
* }
*/
TA_RetCode TA_FuncTableAlloc( const char *group, TA_StringTable **table );
TA_RetCode TA_FuncTableAlloc( const char *group, TA_StringTable **table );
TA_RetCode TA_FuncTableFree ( TA_StringTable *table );

/* Using the name, you can obtain an handle unique to this function.
Expand Down Expand Up @@ -180,7 +180,7 @@ TA_RetCode TA_GetFuncHandle( const char *name,
typedef int TA_FuncFlags;
#define TA_FUNC_FLG_OVERLAP 0x01000000 /* Output scale same as input data. */
#define TA_FUNC_FLG_VOLUME 0x04000000 /* Output shall be over the volume data. */
#define TA_FUNC_FLG_UNST_PER 0x08000000 /* Indicate if this function have an unstable
#define TA_FUNC_FLG_UNST_PER 0x08000000 /* Indicate if this function have an unstable
* initial period. Some additional code exist
* for these functions for allowing to set that
* unstable period. See Documentation.
Expand Down Expand Up @@ -316,7 +316,7 @@ typedef enum
TA_Output_Integer
} TA_OutputParameterType;

/* When the input is a TA_Input_Price, the following
/* When the input is a TA_Input_Price, the following
* TA_InputFlags indicates the required components.
* These can be combined for functions requiring more
* than one component.
Expand Down Expand Up @@ -353,7 +353,7 @@ typedef int TA_OptInputFlags;
#define TA_OPTIN_IS_DEGREE 0x00200000 /* Input is a degree (0-360). */
#define TA_OPTIN_IS_CURRENCY 0x00400000 /* Input is a currency. */
#define TA_OPTIN_ADVANCED 0x01000000


/* The following are flags giving hint on what
* could be done with the output.
Expand Down Expand Up @@ -469,14 +469,14 @@ typedef struct TA_ParamHolder
{
/* Implementation is hidden. */
void *hiddenData;
} TA_ParamHolder;
} TA_ParamHolder;

TA_RetCode TA_ParamHolderAlloc( const TA_FuncHandle *handle,
TA_ParamHolder **allocatedParams );

TA_RetCode TA_ParamHolderFree( TA_ParamHolder *params );

/* Setup the values of the data input parameters.
/* Setup the values of the data input parameters.
*
* paramIndex is zero for the first input.
*/
Expand Down Expand Up @@ -526,15 +526,15 @@ TA_RetCode TA_SetOutputParamRealPtr( TA_ParamHolder *params,
unsigned int paramIndex,
TA_Real *out );

/* Once the optional parameter are set, it is possible to
/* Once the optional parameter are set, it is possible to
* get the lookback for this call. This information can be
* used to calculate the optimal size for the output buffers.
* (See the documentation for method to calculate the output size).
*/
TA_RetCode TA_GetLookback( const TA_ParamHolder *params,
TA_Integer *lookback );

/* Finally, call the TA function with the parameters.
/* Finally, call the TA function with the parameters.
*
* The TA function who is going to be called was specified
* when the TA_ParamHolderAlloc was done.
Expand All @@ -556,4 +556,3 @@ const char *TA_FunctionDescriptionXML( void );
#endif

#endif

14 changes: 7 additions & 7 deletions include/ta_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#define TA_COMMON_H

/* The following macros are used to return internal errors.
* The Id can be from 1 to 999 and translate to the user
* The Id can be from 1 to 999 and translate to the user
* as the return code 5000 to 5999.
*
* Everytime you wish to add a new fatal error code,
Expand All @@ -60,11 +60,11 @@ extern "C" {
/* Some functions to get the version of TA-Lib.
*
* Format is "Major.Minor.Patch (Month Day Year Hour:Min:Sec)"
*
*
* Example: "1.2.0 (Jan 17 2004 23:59:59)"
*
* Major increments indicates an "Highly Recommended" update.
*
*
* Minor increments indicates arbitrary milestones in the
* development of the next major version.
*
Expand All @@ -84,7 +84,7 @@ const char *TA_GetVersionTime ( void );
typedef double TA_Real;
typedef int TA_Integer;

/* General purpose structure containing an array of string.
/* General purpose structure containing an array of string.
*
* Example of usage:
* void printStringTable( TA_StringTable *table )
Expand All @@ -103,7 +103,7 @@ typedef struct TA_StringTable
/* Hidden data for internal use by TA-Lib. Do not modify. */
void *hiddenData;
} TA_StringTable;
/* End-user can get additional information related to a TA_RetCode.
/* End-user can get additional information related to a TA_RetCode.
*
* Example:
* TA_RetCodeInfo info;
Expand All @@ -125,12 +125,12 @@ typedef struct TA_StringTable
typedef struct TA_RetCodeInfo
{
const char *enumStr; /* Like "TA_IP_SOCKETERROR" */
const char *infoStr; /* Like "Error creating socket" */
const char *infoStr; /* Like "Error creating socket" */
} TA_RetCodeInfo;

/* Info is always returned, even when 'theRetCode' is invalid. */
void TA_SetRetCodeInfo( TA_RetCode theRetCode, TA_RetCodeInfo *retCodeInfo );

/* TA_Initialize() initialize the ressources used by TA-Lib. This
* function must be called once prior to any other functions declared in
* this file.
Expand Down
26 changes: 13 additions & 13 deletions include/ta_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
***/
#ifndef FD_DEFS_H
#if defined( _MANAGED )
/* Int32, UInt32, Int64 and UInt64 are built-in for .NET */
/* Int32, UInt32, Int64 and UInt64 are built-in for .NET */
#define INT_MIN (Int32::MinValue)
#define INT_MAX (Int32::MaxValue)
#elif defined( _JAVA )
Expand All @@ -55,7 +55,7 @@
#include <limits.h>

/* Identify if 64 bits platform with __64BIT__.
* Can also be done from compiler command line.
* Can also be done from compiler command line.
*/
#if defined(_WIN64)
#define __64BIT__ 1
Expand All @@ -72,8 +72,8 @@
||defined(__s390x__)\
||defined(__x86_64__)
#define __64BIT__ 1
#endif
#endif

#if !defined(__MACTYPES__)
typedef signed int Int32;
typedef unsigned int UInt32;
Expand Down Expand Up @@ -108,12 +108,12 @@
#define CMJ(c,managed,java) managed

/* Enumeration abstraction */
#define ENUM_BEGIN(w) enum class w {
#define ENUM_BEGIN(w) enum class w {
#define ENUM_DEFINE(x,y) y
#define ENUM_VALUE(w,x,y) (w::y)
#define ENUM_CASE(w,x,y) (w::y)
#define ENUM_DECLARATION(w) w
#define ENUM_END(w) };
#define ENUM_END(w) };

/* Structure abstraction */
#define STRUCT_BEGIN(x) struct x {
Expand Down Expand Up @@ -213,7 +213,7 @@
#define TA_INTEGER_MIN (INT_MIN+1)
#define TA_INTEGER_MAX (INT_MAX)

/* min/max value for a TA_Real
/* min/max value for a TA_Real
*
* Use fix value making sense in the
* context of TA-Lib (avoid to use DBL_MIN
Expand All @@ -223,15 +223,15 @@
#define TA_REAL_MIN (-3e+37)
#define TA_REAL_MAX (3e+37)

/* A value outside of the min/max range
/* A value outside of the min/max range
* indicates an undefined or default value.
*/
#define TA_INTEGER_DEFAULT (INT_MIN)
#define TA_REAL_DEFAULT (-4e+37)

/* Part of this file is generated by gen_code */

ENUM_BEGIN( RetCode )
ENUM_BEGIN( RetCode )
/* 0 */ ENUM_DEFINE( TA_SUCCESS, Success ), /* No error */
/* 1 */ ENUM_DEFINE( TA_LIB_NOT_INITIALIZE, LibNotInitialize ), /* TA_Initialize was not sucessfully called */
/* 2 */ ENUM_DEFINE( TA_BAD_PARAM, BadParam ), /* A parameter is out of range */
Expand All @@ -253,7 +253,7 @@ ENUM_BEGIN( RetCode )
/* 0xFFFF */ ENUM_DEFINE( TA_UNKNOWN_ERR, UnknownErr ) = 0xFFFF
ENUM_END( RetCode )

ENUM_BEGIN( Compatibility )
ENUM_BEGIN( Compatibility )
ENUM_DEFINE( TA_COMPATIBILITY_DEFAULT, Default ),
ENUM_DEFINE( TA_COMPATIBILITY_METASTOCK, Metastock )
ENUM_END( Compatibility )
Expand All @@ -272,7 +272,7 @@ ENUM_END( MAType )


/**** START GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/
/* Generated */
/* Generated */
/* Generated */ ENUM_BEGIN( FuncUnstId )
/* Generated */ /* 000 */ ENUM_DEFINE( TA_FUNC_UNST_ADX, Adx),
/* Generated */ /* 001 */ ENUM_DEFINE( TA_FUNC_UNST_ADXR, Adxr),
Expand Down Expand Up @@ -301,10 +301,10 @@ ENUM_END( MAType )
/* Generated */ ENUM_DEFINE( TA_FUNC_UNST_ALL, FuncUnstAll),
/* Generated */ ENUM_DEFINE( TA_FUNC_UNST_NONE, FuncUnstNone) = -1
/* Generated */ ENUM_END( FuncUnstId )
/* Generated */
/* Generated */
/**** END GENCODE SECTION 1 - DO NOT DELETE THIS LINE ****/

/* The TA_RangeType enum specifies the types of range that can be considered
/* The TA_RangeType enum specifies the types of range that can be considered
* when to compare a part of a candle to other candles
*/

Expand Down
Loading

0 comments on commit 9286e25

Please sign in to comment.