scilab: use a macro instead of 999 for error code
This commit is contained in:
parent
9b427cc2e0
commit
d89c2f15a0
20 changed files with 84 additions and 82 deletions
|
|
@ -17,12 +17,12 @@ SWIG_AsVal_dec(bool)(SwigSciObject iVar, bool *pbValue) {
|
|||
}
|
||||
|
||||
if (!isBooleanType(pvApiCtx, piAddrVar)) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A boolean expected.\n"), SWIG_Scilab_GetFname(), iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A boolean expected.\n"), SWIG_Scilab_GetFname(), iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
if (!isScalar(pvApiCtx, piAddrVar)) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A boolean expected.\n"), SWIG_Scilab_GetFname(), iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A boolean expected.\n"), SWIG_Scilab_GetFname(), iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +77,7 @@ SWIG_SciBoolean_AsBoolArrayAndSize(void *pvApiCtx, int iVar, int *iRows, int *iC
|
|||
(*pbValue)[i] = piValue[i] != 0;
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A boolean matrix expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A boolean matrix expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ SWIG_SciBoolean_AsIntArrayAndSize(void *pvApiCtx, int iVar, int *iRows, int *iCo
|
|||
}
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A boolean matrix expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A boolean matrix expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ SWIG_SciString_AsChar(void *pvApiCtx, int iVar, char *pcValue, char *fname) {
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iType != sci_strings) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A string expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ SWIG_SciString_AsChar(void *pvApiCtx, int iVar, char *pcValue, char *fname) {
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A string expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A string expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
*pcValue = pstStrings[0];
|
||||
|
|
|
|||
|
|
@ -18,12 +18,12 @@ SWIG_SciDouble_AsDouble(void *pvApiCtx, SwigSciObject iVar, double *pdblValue, c
|
|||
}
|
||||
|
||||
if (!isDoubleType(pvApiCtx, piAddrVar) || isVarComplex(pvApiCtx, piAddrVar)) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A real expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A real expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
if (!isScalar(pvApiCtx, piAddrVar)) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A real expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A real expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ SWIG_SciDouble_AsDoubleArrayAndSize(void *pvApiCtx, int iVar, int *iRows, int *i
|
|||
}
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A real matrix expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A real matrix expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ SWIG_SciDouble_AsFloatArrayAndSize(void *pvApiCtx, int iVar, int *iRows, int *iC
|
|||
return SWIG_OK;
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A real matrix expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A real matrix expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ SWIG_SciDoubleOrInt32_AsInt(void *pvApiCtx, SwigSciObject iVar, int *piValue, ch
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iPrec != SCI_INT32) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
sciErr = getMatrixOfInteger32(pvApiCtx, piAddrVar, &iRows, &iCols, &piData);
|
||||
|
|
@ -48,7 +48,7 @@ SWIG_SciDoubleOrInt32_AsInt(void *pvApiCtx, SwigSciObject iVar, int *piValue, ch
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
*piValue = *piData;
|
||||
|
|
@ -64,23 +64,23 @@ SWIG_SciDoubleOrInt32_AsInt(void *pvApiCtx, SwigSciObject iVar, int *piValue, ch
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
dValue = *pdData;
|
||||
if (dValue != floor(dValue)) {
|
||||
Scierror(999, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 32-bit signed integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 32-bit signed integer.\n"), fname, iVar);
|
||||
return SWIG_ValueError;
|
||||
}
|
||||
if ((dValue < INT_MIN) || (dValue > INT_MAX)) {
|
||||
Scierror(999, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 32-bit signed integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 32-bit signed integer.\n"), fname, iVar);
|
||||
return SWIG_OverflowError;
|
||||
}
|
||||
*piValue = (int) dValue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ SWIG_SciDoubleOrInt32_AsIntArrayAndSize(void *pvApiCtx, int iVar, int *iRows, in
|
|||
}
|
||||
if (iPrec != SCI_INT32)
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
sciErr = getMatrixOfInteger32(pvApiCtx, piAddrVar, iRows, iCols, piValue);
|
||||
|
|
@ -166,7 +166,7 @@ SWIG_SciDoubleOrInt32_AsIntArrayAndSize(void *pvApiCtx, int iVar, int *iRows, in
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
return SWIG_OK;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ SWIG_CheckScilabList(SwigSciObject obj)
|
|||
|
||||
if ((iType != sci_list) && (iType != sci_tlist) && (iType != sci_mlist))
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A list is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A list is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ SWIG_SciDoubleOrInt32_AsLong(void *pvApiCtx, SwigSciObject iVar, long *plValue,
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iPrec != SCI_INT32) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
sciErr = getMatrixOfInteger32(pvApiCtx, piAddrVar, &iRows, &iCols, &piData);
|
||||
|
|
@ -46,7 +46,7 @@ SWIG_SciDoubleOrInt32_AsLong(void *pvApiCtx, SwigSciObject iVar, long *plValue,
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
*plValue = (long) *piData;
|
||||
|
|
@ -61,22 +61,22 @@ SWIG_SciDoubleOrInt32_AsLong(void *pvApiCtx, SwigSciObject iVar, long *plValue,
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
dValue = *pdData;
|
||||
if (dValue != floor(dValue)) {
|
||||
Scierror(999, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 32-bit signed integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 32-bit signed integer.\n"), fname, iVar);
|
||||
return SWIG_ValueError;
|
||||
}
|
||||
if ((dValue < LONG_MIN) || (dValue > LONG_MAX)) {
|
||||
Scierror(999, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 32-bit signed integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 32-bit signed integer.\n"), fname, iVar);
|
||||
return SWIG_OverflowError;
|
||||
}
|
||||
*plValue = (long) dValue;
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
%fragment("SWIG_SciInt64_ToLongLong", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciInt64_ToLongLong(void *pvApiCtx, int iVar, long long *pllValue, char *fname) {
|
||||
Scierror(999, _("%s: Scilab 5.X does not manage '%s' data type.\n"), "SWIG_SciInt64_ToLongLong", "int64");
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Scilab 5.X does not manage '%s' data type.\n"), "SWIG_SciInt64_ToLongLong", "int64");
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@ SWIG_SciInt64_ToLongLong(void *pvApiCtx, int iVar, long long *pllValue, char *fn
|
|||
%fragment("SWIG_SciInt64_FromLongLong", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciInt64_FromLongLong(void *pvApiCtx, int iVarOut, long long llValue) {
|
||||
Scierror(999, _("%s: Scilab 5.X does not manage '%s' data type.\n"), "SWIG_SciInt64_ToLongLong", "int64");
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Scilab 5.X does not manage '%s' data type.\n"), "SWIG_SciInt64_ToLongLong", "int64");
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
@ -36,7 +36,7 @@ SWIG_SciInt64_FromLongLong(void *pvApiCtx, int iVarOut, long long llValue) {
|
|||
%fragment("SWIG_SciUint64_ToUnsignedLongLong", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciUint64_ToUnsignedLongLong(void *pvApiCtx, int iVar, unsigned long long *pullValue, char *fname) {
|
||||
Scierror(999, _("%s: Scilab 5.X does not manage '%s' data type.\n"), "SWIG_SciUint64_ToLongLong", "uint64");
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Scilab 5.X does not manage '%s' data type.\n"), "SWIG_SciUint64_ToLongLong", "uint64");
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
@ -47,7 +47,7 @@ SWIG_SciUint64_ToUnsignedLongLong(void *pvApiCtx, int iVar, unsigned long long *
|
|||
%fragment("SWIG_SciUint64_FromUnsignedLongLong", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciUint64_FromUnsignedLongLong(void *pvApiCtx, int iVarOut, unsigned long long llValue) {
|
||||
Scierror(999, _("%s: Scilab 5.X does not manage '%s' data type.\n"), "SWIG_SciUint64_ToLongLong", "uint64");
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Scilab 5.X does not manage '%s' data type.\n"), "SWIG_SciUint64_ToLongLong", "uint64");
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,6 +203,8 @@ SWIG_Scilab_NewMemberObj(void *pvApiCtx, int iVarOut, void *_ptr, int _sz, swig_
|
|||
|
||||
/* Error functions */
|
||||
|
||||
#define SCILAB_API_ARGUMENT_ERROR 999
|
||||
|
||||
SWIGINTERN const char*
|
||||
SWIG_Scilab_ErrorType(int code) {
|
||||
switch(code) {
|
||||
|
|
@ -276,7 +278,7 @@ int SWIG_this(SWIG_GatewayParameters) {
|
|||
(double) (unsigned long) ptrValue));
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Incorrect value for input argument #%d: The value is not a pointer.\n"), fname, 1);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Incorrect value for input argument #%d: The value is not a pointer.\n"), fname, 1);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
@ -294,11 +296,11 @@ int SWIG_ptr(SWIG_GatewayParameters) {
|
|||
}
|
||||
if (getScalarDouble(pvApiCtx, piAddr, &dValue) == 0) {
|
||||
if (dValue != (unsigned long)dValue) {
|
||||
Scierror(999, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a pointer.\n"), fname, 1);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a pointer.\n"), fname, 1);
|
||||
return SWIG_ValueError;
|
||||
}
|
||||
if ((dValue < 0) || (dValue > ULONG_MAX)) {
|
||||
Scierror(999, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a pointer.\n"), fname, 1);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a pointer.\n"), fname, 1);
|
||||
return SWIG_OverflowError;
|
||||
}
|
||||
SWIG_Scilab_SetOutputPosition(1);
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ SWIG_AsCheck_Sequence_dec(bool)(SwigSciObject obj) {
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A boolean is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A boolean is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ SWIG_AsSize_Sequence_dec(bool)(SwigSciObject obj, int *piSize) {
|
|||
int iMatrixColCount;
|
||||
if (SWIG_SciBoolean_AsIntArrayAndSize(pvApiCtx, obj, &iMatrixRowCount, &iMatrixColCount, &piMatrix, SWIG_Scilab_GetFname()) == SWIG_OK) {
|
||||
if ((iMatrixRowCount > 1) && (iMatrixColCount > 1)) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: An integer vector is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: An integer vector is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
*piSize = iMatrixRowCount * iMatrixColCount;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ SWIG_AsCheck_Sequence_dec(double)(SwigSciObject obj) {
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A double is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A double is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ SWIG_AsSize_Sequence_dec(double)(SwigSciObject obj, int *piSize) {
|
|||
int iMatrixColCount;
|
||||
if (SWIG_SciDouble_AsDoubleArrayAndSize(pvApiCtx, obj, &iMatrixRowCount, &iMatrixColCount, &pdblMatrix, SWIG_Scilab_GetFname()) == SWIG_OK) {
|
||||
if ((iMatrixRowCount > 1) && (iMatrixColCount > 1)) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A double vector is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A double vector is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
*piSize = iMatrixRowCount * iMatrixColCount;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ SWIG_AsCheck_Sequence_dec(float)(SwigSciObject obj) {
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A double is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A double is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ SWIG_AsSize_Sequence_dec(float)(SwigSciObject obj, int *piSize) {
|
|||
int iMatrixColCount;
|
||||
if (SWIG_SciDouble_AsFloatArrayAndSize(pvApiCtx, obj, &iMatrixRowCount, &iMatrixColCount, &pdblMatrix, SWIG_Scilab_GetFname()) == SWIG_OK) {
|
||||
if ((iMatrixRowCount > 1) && (iMatrixColCount > 1)) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A float vector is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A float vector is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
*piSize = iMatrixRowCount * iMatrixColCount;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ SWIG_AsCheck_Sequence_dec(int)(SwigSciObject obj) {
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: An integer is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: An integer is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ SWIG_AsSize_Sequence_dec(int)(SwigSciObject obj, int *piSize) {
|
|||
int iMatrixColCount;
|
||||
if (SWIG_SciDoubleOrInt32_AsIntArrayAndSize(pvApiCtx, obj, &iMatrixRowCount, &iMatrixColCount, &piMatrix, SWIG_Scilab_GetFname()) == SWIG_OK) {
|
||||
if ((iMatrixRowCount > 1) && (iMatrixColCount > 1)) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: An integer vector is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: An integer vector is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
*piSize = iMatrixRowCount * iMatrixColCount;
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ SWIG_AsVal_SequenceItem_dec(ptr)(SwigSciObject obj, int *piSequence, int itemInd
|
|||
|
||||
if (iType != sci_pointer)
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A pointer is expected at list item #%d.\n"), SWIG_Scilab_GetFname(), obj, itemIndex + 1);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A pointer is expected at list item #%d.\n"), SWIG_Scilab_GetFname(), obj, itemIndex + 1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ SWIG_AsCheck_Sequence_dec(std::string)(SwigSciObject obj) {
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A string is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A string is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ SWIG_SciDoubleOrInt16_AsShort(void *pvApiCtx, int iVar, short *psValue, char *fn
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iPrec != SCI_INT16) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 16-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
sciErr = getMatrixOfInteger16(pvApiCtx, piAddrVar, &iRows, &iCols, &psData);
|
||||
|
|
@ -46,7 +46,7 @@ SWIG_SciDoubleOrInt16_AsShort(void *pvApiCtx, int iVar, short *psValue, char *fn
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 16-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 16-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
*psValue = *psData;
|
||||
|
|
@ -61,22 +61,22 @@ SWIG_SciDoubleOrInt16_AsShort(void *pvApiCtx, int iVar, short *psValue, char *fn
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 16-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 16-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
dValue = *pdData;
|
||||
if (dValue != floor(dValue)) {
|
||||
Scierror(999, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 16-bit signed integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 16-bit signed integer.\n"), fname, iVar);
|
||||
return SWIG_ValueError;
|
||||
}
|
||||
if ((dValue < SHRT_MIN) || (dValue > SHRT_MAX)) {
|
||||
Scierror(999, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 16-bit signed integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 16-bit signed integer.\n"), fname, iVar);
|
||||
return SWIG_OverflowError;
|
||||
}
|
||||
*psValue = (short) dValue;
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 16-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ SWIG_SciDoubleOrInt16_AsShortArrayAndSize(void *pvApiCtx, int iVar, int *iRows,
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iPrec != SCI_INT16) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 16-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ SWIG_SciDoubleOrInt16_AsShortArrayAndSize(void *pvApiCtx, int iVar, int *iRows,
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 16-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ SWIG_SciDoubleOrInt8_AsShort(void *pvApiCtx, int iVar, signed char *pscValue, ch
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iPrec != SCI_INT8) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
sciErr = getMatrixOfInteger8(pvApiCtx, piAddrVar, &iRows, &iCols, &pcData);
|
||||
|
|
@ -45,7 +45,7 @@ SWIG_SciDoubleOrInt8_AsShort(void *pvApiCtx, int iVar, signed char *pscValue, ch
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 8-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 8-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
*pscValue = *pcData;
|
||||
|
|
@ -60,22 +60,22 @@ SWIG_SciDoubleOrInt8_AsShort(void *pvApiCtx, int iVar, signed char *pscValue, ch
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 8-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 8-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
dValue = *pdData;
|
||||
if (dValue != floor(dValue)) {
|
||||
Scierror(999, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 8-bit signed integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 8-bit signed integer.\n"), fname, iVar);
|
||||
return SWIG_ValueError;
|
||||
}
|
||||
if ((dValue < SCHAR_MIN) || (dValue > SCHAR_MAX)) {
|
||||
Scierror(999, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 8-bit signed integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 8-bit signed integer.\n"), fname, iVar);
|
||||
return SWIG_OverflowError;
|
||||
}
|
||||
*pscValue = (signed char) dValue;
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ SWIG_SciDoubleOrInt8_AsSignedCharArrayAndSize(void *pvApiCtx, int iVar, int *iRo
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iPrec != SCI_INT8) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -159,7 +159,7 @@ SWIG_SciDoubleOrInt8_AsSignedCharArrayAndSize(void *pvApiCtx, int iVar, int *iRo
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double matrix expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
return SWIG_OK;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ SWIG_SciUint8_AsUnsignedChar(void *pvApiCtx, int iVar, unsigned char *pucValue,
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iPrec != SCI_UINT8) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ SWIG_SciUint8_AsUnsignedChar(void *pvApiCtx, int iVar, unsigned char *pucValue,
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 8-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 8-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
*pucValue = *pucData;
|
||||
|
|
@ -62,23 +62,23 @@ SWIG_SciUint8_AsUnsignedChar(void *pvApiCtx, int iVar, unsigned char *pucValue,
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 8-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 8-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
dValue = *pdData;
|
||||
if (dValue != floor(dValue)) {
|
||||
Scierror(999, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 8-bit unsigned integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 8-bit unsigned integer.\n"), fname, iVar);
|
||||
return SWIG_ValueError;
|
||||
}
|
||||
if ((dValue < 0) || (dValue > UCHAR_MAX)) {
|
||||
Scierror(999, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 8-bit unsigned integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 8-bit unsigned integer.\n"), fname, iVar);
|
||||
return SWIG_OverflowError;
|
||||
}
|
||||
*pucValue = (unsigned char) dValue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ SWIG_SciUint8_AsUnsignedCharArrayAndSize(void *pvApiCtx, int iVar, int *iRows, i
|
|||
|
||||
if (iPrec != SCI_UINT8)
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ SWIG_SciUint8_AsUnsignedCharArrayAndSize(void *pvApiCtx, int iVar, int *iRows, i
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 8-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ SWIG_SciUint32_AsUnsignedInt(void *pvApiCtx, int iVar, unsigned int *puiValue, c
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iPrec != SCI_UINT32) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ SWIG_SciUint32_AsUnsignedInt(void *pvApiCtx, int iVar, unsigned int *puiValue, c
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 32-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 32-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
*puiValue = *puiData;
|
||||
|
|
@ -62,23 +62,23 @@ SWIG_SciUint32_AsUnsignedInt(void *pvApiCtx, int iVar, unsigned int *puiValue, c
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 32-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 32-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
dValue = *pdData;
|
||||
if (dValue != floor(dValue)) {
|
||||
Scierror(999, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 32-bit unsigned integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 32-bit unsigned integer.\n"), fname, iVar);
|
||||
return SWIG_ValueError;
|
||||
}
|
||||
if ((dValue < 0) || (dValue > UINT_MAX)) {
|
||||
Scierror(999, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 32-bit unsigned integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 32-bit unsigned integer.\n"), fname, iVar);
|
||||
return SWIG_OverflowError;
|
||||
}
|
||||
*puiValue = (unsigned int) dValue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -152,7 +152,7 @@ SWIG_SciUint32_AsUnsignedIntArrayAndSize(void *pvApiCtx, int iVar, int *iRows, i
|
|||
|
||||
if (iPrec != SCI_UINT32)
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -165,7 +165,7 @@ SWIG_SciUint32_AsUnsignedIntArrayAndSize(void *pvApiCtx, int iVar, int *iRows, i
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 32-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ SWIG_SciUint16_AsUnsignedShort(void *pvApiCtx, int iVar, unsigned short *pusValu
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iPrec != SCI_UINT16) {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ SWIG_SciUint16_AsUnsignedShort(void *pvApiCtx, int iVar, unsigned short *pusValu
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 16-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 16-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
*pusValue = *pusData;
|
||||
|
|
@ -62,23 +62,23 @@ SWIG_SciUint16_AsUnsignedShort(void *pvApiCtx, int iVar, unsigned short *pusValu
|
|||
return SWIG_ERROR;
|
||||
}
|
||||
if (iRows * iCols != 1) {
|
||||
Scierror(999, _("%s: Wrong size for input argument #%d: A 16-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong size for input argument #%d: A 16-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
dValue = *pdData;
|
||||
if (dValue != floor(dValue)) {
|
||||
Scierror(999, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 16-bit unsigned integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Incorrect value for input argument #%d: The double value cannot be converted to a 16-bit unsigned integer.\n"), fname, iVar);
|
||||
return SWIG_ValueError;
|
||||
}
|
||||
if ((dValue < 0) || (dValue > USHRT_MAX)) {
|
||||
Scierror(999, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 16-bit unsigned integer.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Overflow error for input argument #%d: The double value cannot be converted to a 16-bit unsigned integer.\n"), fname, iVar);
|
||||
return SWIG_OverflowError;
|
||||
}
|
||||
*pusValue = (unsigned short) dValue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -151,7 +151,7 @@ SWIG_SciUint16_AsUnsignedShortArrayAndSize(void *pvApiCtx, int iVar, int *iRows,
|
|||
|
||||
if (iPrec != SCI_UINT16)
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -164,7 +164,7 @@ SWIG_SciUint16_AsUnsignedShortArrayAndSize(void *pvApiCtx, int iVar, int *iRows,
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
Scierror(SCILAB_API_ARGUMENT_ERROR, _("%s: Wrong type for input argument #%d: A 16-bit unsigned integer or a double vector expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue