Переглянути джерело

Replace Delphi tool (DumpSections) with equivalent shell script (dumpsections.sh).

git-svn-id: file:///var/svn/tigccpp/trunk@1247 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler 16 роки тому
батько
коміт
23f3b90a29

+ 0 - 34
tigcc/doc/Programs/GNUDocs/DumpSections.cfg

@@ -1,34 +0,0 @@
--$A+
--$B-
--$C+
--$D+
--$E-
--$F-
--$G+
--$H+
--$I+
--$J+
--$K-
--$L+
--$M-
--$N+
--$O+
--$P+
--$Q-
--$R-
--$S-
--$T-
--$U-
--$V+
--$W-
--$X+
--$YD
--$Z1
--cg
--AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
--H+
--W+
--M
--$M16384,1048576
--K$00400000
--LN"c:\delphi\Lib"

+ 0 - 109
tigcc/doc/Programs/GNUDocs/DumpSections.dof

@@ -1,109 +0,0 @@
-[Compiler]
-A=1
-B=0
-C=1
-D=1
-E=0
-F=0
-G=1
-H=1
-I=1
-J=1
-K=0
-L=1
-M=0
-N=1
-O=1
-P=1
-Q=0
-R=0
-S=0
-T=0
-U=0
-V=1
-W=0
-X=1
-Y=1
-Z=1
-ShowHints=1
-ShowWarnings=1
-UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-
-[Linker]
-MapFile=0
-OutputObjs=0
-ConsoleApp=1
-DebugInfo=0
-RemoteSymbols=0
-MinStackSize=16384
-MaxStackSize=1048576
-ImageBase=4194304
-ExeDescription=
-
-[Directories]
-OutputDir=
-UnitOutputDir=
-PackageDLLOutputDir=
-PackageDCPOutputDir=
-SearchPath=
-Packages=
-Conditionals=
-DebugSourceDirs=
-UsePackages=0
-
-[Parameters]
-RunParams=C:\Programme\Taschenrechner\TI-GCC\Doc\System\Info\gnuexts\
-HostApplication=
-
-[Version Info]
-IncludeVerInfo=0
-AutoIncBuild=0
-MajorVer=1
-MinorVer=0
-Release=0
-Build=0
-Debug=0
-PreRelease=0
-Special=0
-Private=0
-DLL=0
-Locale=1031
-CodePage=1252
-
-[Version Info Keys]
-CompanyName=
-FileDescription=
-FileVersion=1.0.0.0
-InternalName=
-LegalCopyright=
-LegalTrademarks=
-OriginalFilename=
-ProductName=
-ProductVersion=1.0.0.0
-Comments=
-
-[Excluded Packages]
-$(DELPHI)\Bin\dclstd40.bpl=Borland Standard Components
-$(DELPHI)\Bin\dcldb40.bpl=Borland Database Components
-$(DELPHI)\Bin\dcl31w40.bpl=Delphi 1.0 Compatibility Components
-$(DELPHI)\Bin\dclsmp40.bpl=Borland Sample Components
-$(DELPHI)\Bin\dclqrt40.bpl=QuickReport Components
-$(DELPHI)\Bin\dclint40.bpl=Borland Resource DLL Wizard
-$(DELPHI)\Bin\dcltee40.bpl=Borland TeeChart Components
-C:\WINDOWS\SYSTEM\\ibevnt40.bpl=Borland Interbase Event Alerter Component
-C:\WINDOWS\SYSTEM\\nmfast40.bpl=NetMasters Fastnet Tools
-$(DELPHI)\Bin\dclocx40.bpl=Borland Sample Imported ActiveX Controls
-$(DELPHI)\Lib\dclusr40.bpl=Borland User
-
-[HistoryLists\hlRunParameters]
-Count=10
-Item0=C:\Programme\Taschenrechner\TI-GCC\Doc\System\Info\gnuexts\
-Item1=C:\Programme\Taschenrechner\TI-GCC\Doc\System\Info\comopts\
-Item2=C:\Programme\Taschenrechner\TI-GCC\Doc\System\Info\cpp\
-Item3=C:\Programme\Taschenrechner\TI-GCC\Doc\System\Info\gnuasm\
-Item4=as.texi
-Item5=cpp.texi
-Item6=invoke.texi
-Item7=as.texinfo
-Item8=estack.h
-Item9=alloc.h

