Navigation Menu

Skip to content

Commit

Permalink
Fix a problem with a missing carriage return
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvestre Ledru committed Oct 14, 2010
1 parent 8d0ceb2 commit 909ad27
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Source/Modules/scilab.cxx
Expand Up @@ -247,8 +247,9 @@ class SCILAB:public Language {
else
Printv(getargs, tm, NIL);
Printv(f->code, getargs, "\n", NIL);
if ( Equal(SwigType_base(pt), "long long") || Equal(SwigType_base(pt), "unsigned long long"))
if ( Equal(SwigType_base(pt), "long long") || Equal(SwigType_base(pt), "unsigned long long")) {
Printv(f->code, "#endif\n", NIL);
}
Delete(getargs);
p = Getattr(p, "tmap:in:next");
continue;
Expand Down Expand Up @@ -502,8 +503,9 @@ class SCILAB:public Language {
Append(setf->code, "SWIG_Error(999, \"attempt to set immutable member variable\");");
}
Append(setf->code, "}\n");
if ( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long"))
if ( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long")) {
Printv(setf->def, "#endif\n", NIL);
}
Wrapper_print(setf, f_wrappers);
if (++ function_count % 10 == 0) {
Printf(f_builder_code, "];\n\ntable = [table;");
Expand All @@ -513,16 +515,17 @@ class SCILAB:public Language {
/* Deal with the get function */
Setattr(n, "wrap:name", getname);
int addfail = 0;
if ( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long"))
if ( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long")) {
Printv(getf->def, " #ifdef __SCILAB_INT64__\n", NIL);
}
Printv(getf->def, "int ", getname, " (char *fname, unsigned long fname_len){\n", NIL);

/* Check the number of input and output */
Printf(getf->def, "CheckRhs(0, 0);\n");
Printf(getf->def, "CheckLhs(1, 1);\n");
Printf(getf->def, "SciErr sciErr;\n");
/* Insert the order of output parameters */
Printf(getf->def, "\nint iOutNum=1;\nint iVarOut=Rhs+1;");
Printf(getf->def, "\nint iOutNum=1;\nint iVarOut=Rhs+1;\n");
/* Insert the argument counter */
//Printf(getf->def, "\nint scilabArgNumber=0;");

Expand All @@ -546,8 +549,9 @@ class SCILAB:public Language {
/* Dump the wrapper function */
Printf(getf->code, "LhsVar(iOutNum) = iVarOut;\n");
Append(getf->code, "}\n");
if ( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long"))
if ( Equal(SwigType_base(t), "long long") || Equal(SwigType_base(t), "unsigned long long")) {
Printv(getf->def, " #endif\n", NIL);
}
Wrapper_print(getf, f_wrappers);
Printf(f_header,"%s", globalVar);
if (++ function_count % 10 == 0) {
Expand Down Expand Up @@ -596,7 +600,7 @@ class SCILAB:public Language {
Printf(getf->def, "CheckLhs(1, 1);\n");
Printf(getf->def, "SciErr sciErr;\n");
/* Insert the order of output parameters*/
Printf(getf->def, "\nint iOutNum=1;\nint iVarOut=Rhs+1;");
Printf(getf->def, "\nint iOutNum=1;\nint iVarOut=Rhs+1;\n");

/* Insert the argument counter */
//Printf(getf->def, "\nint scilabArgNumber=0;");
Expand Down

0 comments on commit 909ad27

Please sign in to comment.