1. Difference / Patching Tools
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C1B8A0.C2765E60
charset="iso-8859-2"
Hi Euphoria Users,
as I stated some time ago, I'd be like if there was a diff/patch
system set up among Eu programmers like in GNU, so if someone finds
a bug or make a change to a code, (s)he could just send a little
patch instead of complicated describing where (s)he made change,
and everyone can apply the patch.
After searching (not wide), I found these interesting utils:
a) ExamDiff (201 kB) http://www.prestosoft.com/examdiff/examdiff.htm
Has nice GUI, you can compare two files, and see differences on
screen. On left side the old file, on right the new. Changed lines
are coloured distingushed. Can write unix diff file, but only in
standart format and for single file. Cannot patch.
b) GNU utilities for Win32 (2843 kB)
http://www.weihenstephan.de/~syring/win32/UnxUtils.html
Unix GNU utilities compiled for Win32 - including "patch" and "diff"
command line, but powerful. GUI Frontend would come in handy.
(also other utils are interesting for Euphoria coding - make,grep etc.)
As a demonstration, I attach output of "diff -r -u OLD_IDE_DIR NEW_IDE_DIR >
diff.txt"
(recursive, unified format) which can patch IDE 0.12 BE from #9 to #10.
Size of patch is only 9 kB and you don't have to redownload the 300 kB package
again.
To apply the patch, just write "patch -d OLD_IDE_DIR -i diff.txt"
Anyone wants to follow me ?
Regards,
Martin Stachon
martin.stachon at worldonline.cz
http://www.webpark.cz/stachon
------=_NextPart_000_000D_01C1B8A0.C2765E60
Content-Type: text/plain;
name="diff.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="diff.txt"
Only in c:\downloads\ide12.0-mod7: edit.cfg
Only in c:\downloads\ide12.0-mod7: IDE.cfg
diff -r -u c:\downloads\ide12.0-mod7\IDE.exw =
c:\downloads\ide12.0\IDE.exw
--- c:\downloads\ide12.0-mod7\IDE.exw Fri Feb 15 19:35:38 2002
+++ c:\downloads\ide12.0\IDE.exw Fri Feb 15 15:14:08 2002
@@ -1483,7 +1483,7 @@
propCursorAt =3D propGetCursorPos()
=20
--there are cases where updating Width also updates Height
- if equal(property, "Width") then
+ if equal(property, "Height") then
if find( controls[selectedControl][Class],
{ "MonthCalendar", "StatusBar", "SepButton" } ) then
setProperty( "Width", controls[selectedControl][CX], 0, {} =
)
@@ -1503,15 +1503,15 @@
end if
end if
=20
- if equal(property, "Height") then
+ if equal(property, "Width") then
if find( controls[selectedControl][Class],
{ "MonthCalendar", "StatusBar", "SepButton" } ) then
- setProperty( "Height", controls[selectedControl][CY], 0, {} =
)
+ setProperty( "Width", controls[selectedControl][CX], 0, {} =
)
else
if find(controls[selectedControl][Class], {"ReBar", =
"ReBarBand"}) then
- setProperty( "Height", controls[selectedControl][CY], =
0, {} )
+ setProperty( "Width", controls[selectedControl][CX], 0, =
{} )
else
- setProperty( "Height", controls[selectedControl][CY], =
1, {} )
+ setProperty( "Width", controls[selectedControl][CX], 1, =
{} )
end if
end if
end if
@@ -2528,7 +2528,7 @@
elsif equal( name, "Enable") then index =3D EnableC
elsif equal( name, "Visible") then index =3D Visible
elsif equal( name, "Limit Text To") then index =3D Limit
- elsif equal( name, "Flags") then index =3D 999 --v9L.7
+ elsif equal( name, "Flags") then index =3D 999
elsif equal( name, " Upper Case") then index =3D Upper
elsif equal( name, " Lower Case") then index =3D Lower
elsif equal( name, " Read Only") then index =3D ReadOnly
@@ -9253,14 +9253,14 @@
if updateThePropertyWidth
or updateThePropertyHeight then
if getIndex(PropertyTitleBar)=3D1 then
- --if updateThePropertyWidth
- --and updateThePropertyHeight then
+ if updateThePropertyWidth
+ and updateThePropertyHeight then
+ updateProperty("Height")
+ elsif updateThePropertyWidth then
updateProperty("Width")
- --elsif updateThePropertyWidth then
- -- updateProperty("Width")
- --elsif updateThePropertyHeight then
- -- updateProperty("Height")
- --end if
+ elsif updateThePropertyHeight then
+ updateProperty("Height")
+ end if
else
selectedControl=3DTheWindow
updateProperties()
@@ -9344,7 +9344,7 @@
if getIndex(PropertyTitleBar)=3D1 then
if updateThePropertyWidth
and updateThePropertyHeight then
- updateProperty("Width")
+ updateProperty("Height")
elsif updateThePropertyWidth then
updateProperty("Width")
elsif updateThePropertyHeight then
diff -r -u c:\downloads\ide12.0-mod7\IDE_code.ew =
c:\downloads\ide12.0\IDE_code.ew
--- c:\downloads\ide12.0-mod7\IDE_code.ew Wed Feb 13 05:35:50 2002
+++ c:\downloads\ide12.0\IDE_code.ew Fri Feb 15 11:49:46 2002
@@ -1455,7 +1455,7 @@
-- get the event name
-- add the control name to the list
=20
- --v9L.7 win32lib version .55 can not load zero length =
Name
+ --win32lib version .55 can not load zero length Name
if not length( controls[i][Name] ) then
controls[i][Name] =3D " "
end if
diff -r -u c:\downloads\ide12.0-mod7\IDE_design.ew =
c:\downloads\ide12.0\IDE_design.ew
--- c:\downloads\ide12.0-mod7\IDE_design.ew Thu Feb 14 17:47:20 2002
+++ c:\downloads\ide12.0\IDE_design.ew Sat Feb 16 04:48:02 2002
@@ -68,8 +68,7 @@
=
-------------------------------------------------------------------------=
-----
procedure makeCopyControl( integer theX, integer theY, integer theCX,
integer theCY, sequence theClass,
- sequence theName, sequence theTitle ) =
--v9M.3
-
+ sequence theName, sequence theTitle )
=20
sequence control
integer quoteInTitle
@@ -2059,6 +2058,8 @@
dragCX =3D controls[selectedControl][CX] - mouseX
dragCY =3D controls[selectedControl][CY] - mouseY
origCX =3D controls[selectedControl][CX] - mouseX
+ saveDragCX =3D controls[selectedControl][CX]
+ saveDragCY =3D controls[selectedControl][CY]
=20
elsif event =3D MOUSE_MOVE
and state =3D Normal
@@ -2289,7 +2290,7 @@
else
if controls[selectedControl][CX] !=3D saveDragCX
and controls[selectedControl][CY] !=3D saveDragCY =
then
- call_proc(updateProperty_id,{"Width"})
+ call_proc(updateProperty_id,{"Height"})
elsif controls[selectedControl][CX] !=3D saveDragCX =
then
call_proc(updateProperty_id,{"Width"})
else
@@ -5646,8 +5647,8 @@
+ controls[selectedControl][Y],
controls[i][CX], controls[i][CY],
controls[i][Class],
- controls[i][Name], --v9M.3
- controls[i][Title] ) --v9M.3
+ controls[i][Name],
+ controls[i][Title] )
controls[ length( controls ) ][ControlParent] =3D
controls[selectedControl][Name]
--changed hardcoded "Group" to the temp class
@@ -5684,9 +5685,8 @@
+ controls[selectedControl][Y],
controls[i][CX], controls[i][CY],
controls[i][Class],
- controls[i][Name], --v9M.3
- controls[i][Title] ) --v9M.3
- controls[ length( controls ) ][ControlParent] =3D
+ controls[i][Name],
+ controls[i][Title] ) =
controls[ length( controls ) ][ControlParent] =3D
controls[selectedControl][Name]
--changed hardcoded "Group" to temp class
controls[ length( controls ) =
][ParentClass]=3Dcontrols[tempControl][Class]
@@ -6995,7 +6995,6 @@
=20
if selectedControl !=3D TheWindow
and not isChecked( MenuFormLock ) then
-
the=3Dcontrols[selectedControl]
if and_bits( shift, ShiftMask ) then
-- shift is held down
@@ -7009,6 +7008,16 @@
controls[selectedControl][CX]+=3DSnapSize
end if
call_proc( check_ResizeDrag_id,{the[CX],the[CY]} )
+ elsif and_bits( shift, ControlMask ) then
+ if key=3DVK_LEFT then
+ controls[selectedControl][CX]-=3DSnapSize
+ controls[selectedControl][CY]-=3DSnapSize
+ call_proc( check_ResizeDrag_id,{the[CX],the[CY]} )
+ elsif key=3DVK_RIGHT then
+ controls[selectedControl][CX]+=3DSnapSize
+ controls[selectedControl][CY]+=3DSnapSize
+ call_proc( check_ResizeDrag_id,{the[CX],the[CY]} )
+ end if
else
if key=3DVK_UP then
controls[selectedControl][Y]-=3DSnapSize
@@ -7107,6 +7116,8 @@
or key=3DVK_RIGHT then
call_proc(updateProperty_id,{"Width"})
end if
+ elsif and_bits( shift, ControlMask ) then
+ call_proc(updateProperty_id,{"Height"})
else
if key=3DVK_UP
or key=3DVK_DOWN then
diff -r -u c:\downloads\ide12.0-mod7\IDE_menu.ew =
c:\downloads\ide12.0\IDE_menu.ew
--- c:\downloads\ide12.0-mod7\IDE_menu.ew Sat Feb 09 07:17:44 2002
+++ c:\downloads\ide12.0\IDE_menu.ew Fri Feb 15 11:52:22 2002
@@ -407,7 +407,7 @@
controls =3D saveMenu
=20
IDE_Changed=3DTrue
- --v10.2
+
buildProjectFolders()
end if
=20
diff -r -u c:\downloads\ide12.0-mod7\Ide_timer.ew =
c:\downloads\ide12.0\Ide_timer.ew
--- c:\downloads\ide12.0-mod7\Ide_timer.ew Sat Feb 09 07:21:40 2002
+++ c:\downloads\ide12.0\Ide_timer.ew Fri Feb 15 11:52:52 2002
@@ -276,7 +276,7 @@
controls =3D saveTimer
=20
IDE_Changed=3DTrue
- --v10.2
+
buildProjectFolders()
end if
=20
------=_NextPart_000_000D_01C1B8A0.C2765E60--
2. Re: Difference / Patching Tools
Yes, I was even think of including one with win32lib. But I couldn't find a
suitable one and the idea of writing it seemed time consuming.
----- Original Message -----
From: "Martin Stachon" <martin.stachon at worldonline.cz>
To: "EUforum" <EUforum at topica.com>
Subject: Difference / Patching Tools
>
> Hi Euphoria Users,
> as I stated some time ago, I'd be like if there was a diff/patch
> system set up among Eu programmers like in GNU, so if someone finds
> a bug or make a change to a code, (s)he could just send a little
> patch instead of complicated describing where (s)he made change,
> and everyone can apply the patch.
>
> After searching (not wide), I found these interesting utils:
>
> a) ExamDiff (201 kB) http://www.prestosoft.com/examdiff/examdiff.htm
> Has nice GUI, you can compare two files, and see differences on
> screen. On left side the old file, on right the new. Changed lines
> are coloured distingushed. Can write unix diff file, but only in
> standart format and for single file. Cannot patch.
>
> b) GNU utilities for Win32 (2843 kB)
> http://www.weihenstephan.de/~syring/win32/UnxUtils.html
> Unix GNU utilities compiled for Win32 - including "patch" and "diff"
> command line, but powerful. GUI Frontend would come in handy.
> (also other utils are interesting for Euphoria coding - make,grep etc.)
>
> As a demonstration, I attach output of "diff -r -u OLD_IDE_DIR NEW_IDE_DIR
> diff.txt"
> (recursive, unified format) which can patch IDE 0.12 BE from #9 to #10.
> Size of patch is only 9 kB and you don't have to redownload the 300 kB
package again.
> To apply the patch, just write "patch -d OLD_IDE_DIR -i diff.txt"
>
> Anyone wants to follow me ?
>
> Regards,
> Martin Stachon
>
> martin.stachon at worldonline.cz
> http://www.webpark.cz/stachon
>
>
>
>
3. Re: Difference / Patching Tools
I've posted some file comparison routines direct to martin to have the
first look at. If anyone else wants a copy mail me direct.
Pete
4. Re: Difference / Patching Tools
- Posted by rforno at tutopia.com
Feb 19, 2002
I'm developing a diff program (not patch, but it can be extended). I'll mail
it to the list in one or two days.
However, I have some doubts about it. If I use a simple algorithm, sometimes
it reports many more differences than necessary. If I use a backtracking
algorithm, it should attain a maximum of matching lines, but with somewhat
big files it lasts forever. I wonder if it exits a fast and optimum
algorithm.
----- Original Message -----
From: "Martin Stachon" <martin.stachon at worldonline.cz>
To: "EUforum" <EUforum at topica.com>
Subject: Difference / Patching Tools
>
> Hi Euphoria Users,
> as I stated some time ago, I'd be like if there was a diff/patch
> system set up among Eu programmers like in GNU, so if someone finds
> a bug or make a change to a code, (s)he could just send a little
> patch instead of complicated describing where (s)he made change,
> and everyone can apply the patch.
>
> After searching (not wide), I found these interesting utils:
>
> a) ExamDiff (201 kB) http://www.prestosoft.com/examdiff/examdiff.htm
> Has nice GUI, you can compare two files, and see differences on
> screen. On left side the old file, on right the new. Changed lines
> are coloured distingushed. Can write unix diff file, but only in
> standart format and for single file. Cannot patch.
>
> b) GNU utilities for Win32 (2843 kB)
> http://www.weihenstephan.de/~syring/win32/UnxUtils.html
> Unix GNU utilities compiled for Win32 - including "patch" and "diff"
> command line, but powerful. GUI Frontend would come in handy.
> (also other utils are interesting for Euphoria coding - make,grep etc.)
>
> As a demonstration, I attach output of "diff -r -u OLD_IDE_DIR NEW_IDE_DIR
> diff.txt"
> (recursive, unified format) which can patch IDE 0.12 BE from #9 to #10.
> Size of patch is only 9 kB and you don't have to redownload the 300 kB
package again.
> To apply the patch, just write "patch -d OLD_IDE_DIR -i diff.txt"
>
> Anyone wants to follow me ?
>
> Regards,
> Martin Stachon
>
> martin.stachon at worldonline.cz
> http://www.webpark.cz/stachon
>
>
>
>
5. Re: Difference / Patching Tools
Hi,
if anyone wants diff.exe, patch.exe and HTML manual,
you can get it from
http://www.webpark.cz/stachon/files/diffutils.zip (111 kB)
Regards,
Martin Stachon
martin.stachon at worldonline.cz
http://www.webpark.cz/stachon