Skip to content

Commit 225fd2a

Browse files
committed
refactor: Making new entry comply with folders
1 parent 08853ce commit 225fd2a

File tree

4 files changed

+103
-27
lines changed

4 files changed

+103
-27
lines changed

baseline/Lazarus/src/baseline.lpr

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818
type
1919

20-
{ TOneBRCBaseline }
21-
20+
{ TOneBRCBaseline }
2221
TOneBRCBaseline = class(TCustomApplication)
2322
private
2423
FBaseline: TBaseline;

entries/ikelaiah/src/OneBRC.lpi

Lines changed: 88 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,84 @@
88
<MainUnitHasCreateFormStatements Value="False"/>
99
<MainUnitHasTitleStatement Value="False"/>
1010
<MainUnitHasScaledStatement Value="False"/>
11+
<CompatibilityMode Value="True"/>
1112
</Flags>
1213
<SessionStorage Value="InProjectDir"/>
1314
<Title Value="OneBRC"/>
1415
<UseAppBundle Value="False"/>
1516
<ResourceType Value="res"/>
1617
</General>
17-
<BuildModes>
18-
<Item Name="Default" Default="True"/>
18+
<BuildModes Count="3">
19+
<Item1 Name="Default" Default="True"/>
20+
<Item2 Name="Debug">
21+
<CompilerOptions>
22+
<Version Value="11"/>
23+
<PathDelim Value="\"/>
24+
<Target>
25+
<Filename Value="..\..\..\bin\ikelaiah"/>
26+
</Target>
27+
<SearchPaths>
28+
<IncludeFiles Value="$(ProjOutDir)"/>
29+
<UnitOutputDirectory Value="..\..\..\bin\lib\$(TargetCPU)-$(TargetOS)"/>
30+
</SearchPaths>
31+
<Parsing>
32+
<SyntaxOptions>
33+
<IncludeAssertionCode Value="True"/>
34+
</SyntaxOptions>
35+
</Parsing>
36+
<CodeGeneration>
37+
<RelocatableUnit Value="True"/>
38+
<Checks>
39+
<IOChecks Value="True"/>
40+
<RangeChecks Value="True"/>
41+
<OverflowChecks Value="True"/>
42+
<StackChecks Value="True"/>
43+
</Checks>
44+
<VerifyObjMethodCallValidity Value="True"/>
45+
</CodeGeneration>
46+
<Linking>
47+
<Debugging>
48+
<DebugInfoType Value="dsDwarf3"/>
49+
<UseHeaptrc Value="True"/>
50+
<TrashVariables Value="True"/>
51+
<UseExternalDbgSyms Value="True"/>
52+
</Debugging>
53+
</Linking>
54+
<Other>
55+
<CustomOptions Value="-dDEBUG"/>
56+
<OtherDefines Count="1">
57+
<Define0 Value="DEBUG"/>
58+
</OtherDefines>
59+
</Other>
60+
</CompilerOptions>
61+
</Item2>
62+
<Item3 Name="Release">
63+
<CompilerOptions>
64+
<Version Value="11"/>
65+
<PathDelim Value="\"/>
66+
<Target>
67+
<Filename Value="..\..\..\bin\ikelaiah"/>
68+
</Target>
69+
<SearchPaths>
70+
<IncludeFiles Value="$(ProjOutDir)"/>
71+
<UnitOutputDirectory Value="..\..\..\bin\lib\$(TargetCPU)-$(TargetOS)"/>
72+
</SearchPaths>
73+
<CodeGeneration>
74+
<SmartLinkUnit Value="True"/>
75+
<RelocatableUnit Value="True"/>
76+
<Optimizations>
77+
<OptimizationLevel Value="3"/>
78+
</Optimizations>
79+
</CodeGeneration>
80+
<Linking>
81+
<Debugging>
82+
<GenerateDebugInfo Value="False"/>
83+
<RunWithoutDebug Value="True"/>
84+
</Debugging>
85+
<LinkSmart Value="True"/>
86+
</Linking>
87+
</CompilerOptions>
88+
</Item3>
1989
</BuildModes>
2090
<PublishOptions>
2191
<Version Value="2"/>
@@ -24,32 +94,32 @@
2494
<RunParams>
2595
<FormatVersion Value="2"/>
2696
</RunParams>
27-
<Units>
28-
<Unit>
97+
<Units Count="3">
98+
<Unit0>
2999
<Filename Value="OneBRC.lpr"/>
30100
<IsPartOfProject Value="True"/>
31-
</Unit>
32-
<Unit>
101+
</Unit0>
102+
<Unit1>
33103
<Filename Value="stopwatch.pas"/>
34104
<IsPartOfProject Value="True"/>
35105
<UnitName Value="Stopwatch"/>
36-
</Unit>
37-
<Unit>
106+
</Unit1>
107+
<Unit2>
38108
<Filename Value="weatherstation.pas"/>
39109
<IsPartOfProject Value="True"/>
40110
<UnitName Value="WeatherStation"/>
41-
</Unit>
111+
</Unit2>
42112
</Units>
43113
</ProjectOptions>
44114
<CompilerOptions>
45115
<Version Value="11"/>
46116
<PathDelim Value="\"/>
47117
<Target>
48-
<Filename Value="OneBRC"/>
118+
<Filename Value="..\..\..\bin\ikelaiah"/>
49119
</Target>
50120
<SearchPaths>
51121
<IncludeFiles Value="$(ProjOutDir)"/>
52-
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
122+
<UnitOutputDirectory Value="..\..\..\bin\lib\$(TargetCPU)-$(TargetOS)"/>
53123
</SearchPaths>
54124
<CodeGeneration>
55125
<SmartLinkUnit Value="True"/>
@@ -63,16 +133,16 @@
63133
</Linking>
64134
</CompilerOptions>
65135
<Debugging>
66-
<Exceptions>
67-
<Item>
136+
<Exceptions Count="3">
137+
<Item1>
68138
<Name Value="EAbort"/>
69-
</Item>
70-
<Item>
139+
</Item1>
140+
<Item2>
71141
<Name Value="ECodetoolError"/>
72-
</Item>
73-
<Item>
142+
</Item2>
143+
<Item3>
74144
<Name Value="EFOpenError"/>
75-
</Item>
145+
</Item3>
76146
</Exceptions>
77147
</Debugging>
78148
</CONFIG>

