diff --git a/FoxBin2PRGVersionFile.txt b/FoxBin2PRGVersionFile.txt index 853cf99..39805a3 100644 --- a/FoxBin2PRGVersionFile.txt +++ b/FoxBin2PRGVersionFile.txt @@ -2,8 +2,8 @@ Lparameters toUpdateInfo Local lcNote With toUpdateInfo - .VersionNumber = 'v1.19.29' - .VersionDate = Date(2014,08,01) + .VersionNumber = 'v1.19.30' + .VersionDate = Date(2014,08,07) .SourceFileUrl = 'http://vfpxrepository.com/dl/thorupdate/Projects/FoxBin2Prg/FoxBin2Prg.Zip' .Link = 'http://vfpx.codeplex.com/wikipage?title=FoxBin2PRG' @@ -17,8 +17,11 @@ Demo video using FoxBin2Prg with PlasticSCM: http://youtu.be/sE4wQ50Itqg Change History ------------------------------------------------------------- +2014/08/07 v1.19.30 +- Bug Fix vcx/scx: Bad EndText block detection when the previous line end with "," or ";" (Jim Nelson) + 2014/08/01 v1.19.29 -- Bug Fix vcx/scx: Bad text/endtext block detection when there is a line that begins with a "text" field and previous line end with "," in regards of ";" (M_N_M) +- Bug Fix vcx/scx: Bad Text block detection when the previous line ends with "," (M_N_M) - Optimizations and refactoring 2014/07/26 v1.19.28 diff --git a/TESTS/ut__foxbin2prg__c_conversor_base__IdentificarBloquesDeExclusion.prg b/TESTS/ut__foxbin2prg__c_conversor_base__IdentificarBloquesDeExclusion.prg index 0b50c40..b5cc86e 100644 --- a/TESTS/ut__foxbin2prg__c_conversor_base__IdentificarBloquesDeExclusion.prg +++ b/TESTS/ut__foxbin2prg__c_conversor_base__IdentificarBloquesDeExclusion.prg @@ -89,7 +89,7 @@ DEFINE CLASS ut__foxbin2prg__c_conversor_base__IdentificarBloquesDeExclusion as laLineasExclusion_Esperadas( 8) = .T. laLineasExclusion_Esperadas( 9) = .T. - TEXT TO lcMethod NOSHOW TEXTMERGE FLAGS 1 PRETEXT 1+2+4 + TEXT TO lcMethod NOSHOW TEXTMERGE FLAGS 1 PRETEXT 1+2 <> myMethod_B *-- Code Block <> @@ -132,7 +132,7 @@ DEFINE CLASS ut__foxbin2prg__c_conversor_base__IdentificarBloquesDeExclusion as laLineasExclusion_Esperadas( 8) = .T. laLineasExclusion_Esperadas( 9) = .T. - TEXT TO lcMethod NOSHOW TEXTMERGE FLAGS 1 PRETEXT 1+2+4 + TEXT TO lcMethod NOSHOW TEXTMERGE FLAGS 1 PRETEXT 1+2 <> myMethod_B *-- Code Block <> @@ -176,7 +176,7 @@ DEFINE CLASS ut__foxbin2prg__c_conversor_base__IdentificarBloquesDeExclusion as laLineasExclusion_Esperadas( 8) = .T. laLineasExclusion_Esperadas( 9) = .T. - TEXT TO lcMethod NOSHOW TEXTMERGE FLAGS 1 PRETEXT 1+2+4 + TEXT TO lcMethod NOSHOW TEXTMERGE FLAGS 1 PRETEXT 1+2 <> myMethod_B *-- Code Block <> @@ -211,7 +211,7 @@ DEFINE CLASS ut__foxbin2prg__c_conversor_base__IdentificarBloquesDeExclusion as laExpected_Pos(1,1) = 0 laExpected_Pos(1,2) = 0 - TEXT TO lcMethod NOSHOW TEXTMERGE FLAGS 1 PRETEXT 1+2+4 + TEXT TO lcMethod NOSHOW TEXTMERGE FLAGS 1 PRETEXT 1+2 <> myMethod_B *-- Code Block IF !FOUND() @@ -292,7 +292,7 @@ DEFINE CLASS ut__foxbin2prg__c_conversor_base__IdentificarBloquesDeExclusion as laLineasExclusion_Esperadas(I) = .T. ENDFOR - TEXT TO lcMethod NOSHOW TEXTMERGE FLAGS 1 PRETEXT 1+2+4 + TEXT TO lcMethod NOSHOW TEXTMERGE FLAGS 1 PRETEXT 1+2 <> myMethod_B *-- Code Block IF ODBC_Query.odbc @@ -335,4 +335,56 @@ DEFINE CLASS ut__foxbin2prg__c_conversor_base__IdentificarBloquesDeExclusion as ENDFUNC + ******************************************************************************************************************************************* + FUNCTION Deberia_EncontrarBloque_TEXT_ENDTEXT_CuandoEvaluaUnaLineaQueTerminaConUn_EndText_YLineaAnteriorTerminaEn_Coma + LOCAL lcMethod, laLineas(1), lnLineas, laPos(1,2), lnPos_Count, laExpected_Pos(1,2) ; + , laLineasExclusion(23), laLineasExclusion_Esperadas(23) + LOCAL loObj AS c_conversor_prg_a_bin OF "FOXBIN2PRG.PRG" + loObj = THIS.icObj + + *-- Input and expected params + STORE '' TO lcMethod + laExpected_Pos(1,1) = 3 + laExpected_Pos(1,2) = 13 + FOR I = 3 TO 13 + laLineasExclusion_Esperadas(I) = .T. + ENDFOR + + TEXT TO lcMethod NOSHOW TEXTMERGE FLAGS 1 PRETEXT 1+2 + <> Init + Local lcRowSource + <> To lcRowSource Textmerge Noshow + Overview,ItemDtl, + Forecasting,Forecasting, + Purchase Orders,PurchaseOrders, + Sales Orders,SalesOrders, + Sales History,History, + Inventory,Bins, + Inventory History,InventoryHistory, + Configuration,PartsInfo, + Operations,Operations, + <> + + + This.RowSource = Chrtran(lcRowSource, CRLF, '') + This.ControlSource = 'Thisform.cStartPage' + This.Value = ReadSetting('Item Detail Start Page', 'ItemDtl', .F., .T.) + <> + <> Valid + WriteSetting('Item Detail Start Page', This.Value, .F., .T.) + Thisform.comboPartno.SetFocus() + <> + ENDTEXT + + lnLineas = ALINES( laLineas, lcMethod ) + + *-- Test + loObj.identificarBloquesDeExclusion( @laLineas, lnLineas, , @laLineasExclusion, @lnPos_Count, @laPos ) + + *-- Evaluación de resultados + THIS.Evaluate_results( @laExpected_Pos, @laPos, lnPos_Count, @laLineasExclusion_Esperadas, @laLineasExclusion ) + + ENDFUNC + + ENDDEFINE diff --git a/foxbin2prg.exe b/foxbin2prg.exe index e954ceb..f394ce5 100644 Binary files a/foxbin2prg.exe and b/foxbin2prg.exe differ diff --git a/foxbin2prg.pj2 b/foxbin2prg.pj2 index 6fdb618..d657dc4 100644 --- a/foxbin2prg.pj2 +++ b/foxbin2prg.pj2 @@ -23,10 +23,10 @@ _CompanyName = "Fernando D. Bozzo" _FileDescription = "Conversor bidireccional de binarios FoxPro 9 (scx,vcx,pjx) a texto para sustituir al scctext :-)" _LegalCopyright = "Creative Commons 4: Reconocimiento - CompartirIgual (by-sa): http://creativecommons.org/licenses/by/4.0/" _LegalTrademark = "Creative Commons 4: Reconocimiento - CompartirIgual (by-sa): http://creativecommons.org/licenses/by/4.0/" -_ProductName = " FOXBIN2PRG v1.19.29" +_ProductName = " FOXBIN2PRG v1.19.30" _MajorVer = "1" _MinorVer = "19" -_Revision = "29" +_Revision = "30" _LanguageID = "1034" _AutoIncrement = "0" * diff --git a/foxbin2prg.pjt b/foxbin2prg.pjt index 5607e98..4eb5c40 100644 Binary files a/foxbin2prg.pjt and b/foxbin2prg.pjt differ diff --git a/foxbin2prg.pjx b/foxbin2prg.pjx index 087ef4b..f2ebf87 100644 Binary files a/foxbin2prg.pjx and b/foxbin2prg.pjx differ diff --git a/foxbin2prg.prg b/foxbin2prg.prg index 623586d..176702e 100644 --- a/foxbin2prg.prg +++ b/foxbin2prg.prg @@ -96,6 +96,7 @@ * 02/06/2014 DH/FDBOZZO v1.19.27 Mejora: Agregado soporte para exportar datos para DIFF (no para importar) * 21/07/2014 FDBOZZO v1.19.28 Mejora: Agregada funcionalidad para filtrado de tablas y datos cuando se elige DBF_Conversion_Support:4 (Edyshor) * 29/07/2014 FDBOZZO v1.19.29 Arreglo bug vcx/scx: Un campo de tabla llamado "text" que comienza la línea puede confundirse con la estructura TEXT/ENDTEXT y reconocer mal el resto del código +* 07/08/2014 FDBOZZO v1.19.30 Arreglo bug vcx/scx: Cuando la línea anterior a un ENDTEXT termina en ";" o "," no se reconoce como ENDTEXT sino como continuación (Jim Nelson) * * *--------------------------------------------------------------------------------------------------- @@ -135,6 +136,7 @@ * 02/06/2014 Doug Hennig MEJORA v1.19.22: Agregada funcionalidad para exportar los datos de las tablas al archivo db2 (Agregado en v1.19.27) * 21/07/2014 Edyshor PROPUESTA DE MEJORA db2 v1.19.27: Sería útil poder filtrar tablas y datos cuando se elige DBF_Conversion_Support:4 (Agregado en v1.19.28) * 29/07/2014 M_N_M REPORTE BUG vcx/scx v1.19.28: Los campos de tabla con nombre "text" a veces provocan corrupción del binario generado (Arreglado en v1.19.29) +* 07/08/2014 Jim Nelson REPORTE BUG vcx/scx v1.19.29: Cuando la línea anterior a un ENDTEXT termina en ";" o "," no se reconoce como ENDTEXT sino como continuación (Arreglado en v1.19.30) * * *--------------------------------------------------------------------------------------------------- @@ -3164,10 +3166,11 @@ DEFINE CLASS c_conversor_base AS SESSION DO CASE CASE .elTextoEvaluadoEsElTokenIndicado( @lcLine, @ta_ID_Bloques, lnLen_IDFinBQ, X, 1 ) ; AND NOT THIS.currentLineIsPreviousLineContinuation( @taCodeLines, I ) + *-- Busca el primer marcador (#IF o TEXT) lnAnidamientos = lnAnidamientos + 1 - CASE .elTextoEvaluadoEsElTokenIndicado( @lcLine, @ta_ID_Bloques, lnLen_IDFinBQ, X, 2 ) ; - AND NOT THIS.currentLineIsPreviousLineContinuation( @taCodeLines, I ) + CASE .elTextoEvaluadoEsElTokenIndicado( @lcLine, @ta_ID_Bloques, lnLen_IDFinBQ, X, 2 ) + *-- Busca el segundo marcador (#ENDIF o ENDTEXT) lnAnidamientos = lnAnidamientos - 1 IF lnAnidamientos = 0