Commit f28e0ee7 authored by rdubner's avatar rdubner
Browse files

Implement COBST_NOISY environment variable

parent beb4853f
......@@ -49,6 +49,9 @@ using namespace std;
//#define DUMPING
// When this global variable is on, every input line is echoed
bool GV_echo_line = false;
static void
CreateSymc(PARAMETERS &params,
const VARIABLES &variables,
......@@ -261,6 +264,16 @@ main(int argc, char *argv[])
{
PROFILER;
char *noisy=getenv("COBST_NOISY");
if( noisy )
{
int nnoisy=atoi(noisy);
if( nnoisy )
{
GV_echo_line = true;
}
}
// Decode the command line for our purposes.
PARAMETERS params;
params.GetParameters(argc, argv);
......
......@@ -3,17 +3,25 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<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>
<LocalDebuggerEnvironment>
</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<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>
<LocalDebuggerEnvironment>
</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<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>
<LocalDebuggerEnvironment>
</LocalDebuggerEnvironment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<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>
<LocalDebuggerEnvironment>
</LocalDebuggerEnvironment>
</PropertyGroup>
</Project>
\ No newline at end of file
......@@ -310,7 +310,13 @@ COB_FIELDS::ScanCFile(const string &path, const string &fname)
char ach[16384];
static const char COB_SET_DATA[] = "COB_SET_DATA";
int line_number = 1;
while( fgets(ach,sizeof(ach),f) ) {
extern bool GV_echo_line;
if( GV_echo_line )
{
printf("B-%d %s",line_number++,ach);
}
char *pcsd;
if( (pcsd=strstr(ach,COB_SET_DATA)) ) {
// This line has COB_SET_DATA in it.
......
......@@ -59,7 +59,13 @@ VARIABLES::ScanCFile(const string &path, const string &fname)
char ach[16384];
string current_record_type = "X" ;
int line_number = 1;
while( fgets(ach,sizeof(ach),f) ) {
extern bool GV_echo_line;
if( GV_echo_line )
{
printf("A-%d %s",line_number++,ach);
}
if( strstr(ach, ": Entry ") ) {
string input = ach;
......
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