entries/ikelaiah/src/OneBRC.lpr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
{$mode objfpc}{$H+}{$J-}{$modeSwitch advancedRecords}
2323
{$codepage utf8}
24-
//{$DEFINE DEBUG}
24+
2525

2626
uses
2727
{$IFDEF UNIX}

entries/ikelaiah/src/weatherstation.pas

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ interface
1010
{$ENDIF}
1111
Classes,
1212
SysUtils,
13-
Generics.Collections,
14-
Stopwatch;
13+
Generics.Collections
14+
{$IFDEF DEBUG}
15+
, Stopwatch
16+
{$ENDIF}
17+
;
1518

1619
type
1720
// Create a record of temperature stats
@@ -147,7 +150,9 @@ procedure ProcessTempMeasurements(filename: string);
147150
begin
148151

149152
// Start a timer
150-
// Stopwatch.StartTimer;
153+
{$IFDEF DEBUG}
154+
Stopwatch.StartTimer;
155+
{$ENDIF}
151156

152157
// Create a city - weather dictionary
153158
wd := TWeatherDictionary.Create;
@@ -206,7 +211,7 @@ procedure ProcessTempMeasurements(filename: string);
206211
isFirstKey := False;
207212
end;
208213

209-
Write('}');
214+
WriteLn('}');
210215

211216
{$IFDEF DEBUG}
212217
WriteLn('DEBUG mode on');
@@ -218,8 +223,10 @@ procedure ProcessTempMeasurements(filename: string);
218223
end; // End of processing TDictionary and TStringList
219224

220225
// Stop a timer
221-
// Stopwatch.StopTimer;
222-
// Stopwatch.DisplayTimer;
226+
{$IFDEF DEBUG}
227+
Stopwatch.StopTimer;
228+
Stopwatch.DisplayTimer;
229+
{$ENDIF}
223230

224231
end;
225232

0 commit comments

Comments
 (0)