beautify scilab.cxx

This commit is contained in:
William S Fulton 2014-10-31 23:27:36 +00:00
commit 698248d2bf

View file

@ -208,22 +208,18 @@ public:
if (generateBuilder) {
createBuilderFile(outputFilename);
}
// Create gateway source if required
if (createGatewaySource) {
createGatewaySourceFile(gatewaySourceName);
}
// Create gateway XML if required
if (createGatewayXML) {
createGatewayXMLFile(gatewayName);
}
// Create loader script if required
if (createLoader) {
createLoaderFile(gatewayLibraryName);
}
// Module initialization function
String *gatewayInitFunctionName = NewStringf("%s_Init", gatewayName);
@ -688,7 +684,6 @@ public:
Delete(str);
constantValue = wname;
}
// 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);
@ -786,8 +781,7 @@ public:
if (Len(name) > char_size_max) {
scilabIdentifierName = DohNewStringWithSize(name, char_size_max);
Swig_warning(WARN_SCILAB_TRUNCATED_NAME, input_file, line_number,
"Identifier name '%s' exceeds 24 characters and has been truncated to '%s'.\n",
name, scilabIdentifierName);
"Identifier name '%s' exceeds 24 characters and has been truncated to '%s'.\n", name, scilabIdentifierName);
} else
scilabIdentifierName = name;
return scilabIdentifierName;
@ -818,13 +812,11 @@ public:
Setattr(node, "sym:name", scilabMemberName);
Swig_warning(WARN_SCILAB_TRUNCATED_NAME, input_file, line_number,
"Wrapping functions names for member '%s.%s' will exceed 24 characters, "
"so member name has been truncated to '%s'.\n",
containerName, memberName, scilabMemberName);
"so member name has been truncated to '%s'.\n", containerName, memberName, scilabMemberName);
} else
Swig_error(input_file, line_number,
"Wrapping functions names for member '%s.%s' will exceed 24 characters, "
"please rename the container of member '%s'.\n",
containerName, memberName, containerName);
"please rename the container of member '%s'.\n", containerName, memberName, containerName);
}
}
@ -974,7 +966,6 @@ public:
FileErrorDisplay(gatewayXMLFilename);
SWIG_exit(EXIT_FAILURE);
}
// Add a slightly modified SWIG banner to the gateway XML ("--modify" is illegal in XML)
gatewayXML = NewString("");
Printf(gatewayXML, "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n");