From 94cb2299ea4284c916643df1dff1ffe0c8ed70b1 Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 4 Nov 1999 23:13:25 +0000 Subject: [PATCH] * moved unit alias support into ifdef --- compiler/files.pas | 9 ++++++++- compiler/options.pas | 7 ++++++- compiler/symtable.pas | 16 ++++++++++++---- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/compiler/files.pas b/compiler/files.pas index ebfcacf7f6..403936581f 100644 --- a/compiler/files.pas +++ b/compiler/files.pas @@ -1160,7 +1160,11 @@ end; FSplit(s,p,n,e); { Programs have the name program to don't conflict with dup id's } if _is_unit then +{$ifdef UNITALIASES} modulename:=stringdup(GetUnitAlias(Upper(n))) +{$else} + modulename:=stringdup(Upper(n)) +{$endif} else modulename:=stringdup('PROGRAM'); mainsource:=stringdup(s); @@ -1340,7 +1344,10 @@ end; end. { $Log$ - Revision 1.106 1999-11-04 10:54:02 peter + Revision 1.107 1999-11-04 23:13:25 peter + * moved unit alias support into ifdef + + Revision 1.106 1999/11/04 10:54:02 peter + -Ua= unit alias support Revision 1.105 1999/10/28 13:14:00 pierre diff --git a/compiler/options.pas b/compiler/options.pas index c9067aa7d1..cf5a30761c 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -679,10 +679,12 @@ begin 'U' : begin for j:=1 to length(more) do case more[j] of +{$ifdef UNITALIASES} 'a' : begin AddUnitAlias(Copy(More,j+1,255)); break; end; +{$endif UNITALIASES} 'n' : initglobalswitches:=initglobalswitches-[cs_check_unit_name]; 'p' : begin Message2(option_obsolete_switch_use_new,'-Up','-Fu'); @@ -1249,7 +1251,10 @@ end; end. { $Log$ - Revision 1.31 1999-11-04 10:54:03 peter + Revision 1.32 1999-11-04 23:13:25 peter + * moved unit alias support into ifdef + + Revision 1.31 1999/11/04 10:54:03 peter + -Ua= unit alias support Revision 1.30 1999/11/03 23:43:09 peter diff --git a/compiler/symtable.pas b/compiler/symtable.pas index 62d2ee1c4f..8ca36b70f7 100644 --- a/compiler/symtable.pas +++ b/compiler/symtable.pas @@ -365,8 +365,7 @@ unit symtable; 'lower_or_equal','as','is','in','sym_diff', 'starstar','assign'); -{*** Unit aliases ***} - +{$ifdef UNITALIASES} type punit_alias = ^tunit_alias; tunit_alias = object(tnamedindexobject) @@ -374,12 +373,12 @@ unit symtable; constructor init(const n:string); destructor done;virtual; end; - var unitaliases : pdictionary; procedure addunitalias(const n:string); function getunitalias(const n:string):string; +{$endif UNITALIASES} {**************************************************************************** @@ -2234,6 +2233,7 @@ implementation end; +{$ifdef UNITALIASES} {**************************************************************************** TUNIT_ALIAS ****************************************************************************} @@ -2273,6 +2273,7 @@ implementation else getunitalias:=n; end; +{$endif UNITALIASES} {**************************************************************************** @@ -2379,8 +2380,10 @@ implementation { create error syms and def } generrorsym:=new(perrorsym,init); generrordef:=new(perrordef,init); +{$ifdef UNITALIASES} { unit aliases } unitaliases:=new(pdictionary,init); +{$endif} end; @@ -2388,7 +2391,9 @@ implementation begin dispose(generrorsym,done); dispose(generrordef,done); +{$ifdef UNITALIASES} dispose(unitaliases,done); +{$endif} {$ifndef Delphi} {$ifdef TP} { close the stream } @@ -2401,7 +2406,10 @@ implementation end. { $Log$ - Revision 1.55 1999-11-04 10:54:02 peter + Revision 1.56 1999-11-04 23:13:25 peter + * moved unit alias support into ifdef + + Revision 1.55 1999/11/04 10:54:02 peter + -Ua= unit alias support Revision 1.54 1999/10/26 12:30:46 peter