scilab: coding style: remove "_" from parameter names
This commit is contained in:
parent
7ce1550664
commit
81879c0da8
7 changed files with 37 additions and 37 deletions
|
|
@ -8,11 +8,11 @@
|
|||
*/
|
||||
|
||||
%fragment(SWIG_AsVal_frag(char), "header", fragment="SWIG_SciString_AsChar") {
|
||||
#define SWIG_AsVal_char(scilabValue, valuePointer) SWIG_SciString_AsChar(pvApiCtx, scilabValue, valuePointer, fname)
|
||||
#define SWIG_AsVal_char(scilabValue, valuePointer) SWIG_SciString_AsChar(pvApiCtx, scilabValue, valuePointer, SWIG_Scilab_GetFname())
|
||||
}
|
||||
%fragment("SWIG_SciString_AsChar", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciString_AsChar(void *_pvApiCtx, int iVar, char *pcValue, char *_fname) {
|
||||
SWIG_SciString_AsChar(void *_pvApiCtx, int iVar, char *pcValue, char *fname) {
|
||||
SciErr sciErr;
|
||||
int iType = 0;
|
||||
int iRows = 0;
|
||||
|
|
@ -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(999, _("%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(999, _("%s: Wrong size for input argument #%d: A string expected.\n"), fname, iVar);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
*pcValue = pstStrings[0];
|
||||
|
|
@ -78,11 +78,11 @@ SWIG_SciString_FromChar(void *_pvApiCtx, int iVarOut, char chValue) {
|
|||
*/
|
||||
|
||||
%fragment("SWIG_AsCharArray", "header", fragment = "SWIG_SciString_AsCharPtr") {
|
||||
#define SWIG_AsCharArray(scilabValue, charPtrPointer, charPtrLength) SWIG_SciString_AsCharPtr(pvApiCtx, scilabValue, charPtrPointer, charPtrLength, fname)
|
||||
#define SWIG_AsCharArray(scilabValue, charPtrPointer, charPtrLength) SWIG_SciString_AsCharPtr(pvApiCtx, scilabValue, charPtrPointer, charPtrLength, SWIG_Scilab_GetFname())
|
||||
}
|
||||
%fragment("SWIG_SciString_AsCharPtr", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciString_AsCharPtr(void *_pvApiCtx, int iVar, char *pcValue, int iLength, char *_fname) {
|
||||
SWIG_SciString_AsCharPtr(void *_pvApiCtx, int iVar, char *pcValue, int iLength, char *fname) {
|
||||
SciErr sciErr;
|
||||
int *piAddrVar = NULL;
|
||||
char* pcTmpValue = NULL;
|
||||
|
|
@ -110,11 +110,11 @@ SWIG_SciString_AsCharPtr(void *_pvApiCtx, int iVar, char *pcValue, int iLength,
|
|||
}
|
||||
|
||||
%fragment("SWIG_AsCharPtrAndSize", "header", fragment = "SWIG_SciString_AsCharPtrAndSize") {
|
||||
#define SWIG_AsCharPtrAndSize(scilabValue, charPtrPointer, charPtrLength, allocMemory) SWIG_SciString_AsCharPtrAndSize(pvApiCtx, scilabValue, charPtrPointer, charPtrLength, allocMemory, fname)
|
||||
#define SWIG_AsCharPtrAndSize(scilabValue, charPtrPointer, charPtrLength, allocMemory) SWIG_SciString_AsCharPtrAndSize(pvApiCtx, scilabValue, charPtrPointer, charPtrLength, allocMemory, SWIG_Scilab_GetFname())
|
||||
}
|
||||
%fragment("SWIG_SciString_AsCharPtrAndSize", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciString_AsCharPtrAndSize(void *_pvApiCtx, int iVar, char **pcValue, size_t *piLength, int *alloc, char *_fname) {
|
||||
SWIG_SciString_AsCharPtrAndSize(void *_pvApiCtx, int iVar, char **pcValue, size_t *piLength, int *alloc, char *fname) {
|
||||
SciErr sciErr;
|
||||
int *piAddrVar = NULL;
|
||||
int iRet;
|
||||
|
|
@ -187,7 +187,7 @@ SWIG_SciString_FromCharPtr(void *_pvApiCtx, int iVarOut, const char *pchValue) {
|
|||
|
||||
%fragment("SWIG_SciString_AsCharPtrArrayAndSize", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciString_AsCharPtrArrayAndSize(void *_pvApiCtx, int iVar, int *iRows, int *iCols, char ***charPtrArray, char *_fname) {
|
||||
SWIG_SciString_AsCharPtrArrayAndSize(void *_pvApiCtx, int iVar, int *iRows, int *iCols, char ***charPtrArray, char *fname) {
|
||||
SciErr sciErr;
|
||||
int i = 0;
|
||||
int *piAddrVar = NULL;
|
||||
|
|
|
|||
|
|
@ -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"), fname, obj);
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A list is expected.\n"), SWIG_Scilab_GetFname(), obj);
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@
|
|||
* Scilab 6 type: int64
|
||||
*/
|
||||
%fragment(SWIG_AsVal_frag(long long), "header", fragment="SWIG_SciInt64_ToLongLong") {
|
||||
%#define SWIG_AsVal_long_SS_long(scilabValue, valuePointer) SWIG_SciInt64_ToLongLong(pvApiCtx, scilabValue, valuePointer, fname)
|
||||
%#define SWIG_AsVal_long_SS_long(scilabValue, valuePointer) SWIG_SciInt64_ToLongLong(pvApiCtx, scilabValue, valuePointer, SWIG_Scilab_GetFname())
|
||||
}
|
||||
%fragment("SWIG_SciInt64_ToLongLong", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciInt64_ToLongLong(void *_pvApiCtx, int iVar, long long *pllValue, char *_fname) {
|
||||
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");
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
|
@ -31,11 +31,11 @@ SWIG_SciInt64_FromLongLong(void *_pvApiCtx, int iVarOut, long long llValue) {
|
|||
* Scilab 6 type: uint64
|
||||
*/
|
||||
%fragment(SWIG_AsVal_frag(unsigned long long), "header", fragment="SWIG_SciUint64_ToUnsignedLongLong") {
|
||||
#define SWIG_AsVal_unsigned_SS_long_SS_long(scilabValue, valuePointer) SWIG_SciUint64_ToUnsignedLongLong(pvApiCtx, scilabValue, valuePointer, fname)
|
||||
#define SWIG_AsVal_unsigned_SS_long_SS_long(scilabValue, valuePointer) SWIG_SciUint64_ToUnsignedLongLong(pvApiCtx, scilabValue, valuePointer, SWIG_Scilab_GetFname())
|
||||
}
|
||||
%fragment("SWIG_SciUint64_ToUnsignedLongLong", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciUint64_ToUnsignedLongLong(void *_pvApiCtx, int iVar, unsigned long long *pullValue, char *_fname) {
|
||||
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");
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* POINTER
|
||||
*/
|
||||
%fragment("SWIG_ConvertPtr", "header") {
|
||||
#define SWIG_ConvertPtr(scilabValue, voidPointer, pointerDescriptor, flags) SwigScilabPtrToObject(pvApiCtx, scilabValue, voidPointer, pointerDescriptor, flags, fname)
|
||||
#define SWIG_ConvertPtr(scilabValue, voidPointer, pointerDescriptor, flags) SwigScilabPtrToObject(pvApiCtx, scilabValue, voidPointer, pointerDescriptor, flags, SWIG_Scilab_GetFname())
|
||||
}
|
||||
|
||||
%fragment("SWIG_NewPointerObj", "header") {
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
* FUNCTION POINTER
|
||||
*/
|
||||
%fragment("SWIG_ConvertFunctionPtr", "header") {
|
||||
#define SWIG_ConvertFunctionPtr(scilabValue, voidPointer, pointerDescriptor) SwigScilabPtrToObject(pvApiCtx, scilabValue, voidPointer, pointerDescriptor, 0, fname)
|
||||
#define SWIG_ConvertFunctionPtr(scilabValue, voidPointer, pointerDescriptor) SwigScilabPtrToObject(pvApiCtx, scilabValue, voidPointer, pointerDescriptor, 0, SWIG_Scilab_GetFname())
|
||||
}
|
||||
|
||||
%fragment("SWIG_NewFunctionPtrObj", "header") {
|
||||
|
|
@ -28,5 +28,5 @@
|
|||
#define SWIG_NewMemberObj(ptr, sz, tp) SWIG_Scilab_NewMemberObj(pvApiCtx, $result, ptr, sz, tp)
|
||||
}
|
||||
%fragment("SWIG_ConvertMember", "header") {
|
||||
#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Scilab_ConvertPacked(pvApiCtx, obj, ptr, sz, ty, fname)
|
||||
#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Scilab_ConvertPacked(pvApiCtx, obj, ptr, sz, ty, SWIG_Scilab_GetFname())
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,15 +41,15 @@ extern "C" {
|
|||
/* Function name management functions */
|
||||
|
||||
#include <stdlib.h>
|
||||
static char* fname = NULL;
|
||||
static char* g_fname = NULL;
|
||||
static char* SWIG_Scilab_GetFname(void) {
|
||||
return fname;
|
||||
return g_fname;
|
||||
}
|
||||
static void SWIG_Scilab_SetFname(char* _fname) {
|
||||
if (fname != NULL) {
|
||||
free(fname);
|
||||
static void SWIG_Scilab_SetFname(char* fname) {
|
||||
if (g_fname != NULL) {
|
||||
free(g_fname);
|
||||
}
|
||||
fname = strdup(_fname);
|
||||
g_fname = strdup(fname);
|
||||
}
|
||||
#if SWIG_SCILAB_VERSION >= 600
|
||||
static void *pvApiCtx = NULL;
|
||||
|
|
@ -101,7 +101,7 @@ SWIG_Scilab_SetOutput(void *_pvApiCtx, SwigSciObject _output) {
|
|||
/* Pointer conversion functions */
|
||||
|
||||
SWIGINTERN int
|
||||
SwigScilabPtrToObject(void *_pvApiCtx, int iVar, void **_pObjValue, swig_type_info *_descriptor, int _flags, char *_fname) {
|
||||
SwigScilabPtrToObject(void *_pvApiCtx, int iVar, void **_pObjValue, swig_type_info *_descriptor, int _flags, char *fname) {
|
||||
SciErr sciErr;
|
||||
int iType = 0;
|
||||
int *piAddrVar = NULL;
|
||||
|
|
@ -146,7 +146,7 @@ SwigScilabPtrFromObject(void *_pvApiCtx, int iVarOut, void *obj, swig_type_info
|
|||
}
|
||||
|
||||
SWIGRUNTIME int
|
||||
SWIG_Scilab_ConvertPacked(void *_pvApiCtx, int iVar, void *_ptr, int sz, swig_type_info *ty, char *_fname) {
|
||||
SWIG_Scilab_ConvertPacked(void *_pvApiCtx, int iVar, void *_ptr, int sz, swig_type_info *ty, char *fname) {
|
||||
swig_cast_info *tc;
|
||||
int *piAddrVar = NULL;
|
||||
char *pstStrings = NULL;
|
||||
|
|
|
|||
|
|
@ -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"), fname, obj, itemIndex + 1);
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A pointer is expected at list item #%d.\n"), SWIG_Scilab_GetFname(), obj, itemIndex + 1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,11 +3,11 @@
|
|||
* Scilab type: int8
|
||||
*/
|
||||
%fragment(SWIG_AsVal_frag(signed char), "header", fragment="SWIG_SciDoubleOrInt8_AsShort", fragment="<limits.h>") {
|
||||
#define SWIG_AsVal_signed_SS_char(scilabValue, valuePointer) SWIG_SciDoubleOrInt8_AsShort(pvApiCtx, scilabValue, valuePointer, fname)
|
||||
#define SWIG_AsVal_signed_SS_char(scilabValue, valuePointer) SWIG_SciDoubleOrInt8_AsShort(pvApiCtx, scilabValue, valuePointer, SWIG_Scilab_GetFname())
|
||||
}
|
||||
%fragment("SWIG_SciDoubleOrInt8_AsShort", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciDoubleOrInt8_AsShort(void *_pvApiCtx, int iVar, signed char *pscValue, char *_fname) {
|
||||
SWIG_SciDoubleOrInt8_AsShort(void *_pvApiCtx, int iVar, signed char *pscValue, char *fname) {
|
||||
SciErr sciErr;
|
||||
int iType = 0;
|
||||
int iRows = 0;
|
||||
|
|
@ -36,7 +36,7 @@ SWIG_SciDoubleOrInt8_AsShort(void *_pvApiCtx, int iVar, signed char *pscValue, c
|
|||
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(999, _("%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, c
|
|||
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(999, _("%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, c
|
|||
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(999, _("%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(999, _("%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(999, _("%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(999, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double expected.\n"), fname, iVar);
|
||||
return SWIG_TypeError;
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +102,7 @@ SWIG_SciDouble_FromSignedChar(void *_pvApiCtx, int iVarOut, signed char scValue)
|
|||
*/
|
||||
%fragment("SWIG_SciDoubleOrInt8_AsSignedCharArrayAndSize", "header") {
|
||||
SWIGINTERN int
|
||||
SWIG_SciDoubleOrInt8_AsSignedCharArrayAndSize(void *_pvApiCtx, int iVar, int *iRows, int *iCols, signed char **pscValue, char *_fname) {
|
||||
SWIG_SciDoubleOrInt8_AsSignedCharArrayAndSize(void *_pvApiCtx, int iVar, int *iRows, int *iCols, signed char **pscValue, char *fname) {
|
||||
SciErr sciErr;
|
||||
int iType = 0;
|
||||
int *piAddrVar = NULL;
|
||||
|
|
@ -147,7 +147,7 @@ SWIG_SciDoubleOrInt8_AsSignedCharArrayAndSize(void *_pvApiCtx, int iVar, int *iR
|
|||
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(999, _("%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 *iR
|
|||
}
|
||||
else
|
||||
{
|
||||
Scierror(999, _("%s: Wrong type for input argument #%d: A 8-bit signed integer or a double matrix expected.\n"), _fname, iVar);
|
||||
Scierror(999, _("%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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue