Fixes MNX with ";"
Fixed Recreating MNX containing ";" by bjornhoeksel fixed #80
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# FoxBin2Prg v1.19.70
|
# FoxBin2Prg v1.19.71
|
||||||
**Binary/Text Converting program for Microsoft Visual FoxPro**
|
**Binary/Text Converting program for Microsoft Visual FoxPro**
|
||||||
|
|
||||||
## Lutz Scheffler
|
## Lutz Scheffler
|
||||||
@@ -138,4 +138,4 @@ For usage see [documentation](./docs/FoxBin2Prg.md)
|
|||||||
## Contribution
|
## Contribution
|
||||||
See [contribution](./.github/CONTRIBUTING.md)
|
See [contribution](./.github/CONTRIBUTING.md)
|
||||||
|
|
||||||
Last changed: _2022/03/16_ 
|
Last changed: _2022/03/30_ 
|
||||||
Binary file not shown.
@@ -10,8 +10,8 @@ local;
|
|||||||
|
|
||||||
lcappName = "FoxBin2Prg"
|
lcappName = "FoxBin2Prg"
|
||||||
*Set following two numbers on version
|
*Set following two numbers on version
|
||||||
ldDate = date(2022,03,16)
|
ldDate = date(2022,03,30)
|
||||||
lcmajorVersion = "1.19.70"
|
lcmajorVersion = "1.19.71"
|
||||||
|
|
||||||
*lnJulian = val(sys(11, m.ldDate)) - val(sys(11, {^2000-01-01}))
|
*lnJulian = val(sys(11, m.ldDate)) - val(sys(11, {^2000-01-01}))
|
||||||
*lcJulian = padl(transform(lnJulian), 4, '0')
|
*lcJulian = padl(transform(lnJulian), 4, '0')
|
||||||
@@ -39,6 +39,9 @@ Demo video using FoxBin2Prg with PlasticSCM: http://youtu.be/sE4wQ50Itqg
|
|||||||
|
|
||||||
+++++++++++++++++++++++ Change History +++++++++++++++++++++++
|
+++++++++++++++++++++++ Change History +++++++++++++++++++++++
|
||||||
|
|
||||||
|
2022-03-30 v1.19.71
|
||||||
|
- Bug Fix: Convert menu mn2 to mnx with skip for that contains a string with ; sign is missing part after that sign in mnx. (bjornhoeksel)
|
||||||
|
|
||||||
2022-03-16 v1.19.70
|
2022-03-16 v1.19.70
|
||||||
- Bug Fix: Last bar in menu files are in some situations not converted correctly back in the mnx file. (bjornhoeksel)
|
- Bug Fix: Last bar in menu files are in some situations not converted correctly back in the mnx file. (bjornhoeksel)
|
||||||
- Docu: Buglist internal of FoxBin2Prg reordered
|
- Docu: Buglist internal of FoxBin2Prg reordered
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
appName = FoxBin2Prg
|
appName = FoxBin2Prg
|
||||||
appID = FoxBin2Prg
|
appID = FoxBin2Prg
|
||||||
majorVersion = 1.19.70
|
majorVersion = 1.19.71
|
||||||
excludeFiles = *.bak,*.bat,*.fxp,*.tbk,*.tmp,*.dat,*.log,*.cvp,README.md,.gitignore,*.zip*,*.7z*,*- copia.*,*.private.*,test_*.*,xx*.*,*.lnk,vfp_init.*,tmp*.*,*.err, *.conflict.*, *.private., .gitignore, *.pui. *.prj*
|
excludeFiles = *.bak,*.bat,*.fxp,*.tbk,*.tmp,*.dat,*.log,*.cvp,README.md,.gitignore,*.zip*,*.7z*,*- copia.*,*.private.*,test_*.*,xx*.*,*.lnk,vfp_init.*,tmp*.*,*.err, *.conflict.*, *.private., .gitignore, *.pui. *.prj*
|
||||||
excludeFolders = *.plastic*,*ThorUpdater*,*Documentacion*,*foxunit*,*foxunit_*,*pruebas varias*,*versiones*,*datos_test*
|
excludeFolders = *.plastic*,*ThorUpdater*,*Documentacion*,*foxunit*,*foxunit_*,*pruebas varias*,*versiones*,*datos_test*
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ _**Note:** you can click on the version number for downloading this version from
|
|||||||
|
|
||||||
| Rel.Date | Developer | Version | Details |
|
| Rel.Date | Developer | Version | Details |
|
||||||
| - | - | - | - |
|
| - | - | - | - |
|
||||||
|
| 2022/03/30 | bjornhoeksel | [v1.19.71](https://github.com/fdbozzo/foxbin2prg/releases/tag/v1.19.71) | **Bug Fix**: Convert menu mn2 to mnx with skip for that contains a string with ; sign is missing part after that sign in mnx. (bjornhoeksel) |
|
||||||
| 2022/03/16 | LScheffler | [v1.19.70](https://github.com/fdbozzo/foxbin2prg/releases/tag/v1.19.70) | **Bug Fix**: Last bar in menu files are in some situations not converted correctly back in the mnx file. (bjornhoeksel) |
|
| 2022/03/16 | LScheffler | [v1.19.70](https://github.com/fdbozzo/foxbin2prg/releases/tag/v1.19.70) | **Bug Fix**: Last bar in menu files are in some situations not converted correctly back in the mnx file. (bjornhoeksel) |
|
||||||
| | | | **Enhancement**: Buglist internal of FoxBin2Prg reordered |
|
| | | | **Enhancement**: Buglist internal of FoxBin2Prg reordered |
|
||||||
| | | | **Enhancement**: Enhancement to documentation |
|
| | | | **Enhancement**: Enhancement to documentation |
|
||||||
@@ -408,4 +409,4 @@ _**Note:** you can click on the version number for downloading this version from
|
|||||||
This project is part of [VFPX](https://vfpx.github.io/).
|
This project is part of [VFPX](https://vfpx.github.io/).
|
||||||
|
|
||||||
----
|
----
|
||||||
Last changed: _2022/03/16_ 
|
Last changed: _2022/03/30_ 
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
*################################################################################################################
|
*################################################################################################################
|
||||||
*FOXBIN2PRG.CFG configuration options: (If no values given, these are the DEFAULTS)
|
*FOXBIN2PRG.CFG configuration options: (If no values given, these are the DEFAULTS)
|
||||||
*Version: v1.19.70
|
*Version: v1.19.71
|
||||||
*****************************************************************************************************************
|
*****************************************************************************************************************
|
||||||
|
|
||||||
* Note, configuration files will follow an inheritance.
|
* Note, configuration files will follow an inheritance.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
*################################################################################################################
|
*################################################################################################################
|
||||||
*-- Individual DBF configuration file (syntax: filename.dbf.cfg) Defaults see FoxBin2prg.cfg
|
*-- Individual DBF configuration file (syntax: filename.dbf.cfg) Defaults see FoxBin2prg.cfg
|
||||||
*Version: v1.19.70
|
*Version: v1.19.71
|
||||||
*****************************************************************************************************************
|
*****************************************************************************************************************
|
||||||
|
|
||||||
*DBF_Conversion_Support: <0,1,2,4,8> && 0=No support, 1=Generate Header TXT only (Diff), 2=Generate Header TXT and BIN (Merge/Only Structure!), 4=Generate TXT with DATA (Diff), 8=Export and Import DATA (Merge/Structure & Data)
|
*DBF_Conversion_Support: <0,1,2,4,8> && 0=No support, 1=Generate Header TXT only (Diff), 2=Generate Header TXT and BIN (Merge/Only Structure!), 4=Generate TXT with DATA (Diff), 8=Export and Import DATA (Merge/Structure & Data)
|
||||||
|
|||||||
BIN
foxbin2prg.exe
BIN
foxbin2prg.exe
Binary file not shown.
@@ -26,7 +26,7 @@ _LegalTrademark = "MIT License"
|
|||||||
_ProductName = "FOXBIN2PRG"
|
_ProductName = "FOXBIN2PRG"
|
||||||
_MajorVer = "1"
|
_MajorVer = "1"
|
||||||
_MinorVer = "19"
|
_MinorVer = "19"
|
||||||
_Revision = "64"
|
_Revision = "71"
|
||||||
_LanguageID = "1034"
|
_LanguageID = "1034"
|
||||||
_AutoIncrement = "0"
|
_AutoIncrement = "0"
|
||||||
*</DevInfo>
|
*</DevInfo>
|
||||||
|
|||||||
BIN
foxbin2prg.pjt
BIN
foxbin2prg.pjt
Binary file not shown.
BIN
foxbin2prg.pjx
BIN
foxbin2prg.pjx
Binary file not shown.
121
foxbin2prg.prg
121
foxbin2prg.prg
@@ -287,6 +287,7 @@
|
|||||||
* 25/02/2022 LScheffler v1.19.69 Docu: examples and template for config files enhanced
|
* 25/02/2022 LScheffler v1.19.69 Docu: examples and template for config files enhanced
|
||||||
* 16/03/2022 LScheffler v1.19.70 Bug Fix: Last bar in menu files are in some situations not converted correctly back in the mnx file. (bjornhoeksel)
|
* 16/03/2022 LScheffler v1.19.70 Bug Fix: Last bar in menu files are in some situations not converted correctly back in the mnx file. (bjornhoeksel)
|
||||||
* 16/03/2022 LScheffler v1.19.70 Docu: Bug list below
|
* 16/03/2022 LScheffler v1.19.70 Docu: Bug list below
|
||||||
|
* 30/03/2022 bjornhoeksel v1.19.71 Bug Fix: Convert menu mn2 to mnx with skip for that contains a string with ; sign is missing part after that sign in mnx. (bjornhoeksel)
|
||||||
* </HISTORIAL DE CAMBIOS Y NOTAS IMPORTANTES>
|
* </HISTORIAL DE CAMBIOS Y NOTAS IMPORTANTES>
|
||||||
*
|
*
|
||||||
*---------------------------------------------------------------------------------------------------
|
*---------------------------------------------------------------------------------------------------
|
||||||
@@ -448,6 +449,7 @@
|
|||||||
* 23/02/2022 bjornhoeksel Bug REPORT v1.19.68 Missing class when building text file from corrupted VCX
|
* 23/02/2022 bjornhoeksel Bug REPORT v1.19.68 Missing class when building text file from corrupted VCX
|
||||||
* 23/02/2022 bjornhoeksel Bug REPORT v1.19.68 Creating a class, when an object is named equal to this class
|
* 23/02/2022 bjornhoeksel Bug REPORT v1.19.68 Creating a class, when an object is named equal to this class
|
||||||
* 16/03/2022 bjornhoeksel Bug REPORT v1.19.69 Last bar in menu files are in some situations not converted correctly back in the mnx file.
|
* 16/03/2022 bjornhoeksel Bug REPORT v1.19.69 Last bar in menu files are in some situations not converted correctly back in the mnx file.
|
||||||
|
* 30/03/2022 bjornhoeksel Bug REPORT v1.19.70 Convert menu mn2 to mnx with skip for that contains a string with ; sign is missing part after that sign in mnx.
|
||||||
|
|
||||||
* </TESTEO Y REPORTE DE BUGS (AGRADECIMIENTOS)>
|
* </TESTEO Y REPORTE DE BUGS (AGRADECIMIENTOS)>
|
||||||
*
|
*
|
||||||
@@ -963,7 +965,7 @@ Define Class c_foxbin2prg As Session
|
|||||||
Protected n_CFG_Actual, l_Main_CFG_Loaded, o_Configuration, l_CFG_CachedAccess
|
Protected n_CFG_Actual, l_Main_CFG_Loaded, o_Configuration, l_CFG_CachedAccess
|
||||||
*--
|
*--
|
||||||
n_FB2PRG_Version = 1.19
|
n_FB2PRG_Version = 1.19
|
||||||
c_FB2PRG_Version_Real = '1.19.70'
|
c_FB2PRG_Version_Real = '1.19.71'
|
||||||
*--
|
*--
|
||||||
c_Language = '' && EN, FR, ES, DE
|
c_Language = '' && EN, FR, ES, DE
|
||||||
c_Language_In = '(auto)'
|
c_Language_In = '(auto)'
|
||||||
@@ -28530,6 +28532,77 @@ Define Class CL_MENU_OPTION As CL_MENU_COL_BASE
|
|||||||
Return llBloqueEncontrado
|
Return llBloqueEncontrado
|
||||||
Endproc
|
Endproc
|
||||||
|
|
||||||
|
*!* Changd By: BH 30.3.2022
|
||||||
|
*!* <pdm>
|
||||||
|
*!* <change date="{^2022-03-16,19:41:00}">Changd By: BH <br />
|
||||||
|
*!* <a href"https://github.com/fdbozzo/foxbin2prg/issues/80">Issue #80</a>, by bjornhoeksel
|
||||||
|
*!* Support ; sign in skip for expression between quotes
|
||||||
|
*!* </change>
|
||||||
|
*!* </pdm>
|
||||||
|
|
||||||
|
PROCEDURE remove_strings
|
||||||
|
*---------------------------------------------------------------------------------------------------
|
||||||
|
* Remove all things between quotes
|
||||||
|
* PARÁMETROS:
|
||||||
|
* tcLine Contenido de la línea en análisis
|
||||||
|
*---------------------------------------------------------------------------------------------------
|
||||||
|
Lparameters tcLine
|
||||||
|
* m.p_format_class = parameter object
|
||||||
|
|
||||||
|
LOCAL lnStringCount, lnStringNumber, lnStartPosition, lnEndPosition
|
||||||
|
|
||||||
|
* Count the number of '
|
||||||
|
lnStringCount = OCCURS("'", tcLine) / 2
|
||||||
|
|
||||||
|
FOR lnStringNumber = 1 TO lnStringCount
|
||||||
|
* Loop for the number of '
|
||||||
|
|
||||||
|
* Get start position of '
|
||||||
|
lnStartPosition = ATC("'", tcLine, lnStringNumber)
|
||||||
|
* Get end position of '
|
||||||
|
lnEndPosition = ATC("'", tcLine, lnStringNumber + 1) - lnStartPosition
|
||||||
|
|
||||||
|
* Replace all that stand between ' with ***
|
||||||
|
tcLine = STUFF(tcLine, lnStartPosition, lnEndPosition, '********')
|
||||||
|
NEXT
|
||||||
|
|
||||||
|
* Count the number of "
|
||||||
|
lnStringCount = OCCURS(["], tcLine) / 2
|
||||||
|
|
||||||
|
FOR lnStringNumber = 1 TO lnStringCount
|
||||||
|
* Loop for the number of "
|
||||||
|
|
||||||
|
* Get start position of "
|
||||||
|
lnStartPosition = ATC(["], tcLine, lnStringNumber)
|
||||||
|
* Get end position of '
|
||||||
|
lnEndPosition = ATC(["], tcLine, lnStringNumber + 1) - lnStartPosition
|
||||||
|
|
||||||
|
* Replace all that stand between " with ***
|
||||||
|
tcLine = STUFF(tcLine, lnStartPosition, lnEndPosition, '********')
|
||||||
|
NEXT
|
||||||
|
|
||||||
|
* Count the number of [
|
||||||
|
lnStringCount = OCCURS("[", tcLine)
|
||||||
|
|
||||||
|
FOR lnStringNumber = 1 TO lnStringCount
|
||||||
|
* Loop for the number of [
|
||||||
|
|
||||||
|
* Get start position of [
|
||||||
|
lnStartPosition = AT("[", tcLine, lnStringNumber) + 1
|
||||||
|
|
||||||
|
* Get end position of ]
|
||||||
|
lnEndPosition = AT("]", tcLine, lnStringNumber) - lnStartPosition
|
||||||
|
|
||||||
|
* Replace all that stand between [ with ***
|
||||||
|
tcLine = STUFF(tcLine, lnStartPosition, lnEndPosition, '********')
|
||||||
|
NEXT
|
||||||
|
|
||||||
|
* Return line without string content
|
||||||
|
RETURN tcLine
|
||||||
|
|
||||||
|
ENDPROC
|
||||||
|
|
||||||
|
*!* /Changd By: BH 30.3.2022
|
||||||
|
|
||||||
Procedure analyzeCodeBlock_DefineBAR
|
Procedure analyzeCodeBlock_DefineBAR
|
||||||
*---------------------------------------------------------------------------------------------------
|
*---------------------------------------------------------------------------------------------------
|
||||||
@@ -28548,7 +28621,7 @@ Define Class CL_MENU_OPTION As CL_MENU_COL_BASE
|
|||||||
|
|
||||||
Try
|
Try
|
||||||
Local llBloqueEncontrado, lcText, loReg, lnPos, lcBarName, lcExpr, lcComment, lcProcName, lcProcCode, loEx As Exception ;
|
Local llBloqueEncontrado, lcText, loReg, lnPos, lcBarName, lcExpr, lcComment, lcProcName, lcProcCode, loEx As Exception ;
|
||||||
, lnNegContainer, lnNegObject
|
, lnNegContainer, lnNegObject, lnLineEnd, lcLineNoStrings
|
||||||
Store '' To lcText, lcComment, lcBarName
|
Store '' To lcText, lcComment, lcBarName
|
||||||
|
|
||||||
* Estructura ejemplo a analizar:
|
* Estructura ejemplo a analizar:
|
||||||
@@ -28625,6 +28698,7 @@ Define Class CL_MENU_OPTION As CL_MENU_COL_BASE
|
|||||||
*-- ANALISIS DEL "DEFINE BAR"
|
*-- ANALISIS DEL "DEFINE BAR"
|
||||||
Do Case
|
Do Case
|
||||||
Case ';' $ tcLine
|
Case ';' $ tcLine
|
||||||
|
|
||||||
For I = m.I + 1 To tnCodeLines
|
For I = m.I + 1 To tnCodeLines
|
||||||
.set_Line( @tcLine, @taCodeLines, m.I )
|
.set_Line( @tcLine, @taCodeLines, m.I )
|
||||||
|
|
||||||
@@ -28635,6 +28709,25 @@ Define Class CL_MENU_OPTION As CL_MENU_COL_BASE
|
|||||||
Endif
|
Endif
|
||||||
Endif
|
Endif
|
||||||
|
|
||||||
|
*!* Changd By: BH 30.3.2022
|
||||||
|
*!* <pdm>
|
||||||
|
*!* <change date="{^2022-03-16,19:41:00}">Changd By: BH <br />
|
||||||
|
*!* <a href"https://github.com/fdbozzo/foxbin2prg/issues/80">Issue #80</a>, by bjornhoeksel
|
||||||
|
*!* Support ; sign in skip for expression between quotes
|
||||||
|
*!* </change>
|
||||||
|
*!* </pdm>
|
||||||
|
lcLineNoStrings = this.remove_strings(tcLine)
|
||||||
|
lnLineEnd = OCCURS(";", lcLineNoStrings)
|
||||||
|
|
||||||
|
IF lnLineEnd > 0
|
||||||
|
* We have ; end line markers not between quotes
|
||||||
|
* Calc first ; not between quotes
|
||||||
|
lnLineEnd = (OCCURS(";", tcLine) - ((OCCURS(";", tcLine) - lnLineEnd))) + 1
|
||||||
|
ELSE
|
||||||
|
* No line markers not between quotes
|
||||||
|
lnLineEnd = 0
|
||||||
|
Endif
|
||||||
|
|
||||||
Do Case
|
Do Case
|
||||||
Case Left( tcLine, 10 ) == 'NEGOTIATE '
|
Case Left( tcLine, 10 ) == 'NEGOTIATE '
|
||||||
lcExpr = Alltrim( Strextract( tcLine, 'NEGOTIATE ', ';', 1, 2 ) )
|
lcExpr = Alltrim( Strextract( tcLine, 'NEGOTIATE ', ';', 1, 2 ) )
|
||||||
@@ -28645,13 +28738,21 @@ Define Class CL_MENU_OPTION As CL_MENU_COL_BASE
|
|||||||
loReg.Location = lnNegContainer + lnNegObject * 2^4
|
loReg.Location = lnNegContainer + lnNegObject * 2^4
|
||||||
|
|
||||||
Case Left( tcLine, 4 ) == 'KEY '
|
Case Left( tcLine, 4 ) == 'KEY '
|
||||||
lcExpr = Alltrim( Strextract( tcLine, 'KEY ', ';', 1, 2 ) )
|
lcExpr = Alltrim( Strextract( tcLine, 'KEY ') )
|
||||||
|
IF lnLineEnd > 0
|
||||||
|
lcExpr = SUBSTR(lcExpr, 1, ATC(';', lcExpr, lnLineEnd)-1)
|
||||||
|
ENDIF
|
||||||
|
|
||||||
lnPos = At( ',', lcExpr )
|
lnPos = At( ',', lcExpr )
|
||||||
loReg.KEYNAME = Alltrim( Left( lcExpr, lnPos-1 ) )
|
loReg.KEYNAME = Alltrim( Left( lcExpr, lnPos-1 ) )
|
||||||
loReg.KeyLabel = Alltrim( Strextract( lcExpr, '"', '"' ) )
|
loReg.KeyLabel = Alltrim( Strextract( lcExpr, '"', '"' ) )
|
||||||
|
|
||||||
Case Left( tcLine, 9 ) == 'SKIP FOR '
|
Case Left( tcLine, 9 ) == 'SKIP FOR '
|
||||||
loReg.SkipFor = Alltrim( Strextract( tcLine, 'SKIP FOR ', ';', 1, 2 ) )
|
loReg.SkipFor = Alltrim( Strextract( tcLine, 'SKIP FOR ') )
|
||||||
|
IF lnLineEnd > 0
|
||||||
|
loReg.SkipFor = SUBSTR(loReg.SkipFor, 1, ATC(';', loReg.SkipFor, lnLineEnd)-1)
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
Case Left( tcLine, 8 ) == 'MESSAGE '
|
Case Left( tcLine, 8 ) == 'MESSAGE '
|
||||||
loReg.Message = Alltrim( Substr( tcLine, 9 ) )
|
loReg.Message = Alltrim( Substr( tcLine, 9 ) )
|
||||||
@@ -28660,12 +28761,20 @@ Define Class CL_MENU_OPTION As CL_MENU_COL_BASE
|
|||||||
loReg.RESNAME = Alltrim( Strextract( tcLine, '"', '"' ) )
|
loReg.RESNAME = Alltrim( Strextract( tcLine, '"', '"' ) )
|
||||||
|
|
||||||
Case Left( tcLine, 8 ) == 'PICTRES '
|
Case Left( tcLine, 8 ) == 'PICTRES '
|
||||||
loReg.RESNAME = Alltrim( Strextract( tcLine, 'PICTRES ', ';', 1, 2 ) )
|
loReg.RESNAME = Alltrim( Strextract( tcLine, 'PICTRES ') )
|
||||||
|
|
||||||
|
IF lnLineEnd > 0
|
||||||
|
loReg.RESNAME = SUBSTR(loReg.RESNAME, 1, ATC(';', loReg.RESNAME, lnLineEnd)-1)
|
||||||
|
ELSE
|
||||||
|
|
||||||
|
ENDIF
|
||||||
loReg.SYSRES = 1
|
loReg.SYSRES = 1
|
||||||
|
|
||||||
Otherwise
|
Otherwise
|
||||||
* Nada
|
* Nada
|
||||||
Endcase
|
ENDCASE
|
||||||
|
*!* /Changd By: BH 30.3.2022
|
||||||
|
|
||||||
|
|
||||||
If Not ';' $ tcLine && Fin
|
If Not ';' $ tcLine && Fin
|
||||||
Exit
|
Exit
|
||||||
|
|||||||
Reference in New Issue
Block a user