From 99c42d62491307279403059690fa31be1fb3af63 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Mon, 2 May 2011 05:04:36 +0000 Subject: Minor fixes to various parts of CVC4, including the removal of the uintptr_t constructors for Type and Expr (which existed due to ANTLR limitations). These issues are now handled (as a hack, due to said limitations) in the parser rather than the CVC4 core. --- src/main/interactive_shell.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main') diff --git a/src/main/interactive_shell.cpp b/src/main/interactive_shell.cpp index cf04dacdf..707fc0ef3 100644 --- a/src/main/interactive_shell.cpp +++ b/src/main/interactive_shell.cpp @@ -130,7 +130,7 @@ Command* InteractiveShell::readCommand() { throw ParserException("Interactive input broken."); } - char* lineBuf; + char* lineBuf = NULL; string input; stringbuf sb; string line; @@ -138,12 +138,12 @@ Command* InteractiveShell::readCommand() { /* Prompt the user for input. */ if(d_usingReadline) { #if HAVE_LIBREADLINE - lineBuf = ::readline("CVC4> "); - if(lineBuf != NULL && lineBuf[0] != '\0') { - ::add_history(lineBuf); - } - line = lineBuf == NULL ? "" : lineBuf; - free(lineBuf); + lineBuf = ::readline("CVC4> "); + if(lineBuf != NULL && lineBuf[0] != '\0') { + ::add_history(lineBuf); + } + line = lineBuf == NULL ? "" : lineBuf; + free(lineBuf); #endif /* HAVE_LIBREADLINE */ } else { d_out << "CVC4> " << flush; -- cgit v1.2.3