</property>
<method name="UnpackFile"/>
<method name="PackFile"/>
+ <method name="ShowSettingsDialog"/>
</implements>
<script language="VBS">
PackFile = False
End Function
+Function ShowSettingsDialog()
+ ShowSettingsDialog = False
+ Err.Raise 30001,, "Not Implemented"
+End Function
+
</script>
</scriptlet>
</property>
<method name="UnpackFile"/>
<method name="PackFile"/>
+ <method name="ShowSettingsDialog"/>
</implements>
<script language="VBS">
PackFile = False
End Function
+Function ShowSettingsDialog()
+ ShowSettingsDialog = False
+ Err.Raise 30001,, "Not Implemented"
+End Function
+
</script>
</scriptlet>
End If\r
End Function\r
\r
+Public Function ShowSettingsDialog() As Boolean\r
+ ShowSettingsDialog = False\r
+ Err.Raise 30001, , "Not Implemented"\r
+End Function\r
+\r
End If\r
End Function\r
\r
+Public Function ShowSettingsDialog() As Boolean\r
+ ShowSettingsDialog = False\r
+ Err.Raise 30001, , "Not Implemented"\r
+End Function\r
+\r
-Type=OleDll
-Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\System32\stdole2.tlb#OLE Automation
-Class=WinMergeScript; WinMergeScript.cls
-Startup="(None)"
-HelpFile=""
-Title="HideLastLetter"
-ExeName32="HideLastLetter.dll"
-Command32=""
-Name="HideLastLetter"
-HelpContextID="0"
-CompatibleMode="0"
-CompatibleEXE32="HideLastLetter"
-MajorVer=1
-MinorVer=0
-RevisionVer=0
-AutoIncrementVer=0
-ServerSupportFiles=0
-VersionCompanyName="MAISON"
-CompilationType=0
-OptimizationType=0
-FavorPentiumPro(tm)=0
-CodeViewDebugInfo=0
-NoAliasing=0
-BoundsCheck=0
-OverflowCheck=0
-FlPointCheck=0
-FDIVCheck=0
-UnroundedFP=0
-StartMode=1
-Unattended=0
-Retained=0
-ThreadPerObject=0
-MaxNumberOfThreads=1
-ThreadingModel=1
-DebugStartupOption=0
-
-[MS Transaction Server]
-AutoRefresh=1
+Type=OleDll\r
+Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\Windows\SysWOW64\stdole2.tlb#OLE Automation\r
+Class=WinMergeScript; WinMergeScript.cls\r
+Startup="(None)"\r
+HelpFile=""\r
+Title="HideLastLetter"\r
+ExeName32="HideLastLetter.dll"\r
+Path32="..\..\dlls"\r
+Command32=""\r
+Name="HideLastLetter"\r
+HelpContextID="0"\r
+CompatibleMode="0"\r
+CompatibleEXE32="HideLastLetter"\r
+MajorVer=1\r
+MinorVer=0\r
+RevisionVer=0\r
+AutoIncrementVer=0\r
+ServerSupportFiles=0\r
+VersionCompanyName="MAISON"\r
+CompilationType=0\r
+OptimizationType=0\r
+FavorPentiumPro(tm)=0\r
+CodeViewDebugInfo=0\r
+NoAliasing=0\r
+BoundsCheck=0\r
+OverflowCheck=0\r
+FlPointCheck=0\r
+FDIVCheck=0\r
+UnroundedFP=0\r
+StartMode=1\r
+Unattended=0\r
+Retained=0\r
+ThreadPerObject=0\r
+MaxNumberOfThreads=1\r
+ThreadingModel=1\r
+DebugStartupOption=0\r
+\r
+[MS Transaction Server]\r
+AutoRefresh=1\r
-VERSION 1.0 CLASS
-BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
-END
-Attribute VB_Name = "WinMergeScript"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = True
-Attribute VB_PredeclaredId = False
-Attribute VB_Exposed = True
-Option Explicit
-
-Public Property Get PluginEvent() As String
- PluginEvent = "BUFFER_PACK_UNPACK"
-End Property
-
-Public Property Get PluginDescription() As String
- PluginDescription = "This plugins hides the last non-space character"
-End Property
-
-Public Property Get PluginFileFilters() As String
- PluginFileFilters = "\.nolast$"
-End Property
-
-Public Property Get PluginIsAutomatic() As Boolean
- PluginIsAutomatic = True
-End Property
-
-
-
-Public Function UnpackBufferA(ByRef buffer() As Byte, ByRef size As Long, ByRef bChanged As Boolean, ByRef subcode As Long) As Boolean
- If (size < 10) Then
- subcode = -1
- bChanged = False
- UnpackBufferA = True
- Exit Function
- End If
-
- ' memorize and delete the last letter (exclude space/EOL characters)
- Dim i
- Dim oldsubcode
- Dim nIgnored
- nIgnored = 0
- For i = size - 1 To 0 Step -1
- subcode = buffer(i)
- buffer(i) = oldsubcode
- oldsubcode = subcode
- If (oldsubcode > 32) Then
- Exit For
- End If
- nIgnored = nIgnored + 1
- Next
-
- subcode = subcode + (nIgnored * 256)
- size = size - 1
- bChanged = True
- UnpackBufferA = True
-End Function
-
-Public Function PackBufferA(ByRef buffer() As Byte, ByRef size As Long, ByRef bChanged As Boolean, subcode As Long) As Boolean
- If subcode = -1 Then
- bChanged = False
- PackBufferA = True
- Exit Function
- End If
-
- ' restore the last letter
- size = size + 1
- ReDim Preserve buffer(0 To size - 1)
-
- Dim nIgnored
- For nIgnored = 1 To (subcode / 256)
- buffer(size - nIgnored) = buffer(size - nIgnored - 1)
- Next
- buffer(size - (subcode / 256) - 1) = (subcode And 255)
-
- bChanged = True
- PackBufferA = True
-End Function
-
+VERSION 1.0 CLASS\r
+BEGIN\r
+ MultiUse = -1 'True\r
+ Persistable = 0 'NotPersistable\r
+ DataBindingBehavior = 0 'vbNone\r
+ DataSourceBehavior = 0 'vbNone\r
+ MTSTransactionMode = 0 'NotAnMTSObject\r
+END\r
+Attribute VB_Name = "WinMergeScript"\r
+Attribute VB_GlobalNameSpace = False\r
+Attribute VB_Creatable = True\r
+Attribute VB_PredeclaredId = False\r
+Attribute VB_Exposed = True\r
+Option Explicit\r
+\r
+Public Property Get PluginEvent() As String\r
+ PluginEvent = "BUFFER_PACK_UNPACK"\r
+End Property\r
+\r
+Public Property Get PluginDescription() As String\r
+ PluginDescription = "This plugins hides the last non-space character"\r
+End Property\r
+\r
+Public Property Get PluginFileFilters() As String\r
+ PluginFileFilters = "\.nolast$"\r
+End Property\r
+\r
+Public Property Get PluginIsAutomatic() As Boolean\r
+ PluginIsAutomatic = True\r
+End Property\r
+\r
+\r
+\r
+Public Function UnpackBufferA(ByRef buffer() As Byte, ByRef size As Long, ByRef bChanged As Boolean, ByRef subcode As Long) As Boolean\r
+ If (size < 10) Then\r
+ subcode = -1\r
+ bChanged = False\r
+ UnpackBufferA = True\r
+ Exit Function\r
+ End If\r
+ \r
+ ' memorize and delete the last letter (exclude space/EOL characters)\r
+ Dim i\r
+ Dim oldsubcode\r
+ Dim nIgnored\r
+ nIgnored = 0\r
+ For i = size - 1 To 0 Step -1\r
+ subcode = buffer(i)\r
+ buffer(i) = oldsubcode\r
+ oldsubcode = subcode\r
+ If (oldsubcode > 32) Then\r
+ Exit For\r
+ End If\r
+ nIgnored = nIgnored + 1\r
+ Next\r
+ \r
+ subcode = subcode + (nIgnored * 256)\r
+ size = size - 1\r
+ bChanged = True\r
+ UnpackBufferA = True\r
+End Function\r
+\r
+Public Function PackBufferA(ByRef buffer() As Byte, ByRef size As Long, ByRef bChanged As Boolean, subcode As Long) As Boolean\r
+ If subcode = -1 Then\r
+ bChanged = False\r
+ PackBufferA = True\r
+ Exit Function\r
+ End If\r
+ \r
+ ' restore the last letter\r
+ size = size + 1\r
+ ReDim Preserve buffer(0 To size - 1)\r
+ \r
+ Dim nIgnored\r
+ For nIgnored = 1 To (subcode / 256)\r
+ buffer(size - nIgnored) = buffer(size - nIgnored - 1)\r
+ Next\r
+ buffer(size - (subcode / 256) - 1) = (subcode And 255)\r
+ \r
+ bChanged = True\r
+ PackBufferA = True\r
+End Function\r
+\r
+Public Function ShowSettingsDialog() As Boolean\r
+ ShowSettingsDialog = False\r
+ Err.Raise 30001, , "Not Implemented"\r
+End Function\r
+\r
Type=OleDll\r
-Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINNT\system32\stdole2.tlb#OLE Automation\r
+Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\Windows\SysWOW64\stdole2.tlb#OLE Automation\r
Class=WinMergeScript; WinMergeScript.cls\r
Startup="(None)"\r
HelpFile=""\r
Title="IgnoreLeadingLineNumbers"\r
ExeName32="IgnoreLeadingLineNumbers.dll"\r
+Path32="..\..\dlls"\r
Command32=""\r
Name="IgnoreLeadingLineNumbers"\r
HelpContextID="0"\r
End If\r
PrediffBufferW = True\r
End Function\r
+\r
+Public Function ShowSettingsDialog() As Boolean\r
+ ShowSettingsDialog = False\r
+ Err.Raise 30001, , "Not Implemented"\r
+End Function\r
+\r
-Type=OleDll
-Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\System32\stdole2.tlb#OLE Automation
-Class=WinMergeScript; WinMergeScript.cls
-Startup="(None)"
-HelpFile=""
-Title="IgnoreTwoFirstCharsOrder"
-ExeName32="IgnoreTwoFirstCharsOrder.dll"
-Command32=""
-Name="IgnoreTwoFirstCharsOrder"
-HelpContextID="0"
-CompatibleMode="0"
-CompatibleEXE32="ClassTwoFirstChars.dll"
-MajorVer=1
-MinorVer=0
-RevisionVer=0
-AutoIncrementVer=0
-ServerSupportFiles=0
-VersionCompanyName="MAISON"
-CompilationType=0
-OptimizationType=0
-FavorPentiumPro(tm)=0
-CodeViewDebugInfo=0
-NoAliasing=0
-BoundsCheck=0
-OverflowCheck=0
-FlPointCheck=0
-FDIVCheck=0
-UnroundedFP=0
-StartMode=1
-Unattended=0
-Retained=0
-ThreadPerObject=0
-MaxNumberOfThreads=1
-ThreadingModel=1
-DebugStartupOption=0
-
-[MS Transaction Server]
-AutoRefresh=1
+Type=OleDll\r
+Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\Windows\SysWOW64\stdole2.tlb#OLE Automation\r
+Class=WinMergeScript; WinMergeScript.cls\r
+Startup="(None)"\r
+HelpFile=""\r
+Title="IgnoreTwoFirstCharsOrder"\r
+ExeName32="IgnoreTwoFirstCharsOrder.dll"\r
+Path32="..\..\dlls"\r
+Command32=""\r
+Name="IgnoreTwoFirstCharsOrder"\r
+HelpContextID="0"\r
+CompatibleMode="0"\r
+CompatibleEXE32="ClassTwoFirstChars.dll"\r
+MajorVer=1\r
+MinorVer=0\r
+RevisionVer=0\r
+AutoIncrementVer=0\r
+ServerSupportFiles=0\r
+VersionCompanyName="MAISON"\r
+CompilationType=0\r
+OptimizationType=0\r
+FavorPentiumPro(tm)=0\r
+CodeViewDebugInfo=0\r
+NoAliasing=0\r
+BoundsCheck=0\r
+OverflowCheck=0\r
+FlPointCheck=0\r
+FDIVCheck=0\r
+UnroundedFP=0\r
+StartMode=1\r
+Unattended=0\r
+Retained=0\r
+ThreadPerObject=0\r
+MaxNumberOfThreads=1\r
+ThreadingModel=1\r
+DebugStartupOption=0\r
+\r
+[MS Transaction Server]\r
+AutoRefresh=1\r
-VERSION 1.0 CLASS
-BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
-END
-Attribute VB_Name = "WinMergeScript"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = True
-Attribute VB_PredeclaredId = False
-Attribute VB_Exposed = True
-Option Explicit
-
-Public Property Get PluginEvent() As String
- PluginEvent = "BUFFER_PREDIFF"
-End Property
-
-Public Property Get PluginDescription() As String
- PluginDescription = "This plugins ignores the difference concerning the order of the two first characters"
-End Property
-
-Public Property Get PluginFileFilters() As String
- PluginFileFilters = "\.txt$"
-End Property
-
-Public Property Get PluginIsAutomatic() As Boolean
- PluginIsAutomatic = True
-End Property
-
-Public Function PrediffBufferW(ByRef text As String, ByRef size As Long, ByRef bChanged As Boolean) As Boolean
- Dim c1 As String, c2 As String
-
- c1 = Mid(text, 1, 1)
- c2 = Mid(text, 2, 1)
- If (c1 < c2) Then
- text = c2 & c1 & Mid(text, 3)
- bChanged = True
- Else
- bChanged = False
- End If
- PrediffBufferW = True
-End Function
-
-
+VERSION 1.0 CLASS\r
+BEGIN\r
+ MultiUse = -1 'True\r
+ Persistable = 0 'NotPersistable\r
+ DataBindingBehavior = 0 'vbNone\r
+ DataSourceBehavior = 0 'vbNone\r
+ MTSTransactionMode = 0 'NotAnMTSObject\r
+END\r
+Attribute VB_Name = "WinMergeScript"\r
+Attribute VB_GlobalNameSpace = False\r
+Attribute VB_Creatable = True\r
+Attribute VB_PredeclaredId = False\r
+Attribute VB_Exposed = True\r
+Option Explicit\r
+\r
+Public Property Get PluginEvent() As String\r
+ PluginEvent = "BUFFER_PREDIFF"\r
+End Property\r
+\r
+Public Property Get PluginDescription() As String\r
+ PluginDescription = "This plugins ignores the difference concerning the order of the two first characters"\r
+End Property\r
+\r
+Public Property Get PluginFileFilters() As String\r
+ PluginFileFilters = "\.txt$"\r
+End Property\r
+\r
+Public Property Get PluginIsAutomatic() As Boolean\r
+ PluginIsAutomatic = True\r
+End Property\r
+\r
+Public Function PrediffBufferW(ByRef text As String, ByRef size As Long, ByRef bChanged As Boolean) As Boolean\r
+ Dim c1 As String, c2 As String\r
+ \r
+ c1 = Mid(text, 1, 1)\r
+ c2 = Mid(text, 2, 1)\r
+ If (c1 < c2) Then\r
+ text = c2 & c1 & Mid(text, 3)\r
+ bChanged = True\r
+ Else\r
+ bChanged = False\r
+ End If\r
+ PrediffBufferW = True\r
+End Function\r
+\r
+Public Function ShowSettingsDialog() As Boolean\r
+ ShowSettingsDialog = False\r
+ Err.Raise 30001, , "Not Implemented"\r
+End Function\r
+\r
-Type=OleDll
-Class=WinMergeScript; WinMergeScript.cls
-Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\System32\stdole2.tlb#OLE Automation
-Startup="(None)"
-HelpFile=""
-Title="MakeUpper"
-ExeName32="ToUpper.dll"
-Command32=""
-Name="ToUpper"
-HelpContextID="0"
-CompatibleMode="0"
-MajorVer=1
-MinorVer=0
-RevisionVer=0
-AutoIncrementVer=0
-ServerSupportFiles=0
-VersionCompanyName="MAISON"
-CompilationType=0
-OptimizationType=0
-FavorPentiumPro(tm)=0
-CodeViewDebugInfo=0
-NoAliasing=0
-BoundsCheck=0
-OverflowCheck=0
-FlPointCheck=0
-FDIVCheck=0
-UnroundedFP=0
-StartMode=1
-Unattended=0
-Retained=0
-ThreadPerObject=0
-MaxNumberOfThreads=1
-ThreadingModel=1
-DebugStartupOption=0
-
-[MS Transaction Server]
-AutoRefresh=1
+Type=OleDll\r
+Class=WinMergeScript; WinMergeScript.cls\r
+Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\..\..\..\Windows\SysWOW64\stdole2.tlb#OLE Automation\r
+Startup="(None)"\r
+HelpFile=""\r
+Title="MakeUpper"\r
+ExeName32="ToUpper.dll"\r
+Path32="..\..\dlls"\r
+Command32=""\r
+Name="ToUpper"\r
+HelpContextID="0"\r
+CompatibleMode="0"\r
+MajorVer=1\r
+MinorVer=0\r
+RevisionVer=0\r
+AutoIncrementVer=0\r
+ServerSupportFiles=0\r
+VersionCompanyName="MAISON"\r
+CompilationType=0\r
+OptimizationType=0\r
+FavorPentiumPro(tm)=0\r
+CodeViewDebugInfo=0\r
+NoAliasing=0\r
+BoundsCheck=0\r
+OverflowCheck=0\r
+FlPointCheck=0\r
+FDIVCheck=0\r
+UnroundedFP=0\r
+StartMode=1\r
+Unattended=0\r
+Retained=0\r
+ThreadPerObject=0\r
+MaxNumberOfThreads=1\r
+ThreadingModel=1\r
+DebugStartupOption=0\r
+\r
+[MS Transaction Server]\r
+AutoRefresh=1\r
-VERSION 1.0 CLASS
-BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
-END
-Attribute VB_Name = "WinMergeScript"
-Attribute VB_GlobalNameSpace = False
-Attribute VB_Creatable = True
-Attribute VB_PredeclaredId = False
-Attribute VB_Exposed = True
-Option Explicit
-
-
-Public Property Get PluginEvent() As String
- PluginEvent = "EDITOR_SCRIPT"
-End Property
-
-Public Property Get PluginDescription() As String
- PluginDescription = "A simple function to convert text to uppercase"
-End Property
-
-
-Public Function MakeUpperVB(text As String)
- MakeUpperVB = StrConv(text, vbUpperCase)
-End Function
-
-
-
+VERSION 1.0 CLASS\r
+BEGIN\r
+ MultiUse = -1 'True\r
+ Persistable = 0 'NotPersistable\r
+ DataBindingBehavior = 0 'vbNone\r
+ DataSourceBehavior = 0 'vbNone\r
+ MTSTransactionMode = 0 'NotAnMTSObject\r
+END\r
+Attribute VB_Name = "WinMergeScript"\r
+Attribute VB_GlobalNameSpace = False\r
+Attribute VB_Creatable = True\r
+Attribute VB_PredeclaredId = False\r
+Attribute VB_Exposed = True\r
+Option Explicit\r
+\r
+\r
+Public Property Get PluginEvent() As String\r
+ PluginEvent = "EDITOR_SCRIPT"\r
+End Property\r
+\r
+Public Property Get PluginDescription() As String\r
+ PluginDescription = "A simple function to convert text to uppercase"\r
+End Property\r
+\r
+\r
+Public Function MakeUpperVB(text As String)\r
+ MakeUpperVB = StrConv(text, vbUpperCase)\r
+End Function\r
+\r
+Public Function ShowSettingsDialog() As Boolean\r
+ ShowSettingsDialog = False\r
+ Err.Raise 30001, , "Not Implemented"\r
+End Function\r
+\r
[id(6), helpstring("method PackBufferA")] HRESULT PackBufferA([in] SAFEARRAY(unsigned char) * pBuffer, [in] INT * pSize, [in] VARIANT_BOOL * pbChanged, [in] INT subcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(7), helpstring("method UnpackFile")] HRESULT UnpackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(8), helpstring("method PackFile")] HRESULT PackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
+ [id(9), helpstring("method ShowSettingsDialog")] HRESULT ShowSettingsDialog([out, retval] VARIANT_BOOL * pbHandled);
};
[
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,5,17116
- PRODUCTVERSION 1,0,5,17116
+ FILEVERSION 1,0,6,17116
+ PRODUCTVERSION 1,0,6,17116
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "DisplayBinaryFiles Module\0"
- VALUE "FileVersion", "1, 0, 5, 17116\0"
+ VALUE "FileVersion", "1, 0, 6, 17116\0"
VALUE "InternalName", "DisplayBinaryFiles\0"
- VALUE "LegalCopyright", "Copyright 2003-2012\0"
+ VALUE "LegalCopyright", "Copyright 2003-2014\0"
VALUE "OriginalFilename", "DisplayBinaryFiles.DLL\0"
VALUE "ProductName", "DisplayBinaryFiles Module\0"
- VALUE "ProductVersion", "1, 0, 5, 17116\0"
+ VALUE "ProductVersion", "1, 0, 6, 17116\0"
VALUE "OLESelfRegister", "\0"
END
END
return S_OK;
}
-
-
STDMETHODIMP CWinMergeScript::PackFile(BSTR fileSrc, BSTR fileDst, VARIANT_BOOL *pbChanged, INT pSubcode, VARIANT_BOOL *pbSuccess)
{
// always return error so the users knows we can not repack
*pbSuccess = VARIANT_FALSE;
return S_OK;
}
+
+STDMETHODIMP CWinMergeScript::ShowSettingsDialog(VARIANT_BOOL *pbHandled)
+{
+ *pbHandled = VARIANT_FALSE;
+ return E_NOTIMPL;
+}
STDMETHOD(UnpackFile)(/*[in]*/ BSTR fileSrc, /*[in]*/ BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(PackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT subcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(UnpackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
+ STDMETHOD(ShowSettingsDialog)(/*[out, retval]*/ VARIANT_BOOL * pbHandled);
STDMETHOD(get_PluginIsAutomatic)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_PluginFileFilters)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_PluginDescription)(/*[out, retval]*/ BSTR *pVal);
[id(6), helpstring("method PackBufferA")] HRESULT PackBufferA([in] SAFEARRAY(unsigned char) * pBuffer, [in] INT * pSize, [in] VARIANT_BOOL * pbChanged, [in] INT subcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(7), helpstring("method UnpackFile")] HRESULT UnpackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(8), helpstring("method PackFile")] HRESULT PackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
+ [id(9), helpstring("method ShowSettingsDialog")] HRESULT ShowSettingsDialog([out, retval] VARIANT_BOOL * pbHandled);
};
[
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,1,1,1
- PRODUCTVERSION 1,1,1,1
+ FILEVERSION 1,1,2,1
+ PRODUCTVERSION 1,1,2,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
VALUE "Comments", "WinMerge plugin\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "DisplayXMLFiles Module\0"
- VALUE "FileVersion", "1, 1, 1, 1\0"
+ VALUE "FileVersion", "1, 1, 2, 1\0"
VALUE "InternalName", "DisplayXMLFiles\0"
- VALUE "LegalCopyright", "Copyright 2003-2012\0"
+ VALUE "LegalCopyright", "Copyright 2003-2014\0"
VALUE "LegalTrademarks", "\0"
VALUE "OLESelfRegister", "\0"
VALUE "OriginalFilename", "DisplayXMLFiles.DLL\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "DisplayXMLFiles Module\0"
- VALUE "ProductVersion", "1, 1, 1, 1\0"
+ VALUE "ProductVersion", "1, 1, 2, 1\0"
VALUE "SpecialBuild", "\0"
END
END
*pbSuccess = VARIANT_FALSE;
return S_OK;
}
+
+STDMETHODIMP CWinMergeScript::ShowSettingsDialog(VARIANT_BOOL *pbHandled)
+{
+ *pbHandled = VARIANT_FALSE;
+ return E_NOTIMPL;
+}
STDMETHOD(UnpackFile)(/*[in]*/ BSTR fileSrc, /*[in]*/ BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(PackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT subcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(UnpackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
+ STDMETHOD(ShowSettingsDialog)(/*[out, retval]*/ VARIANT_BOOL * pbHandled);
STDMETHOD(get_PluginIsAutomatic)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_PluginFileFilters)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_PluginDescription)(/*[out, retval]*/ BSTR *pVal);
[id(6), helpstring("method PackBufferA")] HRESULT PackBufferA([in] SAFEARRAY(unsigned char) * pBuffer, [in] INT * pSize, [in] VARIANT_BOOL * pbChanged, [in] INT subcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(7), helpstring("method UnpackFile")] HRESULT UnpackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(8), helpstring("method PackFile")] HRESULT PackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
+ [id(9), helpstring("method ShowSettingsDialog")] HRESULT ShowSettingsDialog([out, retval] VARIANT_BOOL * pbHandled);
};
[
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,1,1
- PRODUCTVERSION 1,0,1,1
+ FILEVERSION 1,0,2,1
+ PRODUCTVERSION 1,0,2,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "EditBinaryFiles Module\0"
- VALUE "FileVersion", "1, 0, 1, 1\0"
+ VALUE "FileVersion", "1, 0, 2, 1\0"
VALUE "InternalName", "EditBinaryFiles\0"
- VALUE "LegalCopyright", "Copyright 2003-2012\0"
+ VALUE "LegalCopyright", "Copyright 2003-2014\0"
VALUE "OriginalFilename", "EditBinaryFiles.DLL\0"
VALUE "ProductName", "EditBinaryFiles Module\0"
- VALUE "ProductVersion", "1, 0, 1, 1\0"
+ VALUE "ProductVersion", "1, 0, 2, 1\0"
VALUE "OLESelfRegister", "\0"
END
END
return S_OK;
}
+
+STDMETHODIMP CWinMergeScript::ShowSettingsDialog(VARIANT_BOOL *pbHandled)
+{
+ *pbHandled = VARIANT_FALSE;
+ return E_NOTIMPL;
+}
STDMETHOD(UnpackFile)(/*[in]*/ BSTR fileSrc, /*[in]*/ BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(PackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT subcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(UnpackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
+ STDMETHOD(ShowSettingsDialog)(/*[out, retval]*/ VARIANT_BOOL * pbHandled);
STDMETHOD(get_PluginIsAutomatic)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_PluginFileFilters)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_PluginDescription)(/*[out, retval]*/ BSTR *pVal);
[id(6), helpstring("method PackBufferA")] HRESULT PackBufferA([in] SAFEARRAY(unsigned char) * pBuffer, [in] INT * pSize, [in] VARIANT_BOOL * pbChanged, [in] INT subcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(7), helpstring("method UnpackFile")] HRESULT UnpackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(8), helpstring("method PackFile")] HRESULT PackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
+ [id(9), helpstring("method ShowSettingsDialog")] HRESULT ShowSettingsDialog([out, retval] VARIANT_BOOL * pbHandled);
};
[
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,1,1
- PRODUCTVERSION 1,0,1,1
+ FILEVERSION 1,0,2,1
+ PRODUCTVERSION 1,0,2,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "HideFirstLetter Module\0"
- VALUE "FileVersion", "1, 0, 1, 1\0"
+ VALUE "FileVersion", "1, 0, 2, 1\0"
VALUE "InternalName", "HideFirstLetter\0"
- VALUE "LegalCopyright", "Copyright 2003-2012\0"
+ VALUE "LegalCopyright", "Copyright 2003-2014\0"
VALUE "OriginalFilename", "HideFirstLetter.DLL\0"
VALUE "ProductName", "HideFirstLetter Module\0"
- VALUE "ProductVersion", "1, 0, 1, 1\0"
+ VALUE "ProductVersion", "1, 0, 2, 1\0"
VALUE "OLESelfRegister", "\0"
END
END
*pbSuccess = VARIANT_TRUE;
return S_OK;
}
+
+STDMETHODIMP CWinMergeScript::ShowSettingsDialog(VARIANT_BOOL *pbHandled)
+{
+ *pbHandled = VARIANT_FALSE;
+ return E_NOTIMPL;
+}
STDMETHOD(UnpackFile)(/*[in]*/ BSTR fileSrc, /*[in]*/ BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(PackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT subcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(UnpackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
+ STDMETHOD(ShowSettingsDialog)(/*[out, retval]*/ VARIANT_BOOL * pbHandled);
STDMETHOD(get_PluginIsAutomatic)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_PluginFileFilters)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_PluginDescription)(/*[out, retval]*/ BSTR *pVal);
[propget, id(3), helpstring("property PluginFileFilters")] HRESULT PluginFileFilters([out, retval] BSTR *pVal);
[propget, id(4), helpstring("property PluginIsAutomatic")] HRESULT PluginIsAutomatic([out, retval] VARIANT_BOOL *pVal);
[id(5), helpstring("method PrediffBufferW")] HRESULT PrediffBufferW([in] BSTR * pText, [in] INT * pSize, [in] VARIANT_BOOL * pbChanged, [out, retval] VARIANT_BOOL * pbHandled);
+ [id(6), helpstring("method ShowSettingsDialog")] HRESULT ShowSettingsDialog([out, retval] VARIANT_BOOL * pbHandled);
};
[
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// French (France) resources
+// \93ú\96{\8cê (\93ú\96{) resources
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
-#ifdef _WIN32
-LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
-#pragma code_page(1252)
-#endif //_WIN32
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
+LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
+#pragma code_page(932)
-#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
-// TEXTINCLUDE
+// Dialog
//
-1 TEXTINCLUDE DISCARDABLE
+IDD_DIALOG1 DIALOGEX 0, 0, 240, 68
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "\90Ý\92è"
+FONT 8, "MS Shell Dlg", 400, 0, 0x80
BEGIN
- "resource.h\0"
+ LTEXT "\96³\8e\8b\82·\82é\97ñ\94Ô\8d\86\n\97á) 3,10-20,32-33\n",IDC_STATIC,6,6,228,18
+ EDITTEXT IDC_EDIT1,6,30,228,14,ES_AUTOHSCROLL
+ DEFPUSHBUTTON "OK",IDOK,132,48,50,14
+ PUSHBUTTON "\83L\83\83\83\93\83Z\83\8b",IDCANCEL,186,48,50,14
END
-2 TEXTINCLUDE DISCARDABLE
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
BEGIN
- "#include ""winres.h""\r\n"
- "\0"
+ IDD_DIALOG1, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 233
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 61
+ END
END
+#endif // APSTUDIO_INVOKED
-3 TEXTINCLUDE DISCARDABLE
+#endif // \93ú\96{\8cê (\93ú\96{) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// \89p\8cê (\95Ä\8d\91) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG1 DIALOGEX 0, 0, 240, 68
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Settings"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- "1 TYPELIB ""IgnoreColumns.tlb""\r\n"
- "\0"
+ LTEXT "Column Ranges To Ignore:\ne.g.) 3,10-20,32-33\n",IDC_STATIC,6,6,228,18
+ EDITTEXT IDC_EDIT1,6,30,228,14,ES_AUTOHSCROLL
+ DEFPUSHBUTTON "OK",IDOK,132,48,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,186,48,50,14
END
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_DIALOG1, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 233
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 61
+ END
+END
#endif // APSTUDIO_INVOKED
-#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,2
- PRODUCTVERSION 1,0,0,2
+ FILEVERSION 1,0,1,2
+ PRODUCTVERSION 1,0,1,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
BEGIN
BLOCK "StringFileInfo"
BEGIN
- BLOCK "040904B0"
+ BLOCK "040904b0"
BEGIN
- VALUE "CompanyName", "\0"
- VALUE "FileDescription", "IgnoreColumns Module\0"
- VALUE "FileVersion", "1, 0, 0, 2\0"
- VALUE "InternalName", "IgnoreColumns\0"
- VALUE "LegalCopyright", "Copyright 2003-2012\0"
- VALUE "OriginalFilename", "IgnoreColumns.DLL\0"
- VALUE "ProductName", "IgnoreColumns Module\0"
- VALUE "ProductVersion", "1, 0, 0, 2\0"
- VALUE "OLESelfRegister", "\0"
+ VALUE "FileDescription", "IgnoreColumns Module"
+ VALUE "FileVersion", "1.0.1.2"
+ VALUE "InternalName", "IgnoreColumns"
+ VALUE "LegalCopyright", "Copyright 2003-2014"
+ VALUE "OriginalFilename", "IgnoreColumns.DLL"
+ VALUE "ProductName", "IgnoreColumns Module"
+ VALUE "ProductVersion", "1.0.1.2"
END
END
BLOCK "VarFileInfo"
END
END
-#endif // !_MAC
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "1 TYPELIB ""IgnoreColumns.tlb""\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// String Table
//
-STRINGTABLE DISCARDABLE
+STRINGTABLE
BEGIN
IDS_PROJNAME "IgnoreColumns"
END
-#endif // French (France) resources
+#endif // \89p\8cê (\95Ä\8d\91) resources
/////////////////////////////////////////////////////////////////////////////
//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
+// Microsoft Visual C++ generated include file.
// Used by IgnoreColumns.rc
//
#define IDS_PROJNAME 100
#define IDR_WINMERGESCRIPT 101
+#define IDD_DIALOG1 201
+#define IDC_EDIT1 201
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 201
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 202
#define _APS_NEXT_COMMAND_VALUE 32768
-#define _APS_NEXT_CONTROL_VALUE 201
+#define _APS_NEXT_CONTROL_VALUE 202
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif
#include "stdafx.h"
#include "IgnoreColumns.h"
#include "WinMergeScript.h"
+#include "resource.h"
+#include <atlstr.h>
/////////////////////////////////////////////////////////////////////////////
// CWinMergeScript
-
/**
* @brief Get the name of the current dll
*/
lastslash = name;
else
lastslash ++;
- TCHAR * lastslash2 = _tcsrchr(lastslash, _T('\\'));
+ TCHAR * lastslash2 = _tcsrchr(lastslash, '\\');
if (lastslash2 == 0)
lastslash2 = name;
else
return name;
}
-
-int CreateArrayFromFilename(int (* value)[2])
+CString KeyName()
{
+ TCHAR szKeyName[256];
TCHAR name[256+1];
GetDllFilename(name, 256);
+ lstrcpy(szKeyName, _T("Software\\Thingamahoochie\\WinMerge\\Plugins\\"));
+ lstrcat(szKeyName, name);
+ return szKeyName;
+}
+
+CString RegReadString(const CString& key, const CString& valuename, const CString& defaultValue)
+{
+ CRegKey reg;
+ if (reg.Open(HKEY_CURRENT_USER, key, KEY_READ) == ERROR_SUCCESS)
+ {
+ TCHAR value[512] = {0};
+ DWORD dwSize = sizeof(value) / sizeof(value[0]);
+ reg.QueryStringValue(valuename, value, &dwSize);
+ return value;
+ }
+ return defaultValue;
+}
+
+int CreateArrayFromRangeString(const TCHAR *rangestr, int (* value)[2])
+{
+ TCHAR name[256];
+
+ lstrcpy(name, rangestr);
+
+ if (name[0] == 0)
+ return 0;
// first pass : prepare the chunks
int nValue = 0;
token = _tcstok( NULL, _T(",_") );
}
- // pass first chunk
- nValue --;
-
if (value == 0)
// just return the number of values
return nValue;
- if (nValue == 0)
- return nValue;
-
- token = name + _tcslen(name) + 1; // pass first chunk
+ token = name;
int i;
for (i = 0 ; i < nValue ; i++)
{
return nValue;
}
+CString CreateRangeStringFromArray(int nExcludedRanges, const int aExcludedRanges[][2])
+{
+ CString rangestr = _T("");
+ for (int i = 0; i < nExcludedRanges; ++i)
+ {
+ TCHAR value[256];
+ if (aExcludedRanges[i][0] > 0 && aExcludedRanges[i][1] > 0)
+ {
+ if (aExcludedRanges[i][0] == aExcludedRanges[i][1])
+ {
+ wsprintf(value, _T("%d"), aExcludedRanges[i][0]);
+ rangestr += value;
+ }
+ else
+ {
+ wsprintf(value, _T("%d-%d"), aExcludedRanges[i][0], aExcludedRanges[i][1]);
+ rangestr += value;
+ }
+ rangestr += _T(",");
+ }
+ }
+ if (!rangestr.IsEmpty())
+ rangestr.Delete(rangestr.GetLength() - 1);
+
+ return rangestr;
+}
+
+CString GetColumnRangeString()
+{
+ TCHAR name[256+1];
+ GetDllFilename(name, 256);
+ CString rangestr;
+ TCHAR * token = _tcspbrk(name, _T(",_"));
+ if (!token)
+ rangestr = RegReadString(KeyName(), _T("ColumnRanges"), _T(""));
+ else
+ rangestr = token + 1;
+
+ int nExcludedRanges = CreateArrayFromRangeString(rangestr, NULL);
+ int (* aExcludedRanges)[2] = new int[nExcludedRanges][2];
+ if (aExcludedRanges == NULL)
+ nExcludedRanges = 0;
+ else
+ nExcludedRanges = CreateArrayFromRangeString(rangestr, aExcludedRanges);
+
+ rangestr = CreateRangeStringFromArray(nExcludedRanges, aExcludedRanges);
+
+ delete[] aExcludedRanges;
+
+ return rangestr;
+}
+
STDMETHODIMP CWinMergeScript::get_PluginEvent(BSTR *pVal)
{
long nSize = *pSize;
WCHAR * pEndText = pBeginText + nSize;
+ CString rangestr = GetColumnRangeString();
- int nExcludedRanges = CreateArrayFromFilename(NULL);
+ int nExcludedRanges = CreateArrayFromRangeString(rangestr, NULL);
int (* aExcludedRanges)[2] = new int[nExcludedRanges][2];
if (aExcludedRanges == NULL)
nExcludedRanges = 0;
else
- nExcludedRanges = CreateArrayFromFilename(aExcludedRanges);
+ nExcludedRanges = CreateArrayFromRangeString(rangestr, aExcludedRanges);
if (nExcludedRanges == 0)
{
*pbHandled = VARIANT_TRUE;
return S_OK;
}
+
+INT_PTR CALLBACK DlgProc(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch(uiMsg) {
+ case WM_INITDIALOG:
+ SetDlgItemText(hWnd, IDC_EDIT1, GetColumnRangeString());
+ return TRUE;
+
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDOK)
+ {
+ CRegKey reg;
+ if (reg.Create(HKEY_CURRENT_USER, KeyName(), REG_NONE, REG_OPTION_NON_VOLATILE, KEY_WRITE) != ERROR_SUCCESS)
+ return FALSE;
+ TCHAR value[512] = {0};
+ GetDlgItemText(hWnd, IDC_EDIT1, value, sizeof(value)/sizeof(TCHAR));
+ reg.SetStringValue(_T("ColumnRanges"), value);
+ EndDialog(hWnd, IDOK);
+ }
+ else if (LOWORD(wParam) == IDCANCEL)
+ {
+ EndDialog(hWnd, IDCANCEL);
+ }
+ return TRUE;
+ break;
+
+ default:
+ break;
+ }
+ return FALSE;
+}
+
+STDMETHODIMP CWinMergeScript::ShowSettingsDialog(VARIANT_BOOL *pbHandled)
+{
+ *pbHandled = (DialogBox(_Module.GetModuleInstance(), MAKEINTRESOURCE(IDD_DIALOG1), NULL, DlgProc) == IDOK);
+ return S_OK;
+}
// IWinMergeScript
public:
STDMETHOD(PrediffBufferW)(/*[in]*/ BSTR * pText, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[out, retval]*/ VARIANT_BOOL * pbHandled);
+ STDMETHOD(ShowSettingsDialog)(/*[out, retval]*/ VARIANT_BOOL * pbHandled);
STDMETHOD(get_PluginIsAutomatic)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_PluginFileFilters)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_PluginDescription)(/*[out, retval]*/ BSTR *pVal);
[propget, id(3), helpstring("property PluginFileFilters")] HRESULT PluginFileFilters([out, retval] BSTR *pVal);
[propget, id(4), helpstring("property PluginIsAutomatic")] HRESULT PluginIsAutomatic([out, retval] VARIANT_BOOL *pVal);
[id(5), helpstring("method PrediffBufferW")] HRESULT PrediffBufferW([in] BSTR * pText, [in] INT * pSize, [in] VARIANT_BOOL * pbChanged, [out, retval] VARIANT_BOOL * pbHandled);
+ [id(6), helpstring("method ShowSettingsDialog")] HRESULT ShowSettingsDialog([out, retval] VARIANT_BOOL * pbHandled);
};
[
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,2
- PRODUCTVERSION 1,0,0,2
+ FILEVERSION 1,0,1,2
+ PRODUCTVERSION 1,0,1,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
VALUE "Comments", "\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "IgnoreCommentsC Module\0"
- VALUE "FileVersion", "1, 0, 0, 2\0"
+ VALUE "FileVersion", "1, 0, 1, 2\0"
VALUE "InternalName", "IgnoreCommentsC\0"
- VALUE "LegalCopyright", "Copyright 2005-2012\0"
+ VALUE "LegalCopyright", "Copyright 2005-2014\0"
VALUE "LegalTrademarks", "\0"
VALUE "OLESelfRegister", "\0"
VALUE "OriginalFilename", "IgnoreCommentsC.DLL\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "IgnoreCommentsC Module\0"
- VALUE "ProductVersion", "1, 0, 0, 2\0"
+ VALUE "ProductVersion", "1, 0, 1, 2\0"
VALUE "SpecialBuild", "\0"
END
END
return S_OK;
}
+STDMETHODIMP CWinMergeScript::ShowSettingsDialog(VARIANT_BOOL *pbHandled)
+{
+ *pbHandled = VARIANT_FALSE;
+ return E_NOTIMPL;
+}
STDMETHOD(PackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT subcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(UnpackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(PrediffBufferW)(BSTR *pText, INT *pSize, VARIANT_BOOL *pbChanged, VARIANT_BOOL *pbHandled);
-
+ STDMETHOD(ShowSettingsDialog)(/*[out, retval]*/ VARIANT_BOOL * pbHandled);
STDMETHOD(get_PluginIsAutomatic)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_PluginFileFilters)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_PluginDescription)(/*[out, retval]*/ BSTR *pVal);
[propget, id(3), helpstring("property PluginFileFilters")] HRESULT PluginFileFilters([out, retval] BSTR *pVal);
[propget, id(4), helpstring("property PluginIsAutomatic")] HRESULT PluginIsAutomatic([out, retval] VARIANT_BOOL *pVal);
[id(5), helpstring("method PrediffBufferW")] HRESULT PrediffBufferW([in] BSTR * pText, [in] INT * pSize, [in] VARIANT_BOOL * pbChanged, [out, retval] VARIANT_BOOL * pbHandled);
+ [id(6), helpstring("method ShowSettingsDialog")] HRESULT ShowSettingsDialog([out, retval] VARIANT_BOOL * pbHandled);
};
[
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// French (France) resources
+// \93ú\96{\8cê (\93ú\96{) resources
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
-#ifdef _WIN32
-LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
-#pragma code_page(1252)
-#endif //_WIN32
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
+LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
+#pragma code_page(932)
-#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
-// TEXTINCLUDE
+// Dialog
//
-1 TEXTINCLUDE DISCARDABLE
+IDD_DIALOG1 DIALOGEX 0, 0, 240, 68
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "\90Ý\92è"
+FONT 8, "MS Shell Dlg", 400, 0, 0x80
BEGIN
- "resource.h\0"
+ LTEXT "\96³\8e\8b\82·\82é\97ñ\94Ô\8d\86\n\97á) 3,10-20,32-33\n",IDC_STATIC,6,6,228,18
+ EDITTEXT IDC_EDIT1,6,30,228,14,ES_AUTOHSCROLL
+ DEFPUSHBUTTON "OK",IDOK,132,48,50,14
+ PUSHBUTTON "\83L\83\83\83\93\83Z\83\8b",IDCANCEL,186,48,50,14
END
-2 TEXTINCLUDE DISCARDABLE
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
BEGIN
- "#include ""winres.h""\r\n"
- "\0"
+ IDD_DIALOG1, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 233
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 61
+ END
END
+#endif // APSTUDIO_INVOKED
-3 TEXTINCLUDE DISCARDABLE
+#endif // \93ú\96{\8cê (\93ú\96{) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// \89p\8cê (\95Ä\8d\91) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG1 DIALOGEX 0, 0, 240, 68
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Settings"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- "1 TYPELIB ""IgnoreFieldsComma.tlb""\r\n"
- "\0"
+ LTEXT "Column Ranges To Ignore:\ne.g.) 3,10-20,32-33\n",IDC_STATIC,6,6,228,18
+ EDITTEXT IDC_EDIT1,6,30,228,14,ES_AUTOHSCROLL
+ DEFPUSHBUTTON "OK",IDOK,132,48,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,186,48,50,14
END
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_DIALOG1, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 233
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 61
+ END
+END
#endif // APSTUDIO_INVOKED
-#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,2
- PRODUCTVERSION 1,0,0,2
+ FILEVERSION 1,0,1,2
+ PRODUCTVERSION 1,0,1,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
BEGIN
BLOCK "StringFileInfo"
BEGIN
- BLOCK "040904B0"
+ BLOCK "040904b0"
BEGIN
- VALUE "CompanyName", "\0"
- VALUE "FileDescription", "IgnoreFieldsComma Module\0"
- VALUE "FileVersion", "1, 0, 0, 2\0"
- VALUE "InternalName", "IgnoreFieldsComma\0"
- VALUE "LegalCopyright", "Copyright 2003-2012\0"
- VALUE "OriginalFilename", "IgnoreFieldsComma.DLL\0"
- VALUE "ProductName", "IgnoreFieldsComma Module\0"
- VALUE "ProductVersion", "1, 0, 0, 2\0"
- VALUE "OLESelfRegister", "\0"
+ VALUE "FileDescription", "IgnoreFieldsComma Module"
+ VALUE "FileVersion", "1.0.1.2"
+ VALUE "InternalName", "IgnoreFieldsComma"
+ VALUE "LegalCopyright", "Copyright 2003-2014"
+ VALUE "OriginalFilename", "IgnoreFieldsComma.DLL"
+ VALUE "ProductName", "IgnoreFieldsComma Module"
+ VALUE "ProductVersion", "1.0.1.2"
END
END
BLOCK "VarFileInfo"
END
END
-#endif // !_MAC
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "1 TYPELIB ""IgnoreFieldsComma.tlb""\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// String Table
//
-STRINGTABLE DISCARDABLE
+STRINGTABLE
BEGIN
IDS_PROJNAME "IgnoreFieldsComma"
END
-#endif // French (France) resources
+#endif // \89p\8cê (\95Ä\8d\91) resources
/////////////////////////////////////////////////////////////////////////////
//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
+// Microsoft Visual C++ generated include file.
// Used by IgnoreFieldsComma.rc
//
#define IDS_PROJNAME 100
#define IDR_WINMERGESCRIPT 101
+#define IDD_DIALOG1 201
+#define IDC_EDIT1 201
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 201
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 202
#define _APS_NEXT_COMMAND_VALUE 32768
-#define _APS_NEXT_CONTROL_VALUE 201
+#define _APS_NEXT_CONTROL_VALUE 202
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif
#include "stdafx.h"
#include "IgnoreFieldsComma.h"
#include "WinMergeScript.h"
+#include "resource.h"
+#include <atlstr.h>
/////////////////////////////////////////////////////////////////////////////
// CWinMergeScript
-
/**
* @brief Get the name of the current dll
*/
return name;
}
-
-int CreateArrayFromFilename(int (* value)[2])
+CString KeyName()
{
+ TCHAR szKeyName[256];
TCHAR name[256+1];
GetDllFilename(name, 256);
+ lstrcpy(szKeyName, _T("Software\\Thingamahoochie\\WinMerge\\Plugins\\"));
+ lstrcat(szKeyName, name);
+ return szKeyName;
+}
+
+CString RegReadString(const CString& key, const CString& valuename, const CString& defaultValue)
+{
+ CRegKey reg;
+ if (reg.Open(HKEY_CURRENT_USER, key, KEY_READ) == ERROR_SUCCESS)
+ {
+ TCHAR value[512] = {0};
+ DWORD dwSize = sizeof(value) / sizeof(value[0]);
+ reg.QueryStringValue(valuename, value, &dwSize);
+ return value;
+ }
+ return defaultValue;
+}
+
+int CreateArrayFromRangeString(const TCHAR *rangestr, int (* value)[2])
+{
+ TCHAR name[256];
+
+ lstrcpy(name, rangestr);
+
+ if (name[0] == 0)
+ return 0;
// first pass : prepare the chunks
int nValue = 0;
token = _tcstok( NULL, _T(",_") );
}
- // pass first chunk
- nValue --;
-
if (value == 0)
// just return the number of values
return nValue;
- if (nValue == 0)
- return nValue;
-
- token = name + _tcslen(name) + 1; // pass first chunk
+ token = name;
int i;
for (i = 0 ; i < nValue ; i++)
{
return nValue;
}
+CString CreateRangeStringFromArray(int nExcludedRanges, const int aExcludedRanges[][2])
+{
+ CString rangestr = _T("");
+ for (int i = 0; i < nExcludedRanges; ++i)
+ {
+ TCHAR value[256];
+ if (aExcludedRanges[i][0] > 0 && aExcludedRanges[i][1] > 0)
+ {
+ if (aExcludedRanges[i][0] == aExcludedRanges[i][1])
+ {
+ wsprintf(value, _T("%d"), aExcludedRanges[i][0]);
+ rangestr += value;
+ }
+ else
+ {
+ wsprintf(value, _T("%d-%d"), aExcludedRanges[i][0], aExcludedRanges[i][1]);
+ rangestr += value;
+ }
+ rangestr += _T(",");
+ }
+ }
+ if (!rangestr.IsEmpty())
+ rangestr.Delete(rangestr.GetLength() - 1);
+
+ return rangestr;
+}
+
+CString GetColumnRangeString()
+{
+ TCHAR name[256+1];
+ GetDllFilename(name, 256);
+ CString rangestr;
+ TCHAR * token = _tcspbrk(name, _T(",_"));
+ if (!token)
+ rangestr = RegReadString(KeyName(), _T("ColumnRanges"), _T(""));
+ else
+ rangestr = token + 1;
+
+ int nExcludedRanges = CreateArrayFromRangeString(rangestr, NULL);
+ int (* aExcludedRanges)[2] = new int[nExcludedRanges][2];
+ if (aExcludedRanges == NULL)
+ nExcludedRanges = 0;
+ else
+ nExcludedRanges = CreateArrayFromRangeString(rangestr, aExcludedRanges);
+
+ rangestr = CreateRangeStringFromArray(nExcludedRanges, aExcludedRanges);
+
+ delete[] aExcludedRanges;
+
+ return rangestr;
+}
+
STDMETHODIMP CWinMergeScript::get_PluginEvent(BSTR *pVal)
{
return S_OK;
}
-
STDMETHODIMP CWinMergeScript::PrediffBufferW(BSTR *pText, INT *pSize, VARIANT_BOOL *pbChanged, VARIANT_BOOL *pbHandled)
{
WCHAR * pBeginText = *pText;
long nSize = *pSize;
WCHAR * pEndText = pBeginText + nSize;
+ CString rangestr = GetColumnRangeString();
- int nExcludedRanges = CreateArrayFromFilename(NULL);
+ int nExcludedRanges = CreateArrayFromRangeString(rangestr, NULL);
int (* aExcludedRanges)[2] = new int[nExcludedRanges][2];
if (aExcludedRanges == NULL)
nExcludedRanges = 0;
else
- nExcludedRanges = CreateArrayFromFilename(aExcludedRanges);
+ nExcludedRanges = CreateArrayFromRangeString(rangestr, aExcludedRanges);
if (nExcludedRanges == 0)
{
*pbHandled = VARIANT_TRUE;
return S_OK;
}
+
+INT_PTR CALLBACK DlgProc(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch(uiMsg) {
+ case WM_INITDIALOG:
+ SetDlgItemText(hWnd, IDC_EDIT1, GetColumnRangeString());
+ return TRUE;
+
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDOK)
+ {
+ CRegKey reg;
+ if (reg.Create(HKEY_CURRENT_USER, KeyName(), REG_NONE, REG_OPTION_NON_VOLATILE, KEY_WRITE) != ERROR_SUCCESS)
+ return FALSE;
+ TCHAR value[512] = {0};
+ GetDlgItemText(hWnd, IDC_EDIT1, value, sizeof(value)/sizeof(TCHAR));
+ reg.SetStringValue(_T("ColumnRanges"), value);
+ EndDialog(hWnd, IDOK);
+ }
+ else if (LOWORD(wParam) == IDCANCEL)
+ {
+ EndDialog(hWnd, IDCANCEL);
+ }
+ return TRUE;
+ break;
+
+ default:
+ break;
+ }
+ return FALSE;
+}
+
+STDMETHODIMP CWinMergeScript::ShowSettingsDialog(VARIANT_BOOL *pbHandled)
+{
+ *pbHandled = (DialogBox(_Module.GetModuleInstance(), MAKEINTRESOURCE(IDD_DIALOG1), NULL, DlgProc) == IDOK);
+ return S_OK;
+}
// IWinMergeScript
public:
STDMETHOD(PrediffBufferW)(/*[in]*/ BSTR * pText, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[out, retval]*/ VARIANT_BOOL * pbHandled);
+ STDMETHOD(ShowSettingsDialog)(/*[out, retval]*/ VARIANT_BOOL * pbHandled);
STDMETHOD(get_PluginIsAutomatic)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_PluginFileFilters)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_PluginDescription)(/*[out, retval]*/ BSTR *pVal);
[propget, id(3), helpstring("property PluginFileFilters")] HRESULT PluginFileFilters([out, retval] BSTR *pVal);
[propget, id(4), helpstring("property PluginIsAutomatic")] HRESULT PluginIsAutomatic([out, retval] VARIANT_BOOL *pVal);
[id(5), helpstring("method PrediffBufferW")] HRESULT PrediffBufferW([in] BSTR * pText, [in] INT * pSize, [in] VARIANT_BOOL * pbChanged, [out, retval] VARIANT_BOOL * pbHandled);
+ [id(6), helpstring("method ShowSettingsDialog")] HRESULT ShowSettingsDialog([out, retval] VARIANT_BOOL * pbHandled);
};
[
-//Microsoft Developer Studio generated resource script.
+// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
-// French (France) resources
+// \93ú\96{\8cê (\93ú\96{) resources
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
-#ifdef _WIN32
-LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
-#pragma code_page(1252)
-#endif //_WIN32
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_JPN)
+LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
+#pragma code_page(932)
-#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
-// TEXTINCLUDE
+// Dialog
//
-1 TEXTINCLUDE DISCARDABLE
+IDD_DIALOG1 DIALOGEX 0, 0, 240, 68
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "\90Ý\92è"
+FONT 8, "MS Shell Dlg", 400, 0, 0x80
BEGIN
- "resource.h\0"
+ LTEXT "\96³\8e\8b\82·\82é\97ñ\94Ô\8d\86\n\97á) 3,10-20,32-33\n",IDC_STATIC,6,6,228,18
+ EDITTEXT IDC_EDIT1,6,30,228,14,ES_AUTOHSCROLL
+ DEFPUSHBUTTON "OK",IDOK,132,48,50,14
+ PUSHBUTTON "\83L\83\83\83\93\83Z\83\8b",IDCANCEL,186,48,50,14
END
-2 TEXTINCLUDE DISCARDABLE
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
BEGIN
- "#include ""winres.h""\r\n"
- "\0"
+ IDD_DIALOG1, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 233
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 61
+ END
END
+#endif // APSTUDIO_INVOKED
-3 TEXTINCLUDE DISCARDABLE
+#endif // \93ú\96{\8cê (\93ú\96{) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+/////////////////////////////////////////////////////////////////////////////
+// \89p\8cê (\95Ä\8d\91) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_DIALOG1 DIALOGEX 0, 0, 240, 68
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Settings"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- "1 TYPELIB ""IgnoreFieldsTab.tlb""\r\n"
- "\0"
+ LTEXT "Column Ranges To Ignore:\ne.g.) 3,10-20,32-33\n",IDC_STATIC,6,6,228,18
+ EDITTEXT IDC_EDIT1,6,30,228,14,ES_AUTOHSCROLL
+ DEFPUSHBUTTON "OK",IDOK,132,48,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,186,48,50,14
END
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+ IDD_DIALOG1, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 233
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 61
+ END
+END
#endif // APSTUDIO_INVOKED
-#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,0,2
- PRODUCTVERSION 1,0,0,2
+ FILEVERSION 1,0,1,2
+ PRODUCTVERSION 1,0,1,2
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
BEGIN
BLOCK "StringFileInfo"
BEGIN
- BLOCK "040904B0"
+ BLOCK "040904b0"
BEGIN
- VALUE "CompanyName", "\0"
- VALUE "FileDescription", "IgnoreFieldsTab Module\0"
- VALUE "FileVersion", "1, 0, 0, 2\0"
- VALUE "InternalName", "IgnoreFieldsTab\0"
- VALUE "LegalCopyright", "Copyright 2003-2012\0"
- VALUE "OriginalFilename", "IgnoreFieldsTab.DLL\0"
- VALUE "ProductName", "IgnoreFieldsTab Module\0"
- VALUE "ProductVersion", "1, 0, 0, 2\0"
- VALUE "OLESelfRegister", "\0"
+ VALUE "FileDescription", "IgnoreFieldsTab Module"
+ VALUE "FileVersion", "1.0.1.2"
+ VALUE "InternalName", "IgnoreFieldsTab"
+ VALUE "LegalCopyright", "Copyright 2003-2014"
+ VALUE "OriginalFilename", "IgnoreFieldsTab.DLL"
+ VALUE "ProductName", "IgnoreFieldsTab Module"
+ VALUE "ProductVersion", "1.0.1.2"
END
END
BLOCK "VarFileInfo"
END
END
-#endif // !_MAC
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "1 TYPELIB ""IgnoreFieldsTab.tlb""\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
// String Table
//
-STRINGTABLE DISCARDABLE
+STRINGTABLE
BEGIN
IDS_PROJNAME "IgnoreFieldsTab"
END
-#endif // French (France) resources
+#endif // \89p\8cê (\95Ä\8d\91) resources
/////////////////////////////////////////////////////////////////////////////
//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
+// Microsoft Visual C++ generated include file.
// Used by IgnoreFieldsTab.rc
//
#define IDS_PROJNAME 100
#define IDR_WINMERGESCRIPT 101
+#define IDD_DIALOG1 201
+#define IDC_EDIT1 201
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 201
+#define _APS_NO_MFC 1
+#define _APS_NEXT_RESOURCE_VALUE 202
#define _APS_NEXT_COMMAND_VALUE 32768
-#define _APS_NEXT_CONTROL_VALUE 201
+#define _APS_NEXT_CONTROL_VALUE 202
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif
#include "stdafx.h"
#include "IgnoreFieldsTab.h"
#include "WinMergeScript.h"
+#include "resource.h"
+#include <atlstr.h>
/////////////////////////////////////////////////////////////////////////////
// CWinMergeScript
-
/**
* @brief Get the name of the current dll
*/
return name;
}
-
-int CreateArrayFromFilename(int (* value)[2])
+CString KeyName()
{
+ TCHAR szKeyName[256];
TCHAR name[256+1];
GetDllFilename(name, 256);
+ lstrcpy(szKeyName, _T("Software\\Thingamahoochie\\WinMerge\\Plugins\\"));
+ lstrcat(szKeyName, name);
+ return szKeyName;
+}
+
+CString RegReadString(const CString& key, const CString& valuename, const CString& defaultValue)
+{
+ CRegKey reg;
+ if (reg.Open(HKEY_CURRENT_USER, key, KEY_READ) == ERROR_SUCCESS)
+ {
+ TCHAR value[512] = {0};
+ DWORD dwSize = sizeof(value) / sizeof(value[0]);
+ reg.QueryStringValue(valuename, value, &dwSize);
+ return value;
+ }
+ return defaultValue;
+}
+
+int CreateArrayFromRangeString(const TCHAR *rangestr, int (* value)[2])
+{
+ TCHAR name[256];
+
+ lstrcpy(name, rangestr);
+
+ if (name[0] == 0)
+ return 0;
// first pass : prepare the chunks
int nValue = 0;
token = _tcstok( NULL, _T(",_") );
}
- // pass first chunk
- nValue --;
-
if (value == 0)
// just return the number of values
return nValue;
- if (nValue == 0)
- return nValue;
-
- token = name + _tcslen(name) + 1; // pass first chunk
+ token = name;
int i;
for (i = 0 ; i < nValue ; i++)
{
return nValue;
}
+CString CreateRangeStringFromArray(int nExcludedRanges, const int aExcludedRanges[][2])
+{
+ CString rangestr = _T("");
+ for (int i = 0; i < nExcludedRanges; ++i)
+ {
+ TCHAR value[256];
+ if (aExcludedRanges[i][0] > 0 && aExcludedRanges[i][1] > 0)
+ {
+ if (aExcludedRanges[i][0] == aExcludedRanges[i][1])
+ {
+ wsprintf(value, _T("%d"), aExcludedRanges[i][0]);
+ rangestr += value;
+ }
+ else
+ {
+ wsprintf(value, _T("%d-%d"), aExcludedRanges[i][0], aExcludedRanges[i][1]);
+ rangestr += value;
+ }
+ rangestr += _T(",");
+ }
+ }
+ if (!rangestr.IsEmpty())
+ rangestr.Delete(rangestr.GetLength() - 1);
+
+ return rangestr;
+}
+
+CString GetColumnRangeString()
+{
+ TCHAR name[256+1];
+ GetDllFilename(name, 256);
+ CString rangestr;
+ TCHAR * token = _tcspbrk(name, _T(",_"));
+ if (!token)
+ rangestr = RegReadString(KeyName(), _T("ColumnRanges"), _T(""));
+ else
+ rangestr = token + 1;
+
+ int nExcludedRanges = CreateArrayFromRangeString(rangestr, NULL);
+ int (* aExcludedRanges)[2] = new int[nExcludedRanges][2];
+ if (aExcludedRanges == NULL)
+ nExcludedRanges = 0;
+ else
+ nExcludedRanges = CreateArrayFromRangeString(rangestr, aExcludedRanges);
+
+ rangestr = CreateRangeStringFromArray(nExcludedRanges, aExcludedRanges);
+
+ delete[] aExcludedRanges;
+
+ return rangestr;
+}
+
STDMETHODIMP CWinMergeScript::get_PluginEvent(BSTR *pVal)
{
return S_OK;
}
-
STDMETHODIMP CWinMergeScript::PrediffBufferW(BSTR *pText, INT *pSize, VARIANT_BOOL *pbChanged, VARIANT_BOOL *pbHandled)
{
WCHAR * pBeginText = *pText;
long nSize = *pSize;
WCHAR * pEndText = pBeginText + nSize;
+ CString rangestr = GetColumnRangeString();
- int nExcludedRanges = CreateArrayFromFilename(NULL);
+ int nExcludedRanges = CreateArrayFromRangeString(rangestr, NULL);
int (* aExcludedRanges)[2] = new int[nExcludedRanges][2];
if (aExcludedRanges == NULL)
nExcludedRanges = 0;
else
- nExcludedRanges = CreateArrayFromFilename(aExcludedRanges);
+ nExcludedRanges = CreateArrayFromRangeString(rangestr, aExcludedRanges);
if (nExcludedRanges == 0)
{
*pbHandled = VARIANT_TRUE;
return S_OK;
}
+
+INT_PTR CALLBACK DlgProc(HWND hWnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)
+{
+ switch(uiMsg) {
+ case WM_INITDIALOG:
+ SetDlgItemText(hWnd, IDC_EDIT1, GetColumnRangeString());
+ return TRUE;
+
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDOK)
+ {
+ CRegKey reg;
+ if (reg.Create(HKEY_CURRENT_USER, KeyName(), REG_NONE, REG_OPTION_NON_VOLATILE, KEY_WRITE) != ERROR_SUCCESS)
+ return FALSE;
+ TCHAR value[512] = {0};
+ GetDlgItemText(hWnd, IDC_EDIT1, value, sizeof(value)/sizeof(TCHAR));
+ reg.SetStringValue(_T("ColumnRanges"), value);
+ EndDialog(hWnd, IDOK);
+ }
+ else if (LOWORD(wParam) == IDCANCEL)
+ {
+ EndDialog(hWnd, IDCANCEL);
+ }
+ return TRUE;
+ break;
+
+ default:
+ break;
+ }
+ return FALSE;
+}
+
+STDMETHODIMP CWinMergeScript::ShowSettingsDialog(VARIANT_BOOL *pbHandled)
+{
+ *pbHandled = (DialogBox(_Module.GetModuleInstance(), MAKEINTRESOURCE(IDD_DIALOG1), NULL, DlgProc) == IDOK);
+ return S_OK;
+}
// IWinMergeScript
public:
STDMETHOD(PrediffBufferW)(/*[in]*/ BSTR * pText, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[out, retval]*/ VARIANT_BOOL * pbHandled);
+ STDMETHOD(ShowSettingsDialog)(/*[out, retval]*/ VARIANT_BOOL * pbHandled);
STDMETHOD(get_PluginIsAutomatic)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_PluginFileFilters)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_PluginDescription)(/*[out, retval]*/ BSTR *pVal);
[propget, id(3), helpstring("property PluginFileFilters")] HRESULT PluginFileFilters([out, retval] BSTR *pVal);
[propget, id(4), helpstring("property PluginIsAutomatic")] HRESULT PluginIsAutomatic([out, retval] VARIANT_BOOL *pVal);
[id(5), helpstring("method PrediffBufferW")] HRESULT PrediffBufferW([in] BSTR * pText, [in] INT * pSize, [in] VARIANT_BOOL * pbChanged, [out, retval] VARIANT_BOOL * pbHandled);
+ [id(6), helpstring("method ShowSettingsDialog")] HRESULT ShowSettingsDialog([out, retval] VARIANT_BOOL * pbHandled);
};
[
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,3,1
- PRODUCTVERSION 1,0,3,1
+ FILEVERSION 1,0,4,1
+ PRODUCTVERSION 1,0,4,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
VALUE "Comments", "WinMerge plugin\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "RCLocalizationHelper Module\0"
- VALUE "FileVersion", "1, 0, 3, 1\0"
+ VALUE "FileVersion", "1, 0, 4, 1\0"
VALUE "InternalName", "RCLocalizationHelper\0"
- VALUE "LegalCopyright", "Copyright 2003-2012\0"
+ VALUE "LegalCopyright", "Copyright 2003-2014\0"
VALUE "LegalTrademarks", "\0"
VALUE "OLESelfRegister", "\0"
VALUE "OriginalFilename", "RCLocalizationHelper.DLL\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "RCLocalizationHelper Module\0"
- VALUE "ProductVersion", "1, 0, 3, 1\0"
+ VALUE "ProductVersion", "1, 0, 4, 1\0"
VALUE "SpecialBuild", "\0"
END
END
*pbHandled = VARIANT_TRUE;
return S_OK;
}
+
+STDMETHODIMP CWinMergeScript::ShowSettingsDialog(VARIANT_BOOL *pbHandled)
+{
+ *pbHandled = VARIANT_FALSE;
+ return E_NOTIMPL;
+}
// IWinMergeScript
public:
STDMETHOD(PrediffBufferW)(/*[in]*/ BSTR * pText, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[out, retval]*/ VARIANT_BOOL * pbHandled);
+ STDMETHOD(ShowSettingsDialog)(/*[out, retval]*/ VARIANT_BOOL * pbHandled);
STDMETHOD(get_PluginIsAutomatic)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_PluginFileFilters)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_PluginDescription)(/*[out, retval]*/ BSTR *pVal);
[id(6), helpstring("method PackBufferA")] HRESULT PackBufferA([in] SAFEARRAY(unsigned char) * pBuffer, [in] INT * pSize, [in] VARIANT_BOOL * pbChanged, [in] INT subcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(7), helpstring("method UnpackFile")] HRESULT UnpackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(8), helpstring("method PackFile")] HRESULT PackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
+ [id(9), helpstring("method ShowSettingsDialog")] HRESULT ShowSettingsDialog([out, retval] VARIANT_BOOL * pbHandled);
};
[
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,1,1
- PRODUCTVERSION 1,0,1,1
+ FILEVERSION 1,0,2,1
+ PRODUCTVERSION 1,0,2,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
VALUE "Comments", "WinMerge plugin\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "WatchBeginningOfLog Module\0"
- VALUE "FileVersion", "1, 0, 1, 1\0"
+ VALUE "FileVersion", "1, 0, 2, 1\0"
VALUE "InternalName", "WatchBeginningOfLog\0"
- VALUE "LegalCopyright", "Copyright 2003-2012\0"
+ VALUE "LegalCopyright", "Copyright 2003-2014\0"
VALUE "LegalTrademarks", "\0"
VALUE "OLESelfRegister", "\0"
VALUE "OriginalFilename", "WatchBeginningOfLog.DLL\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "WatchBeginningOfLog Module\0"
- VALUE "ProductVersion", "1, 0, 1, 1\0"
+ VALUE "ProductVersion", "1, 0, 2, 1\0"
VALUE "SpecialBuild", "\0"
END
END
*pbSuccess = VARIANT_FALSE;
return S_OK;
}
+
+STDMETHODIMP CWinMergeScript::ShowSettingsDialog(VARIANT_BOOL *pbHandled)
+{
+ *pbHandled = VARIANT_FALSE;
+ return E_NOTIMPL;
+}
STDMETHOD(UnpackFile)(/*[in]*/ BSTR fileSrc, /*[in]*/ BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(PackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT subcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(UnpackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
+ STDMETHOD(ShowSettingsDialog)(/*[out, retval]*/ VARIANT_BOOL * pbHandled);
STDMETHOD(get_PluginIsAutomatic)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_PluginFileFilters)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_PluginDescription)(/*[out, retval]*/ BSTR *pVal);
[id(6), helpstring("method PackBufferA")] HRESULT PackBufferA([in] SAFEARRAY(unsigned char) * pBuffer, [in] INT * pSize, [in] VARIANT_BOOL * pbChanged, [in] INT subcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(7), helpstring("method UnpackFile")] HRESULT UnpackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
[id(8), helpstring("method PackFile")] HRESULT PackFile([in] BSTR fileSrc, [in] BSTR fileDst, VARIANT_BOOL * pbChanged, INT pSubcode, [out, retval] VARIANT_BOOL * pbSuccess);
+ [id(9), helpstring("method ShowSettingsDialog")] HRESULT ShowSettingsDialog([out, retval] VARIANT_BOOL * pbHandled);
};
[
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,1,1
- PRODUCTVERSION 1,0,1,1
+ FILEVERSION 1,0,2,1
+ PRODUCTVERSION 1,0,2,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
VALUE "Comments", "WinMerge plugin\0"
VALUE "CompanyName", "\0"
VALUE "FileDescription", "WatchEndOfLog Module\0"
- VALUE "FileVersion", "1, 0, 1, 1\0"
+ VALUE "FileVersion", "1, 0, 2, 1\0"
VALUE "InternalName", "WatchEndOfLog\0"
- VALUE "LegalCopyright", "Copyright 2003-2012\0"
+ VALUE "LegalCopyright", "Copyright 2003-2014\0"
VALUE "LegalTrademarks", "\0"
VALUE "OLESelfRegister", "\0"
VALUE "OriginalFilename", "WatchEndOfLog.DLL\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "WatchEndOfLog Module\0"
- VALUE "ProductVersion", "1, 0, 1, 1\0"
+ VALUE "ProductVersion", "1, 0, 2, 1\0"
VALUE "SpecialBuild", "\0"
END
END
*pbSuccess = VARIANT_FALSE;
return S_OK;
}
+
+STDMETHODIMP CWinMergeScript::ShowSettingsDialog(VARIANT_BOOL *pbHandled)
+{
+ *pbHandled = VARIANT_FALSE;
+ return E_NOTIMPL;
+}
STDMETHOD(UnpackFile)(/*[in]*/ BSTR fileSrc, /*[in]*/ BSTR fileDst, VARIANT_BOOL * pbChanged, INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(PackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT subcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
STDMETHOD(UnpackBufferA)(/*[in]*/ SAFEARRAY ** pBuffer, /*[in]*/ INT * pSize, /*[in]*/ VARIANT_BOOL * pbChanged, /*[in]*/ INT * pSubcode, /*[out, retval]*/ VARIANT_BOOL * pbSuccess);
+ STDMETHOD(ShowSettingsDialog)(/*[out, retval]*/ VARIANT_BOOL * pbHandled);
STDMETHOD(get_PluginIsAutomatic)(/*[out, retval]*/ VARIANT_BOOL *pVal);
STDMETHOD(get_PluginFileFilters)(/*[out, retval]*/ BSTR *pVal);
STDMETHOD(get_PluginDescription)(/*[out, retval]*/ BSTR *pVal);