+ 0 - 64
tigcc/doc/Programs/GNUDocs/DumpSections.dpr

@@ -1,64 +0,0 @@
-{
-  TIGCC Documentation Tools
-
-  Copyright (C) 2002-2004 Sebastian Reichelt
-
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2, or (at your option)
-  any later version.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with this program; if not, write to the Free Software Foundation,
-  Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
-}
-
-program DumpSections;
-
-uses
-	UtilsDos,
-	SysUtils,
-	Classes;
-
-var
-	I,
-	J: Integer;
-	Contents: TStringList;
-	Title: string;
-
-begin
-	Contents := TStringList.Create;
-	try
-		with TFileReferences.Create do try
-			SearchForFiles (ParamStr (1) + '*.hss', atStd);
-			for I := 0 to Count - 1 do
-				with TStringList.Create do try
-					LoadFromFile (Items[I].FullName);
-					for J := 0 to Count - 1 do
-						if Copy (Strings [J], 1, Length ('Title=')) = 'Title=' then begin
-							Title := Copy (Strings [J], Length ('Title=') + 1, Length (Strings [J]));
-							if Length (Title) > 0 then begin
-								if Title [1] = '.' then
-									Contents.Add (#9'else if Pos (''' + Title + ''', Ref) > 0 then'#13#10#9#9'Result := ''' + ExtractFileName (WithoutBackslash (ParamStr (1))) + '/' + WithoutExt (Items[I].FileName) + '''')
-								else if Pos ('cpp', ParamStr (1)) > 0 then
-									Contents.Add (#9'else if Ref = ''' + Title + ''' then'#13#10#9#9'Result := ''' + ExtractFileName (WithoutBackslash (ParamStr (1))) + '/' + WithoutExt (Items[I].FileName) + '''')
-								else
-									Contents.Add (#9'else if Ref = ''' + Title + ',,' + Title + ''' then'#13#10#9#9'Result := ''' + ExtractFileName (WithoutBackslash (ParamStr (1))) + '/' + WithoutExt (Items[I].FileName) + '''');
-							end;
-						end;
-				finally
-					Free;
-				end;
-		finally
-			Free;
-		end;
-		Contents.SaveToFile ('DumpSections.out');
-	finally
-		Contents.Free;
-	end;
-end.

+ 0 - 115
tigcc/doc/Programs/GNUDocs/DumpSections.dsk

@@ -1,115 +0,0 @@
-[Main Window]
-Create=1
-Visible=1
-State=0
-Left=0
-Top=0
-Width=640
-Height=111
-MaxLeft=-1
-MaxTop=-1
-ClientWidth=632
-ClientHeight=84
-
-[Closed Files]
-File_0=SourceModule,'C:\Delphi\Projects\TIGCC IDE\HTML Help\HelpSystemMasterUnit.pas',0,1,1,1,1,0,0
-File_1=SourceModule,'c:\delphi\Source\Rtl\Win\opengl.pas',0,1,1,1,1,0,0
-File_2=SourceModule,'D:\Eigene Dateien\Standard-Delphi-Units\UtilsGra.pas',0,1,1,1,1,0,0
-File_3=SourceModule,'C:\Delphi\Source\UWaveIn.pas',0,1,124,1,130,0,0
-File_4=SourceModule,'C:\Delphi\Source\URLLabelUnit.pas',0,1,1,1,1,0,0
-File_5=SourceModule,'C:\Delphi\Source\TBIcon.pas',0,1,1,1,1,0,0
-File_6=SourceModule,'C:\Delphi\Source\SourceEditUnit.pas',0,1,1,1,1,0,0
-File_7=SourceModule,'C:\Delphi\Source\RegTreeUnit.pas',0,1,1,1,1,0,0
-File_8=SourceModule,'C:\Delphi\Source\MultTime.pas',0,1,1,1,1,0,0
-File_9=SourceModule,'C:\Delphi\Source\MultTask.pas',0,1,1,1,1,0,0
-
-[Modules]
-Module0=C:\Delphi\Projects\TIGCC IDE\HTML Help\GNUDocs\DumpSections.dpr
-Count=1
-EditWindowCount=1
-
-[C:\Delphi\Projects\TIGCC IDE\HTML Help\GNUDocs\DumpSections.dpr]
-ModuleType=SourceModule
-FormState=0
-FormOnTop=0
-
-[C:\Delphi\Bin\ProjectGroup1.bpg]
-FormState=0
-FormOnTop=0
-
-[EditWindow0]
-CodeExplorer=CodeExplorer@EditWindow0
-MessageView=MessageView@EditWindow0
-Create=1
-Visible=1
-State=0
-Left=0
-Top=111
-Width=640
-Height=367
-MaxLeft=-1
-MaxTop=-1
-ClientWidth=632
-ClientHeight=340
-LeftPanelSize=0
-LeftPanelClients=CodeExplorer@EditWindow0
-LeftPanelData=00000400010000000C000000436F64654578706C6F7265720000000000000000000000000000000000FFFFFFFF
-RightPanelSize=0
-BottomPanelSize=0
-BottomPanelClients=MessageView@EditWindow0
-BottomPanelData=00000400010000000B0000004D657373616765566965770000000000000000000000000000000000FFFFFFFF
-ViewCount=1
-CurrentView=0
-View0=0
-
-[CodeExplorer@EditWindow0]
-Create=1
-Visible=0
-State=0
-Left=2
-Top=7
-Width=140
-Height=305
-MaxLeft=-1
-MaxTop=-1
-ClientWidth=140
-ClientHeight=305
-TBDockHeight=305
-LRDockWidth=140
-Dockable=1
-
-[MessageView@EditWindow0]
-Create=1
-Visible=0
-State=0
-Left=11
-Top=0
-Width=621
-Height=52
-MaxLeft=-1
-MaxTop=-1
-ClientWidth=621
-ClientHeight=52
-TBDockHeight=52
-LRDockWidth=443
-Dockable=1
-
-[View0]
-Module=C:\Delphi\Projects\TIGCC IDE\HTML Help\GNUDocs\DumpSections.dpr
-CursorX=1
-CursorY=1
-TopLine=1
-LeftCol=1
-
-[DockHosts]
-DockHostCount=0
-
-[Watches]
-Count=0
-
-[Breakpoints]
-Count=0
-
-[AddressBreakpoints]
-Count=0
-

BIN
tigcc/doc/Programs/GNUDocs/DumpSections.exe


+ 44 - 0
tigcc/doc/Programs/GNUDocs/dumpsections.sh

@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# TIGCC Documentation Tools
+#
+# Copyright (C) 2002-2004 Sebastian Reichelt
+# Copyright (C) 2008 Kevin Kofler
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.
+
+rm -f DumpSections.out
+for f in "$1"/*.hss ; do
+  title=`grep '^Title=' "$f" | sed -e 's/^Title=//g'`
+  if [ -n "$title" ] ; then
+    case "$title" in
+      .*)
+        echo '  else if Pos('\'"$title"\'', Ref) > 0 then' >>DumpSections.out
+        ;;
+      *)
+        case "$1" in
+          *cpp*)
+            echo '  else if Ref = '\'"$title"\'' then' >>DumpSections.out
+            ;;
+          *)
+            echo '  else if Ref = '\'"$title,,$title"\'' then' >>DumpSections.out
+            ;;
+        esac
+        ;;
+    esac
+    fb=`basename "$f"`
+    echo '    Result := '\'`basename $1`/"${fb%.hss}"\' >>DumpSections.out
+  fi
+done