|
spBase
|
マクロ定義 | |
| #define | SPB_CHECK_VERSION(version, revision, update) |
| #define | spLONG long |
| #define | spULONG unsigned long |
| #define | spDWORD spULONG |
| #define | spINT8 signed char |
| #define | spINT16 short |
| #define | spBYTE unsigned char |
| #define | spWORD unsigned short |
| #define | SP_TRUE 1 |
| #define | SP_FALSE 0 |
| #define | SP_TRUE_STRING "1" |
| #define | SP_FALSE_STRING "0" |
| #define | SP_SUCCESS 1 |
| #define | SP_FAILURE 0 |
| #define | SP_PATHLIST_SEPARATOR ':' |
| #define | spMax(a, b) ((a) > (b) ? (a) : (b)) |
| #define | spMin(a, b) ((a) < (b) ? (a) : (b)) |
| #define | spAbs(x) ((x) >= 0 ? (x) : -(x)) |
| #define | spCAbs(xr, xi) sqrt((double)(xr)*(double)(xr)+(double)(xi)*(double)(xi)) |
| #define | spCAbsf(xr, xi) sqrtf((float)((xr)*(xr)+(xi)*(xi))) |
| #define | spSquare(x) ((x) * (x)) |
| #define | spCSquare(xr, xi) ((xr)*(xr)+(xi)*(xi)) |
| #define | spPow2(p) (1 << (long)(p)) |
| #define | spArraySize(array) ((unsigned int)(sizeof(array) / sizeof(array[0]))) |
| #define | spStrEq(s1, s2) ((s1 != NULL) && (s2 != NULL) && (strcmp((s1), (s2)) == 0) ? 1 : 0) |
| #define | spStrNEq(s1, s2, n) ((s1 != NULL) && (s2 != NULL) && (strncmp((s1), (s2), n) == 0) ? 1 : 0) |
| #define | spStrVEq(s1, s2) ((s1 != NULL) && (s2 != NULL) && (strncmp((s1), (s2), strlen(s2)) == 0) ? 1 : 0) |
| #define | spStrNone(string) (((string) == NULL || *(string) == NUL) ? 1 : 0) |
| #define | spIsTrue(flag) ((flag) != SP_FALSE ? SP_TRUE : SP_FALSE) |
| #define | spIsFalse(flag) ((flag) == SP_FALSE ? SP_TRUE : SP_FALSE) |
| #define | spdBf(x) (20.0f * log10f((float)((x) <= 0.0f ? SP_TINY_NUMBER : (x)))) |
| #define | spdB(x) (20.0 * log10((double)((x) <= 0.0 ? SP_TINY_NUMBER : (x)))) |
| #define | spdBpowf(x) (10.0f * log10f((float)((x) <= 0.0f ? SP_TINY_NUMBER : (x)))) |
| #define | spdBpow(x) (10.0 * log10((double)((x) <= 0.0 ? SP_TINY_NUMBER : (x)))) |
| #define | spOffset(typep, field) ((int) (((char *) (&(((typep)0)->field))) - ((char *)0))) |
| #define | spOffsetOf(type, field) spOffset(type*, field) |
| #define | SP_NUL '\0' |
型定義 | |
| typedef int | spBool |
| #define SPB_CHECK_VERSION | ( | version, | |
| revision, | |||
| update ) |
spBaseのヘッダファイルにおけるバージョンが,指定したバージョン以上であるかをチェックします.
| [in] | version | バージョン番号を指定します. |
| [in] | revision | リビション番号を指定します. |
| [in] | update | アップデート番号を指定します. |
| #define spLONG long |
Native type whose size is the same as that of LONG on Windows.
| #define spULONG unsigned long |
Native type whose size is the same as that of ULONG on Windows.
| #define spDWORD spULONG |
Native type whose size is the same as that of DWORD on Windows.
| #define spINT8 signed char |
Native type whose size is the same as that of INT8 on Windows.
| #define spINT16 short |
Native type whose size is the same as that of INT16 on Windows.
| #define spBYTE unsigned char |
Native type whose size is the same as that of BYTE on Windows.
| #define spWORD unsigned short |
Native type whose size is the same as that of WORD on Windows.
| #define SP_TRUE 1 |
True for spBool.
| #define SP_FALSE 0 |
False for spBool.
| #define SP_TRUE_STRING "1" |
String representation of SP_TRUE .
| #define SP_SUCCESS 1 |
Status indicating success.
| #define SP_FAILURE 0 |
Status indicating failure.
| #define SP_PATHLIST_SEPARATOR ':' |
Separator for the path list string which is a string containing multiple paths. The separator is ';' on Windows and Mac, or ':' on others.
| #define spMax | ( | a, | |
| b ) ((a) > (b) ? (a) : (b)) |
The largest of a and b .
| #define spMin | ( | a, | |
| b ) ((a) < (b) ? (a) : (b)) |
The smallest of a and b .
| #define spAbs | ( | x | ) | ((x) >= 0 ? (x) : -(x)) |
The absolute value of x .
| #define spCAbs | ( | xr, | |
| xi ) sqrt((double)(xr)*(double)(xr)+(double)(xi)*(double)(xi)) |
The absolute value of the complex number.
| #define spCAbsf | ( | xr, | |
| xi ) sqrtf((float)((xr)*(xr)+(xi)*(xi))) |
The absolute value of the complex number for float type.
| #define spSquare | ( | x | ) | ((x) * (x)) |
The square of x .
| #define spCSquare | ( | xr, | |
| xi ) ((xr)*(xr)+(xi)*(xi)) |
The absolute square of the complex number.
| #define spPow2 | ( | p | ) | (1 << (long)(p)) |
2 to the p th power.
| #define spArraySize | ( | array | ) | ((unsigned int)(sizeof(array) / sizeof(array[0]))) |
Gets size of the array.
| #define spStrEq | ( | s1, | |
| s2 ) ((s1 != NULL) && (s2 != NULL) && (strcmp((s1), (s2)) == 0) ? 1 : 0) |
True if two strings are the same.
| #define spStrNEq | ( | s1, | |
| s2, | |||
| n ) ((s1 != NULL) && (s2 != NULL) && (strncmp((s1), (s2), n) == 0) ? 1 : 0) |
True if two strings until n the element are the same.
| #define spStrVEq | ( | s1, | |
| s2 ) ((s1 != NULL) && (s2 != NULL) && (strncmp((s1), (s2), strlen(s2)) == 0) ? 1 : 0) |
True if two strings until the length of s2 are the same.
| #define spStrNone | ( | string | ) | (((string) == NULL || *(string) == NUL) ? 1 : 0) |
The string has no data.
| #define spdBf | ( | x | ) | (20.0f * log10f((float)((x) <= 0.0f ? SP_TINY_NUMBER : (x)))) |
Decibel of amplitude x for float type.
| #define spdB | ( | x | ) | (20.0 * log10((double)((x) <= 0.0 ? SP_TINY_NUMBER : (x)))) |
Decibel of amplitude x .
| #define spdBpowf | ( | x | ) | (10.0f * log10f((float)((x) <= 0.0f ? SP_TINY_NUMBER : (x)))) |
Decibel of power x for float type.
| #define spdBpow | ( | x | ) | (10.0 * log10((double)((x) <= 0.0 ? SP_TINY_NUMBER : (x)))) |
Decibel of power x.
| #define spOffset | ( | typep, | |
| field ) ((int) (((char *) (&(((typep)0)->field))) - ((char *)0))) |
Returns the offset of the specified field member within the pointer to struct.
| #define spOffsetOf | ( | type, | |
| field ) spOffset(type*, field) |
Returns the offset of the specified field member within the struct.
| #define SP_NUL '\0' |
The null character.
| typedef int spBool |
Boolean for spLibs.