mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 02:06:12 +02:00
* moved unit alias support into ifdef
This commit is contained in:
parent
aa295af911
commit
94cb2299ea
@ -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<oldname>=<newname> unit alias support
|
||||
|
||||
Revision 1.105 1999/10/28 13:14:00 pierre
|
||||
|
@ -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<oldname>=<newname> unit alias support
|
||||
|
||||
Revision 1.30 1999/11/03 23:43:09 peter
|
||||
|
@ -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<oldname>=<newname> unit alias support
|
||||
|
||||
Revision 1.54 1999/10/26 12:30:46 peter
|
||||
|
Loading…
Reference in New Issue
Block a user