From 297ed5cb0c86ad6283b5cd96201ed921da64a286 Mon Sep 17 00:00:00 2001 From: Margers Date: Sun, 13 Oct 2024 19:12:28 +0000 Subject: [PATCH] Add missing Compiler Modes in Compiler Options --- packages/ide/fpswitch.pas | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/packages/ide/fpswitch.pas b/packages/ide/fpswitch.pas index 37ff186af7..0e8b2b4421 100644 --- a/packages/ide/fpswitch.pas +++ b/packages/ide/fpswitch.pas @@ -44,6 +44,9 @@ type TSwitchMode = (om_Normal,om_Debug,om_Release); + TCompilerMode = (moNone,moFpc,moObjFpc,moTp,moDelphi,moDelphiUnicode, + moMacPas,moIso,moExtendedPascal,moGnu); + TSwitchItemTyp = (ot_Select,ot_Boolean,ot_String,ot_MultiString,ot_Longint); PSwitchItem = ^TSwitchItem; @@ -132,6 +135,7 @@ type procedure AddMultiStringItem(const name,param:string;AID: TParamID); function GetCurrSel:integer; function GetCurrSelParam : String; + function GetCurrSelParamID : TParamID; function GetBooleanItem(index:integer):boolean; function GetLongintItem(index:integer):longint; function GetStringItem(index:integer):string; @@ -238,7 +242,10 @@ const opt_mode_objectpascal = 'Object Pascal extension on'; opt_mode_turbopascal = 'Turbo Pascal compatible'; opt_mode_delphi = 'Delphi compatible'; + opt_mode_delphiunicode = 'Delphi Unicode'; opt_mode_macpascal = 'Macintosh Pascal dialect'; + opt_mode_iso = 'Standard Pascal, ISO 7185'; + opt_mode_extendedpascal = 'Extended Pascal, ISO 10206'; opt_mode_gnupascal = 'GNU Pascal'; { Verbose options } opt_warnings = '~W~arnings'; @@ -794,6 +801,14 @@ begin GetCurrSelParam:=''; end; +function TSwitches.GetCurrSelParamID : TParamID; +begin + if IsSel then + GetCurrSelParamID:=PSwitchItem(Items^.At(SelNr[SwitchesMode]))^.ParamID + else + GetCurrSelParamID:=idNone; +end; + procedure TSwitches.SetCurrSel(index:integer); begin if index