include file cleanup

added semicolons where needed
replaced taglists with 'any' tag
added braces to one-line stocks

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40821
This commit is contained in:
David Anderson 2007-05-19 21:21:55 +00:00
parent 86344c06af
commit a55400b0ac
4 changed files with 61 additions and 9 deletions

View File

@ -33,7 +33,7 @@ enum ConVarBounds
enum QueryCookie enum QueryCookie
{ {
QUERYCOOKIE_FAILED = 0, QUERYCOOKIE_FAILED = 0,
} };
/** /**
* Console variable query result values. * Console variable query result values.

View File

@ -43,7 +43,7 @@ enum Action
Plugin_Continue = 0, /**< Continue with the original action */ Plugin_Continue = 0, /**< Continue with the original action */
Plugin_Handled = 3, /**< Handle the action at the end (don't call it) */ Plugin_Handled = 3, /**< Handle the action at the end (don't call it) */
Plugin_Stop = 4, /**< Immediately stop the hook chain and handle the original */ Plugin_Stop = 4, /**< Immediately stop the hook chain and handle the original */
} };
public PlVers:__version = public PlVers:__version =
{ {

View File

@ -212,83 +212,135 @@ native Float:operator+(Float:oper1, Float:oper2) = FloatAdd;
native Float:operator-(Float:oper1, Float:oper2) = FloatSub; native Float:operator-(Float:oper1, Float:oper2) = FloatSub;
stock Float:operator++(Float:oper) stock Float:operator++(Float:oper)
{
return oper+1.0; return oper+1.0;
}
stock Float:operator--(Float:oper) stock Float:operator--(Float:oper)
{
return oper-1.0; return oper-1.0;
}
stock Float:operator-(Float:oper) stock Float:operator-(Float:oper)
{
return oper^Float:((-1)^((-1)/2)); /* IEEE values are sign/magnitude */ return oper^Float:((-1)^((-1)/2)); /* IEEE values are sign/magnitude */
}
stock Float:operator*(Float:oper1, oper2) stock Float:operator*(Float:oper1, oper2)
{
return FloatMul(oper1, float(oper2)); /* "*" is commutative */ return FloatMul(oper1, float(oper2)); /* "*" is commutative */
}
stock Float:operator/(Float:oper1, oper2) stock Float:operator/(Float:oper1, oper2)
{
return FloatDiv(oper1, float(oper2)); return FloatDiv(oper1, float(oper2));
}
stock Float:operator/(oper1, Float:oper2) stock Float:operator/(oper1, Float:oper2)
{
return FloatDiv(float(oper1), oper2); return FloatDiv(float(oper1), oper2);
}
stock Float:operator+(Float:oper1, oper2) stock Float:operator+(Float:oper1, oper2)
{
return FloatAdd(oper1, float(oper2)); /* "+" is commutative */ return FloatAdd(oper1, float(oper2)); /* "+" is commutative */
}
stock Float:operator-(Float:oper1, oper2) stock Float:operator-(Float:oper1, oper2)
{
return FloatSub(oper1, float(oper2)); return FloatSub(oper1, float(oper2));
}
stock Float:operator-(oper1, Float:oper2) stock Float:operator-(oper1, Float:oper2)
{
return FloatSub(float(oper1), oper2); return FloatSub(float(oper1), oper2);
}
stock bool:operator==(Float:oper1, Float:oper2) stock bool:operator==(Float:oper1, Float:oper2)
{
return FloatCompare(oper1, oper2) == 0; return FloatCompare(oper1, oper2) == 0;
}
stock bool:operator==(Float:oper1, oper2) stock bool:operator==(Float:oper1, oper2)
{
return FloatCompare(oper1, float(oper2)) == 0; /* "==" is commutative */ return FloatCompare(oper1, float(oper2)) == 0; /* "==" is commutative */
}
stock bool:operator!=(Float:oper1, Float:oper2) stock bool:operator!=(Float:oper1, Float:oper2)
{
return FloatCompare(oper1, oper2) != 0; return FloatCompare(oper1, oper2) != 0;
}
stock bool:operator!=(Float:oper1, oper2) stock bool:operator!=(Float:oper1, oper2)
{
return FloatCompare(oper1, float(oper2)) != 0; /* "==" is commutative */ return FloatCompare(oper1, float(oper2)) != 0; /* "==" is commutative */
}
stock bool:operator>(Float:oper1, Float:oper2) stock bool:operator>(Float:oper1, Float:oper2)
{
return FloatCompare(oper1, oper2) > 0; return FloatCompare(oper1, oper2) > 0;
}
stock bool:operator>(Float:oper1, oper2) stock bool:operator>(Float:oper1, oper2)
{
return FloatCompare(oper1, float(oper2)) > 0; return FloatCompare(oper1, float(oper2)) > 0;
}
stock bool:operator>(oper1, Float:oper2) stock bool:operator>(oper1, Float:oper2)
{
return FloatCompare(float(oper1), oper2) > 0; return FloatCompare(float(oper1), oper2) > 0;
}
stock bool:operator>=(Float:oper1, Float:oper2) stock bool:operator>=(Float:oper1, Float:oper2)
{
return FloatCompare(oper1, oper2) >= 0; return FloatCompare(oper1, oper2) >= 0;
}
stock bool:operator>=(Float:oper1, oper2) stock bool:operator>=(Float:oper1, oper2)
{
return FloatCompare(oper1, float(oper2)) >= 0; return FloatCompare(oper1, float(oper2)) >= 0;
}
stock bool:operator>=(oper1, Float:oper2) stock bool:operator>=(oper1, Float:oper2)
{
return FloatCompare(float(oper1), oper2) >= 0; return FloatCompare(float(oper1), oper2) >= 0;
}
stock bool:operator<(Float:oper1, Float:oper2) stock bool:operator<(Float:oper1, Float:oper2)
{
return FloatCompare(oper1, oper2) < 0; return FloatCompare(oper1, oper2) < 0;
}
stock bool:operator<(Float:oper1, oper2) stock bool:operator<(Float:oper1, oper2)
{
return FloatCompare(oper1, float(oper2)) < 0; return FloatCompare(oper1, float(oper2)) < 0;
}
stock bool:operator<(oper1, Float:oper2) stock bool:operator<(oper1, Float:oper2)
{
return FloatCompare(float(oper1), oper2) < 0; return FloatCompare(float(oper1), oper2) < 0;
}
stock bool:operator<=(Float:oper1, Float:oper2) stock bool:operator<=(Float:oper1, Float:oper2)
{
return FloatCompare(oper1, oper2) <= 0; return FloatCompare(oper1, oper2) <= 0;
}
stock bool:operator<=(Float:oper1, oper2) stock bool:operator<=(Float:oper1, oper2)
{
return FloatCompare(oper1, float(oper2)) <= 0; return FloatCompare(oper1, float(oper2)) <= 0;
}
stock bool:operator<=(oper1, Float:oper2) stock bool:operator<=(oper1, Float:oper2)
{
return FloatCompare(float(oper1), oper2) <= 0; return FloatCompare(float(oper1), oper2) <= 0;
}
stock bool:operator!(Float:oper) stock bool:operator!(Float:oper)
{
return (_:oper & ((-1)/2)) == 0; /* -1 = all bits to 1; /2 = remove most significant bit (sign) return (_:oper & ((-1)/2)) == 0; /* -1 = all bits to 1; /2 = remove most significant bit (sign)
works on both 32bit and 64bit systems; no constant required */ works on both 32bit and 64bit systems; no constant required */
}
/** /**
* Forbidden operators. * Forbidden operators.

View File

@ -211,7 +211,7 @@ native Call_StartFunction(Handle:plugin, Function:func);
* @noreturn * @noreturn
* @error Called before a call has been started. * @error Called before a call has been started.
*/ */
native Call_PushCell({Handle,Function,_}:value); native Call_PushCell(any:value);
/** /**
* Pushes a cell by reference onto the current call. * Pushes a cell by reference onto the current call.
@ -222,7 +222,7 @@ native Call_PushCell({Handle,Function,_}:value);
* @noreturn * @noreturn
* @error Called before a call has been started. * @error Called before a call has been started.
*/ */
native Call_PushCellRef(&{Handle,Function,_}:value); native Call_PushCellRef(&any:value);
/** /**
@ -258,7 +258,7 @@ native Call_PushFloatRef(&Float:value);
* @noreturn * @noreturn
* @error Called before a call has been started. * @error Called before a call has been started.
*/ */
native Call_PushArray(const {Handle,Float,Function,_}:value[], size); native Call_PushArray(const any:value[], size);
/** /**
* Pushes an array onto the current call. * Pushes an array onto the current call.
@ -272,7 +272,7 @@ native Call_PushArray(const {Handle,Float,Function,_}:value[], size);
* @noreturn * @noreturn
* @error Called before a call has been started. * @error Called before a call has been started.
*/ */
native Call_PushArrayEx({Handle,Float,Function,_}:value[], size, cpflags); native Call_PushArrayEx(any:value[], size, cpflags);
/** /**
* Pushes a string onto the current call. * Pushes a string onto the current call.
@ -420,7 +420,7 @@ native GetNativeCellRef(param);
* @noreturn * @noreturn
* @error Invalid parameter number or calling from a non-native function. * @error Invalid parameter number or calling from a non-native function.
*/ */
native SetNativeCellRef(param, {Float,Function,Handle,_}:value); native SetNativeCellRef(param, any:value);
/** /**
* Gets an array from a native parameter (always by reference). * Gets an array from a native parameter (always by reference).
@ -431,7 +431,7 @@ native SetNativeCellRef(param, {Float,Function,Handle,_}:value);
* @return SP_ERROR_NONE on success, anything else on failure. * @return SP_ERROR_NONE on success, anything else on failure.
* @error Invalid parameter number or calling from a non-native function. * @error Invalid parameter number or calling from a non-native function.
*/ */
native GetNativeArray(param, {Float,Function,Handle,_}:local[], size); native GetNativeArray(param, any:local[], size);
/** /**
* Copies a local array into a native parameter array (always by reference). * Copies a local array into a native parameter array (always by reference).
@ -442,7 +442,7 @@ native GetNativeArray(param, {Float,Function,Handle,_}:local[], size);
* @return SP_ERROR_NONE on success, anything else on failure. * @return SP_ERROR_NONE on success, anything else on failure.
* @error Invalid parameter number or calling from a non-native function. * @error Invalid parameter number or calling from a non-native function.
*/ */
native SetNativeArray(param, const {Float,Function,Handle,_}:local[], size); native SetNativeArray(param, const any:local[], size);
/** /**
* Formats a string using parameters from a native. * Formats a string using parameters from a native.