MG: removed unused

git-svn-id: trunk@1556 -
This commit is contained in:
lazarus 2002-03-28 00:11:07 +00:00
parent c53114998b
commit 426f90740f
6 changed files with 27 additions and 13 deletions

View File

@ -1108,6 +1108,8 @@ begin
Values.Variables[FDirectiveName]:='PRELOAD' Values.Variables[FDirectiveName]:='PRELOAD'
else if (FDirectiveName='LOCALSYMBOLS') then else if (FDirectiveName='LOCALSYMBOLS') then
// ignore link object directive // ignore link object directive
else if (FDirectiveName='RANGECHECKS') then
// ignore link object directive
else begin else begin
RaiseException( RaiseException(
'invalid flag value "'+copy(UpperSrc,ValStart,SrcPos-ValStart)+'"' 'invalid flag value "'+copy(UpperSrc,ValStart,SrcPos-ValStart)+'"'

View File

@ -148,7 +148,7 @@ implementation
uses uses
Sysutils, Typinfo, Math; Sysutils, Math;
const const

View File

@ -31,6 +31,8 @@ uses
procedure CreateProjectDefineTemplate(CompOpts: TCompilerOptions; procedure CreateProjectDefineTemplate(CompOpts: TCompilerOptions;
const SrcPath: string); const SrcPath: string);
procedure SetAdditionalGlobalSrcPathToCodeToolBoss(const SrcPath: string); procedure SetAdditionalGlobalSrcPathToCodeToolBoss(const SrcPath: string);
function FindCurrentProjectDirTemplate: TDefineTemplate;
function FindCurrentProjectDirSrcPathTemplate: TDefineTemplate;
const const
ProjectDirDefTemplName = 'Current Project Directory'; ProjectDirDefTemplName = 'Current Project Directory';

View File

@ -3014,6 +3014,10 @@ begin
SaveDialog.Title:='Save Project '+Project1.Title+' (*.lpi)'; SaveDialog.Title:='Save Project '+Project1.Title+' (*.lpi)';
// build a nice project info filename suggestion // build a nice project info filename suggestion
NewFilename:='';
if (Project1.MainUnit>=0) then
NewFileName:=Project1.MainUnitInfo.UnitName;
if NewFilename='' then
NewFilename:=ExtractFileName(Project1.ProjectInfoFile); NewFilename:=ExtractFileName(Project1.ProjectInfoFile);
if NewFilename='' then if NewFilename='' then
NewFilename:=ExtractFileName(Project1.MainFilename); NewFilename:=ExtractFileName(Project1.MainFilename);
@ -3021,7 +3025,8 @@ begin
NewFilename:=Trim(Project1.Title); NewFilename:=Trim(Project1.Title);
if NewFilename='' then if NewFilename='' then
NewFilename:='project1'; NewFilename:='project1';
if ExtractFileExt(NewFilename)='' then Ext:=lowercase(ExtractFileExt(NewFilename));
if (Ext='') or FilenameIsPascalUnit(NewFilename) or (Ext='.dpr') then
NewFilename:=ChangeFileExt(NewFilename,'.lpi'); NewFilename:=ChangeFileExt(NewFilename,'.lpi');
SaveDialog.FileName:=NewFilename; SaveDialog.FileName:=NewFilename;
@ -3069,11 +3074,12 @@ begin
end; end;
// apply naming conventions // apply naming conventions
NewProgramName:=ExtractFileNameOnly(NewProgramFilename);
if EnvironmentOptions.PascalFileLowerCase then if EnvironmentOptions.PascalFileLowerCase then
NewFileName:=ExtractFilePath(NewFilename) NewFileName:=ExtractFilePath(NewFilename)
+lowercase(ExtractFileName(NewFilename)); +lowercase(ExtractFileName(NewFilename));
if Project1.ProjectType in [ptApplication,ptProgram] then begin if Project1.MainUnit>=0 then begin
// check mainunit filename // check mainunit filename
NewProgramFilename:=ChangeFileExt( NewProgramFilename:=ChangeFileExt(
NewFilename,ProjectDefaultExt[Project1.ProjectType]); NewFilename,ProjectDefaultExt[Project1.ProjectType]);
@ -3086,15 +3092,14 @@ begin
continue; // try again continue; // try again
end; end;
// check programname // check programname
NewProgramName:=ExtractFileNameOnly(NewProgramFilename);
if FilenameIsPascalUnit(NewProgramFilename) if FilenameIsPascalUnit(NewProgramFilename)
and (Project1.IndexOfUnitWithName(NewProgramName,true, and (Project1.IndexOfUnitWithName(NewProgramName,true,
Project1.MainUnitInfo)>=0) then Project1.MainUnitInfo)>=0) then
begin begin
ACaption:='Unit identifier already exists'; ACaption:='Unit identifier exists';
AText:='A unit with the name "'+NewProgramName+'" already exists' AText:='There is a unit with the name "'+NewProgramName+'"'
+' in the Project1.'#13 +' in the project.'#13
+'Plz choose different name'; +'Plz choose a different name';
Result:=MessageDlg(ACaption,AText,mtError,[mbRetry,mbAbort],0); Result:=MessageDlg(ACaption,AText,mtError,[mbRetry,mbAbort],0);
if Result=mrAbort then exit; if Result=mrAbort then exit;
continue; // try again continue; // try again
@ -6170,6 +6175,9 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.261 2002/03/28 00:11:04 lazarus
MG: removed unused
Revision 1.260 2002/03/27 11:35:56 lazarus Revision 1.260 2002/03/27 11:35:56 lazarus
MG: removed ide_debugger.inc MG: removed ide_debugger.inc

View File

@ -1208,10 +1208,10 @@ end;
procedure TProject.SetProjectInfoFile(const NewFilename:string); procedure TProject.SetProjectInfoFile(const NewFilename:string);
begin begin
if NewFilename='' then exit; if NewFilename='' then exit;
fProjectInfoFile:=NewFilename;
if (AnsiCompareText(fTitle,ExtractFileNameOnly(fProjectInfoFile))=0) if (AnsiCompareText(fTitle,ExtractFileNameOnly(fProjectInfoFile))=0)
or (fProjectInfoFile='') then or (fProjectInfoFile='') or (fTitle='') then
fTitle:=ExtractFileNameOnly(NewFilename); fTitle:=ExtractFileNameOnly(NewFilename);
fProjectInfoFile:=NewFilename;
Modified:=true; Modified:=true;
end; end;
@ -1355,6 +1355,9 @@ end.
{ {
$Log$ $Log$
Revision 1.57 2002/03/28 00:11:06 lazarus
MG: removed unused
Revision 1.56 2002/03/25 16:48:26 lazarus Revision 1.56 2002/03/25 16:48:26 lazarus
MG: clean ups for main.pp, many minor fixes MG: clean ups for main.pp, many minor fixes

View File

@ -466,7 +466,7 @@ implementation
uses uses
LCLType, LCLLinux, TypInfo, LResources, LazConf, EnvironmentOpts, UnitInfoDlg; LCLType, LCLLinux, TypInfo, LResources, LazConf, EnvironmentOpts;
type type
TCompletionType = (ctNone, ctWordCompletion, ctTemplateCompletion, TCompletionType = (ctNone, ctWordCompletion, ctTemplateCompletion,
@ -1001,7 +1001,6 @@ Function TSourceEditor.ccParse(Texts : String) : TStrings;
const const
symtable = '---Symtable '; symtable = '---Symtable ';
Level1 = ' ***'; Level1 = ' ***';
Level2 = ' ***';
kdClass = 1; kdClass = 1;
kdProcedure = 2; kdProcedure = 2;