Commit 784dcdbd authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files

Remove superfluous parens in formating strings

parent 2ec078d9
......@@ -152,7 +152,7 @@ def DeclareCollection(node, name, internal):
g_outputFile.write("%s_member_%02d.DataType='%s';\n" % (name, i, internal))
g_outputFile.write("%s_member_%02d.dimensions=1;\n\n" % (name, i))
g_outputFile.write('%s_member_length=Simulink.BusElement;\n' % name)
g_outputFile.write("%s_member_length.name='length';\n" % (name))
g_outputFile.write("%s_member_length.name='length';\n" % name)
g_outputFile.write("%s_member_length.DataType='int32';\n" % name)
g_outputFile.write("%s_member_length.dimensions=1;\n\n" % name)
g_outputFile.write('%s=Simulink.Bus;\n' % name)
......
......@@ -131,7 +131,7 @@ def DeclareCollection(node, name, internal):
g_outputFile.write("%s_member_%02d.DataType='%s';\n" % (name, i, internal))
g_outputFile.write("%s_member_%02d.dimensions=1;\n\n" % (name, i))
g_outputFile.write('%s_member_length=Simulink.BusElement;\n' % name)
g_outputFile.write("%s_member_length.name='length';\n" % (name))
g_outputFile.write("%s_member_length.name='length';\n" % name)
g_outputFile.write("%s_member_length.DataType='int32';\n" % name)
g_outputFile.write("%s_member_length.dimensions=1;\n\n" % name)
g_outputFile.write('%s=Simulink.Bus;\n' % name)
......
......@@ -127,7 +127,7 @@ def DeclareCollection(node, name, internal):
g_outputFile.write("%s_member_%02d.DataType='%s';\n" % (name, i, internal))
g_outputFile.write("%s_member_%02d.dimensions=1;\n\n" % (name, i))
g_outputFile.write('%s_member_length=Simulink.BusElement;\n' % name)
g_outputFile.write("%s_member_length.name='length';\n" % (name))
g_outputFile.write("%s_member_length.name='length';\n" % name)
g_outputFile.write("%s_member_length.DataType='int32';\n" % name)
g_outputFile.write("%s_member_length.dimensions=1;\n\n" % name)
g_outputFile.write('%s=Simulink.Bus;\n' % name)
......
......@@ -304,7 +304,7 @@ class C_GlueGenerator(ASynchronousToolGlueGenerator):
(self.CleanNameAsToolWants(nodeTypename),
self.CleanNameAsToolWants(nodeTypename)))
self.C_SourceFile.write(
'\tfprintf(stderr, "Could not encode %s (at %%s, %%d), errorMessage was %%s\\n", __FILE__, __LINE__, ossGetErrMsg(g_world));\n' % (nodeTypename))
'\tfprintf(stderr, "Could not encode %s (at %%s, %%d), errorMessage was %%s\\n", __FILE__, __LINE__, ossGetErrMsg(g_world));\n' % nodeTypename)
self.C_SourceFile.write(" return -1;\n")
self.C_SourceFile.write(" } else {\n")
self.C_SourceFile.write(" assert(strm.length <= iMaxBufferSize);\n")
......@@ -319,7 +319,7 @@ class C_GlueGenerator(ASynchronousToolGlueGenerator):
(self.CleanNameAsToolWants(nodeTypename),
("ACN_" if encoding.lower() == "acn" else "")))
self.C_SourceFile.write(
'\tfprintf(stderr, "Could not encode %s (at %%s, %%d), errorCode was %%d\\n", __FILE__, __LINE__, errorCode);\n' % (nodeTypename))
'\tfprintf(stderr, "Could not encode %s (at %%s, %%d), errorCode was %%d\\n", __FILE__, __LINE__, errorCode);\n' % nodeTypename)
self.C_SourceFile.write(" return -1;\n")
self.C_SourceFile.write(" } else {\n")
self.C_SourceFile.write(" return BitStream_GetLength(&strm);\n")
......@@ -397,7 +397,7 @@ class C_GlueGenerator(ASynchronousToolGlueGenerator):
self.C_SourceFile.write(" return 0;\n")
self.C_SourceFile.write(" } else {\n")
self.C_SourceFile.write(
'\tfprintf(stderr, "Could not decode %s (at %%s, %%d), error message was %%s\\n", __FILE__, __LINE__, ossGetErrMsg(g_world));\n' % (nodeTypename))
'\tfprintf(stderr, "Could not decode %s (at %%s, %%d), error message was %%s\\n", __FILE__, __LINE__, ossGetErrMsg(g_world));\n' % nodeTypename)
self.C_SourceFile.write(" return -1;\n")
self.C_SourceFile.write(" }\n")
self.C_SourceFile.write("}\n")
......@@ -406,7 +406,7 @@ class C_GlueGenerator(ASynchronousToolGlueGenerator):
self.C_SourceFile.write(" return 0;\n")
self.C_SourceFile.write(" } else {\n")
self.C_SourceFile.write(
'\tfprintf(stderr, "Could not decode %s (at %%s, %%d), error code was %%d\\n", __FILE__, __LINE__, errorCode);\n' % (nodeTypename))
'\tfprintf(stderr, "Could not decode %s (at %%s, %%d), error code was %%d\\n", __FILE__, __LINE__, errorCode);\n' % nodeTypename)
self.C_SourceFile.write(" return -1;\n")
self.C_SourceFile.write(" }\n")
self.C_SourceFile.write("}\n")
......
......@@ -355,7 +355,7 @@ def OnStartup(modelingLanguage, asnFile, subProgram, subProgramImplementation, o
g_MyEvents.write(" EVT_MENU( ID_MENU_QUIT, TeleCmds::OnMenu_Quit )\n")
# Instructions to create the dialog
g_MyControls.write("wxScrolledWindow* _itemScrolledWindow_%s;\n" % (CleanSP))
g_MyControls.write("wxScrolledWindow* _itemScrolledWindow_%s;\n" % CleanSP)
g_MyCreation.write("_itemScrolledWindow_%s = new wxScrolledWindow( _itemNotebook3, ID_SCROLWND_%s, wxDefaultPosition, wxSize(100, 100), wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL|wxALWAYS_SHOW_SB );\n" % (CleanSP, CleanSP))
g_MyCreation.write("_itemScrolledWindow_%s->SetScrollbars(1, 1, 0, 0);\n" % CleanSP)
g_MyCreation.write("wxBoxSizer* itemBoxSizer_%s = new wxBoxSizer(wxVERTICAL);\n" % CleanSP)
......@@ -793,7 +793,7 @@ def WriteCodeForSave(nodeTypename, node, subProgram, unused_subProgramImplementa
CleanName(nodeTypename))
g_MySave.write(" if (asn1Scc%s_Encode(&var_%s, &strm, &errorCode, TRUE) == FALSE) {\n" %
(CleanName(nodeTypename), CleanParam))
g_MySave.write(' wxMessageBox(_T("Encoding of %s failed"), _T("Error encoding"), wxICON_ERROR);\n' % (nodeTypename))
g_MySave.write(' wxMessageBox(_T("Encoding of %s failed"), _T("Error encoding"), wxICON_ERROR);\n' % nodeTypename)
g_MySave.write("\t\treturn;\n")
g_MySave.write(" } else {\n")
g_MySave.write(" FILE *fp = fopen(flSave.GetPath().ToAscii().release(), \"wb\");\n")
......@@ -890,7 +890,7 @@ def WriteCodeForAction(nodeTypename, node, subProgram, unused_subProgramImplemen
CleanName(nodeTypename))
g_MyAction.write(" if (asn1Scc%s_Encode(&var_%s, &strm, &errorCode, TRUE) == FALSE) {\n" %
(CleanName(nodeTypename), CleanParam))
g_MyAction.write(' wxMessageBox(_T("Encoding of %s failed... Contact Semantix"), _T("Error encoding"), wxICON_ERROR);\n' % (nodeTypename))
g_MyAction.write(' wxMessageBox(_T("Encoding of %s failed... Contact Semantix"), _T("Error encoding"), wxICON_ERROR);\n' % nodeTypename)
g_MyAction.write("\t\treturn;\n")
g_MyAction.write(" } else {\n")
WriteCodeForGnuPlot("TCDATA: ", node, subProgram, param, names)
......
......@@ -340,15 +340,15 @@ class FromASN1SCCtoObjectGeode(RecursiveMapper):
lines.append(" int i;\n")
lines.append(" for(i=0; i<%s; i++) {\n" % limit)
lines.append(" unsigned char value = %s.arr[i];\n" % srcVar)
lines.append(" %s.cont[i].cont[0] = (value & 128) >> 7;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[1] = (value & 64) >> 6;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[2] = (value & 32) >> 5;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[3] = (value & 16) >> 4;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[4] = (value & 8) >> 3;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[5] = (value & 4) >> 2;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[6] = (value & 2) >> 1;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[7] = value & 1;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].length = 8;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[0] = (value & 128) >> 7;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[1] = (value & 64) >> 6;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[2] = (value & 32) >> 5;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[3] = (value & 16) >> 4;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[4] = (value & 8) >> 3;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[5] = (value & 4) >> 2;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[6] = (value & 2) >> 1;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[7] = value & 1;\n" % dstSDLVariable)
lines.append(" %s.cont[i].length = 8;\n" % dstSDLVariable)
lines.append(" }\n")
lines.append(" while(i<%d) {\n" % node._range[-1])
lines.append(" %s.cont[i].cont[0]=0;\n" % dstSDLVariable)
......@@ -457,15 +457,15 @@ class FromOSStoObjectGeode(RecursiveMapper):
lines.append(" int i;\n")
lines.append(" for(i=0; i<%s.length; i++) {\n" % srcVar)
lines.append(" unsigned char value = %s.value[i];\n" % srcVar)
lines.append(" %s.cont[i].cont[0] = value & 128;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[1] = value & 64;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[2] = value & 32;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[3] = value & 16;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[4] = value & 8;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[5] = value & 4;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[6] = value & 2;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[7] = value & 1;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].length = 8;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[0] = value & 128;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[1] = value & 64;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[2] = value & 32;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[3] = value & 16;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[4] = value & 8;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[5] = value & 4;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[6] = value & 2;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[7] = value & 1;\n" % dstSDLVariable)
lines.append(" %s.cont[i].length = 8;\n" % dstSDLVariable)
lines.append(" }\n")
lines.append(" while(i<%d) {\n" % node._range[-1])
lines.append(" %s.cont[i].cont[0]=0;\n" % dstSDLVariable)
......@@ -650,7 +650,7 @@ class OG_GlueGenerator(ASynchronousToolGlueGenerator):
(self.CleanNameAsToolWants(nodeTypename), self.CleanNameAsToolWants(nodeTypename)))
fileOutHeader.write(
'\tfprintf(stderr, "Could not encode %s (at %%s, %%d), error message was %%s\\n", __FILE__, __LINE__, ossGetErrMsg(g_world));\\\n' %
(nodeTypename))
nodeTypename)
fileOutHeader.write(" varName##_len = -1;\\\n")
fileOutHeader.write(" } else {\\\n")
fileOutHeader.write(" memcpy(&varName[0], strm.value, strm.length);\\\n")
......@@ -666,7 +666,7 @@ class OG_GlueGenerator(ASynchronousToolGlueGenerator):
self.CleanNameAsToolWants(nodeTypename)))
fileOutHeader.write(
'\tfprintf(stderr, "Could not encode %s (at %%s, %%d), error code was %%d\\n", __FILE__, __LINE__, errorCode);\\\n' %
(nodeTypename))
nodeTypename)
fileOutHeader.write(" varName##_len = -1;\\\n")
fileOutHeader.write(" } else {\\\n")
fileOutHeader.write(" varName##_len = BitStream_GetLength(&strm);\\\n")
......
......@@ -194,14 +194,14 @@ def OnStartup(modelingLanguage, asnFile, subProgram, unused_subProgramImplementa
nodeTypename = param._signal._asnNodename
CleanParam = CleanName(param._id)
g_SourceFile.write(' %s %s;\n' % (CleanName(nodeTypename), CleanParam))
g_SourceFile.write('} %s_TCDATA;\n\n' % (CleanSP))
g_SourceFile.write('} %s_TCDATA;\n\n' % CleanSP)
parms = []
for param in subProgram._params:
nodeTypename = param._signal._asnNodename
CleanParam = CleanName(param._id)
# parms.append("%s *p_%s" % (CleanName(nodeTypename), CleanParam))
parms.append("void *p_%s" % (CleanParam))
parms.append("void *p_%s" % CleanParam)
g_HeaderFile.write('int SendTC_%s(%s);\n' % (CleanSP, ",".join(parms)))
g_SourceFile.write('int SendTC_%s(%s)\n' % (CleanSP, ",".join(parms)))
g_SourceFile.write('{\n')
......
......@@ -414,18 +414,18 @@ class QGenCGlueGenerator(SynchronousToolGlueGenerator):
def SourceVar(self, unused_nodeTypename, unused_encoding, unused_node, unused_subProgram, unused_subProgramImplementation, param, unused_leafTypeDict, unused_names):
if isinstance(param._sourceElement, AadlPort):
srcQGenC = "cOutput.%s" % (param._id) # pragma: no cover
srcQGenC = "cOutput.%s" % param._id # pragma: no cover
elif isinstance(param._sourceElement, AadlParameter):
srcQGenC = "cOutput.%s" % (param._id)
srcQGenC = "cOutput.%s" % param._id
else: # pragma: no cover
panicWithCallStack("%s not supported (yet?)\n" % str(param._sourceElement)) # pragma: no cover
return srcQGenC
def TargetVar(self, unused_nodeTypename, unused_encoding, unused_node, unused_subProgram, unused_subProgramImplementation, param, unused_leafTypeDict, unused_names):
if isinstance(param._sourceElement, AadlPort):
dstQGenC = "cInput.%s" % (param._id) # pragma: no cover
dstQGenC = "cInput.%s" % param._id # pragma: no cover
elif isinstance(param._sourceElement, AadlParameter):
dstQGenC = "cInput.%s" % (param._id)
dstQGenC = "cInput.%s" % param._id
else: # pragma: no cover
panicWithCallStack("%s not supported (yet?)\n" % str(param._sourceElement)) # pragma: no cover
return dstQGenC
......
......@@ -374,15 +374,15 @@ class FromOSStoRTDS(RecursiveMapper):
lines.append(" int i;\n")
lines.append(" for(i=0; i<%s.length; i++) {\n" % srcVar)
lines.append(" unsigned char value = %s.value[i];\n" % srcVar)
lines.append(" %s.cont[i].cont[0] = value & 128;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[1] = value & 64;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[2] = value & 32;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[3] = value & 16;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[4] = value & 8;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[5] = value & 4;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[6] = value & 2;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[7] = value & 1;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].length = 8;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[0] = value & 128;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[1] = value & 64;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[2] = value & 32;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[3] = value & 16;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[4] = value & 8;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[5] = value & 4;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[6] = value & 2;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[7] = value & 1;\n" % dstSDLVariable)
lines.append(" %s.cont[i].length = 8;\n" % dstSDLVariable)
lines.append(" }\n")
lines.append(" while(i<%d) {\n" % node._range[-1])
lines.append(" %s.cont[i].cont[0]=0;\n" % dstSDLVariable)
......
......@@ -340,15 +340,15 @@ class FromASN1SCCtoObjectGeode(RecursiveMapper):
lines.append(" int i;\n")
lines.append(" for(i=0; i<%s; i++) {\n" % limit)
lines.append(" unsigned char value = %s.arr[i];\n" % srcVar)
lines.append(" %s.cont[i].cont[0] = (value & 128) >> 7;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[1] = (value & 64) >> 6;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[2] = (value & 32) >> 5;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[3] = (value & 16) >> 4;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[4] = (value & 8) >> 3;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[5] = (value & 4) >> 2;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[6] = (value & 2) >> 1;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[7] = value & 1;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].length = 8;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[0] = (value & 128) >> 7;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[1] = (value & 64) >> 6;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[2] = (value & 32) >> 5;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[3] = (value & 16) >> 4;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[4] = (value & 8) >> 3;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[5] = (value & 4) >> 2;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[6] = (value & 2) >> 1;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[7] = value & 1;\n" % dstSDLVariable)
lines.append(" %s.cont[i].length = 8;\n" % dstSDLVariable)
lines.append(" }\n")
lines.append(" while(i<%d) {\n" % node._range[-1])
lines.append(" %s.cont[i].cont[0]=0;\n" % dstSDLVariable)
......@@ -457,15 +457,15 @@ class FromOSStoObjectGeode(RecursiveMapper):
lines.append(" int i;\n")
lines.append(" for(i=0; i<%s.length; i++) {\n" % srcVar)
lines.append(" unsigned char value = %s.value[i];\n" % srcVar)
lines.append(" %s.cont[i].cont[0] = value & 128;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[1] = value & 64;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[2] = value & 32;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[3] = value & 16;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[4] = value & 8;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[5] = value & 4;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[6] = value & 2;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[7] = value & 1;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].length = 8;\n" % (dstSDLVariable))
lines.append(" %s.cont[i].cont[0] = value & 128;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[1] = value & 64;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[2] = value & 32;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[3] = value & 16;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[4] = value & 8;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[5] = value & 4;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[6] = value & 2;\n" % dstSDLVariable)
lines.append(" %s.cont[i].cont[7] = value & 1;\n" % dstSDLVariable)
lines.append(" %s.cont[i].length = 8;\n" % dstSDLVariable)
lines.append(" }\n")
lines.append(" while(i<%d) {\n" % node._range[-1])
lines.append(" %s.cont[i].cont[0]=0;\n" % dstSDLVariable)
......@@ -650,7 +650,7 @@ class OG_GlueGenerator(ASynchronousToolGlueGenerator):
(self.CleanNameAsToolWants(nodeTypename), self.CleanNameAsToolWants(nodeTypename)))
fileOutHeader.write(
'\tfprintf(stderr, "Could not encode %s (at %%s, %%d), error message was %%s\\n", __FILE__, __LINE__, ossGetErrMsg(g_world));\\\n' %
(nodeTypename))
nodeTypename)
fileOutHeader.write(" varName##_len = -1;\\\n")
fileOutHeader.write(" } else {\\\n")
fileOutHeader.write(" memcpy(&varName[0], strm.value, strm.length);\\\n")
......@@ -666,7 +666,7 @@ class OG_GlueGenerator(ASynchronousToolGlueGenerator):
self.CleanNameAsToolWants(nodeTypename)))
fileOutHeader.write(
'\tfprintf(stderr, "Could not encode %s (at %%s, %%d), error code was %%d\\n", __FILE__, __LINE__, errorCode);\\\n' %
(nodeTypename))
nodeTypename)
fileOutHeader.write(" varName##_len = -1;\\\n")
fileOutHeader.write(" } else {\\\n")
fileOutHeader.write(" varName##_len = BitStream_GetLength(&strm);\\\n")
......
......@@ -271,7 +271,7 @@ class SynchronousToolGlueGenerator:
" if (ossEncode(g_world, OSS_%s_PDU, &var_%s, &strm) != 0) {\n" %
(self.CleanNameAsToolWants(nodeTypename), self.CleanNameAsToolWants(nodeTypename)))
self.C_SourceFile.write(
' fprintf(stderr, "Could not encode %s (at %%s, %%d), errorMessage was %%s\\n", __FILE__, __LINE__, ossGetErrMsg(g_world));\n' % (nodeTypename))
' fprintf(stderr, "Could not encode %s (at %%s, %%d), errorMessage was %%s\\n", __FILE__, __LINE__, ossGetErrMsg(g_world));\n' % nodeTypename)
self.C_SourceFile.write(" return -1;\n")
self.C_SourceFile.write(" } else {\n")
self.C_SourceFile.write(" assert(strm.length <= iMaxBufferSize);\n")
......@@ -287,7 +287,7 @@ class SynchronousToolGlueGenerator:
"ACN_" if encoding.lower() == "acn" else "",
self.CleanNameAsToolWants(nodeTypename)))
self.C_SourceFile.write(
' fprintf(stderr, "Could not encode %s (at %%s, %%d), errorCode was %%d\\n", __FILE__, __LINE__, errorCode);\n' % (nodeTypename))
' fprintf(stderr, "Could not encode %s (at %%s, %%d), errorCode was %%d\\n", __FILE__, __LINE__, errorCode);\n' % nodeTypename)
self.C_SourceFile.write(" return -1;\n")
self.C_SourceFile.write(" } else {\n")
self.C_SourceFile.write(" return BitStream_GetLength(&strm);\n")
......@@ -407,7 +407,7 @@ class SynchronousToolGlueGenerator:
self.C_SourceFile.write(" return 0;\n")
self.C_SourceFile.write(" } else {\n")
self.C_SourceFile.write(
' fprintf(stderr, "Could not decode %s (at %%s, %%d), error message was %%s\\n", __FILE__, __LINE__, ossGetErrMsg(g_world));\n' % (nodeTypename))
' fprintf(stderr, "Could not decode %s (at %%s, %%d), error message was %%s\\n", __FILE__, __LINE__, ossGetErrMsg(g_world));\n' % nodeTypename)
self.C_SourceFile.write(" return -1;\n")
self.C_SourceFile.write(" }\n")
self.C_SourceFile.write("}\n\n")
......@@ -415,7 +415,7 @@ class SynchronousToolGlueGenerator:
self.C_SourceFile.write(" return 0;\n")
self.C_SourceFile.write(" } else {\n")
self.C_SourceFile.write(
' fprintf(stderr, "Could not decode %s (at %%s, %%d), error code was %%d\\n", __FILE__, __LINE__, errorCode);\n' % (nodeTypename))
' fprintf(stderr, "Could not decode %s (at %%s, %%d), error code was %%d\\n", __FILE__, __LINE__, errorCode);\n' % nodeTypename)
self.C_SourceFile.write(" return -1;\n")
self.C_SourceFile.write(" }\n")
self.C_SourceFile.write("}\n\n")
......
......@@ -376,7 +376,7 @@ end Stream_Element_Buffer;
o.write(' Type_Source_Name => "%s";\n' % asnTypename)
o.write(' -- what kind of type is this?\n')
prefix = bAADLv2 and "TASTE" or "assert_properties"
o.write(' %s::ASN1_Basic_Type =>' % (prefix))
o.write(' %s::ASN1_Basic_Type =>' % prefix)
if isinstance(node, AsnBool):
o.write('aBOOLEAN;\n')
elif isinstance(node, AsnInt):
......
......@@ -391,7 +391,7 @@ Members:
utility.panic(
"member '%s' appears more than once in ENUMERATED %s" % ( # pragma: no cover
elem[0],
((self._lineno is not None) and ("defined in line %s" % self._lineno) or ("")))) # pragma: no cover
("defined in line %s" % self._lineno) if self._lineno is not None else "")) # pragma: no cover
else:
existing[elem[0]] = 1
......@@ -473,7 +473,7 @@ Members:
utility.panic(
"member '%s' appears more than once in %s" % ( # pragma: no cover
elem[0],
((self._lineno is not None) and ("defined in line %s" % self._lineno) or ("")))) # pragma: no cover
("defined in line %s" % self._lineno) if self._lineno is not None else "")) # pragma: no cover
else:
existing[elem[0]] = 1
......@@ -514,7 +514,7 @@ class AsnSet(AsnComplexNode):
utility.panic(
"member '%s' appears more than once in %s" % ( # pragma: no cover
elem[0],
((self._lineno is not None) and ("defined in line %s" % self._lineno) or ("")))) # pragma: no cover
("defined in line %s" % self._lineno) if self._lineno is not None else "")) # pragma: no cover
else:
existing[elem[0]] = 1
......@@ -564,7 +564,7 @@ Members:
utility.panic(
"member '%s' appears more than once in CHOICE %s" % ( # pragma: no cover
elem[0],
((self._lineno is not None) and ("defined in line %s" % self._lineno) or ("")))) # pragma: no cover
("defined in line %s" % self._lineno) if self._lineno is not None else "")) # pragma: no cover
else:
existing[elem[0]] = 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment