Perl 5.0
Convert Dbase, Clipper, FOXPRO Source Code to XBASE C++ Code for use with XBASE DBMS Library
.cpp File and .h File
1st arg = filename
The script tries to keep track of the databases used in different workareas. But the flow through your program cannot be determined, so in some cases you have to help the script a bit by giving additional info.
Three special comments have been designed to add this info:
* XB2CPP(SelectedArea) or * XB2CPP(SelectedArea,Workarea1,Alias1,Wa2,Al2...) or * XB2CPP(SelA,WA1,Al1[Total1, Active1],Wa2, Al2[Tot2,Act2])
e.g. * XB2CPP(3,3,ZP,2,PL) will inform the script for example at the beginning of a PROCEDURE that a database with Alias ZP is opened in workarea 3 and a database with alias PL is opened in workarea2 and when calling this procedure always workarea 3 is selected.
The third alternative of this statement makes it possible to define the number of open indices and which one is the active index, as given by a previous SET INDEX TO or USE and SET ORDER TO statements. The script cannot know, which procedures, statements have been executed before and opened indices.... So * XB2CPP(2,2,ZP[2,1]) will inform the script about an open database alias ZP in workarea 2 which is currently selected and has two open indices where the first one is the active one.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (version 2 of the License)
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.