Commit a00fa031 authored by rdubner's avatar rdubner

Prepend the nine-digit length to VARIABLE_STRING

parent 970f8a16
......@@ -118,19 +118,28 @@ CreateSymc(PARAMETERS &params,
string current_program = "";
// At this point, ss contains a potentially huge literal string.
// We're going to bust it up into smaller pieces.
// The Python code, in order to read it fairly efficiently, needs to know
// how long it is. We are going to prepend a nine digit number to the
// beginning of the string
string s = ss.str();
char ach[16];
sprintf(ach,"%9.9u",(int)ss.str().size()+9);
string s = ach;
s += ss.str();
// Build the C-code for the global variable string
ss.str("");
// Start with the name
for(size_t i=0; i<fname.size(); i++) {
if( fname[i] EQ '.' ) {
fname[i] = '_' ;
}
}
ss << "char VARIABLE_STRING_" << Upper(fname) << "[]=" << endl;
// Break up the actual data into smaller pieces, so that it will compile.
const int SEGMENT_LENGTH = 78;
int walker = 0;
int remaining = (int)s.length();
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommandArguments>-f C:\Users\Bob\repos\cbl-gdb-samples\ref_test_8\rtest C:\Users\Bob\repos\cbl-gdb-samples\ref_test_8\rtest.cbl</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>-f C:\Users\Bob\repos\cbl-gdb-samples\ref_test_2\rtest C:\Users\Bob\repos\cbl-gdb-samples\ref_test_2\rtest.cbl</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LocalDebuggerCommandArguments>-f C:\Users\Bob\repos\cbl-gdb-samples\ref_test_8\rtest C:\Users\Bob\repos\cbl-gdb-samples\ref_test_8\rtest.cbl</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>-f C:\Users\Bob\repos\cbl-gdb-samples\ref_test_2\rtest C:\Users\Bob\repos\cbl-gdb-samples\ref_test_2\rtest.cbl</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerCommandArguments>-f C:\Users\Bob\repos\cbl-gdb-samples\ref_test_8\rtest C:\Users\Bob\repos\cbl-gdb-samples\ref_test_8\rtest.cbl</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>-f C:\Users\Bob\repos\cbl-gdb-samples\ref_test_2\rtest C:\Users\Bob\repos\cbl-gdb-samples\ref_test_2\rtest.cbl</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LocalDebuggerCommandArguments>-f C:\Users\Bob\repos\cbl-gdb-samples\ref_test_8\rtest C:\Users\Bob\repos\cbl-gdb-samples\ref_test_8\rtest.cbl</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>-f C:\Users\Bob\repos\cbl-gdb-samples\ref_test_2\rtest C:\Users\Bob\repos\cbl-gdb-samples\ref_test_2\rtest.cbl</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
</Project>
\ No newline at end of file
Markdown is supported
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