diff --git a/README.md b/README.md index 5c3d9b5..989dcb8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# FoxBin2Prg v1.19.70 +# FoxBin2Prg v1.19.71 **Binary/Text Converting program for Microsoft Visual FoxPro** ## Lutz Scheffler @@ -138,4 +138,4 @@ For usage see [documentation](./docs/FoxBin2Prg.md) ## Contribution See [contribution](./.github/CONTRIBUTING.md) -Last changed: _2022/03/16_ ![Picture](./docs/pictures/vfpxpoweredby_alternative.gif) \ No newline at end of file +Last changed: _2022/03/30_ ![Picture](./docs/pictures/vfpxpoweredby_alternative.gif) \ No newline at end of file diff --git a/ThorUpdater/FoxBin2Prg.zip b/ThorUpdater/FoxBin2Prg.zip index d3e647b..861aab6 100644 Binary files a/ThorUpdater/FoxBin2Prg.zip and b/ThorUpdater/FoxBin2Prg.zip differ diff --git a/ThorUpdater/FoxBin2PrgVersion.txt b/ThorUpdater/FoxBin2PrgVersion.txt index 843421f..b5bb3d9 100644 --- a/ThorUpdater/FoxBin2PrgVersion.txt +++ b/ThorUpdater/FoxBin2PrgVersion.txt @@ -10,8 +10,8 @@ local; lcappName = "FoxBin2Prg" *Set following two numbers on version -ldDate = date(2022,03,16) -lcmajorVersion = "1.19.70" +ldDate = date(2022,03,30) +lcmajorVersion = "1.19.71" *lnJulian = val(sys(11, m.ldDate)) - val(sys(11, {^2000-01-01})) *lcJulian = padl(transform(lnJulian), 4, '0') @@ -39,6 +39,9 @@ Demo video using FoxBin2Prg with PlasticSCM: http://youtu.be/sE4wQ50Itqg +++++++++++++++++++++++ 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 - 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 diff --git a/ThorUpdater/Project.txt b/ThorUpdater/Project.txt index bf0b1fb..85992a3 100644 --- a/ThorUpdater/Project.txt +++ b/ThorUpdater/Project.txt @@ -1,5 +1,5 @@ appName = 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* excludeFolders = *.plastic*,*ThorUpdater*,*Documentacion*,*foxunit*,*foxunit_*,*pruebas varias*,*versiones*,*datos_test* diff --git a/docs/FoxBin2Prg_Changes.md b/docs/FoxBin2Prg_Changes.md index 02df6ef..eb4b490 100644 --- a/docs/FoxBin2Prg_Changes.md +++ b/docs/FoxBin2Prg_Changes.md @@ -27,6 +27,7 @@ _**Note:** you can click on the version number for downloading this version from | 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) | | | | | **Enhancement**: Buglist internal of FoxBin2Prg reordered | | | | | **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/). ---- -Last changed: _2022/03/16_ ![Picture](./pictures/vfpxpoweredby_alternative.gif) \ No newline at end of file +Last changed: _2022/03/30_ ![Picture](./pictures/vfpxpoweredby_alternative.gif) \ No newline at end of file diff --git a/foxbin2prg.cfg.txt b/foxbin2prg.cfg.txt index 6bf3d35..f00e631 100644 --- a/foxbin2prg.cfg.txt +++ b/foxbin2prg.cfg.txt @@ -1,6 +1,6 @@ *################################################################################################################ *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. diff --git a/foxbin2prg.dbf.cfg.txt b/foxbin2prg.dbf.cfg.txt index 0b8295d..662f5d7 100644 --- a/foxbin2prg.dbf.cfg.txt +++ b/foxbin2prg.dbf.cfg.txt @@ -1,6 +1,6 @@ *################################################################################################################ *-- 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) diff --git a/foxbin2prg.exe b/foxbin2prg.exe index e1be68d..74cfbc9 100644 Binary files a/foxbin2prg.exe and b/foxbin2prg.exe differ diff --git a/foxbin2prg.pj2 b/foxbin2prg.pj2 index 64f325c..d26f7eb 100644 --- a/foxbin2prg.pj2 +++ b/foxbin2prg.pj2 @@ -26,7 +26,7 @@ _LegalTrademark = "MIT License" _ProductName = "FOXBIN2PRG" _MajorVer = "1" _MinorVer = "19" -_Revision = "64" +_Revision = "71" _LanguageID = "1034" _AutoIncrement = "0" * diff --git a/foxbin2prg.pjt b/foxbin2prg.pjt index 7ecaf2d..30e195b 100644 Binary files a/foxbin2prg.pjt and b/foxbin2prg.pjt differ diff --git a/foxbin2prg.pjx b/foxbin2prg.pjx index 3ea3ae6..3e7069d 100644 Binary files a/foxbin2prg.pjx and b/foxbin2prg.pjx differ diff --git a/foxbin2prg.prg b/foxbin2prg.prg index eb0fd5b..3c8eb05 100644 --- a/foxbin2prg.prg +++ b/foxbin2prg.prg @@ -287,6 +287,7 @@ * 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 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) * * *--------------------------------------------------------------------------------------------------- @@ -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 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. +* 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. * * @@ -963,7 +965,7 @@ Define Class c_foxbin2prg As Session Protected n_CFG_Actual, l_Main_CFG_Loaded, o_Configuration, l_CFG_CachedAccess *-- 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_In = '(auto)' @@ -28530,6 +28532,77 @@ Define Class CL_MENU_OPTION As CL_MENU_COL_BASE Return llBloqueEncontrado Endproc +*!* Changd By: BH 30.3.2022 +*!* +*!* Changd By: BH
+*!* Issue #80, by bjornhoeksel +*!* Support ; sign in skip for expression between quotes +*!*
+*!*
+ + 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 *--------------------------------------------------------------------------------------------------- @@ -28548,7 +28621,7 @@ Define Class CL_MENU_OPTION As CL_MENU_COL_BASE Try Local llBloqueEncontrado, lcText, loReg, lnPos, lcBarName, lcExpr, lcComment, lcProcName, lcProcCode, loEx As Exception ; - , lnNegContainer, lnNegObject + , lnNegContainer, lnNegObject, lnLineEnd, lcLineNoStrings Store '' To lcText, lcComment, lcBarName * Estructura ejemplo a analizar: @@ -28625,6 +28698,7 @@ Define Class CL_MENU_OPTION As CL_MENU_COL_BASE *-- ANALISIS DEL "DEFINE BAR" Do Case Case ';' $ tcLine + For I = m.I + 1 To tnCodeLines .set_Line( @tcLine, @taCodeLines, m.I ) @@ -28635,6 +28709,25 @@ Define Class CL_MENU_OPTION As CL_MENU_COL_BASE Endif Endif +*!* Changd By: BH 30.3.2022 +*!* +*!* Changd By: BH
+*!* Issue #80, by bjornhoeksel +*!* Support ; sign in skip for expression between quotes +*!*
+*!*
+ 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 Case Left( tcLine, 10 ) == 'NEGOTIATE ' 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 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 ) loReg.KEYNAME = Alltrim( Left( lcExpr, lnPos-1 ) ) loReg.KeyLabel = Alltrim( Strextract( lcExpr, '"', '"' ) ) 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 ' 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, '"', '"' ) ) 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 Otherwise * Nada - Endcase + ENDCASE +*!* /Changd By: BH 30.3.2022 + If Not ';' $ tcLine && Fin Exit