summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore7
-rw-r--r--analyzer.lpi62
-rw-r--r--analyzer.lpr77
-rw-r--r--analyzer.lps17
4 files changed, 163 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f995854
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*.bak
+*.ppu
+*.o
+*.tar.gz
+*~
+analyzer
+lib
diff --git a/analyzer.lpi b/analyzer.lpi
new file mode 100644
index 0000000..f5eae51
--- /dev/null
+++ b/analyzer.lpi
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <ProjectOptions>
+ <Version Value="9"/>
+ <General>
+ <Flags>
+ <MainUnitHasCreateFormStatements Value="False"/>
+ </Flags>
+ <SessionStorage Value="InProjectDir"/>
+ <MainUnit Value="0"/>
+ <Title Value="Analyzer"/>
+ <UseAppBundle Value="False"/>
+ <ResourceType Value="res"/>
+ </General>
+ <i18n>
+ <EnableI18N LFM="False"/>
+ </i18n>
+ <VersionInfo>
+ <StringTable ProductVersion=""/>
+ </VersionInfo>
+ <BuildModes Count="1">
+ <Item1 Name="Default" Default="True"/>
+ </BuildModes>
+ <PublishOptions>
+ <Version Value="2"/>
+ </PublishOptions>
+ <RunParams>
+ <local>
+ <FormatVersion Value="1"/>
+ </local>
+ </RunParams>
+ <Units Count="1">
+ <Unit0>
+ <Filename Value="analyzer.lpr"/>
+ <IsPartOfProject Value="True"/>
+ </Unit0>
+ </Units>
+ </ProjectOptions>
+ <CompilerOptions>
+ <Version Value="11"/>
+ <Target>
+ <Filename Value="analyzer"/>
+ </Target>
+ <SearchPaths>
+ <IncludeFiles Value="$(ProjOutDir)"/>
+ <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
+ </SearchPaths>
+ </CompilerOptions>
+ <Debugging>
+ <Exceptions Count="3">
+ <Item1>
+ <Name Value="EAbort"/>
+ </Item1>
+ <Item2>
+ <Name Value="ECodetoolError"/>
+ </Item2>
+ <Item3>
+ <Name Value="EFOpenError"/>
+ </Item3>
+ </Exceptions>
+ </Debugging>
+</CONFIG>
diff --git a/analyzer.lpr b/analyzer.lpr
new file mode 100644
index 0000000..02dfd2a
--- /dev/null
+++ b/analyzer.lpr
@@ -0,0 +1,77 @@
+program analyzer;
+
+{$mode objfpc}{$H+}
+
+uses
+ {$IFDEF UNIX}{$IFDEF UseCThreads}
+ cthreads,
+ {$ENDIF}{$ENDIF}
+ Classes, SysUtils, CustApp
+ { you can add units after this };
+
+type
+
+ { TAnalyzer }
+
+ TAnalyzer = class(TCustomApplication)
+ protected
+ procedure DoRun; override;
+ public
+ constructor Create(TheOwner: TComponent); override;
+ destructor Destroy; override;
+ procedure WriteHelp; virtual;
+ end;
+
+{ TAnalyzer }
+
+procedure TAnalyzer.DoRun;
+var
+ ErrorMsg: String;
+begin
+ // quick check parameters
+ ErrorMsg:=CheckOptions('h', 'help');
+ if ErrorMsg<>'' then begin
+ ShowException(Exception.Create(ErrorMsg));
+ Terminate;
+ Exit;
+ end;
+
+ // parse parameters
+ if HasOption('h', 'help') then begin
+ WriteHelp;
+ Terminate;
+ Exit;
+ end;
+
+ { add your program here }
+
+ // stop program loop
+ Terminate;
+end;
+
+constructor TAnalyzer.Create(TheOwner: TComponent);
+begin
+ inherited Create(TheOwner);
+ StopOnException:=True;
+end;
+
+destructor TAnalyzer.Destroy;
+begin
+ inherited Destroy;
+end;
+
+procedure TAnalyzer.WriteHelp;
+begin
+ { add your help code here }
+ writeln('Usage: ', ExeName, ' -h');
+end;
+
+var
+ Application: TAnalyzer;
+begin
+ Application:=TAnalyzer.Create(nil);
+ Application.Title:='Analyzer';
+ Application.Run;
+ Application.Free;
+end.
+
diff --git a/analyzer.lps b/analyzer.lps
new file mode 100644
index 0000000..be061c4
--- /dev/null
+++ b/analyzer.lps
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CONFIG>
+ <ProjectSession>
+ <Version Value="9"/>
+ <BuildModes Active="Default"/>
+ <Units Count="1">
+ <Unit0>
+ <Filename Value="analyzer.lpr"/>
+ <IsPartOfProject Value="True"/>
+ <IsVisibleTab Value="True"/>
+ <UsageCount Value="20"/>
+ <Loaded Value="True"/>
+ </Unit0>
+ </Units>
+ <JumpHistory HistoryIndex="-1"/>
+ </ProjectSession>
+</CONFIG>