Commit e84e578b authored by rdubner's avatar rdubner

Start converting to using universal VERSION.H for versioning

parent 5901be54
......@@ -529,11 +529,14 @@ CreateSymc(PARAMETERS &params,
params.symc << ss.str();
ss.str("");
bool in_copyright = true;
// Copy over the Python script, line by line, getting rid of comments
// that appear after the copyright notice
char *py = new char[___python_cprint_py_len+1];
py[0] = '\0';
size_t index=0;
while(index < ___python_cprint_py_len) {
// Read the next line from the .h file
string seg;
while(index < ___python_cprint_py_len) {
char ch = ___python_cprint_py[index++];
......@@ -543,7 +546,7 @@ CreateSymc(PARAMETERS &params,
seg += ch;
}
size_t nfound_comment = seg.find("#");
if( nfound_comment != string::npos ) {
if( !in_copyright AND nfound_comment != string::npos ) {
// There is a pound sign, which is the Python comment signal
size_t nfound_quote = seg.find_first_of("'\"");
if( nfound_quote > nfound_comment ) {
......@@ -556,6 +559,11 @@ CreateSymc(PARAMETERS &params,
seg += '\n';
size_t t = strlen(py);
strcpy(py+t,seg.c_str());
if( seg.find("EndOfCopyright") != string::npos )
{
in_copyright = false;
}
}
}
......
......@@ -30,8 +30,7 @@
#include <iostream>
#include <regex>
#include "params.h"
#include "utils.h"
#ifdef _WIN32
#include "getopt.h"
#include <io.h>
......@@ -42,6 +41,11 @@
#include <dirent.h>
#endif
#include "params.h"
#include "utils.h"
#include "../version.h"
#define EQ ==
#define AND &&
#define OR ||
......
......@@ -33,7 +33,7 @@
#include <string>
#include <fstream>
#define VERSION "2.3"
#include "../version.h"
class FILENAME
{
......
......@@ -26,10 +26,10 @@
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
# This module implements the gdb extension commands cprint and cwatch
#EndOfCopyright########################################################
# This module implements the gdb extension command cprint
# This module implements the gdb extension commands cprint and cwatch
#
# This script is read by the COBST program and incorporated into a
# C module that gets compiled and linked into the final executable
......@@ -3140,6 +3140,11 @@ if 'gdb' in sys.modules :
def __init__ (self):
super (CPrint, self).__init__ ("print", gdb.COMMAND_USER)
###########################################################################
## The version number in the next line is updated by a Linux bash script. #
## The text "Version x.x" has to appear in square brackets. #
## Don't mess with it! #
###########################################################################
print('registering CPrint (Usage is "print <COBOL identifier>") [Version 2.3]')
self.Worker = CPrintWorker()
self.TabFile = TabFileInformation();
......
......@@ -34,7 +34,7 @@
#include <fstream>
#include <vector>
#define VERSION "2.3"
#include "../version.h"
class FILENAME
{
......
// This file is used by subordinate projects to keep the versioning
// consistent through compilations and packaging.
//
// Note that for the python subdirectory, there is a little bit of
// Linux-only trickery to get the version code in place.
//
#define VERSION "2.4"
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