mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 22:49:23 +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);
|
FSplit(s,p,n,e);
|
||||||
{ Programs have the name program to don't conflict with dup id's }
|
{ Programs have the name program to don't conflict with dup id's }
|
||||||
if _is_unit then
|
if _is_unit then
|
||||||
|
{$ifdef UNITALIASES}
|
||||||
modulename:=stringdup(GetUnitAlias(Upper(n)))
|
modulename:=stringdup(GetUnitAlias(Upper(n)))
|
||||||
|
{$else}
|
||||||
|
modulename:=stringdup(Upper(n))
|
||||||
|
{$endif}
|
||||||
else
|
else
|
||||||
modulename:=stringdup('PROGRAM');
|
modulename:=stringdup('PROGRAM');
|
||||||
mainsource:=stringdup(s);
|
mainsource:=stringdup(s);
|
||||||
@ -1340,7 +1344,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
+ -Ua<oldname>=<newname> unit alias support
|
||||||
|
|
||||||
Revision 1.105 1999/10/28 13:14:00 pierre
|
Revision 1.105 1999/10/28 13:14:00 pierre
|
||||||
|
@ -679,10 +679,12 @@ begin
|
|||||||
'U' : begin
|
'U' : begin
|
||||||
for j:=1 to length(more) do
|
for j:=1 to length(more) do
|
||||||
case more[j] of
|
case more[j] of
|
||||||
|
{$ifdef UNITALIASES}
|
||||||
'a' : begin
|
'a' : begin
|
||||||
AddUnitAlias(Copy(More,j+1,255));
|
AddUnitAlias(Copy(More,j+1,255));
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
|
{$endif UNITALIASES}
|
||||||
'n' : initglobalswitches:=initglobalswitches-[cs_check_unit_name];
|
'n' : initglobalswitches:=initglobalswitches-[cs_check_unit_name];
|
||||||
'p' : begin
|
'p' : begin
|
||||||
Message2(option_obsolete_switch_use_new,'-Up','-Fu');
|
Message2(option_obsolete_switch_use_new,'-Up','-Fu');
|
||||||
@ -1249,7 +1251,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
+ -Ua<oldname>=<newname> unit alias support
|
||||||
|
|
||||||
Revision 1.30 1999/11/03 23:43:09 peter
|
Revision 1.30 1999/11/03 23:43:09 peter
|
||||||
|
@ -365,8 +365,7 @@ unit symtable;
|
|||||||
'lower_or_equal','as','is','in','sym_diff',
|
'lower_or_equal','as','is','in','sym_diff',
|
||||||
'starstar','assign');
|
'starstar','assign');
|
||||||
|
|
||||||
{*** Unit aliases ***}
|
{$ifdef UNITALIASES}
|
||||||
|
|
||||||
type
|
type
|
||||||
punit_alias = ^tunit_alias;
|
punit_alias = ^tunit_alias;
|
||||||
tunit_alias = object(tnamedindexobject)
|
tunit_alias = object(tnamedindexobject)
|
||||||
@ -374,12 +373,12 @@ unit symtable;
|
|||||||
constructor init(const n:string);
|
constructor init(const n:string);
|
||||||
destructor done;virtual;
|
destructor done;virtual;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
unitaliases : pdictionary;
|
unitaliases : pdictionary;
|
||||||
|
|
||||||
procedure addunitalias(const n:string);
|
procedure addunitalias(const n:string);
|
||||||
function getunitalias(const n:string):string;
|
function getunitalias(const n:string):string;
|
||||||
|
{$endif UNITALIASES}
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
@ -2234,6 +2233,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{$ifdef UNITALIASES}
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
TUNIT_ALIAS
|
TUNIT_ALIAS
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
@ -2273,6 +2273,7 @@ implementation
|
|||||||
else
|
else
|
||||||
getunitalias:=n;
|
getunitalias:=n;
|
||||||
end;
|
end;
|
||||||
|
{$endif UNITALIASES}
|
||||||
|
|
||||||
|
|
||||||
{****************************************************************************
|
{****************************************************************************
|
||||||
@ -2379,8 +2380,10 @@ implementation
|
|||||||
{ create error syms and def }
|
{ create error syms and def }
|
||||||
generrorsym:=new(perrorsym,init);
|
generrorsym:=new(perrorsym,init);
|
||||||
generrordef:=new(perrordef,init);
|
generrordef:=new(perrordef,init);
|
||||||
|
{$ifdef UNITALIASES}
|
||||||
{ unit aliases }
|
{ unit aliases }
|
||||||
unitaliases:=new(pdictionary,init);
|
unitaliases:=new(pdictionary,init);
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -2388,7 +2391,9 @@ implementation
|
|||||||
begin
|
begin
|
||||||
dispose(generrorsym,done);
|
dispose(generrorsym,done);
|
||||||
dispose(generrordef,done);
|
dispose(generrordef,done);
|
||||||
|
{$ifdef UNITALIASES}
|
||||||
dispose(unitaliases,done);
|
dispose(unitaliases,done);
|
||||||
|
{$endif}
|
||||||
{$ifndef Delphi}
|
{$ifndef Delphi}
|
||||||
{$ifdef TP}
|
{$ifdef TP}
|
||||||
{ close the stream }
|
{ close the stream }
|
||||||
@ -2401,7 +2406,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
+ -Ua<oldname>=<newname> unit alias support
|
||||||
|
|
||||||
Revision 1.54 1999/10/26 12:30:46 peter
|
Revision 1.54 1999/10/26 12:30:46 peter
|
||||||
|
Loading…
Reference in New Issue
Block a user