beautify scilab.cxx
This commit is contained in:
parent
f52f4c6e10
commit
698248d2bf
1 changed files with 13 additions and 22 deletions
|
|
@ -208,22 +208,18 @@ public:
|
||||||
if (generateBuilder) {
|
if (generateBuilder) {
|
||||||
createBuilderFile(outputFilename);
|
createBuilderFile(outputFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create gateway source if required
|
// Create gateway source if required
|
||||||
if (createGatewaySource) {
|
if (createGatewaySource) {
|
||||||
createGatewaySourceFile(gatewaySourceName);
|
createGatewaySourceFile(gatewaySourceName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create gateway XML if required
|
// Create gateway XML if required
|
||||||
if (createGatewayXML) {
|
if (createGatewayXML) {
|
||||||
createGatewayXMLFile(gatewayName);
|
createGatewayXMLFile(gatewayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create loader script if required
|
// Create loader script if required
|
||||||
if (createLoader) {
|
if (createLoader) {
|
||||||
createLoaderFile(gatewayLibraryName);
|
createLoaderFile(gatewayLibraryName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Module initialization function
|
// Module initialization function
|
||||||
String *gatewayInitFunctionName = NewStringf("%s_Init", gatewayName);
|
String *gatewayInitFunctionName = NewStringf("%s_Init", gatewayName);
|
||||||
|
|
||||||
|
|
@ -688,7 +684,6 @@ public:
|
||||||
Delete(str);
|
Delete(str);
|
||||||
constantValue = wname;
|
constantValue = wname;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Constant names can have SCILAB_VARIABLE_NAME_CHAR_MAX because of suffixes "_get" added to function
|
// Constant names can have SCILAB_VARIABLE_NAME_CHAR_MAX because of suffixes "_get" added to function
|
||||||
String *scilabConstantName = checkIdentifierName(constantName, SCILAB_VARIABLE_NAME_CHAR_MAX);
|
String *scilabConstantName = checkIdentifierName(constantName, SCILAB_VARIABLE_NAME_CHAR_MAX);
|
||||||
|
|
||||||
|
|
@ -786,8 +781,7 @@ public:
|
||||||
if (Len(name) > char_size_max) {
|
if (Len(name) > char_size_max) {
|
||||||
scilabIdentifierName = DohNewStringWithSize(name, char_size_max);
|
scilabIdentifierName = DohNewStringWithSize(name, char_size_max);
|
||||||
Swig_warning(WARN_SCILAB_TRUNCATED_NAME, input_file, line_number,
|
Swig_warning(WARN_SCILAB_TRUNCATED_NAME, input_file, line_number,
|
||||||
"Identifier name '%s' exceeds 24 characters and has been truncated to '%s'.\n",
|
"Identifier name '%s' exceeds 24 characters and has been truncated to '%s'.\n", name, scilabIdentifierName);
|
||||||
name, scilabIdentifierName);
|
|
||||||
} else
|
} else
|
||||||
scilabIdentifierName = name;
|
scilabIdentifierName = name;
|
||||||
return scilabIdentifierName;
|
return scilabIdentifierName;
|
||||||
|
|
@ -818,13 +812,11 @@ public:
|
||||||
Setattr(node, "sym:name", scilabMemberName);
|
Setattr(node, "sym:name", scilabMemberName);
|
||||||
Swig_warning(WARN_SCILAB_TRUNCATED_NAME, input_file, line_number,
|
Swig_warning(WARN_SCILAB_TRUNCATED_NAME, input_file, line_number,
|
||||||
"Wrapping functions names for member '%s.%s' will exceed 24 characters, "
|
"Wrapping functions names for member '%s.%s' will exceed 24 characters, "
|
||||||
"so member name has been truncated to '%s'.\n",
|
"so member name has been truncated to '%s'.\n", containerName, memberName, scilabMemberName);
|
||||||
containerName, memberName, scilabMemberName);
|
|
||||||
} else
|
} else
|
||||||
Swig_error(input_file, line_number,
|
Swig_error(input_file, line_number,
|
||||||
"Wrapping functions names for member '%s.%s' will exceed 24 characters, "
|
"Wrapping functions names for member '%s.%s' will exceed 24 characters, "
|
||||||
"please rename the container of member '%s'.\n",
|
"please rename the container of member '%s'.\n", containerName, memberName, containerName);
|
||||||
containerName, memberName, containerName);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -974,7 +966,6 @@ public:
|
||||||
FileErrorDisplay(gatewayXMLFilename);
|
FileErrorDisplay(gatewayXMLFilename);
|
||||||
SWIG_exit(EXIT_FAILURE);
|
SWIG_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add a slightly modified SWIG banner to the gateway XML ("--modify" is illegal in XML)
|
// Add a slightly modified SWIG banner to the gateway XML ("--modify" is illegal in XML)
|
||||||
gatewayXML = NewString("");
|
gatewayXML = NewString("");
|
||||||
Printf(gatewayXML, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n");
|
Printf(gatewayXML, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue