Skip to content

Commit

Permalink
fix indent of ifdef
Browse files Browse the repository at this point in the history
  • Loading branch information
NishiOwO committed Feb 23, 2025
1 parent 19ca2fa commit daa53f4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/HighballConfig.pp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ function HighballCheckConfig(): Integer;
WriteLn(StdErr, 'ERROR! server.description not set');
HighballCheckConfig := 1;
end;

{$if defined(SQLITE)}
if Length(HighballParsedConfig.DatabasePath) = 0 then
begin
Expand Down
20 changes: 11 additions & 9 deletions src/class/HBDatabase.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
interface
uses
SQLDB,
{$if defined(POSTGRES)}
{$if defined(POSTGRES)}
Postgres,
PQConnection;
{$elseif defined(SQLITE)}
{$elseif defined(SQLITE)}
SQLite3dyn,
SQLite3Conn;
{$endif}
{$endif}


type
{$if defined(POSTGRES)}
{$if defined(POSTGRES)}
THighballDBConnection = TPQConnection;
{$elseif defined(SQLITE)}
{$elseif defined(SQLITE)}
THighballDBConnection = TSQLite3Connection;
{$endif}
{$endif}
THighballDB = class
protected
Connection: THighballDBConnection;
Expand All @@ -41,14 +41,16 @@ constructor THighballDB.Create();
Connection.Transaction := Transaction;
Transaction.Database := Connection;
Connection.CharSet := 'UTF8';
{$if defined(POSTGRES)}

{$if defined(POSTGRES)}
Connection.DatabaseName := HighballParsedConfig.DatabaseDatabase;
Connection.Username := HighballParsedConfig.DatabaseUsername;
Connection.Password := HighballParsedConfig.DatabasePassword;
Connection.Hostname := HighballParsedConfig.DatabaseHostname;
{$elseif defined(SQLITE)}
{$elseif defined(SQLITE)}
Connection.DatabaseName := HighballParsedConfig.DatabasePath;
{$endif}
{$endif}

Connection.Open();
end;

Expand Down
4 changes: 2 additions & 2 deletions src/highball.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
program highball;

uses
{$ifdef UNIX}
{$ifdef UNIX}
CThreads,
CMem,
{$endif}
{$endif}
HighballVersion,
HighballUtils,
HighballServer,
Expand Down

0 comments on commit daa53f4

Please sign in to comment.