From 47eae27a96ef474b3cec67b2cfb186b3281e64b0 Mon Sep 17 00:00:00 2001 From: mattias Date: Tue, 29 Apr 2008 12:55:06 +0000 Subject: [PATCH] added lazc package git-svn-id: trunk@15011 - --- .gitattributes | 5 ++ components/compilers/c/lazc.lpk | 54 +++++++++++++ components/compilers/c/lazc.pas | 21 +++++ components/compilers/c/lazcstrconsts.pas | 45 +++++++++++ components/compilers/c/lazcutil.pas | 99 ++++++++++++++++++++++++ packager/globallinks/lazc-0.lpl | 1 + 6 files changed, 225 insertions(+) create mode 100644 components/compilers/c/lazc.lpk create mode 100644 components/compilers/c/lazc.pas create mode 100644 components/compilers/c/lazcstrconsts.pas create mode 100644 components/compilers/c/lazcutil.pas create mode 100644 packager/globallinks/lazc-0.lpl diff --git a/.gitattributes b/.gitattributes index 59f5056edb..937e7cc53d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -186,6 +186,10 @@ components/codetools/resourcecodetool.pas svneol=native#text/pascal components/codetools/sourcechanger.pas svneol=native#text/pascal components/codetools/sourcelog.pas svneol=native#text/pascal components/codetools/stdcodetools.pas svneol=native#text/pascal +components/compilers/c/lazc.lpk svneol=native#text/plain +components/compilers/c/lazc.pas svneol=native#text/plain +components/compilers/c/lazcstrconsts.pas svneol=native#text/plain +components/compilers/c/lazcutil.pas svneol=native#text/plain components/custom/README.txt svneol=native#text/plain components/customform/custforms.pp svneol=native#text/plain components/customform/demo/appform.pas svneol=native#text/plain @@ -3506,6 +3510,7 @@ packager/globallinks/editortoolbar-0.lpl svneol=native#text/plain packager/globallinks/fpcunitconsolerunner-1.lpl svneol=native#text/plain packager/globallinks/h2paswizard-0.lpl svneol=native#text/plain packager/globallinks/imagesforlazarus-1.1.lpl svneol=native#text/plain +packager/globallinks/lazc-0.lpl svneol=native#text/plain packager/globallinks/lazcustforms-0.lpl svneol=native#text/plain packager/globallinks/lazcustomform-0.lpl svneol=native#text/plain packager/globallinks/lazdaemon-0.lpl svneol=native#text/plain diff --git a/components/compilers/c/lazc.lpk b/components/compilers/c/lazc.lpk new file mode 100644 index 0000000000..0ba4cad645 --- /dev/null +++ b/components/compilers/c/lazc.lpk @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/compilers/c/lazc.pas b/components/compilers/c/lazc.pas new file mode 100644 index 0000000000..c26eb17ea8 --- /dev/null +++ b/components/compilers/c/lazc.pas @@ -0,0 +1,21 @@ +{ This file was automatically created by Lazarus. Do not edit! +This source is only used to compile and install the package. + } + +unit LazC; + +interface + +uses + LazCUtil, LazCStrConsts, LazarusPackageIntf; + +implementation + +procedure Register; +begin + RegisterUnit('LazCUtil', @LazCUtil.Register); +end; + +initialization + RegisterPackage('LazC', @Register); +end. diff --git a/components/compilers/c/lazcstrconsts.pas b/components/compilers/c/lazcstrconsts.pas new file mode 100644 index 0000000000..0d057196e6 --- /dev/null +++ b/components/compilers/c/lazcstrconsts.pas @@ -0,0 +1,45 @@ +{ Resourcestrings + + Copyright (C) 2008 Mattias Gaertner mattias@freepascal.org + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version with the following modification: + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules,and + to copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the terms + and conditions of the license of that module. An independent module is a + module which is not derived from or based on this library. If you modify + this library, you may extend this exception to your version of the library, + but you are not obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License + for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +} +unit LazCStrConsts; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils; + +resourcestring + lcGNUProjectCAndCCompiler = 'GNU project C and C++ compiler'; + +implementation + +end. + diff --git a/components/compilers/c/lazcutil.pas b/components/compilers/c/lazcutil.pas new file mode 100644 index 0000000000..dc52180e42 --- /dev/null +++ b/components/compilers/c/lazcutil.pas @@ -0,0 +1,99 @@ +{ Various Lazarus IDE extensions for C sources and compilers. + + Copyright (C) 2008 Mattias Gaertner mattias@freepascal.org + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version with the following modification: + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules,and + to copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the terms + and conditions of the license of that module. An independent module is a + module which is not derived from or based on this library. If you modify + this library, you may extend this exception to your version of the library, + but you are not obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License + for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +} +unit LazCUtil; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, LCLProc, IDEMsgIntf, LazCStrConsts; + + +type + + { TGCCMessageScanner } + + TGCCMessageScanner = class(TIDEMsgScanner) + public + function ParseLine(MsgLine: TIDEMessageLine; var Show: boolean): boolean; override;// true if line was handled + end; + + { TGCCMsgScannerType } + + TGCCMsgScannerType = class(TIDEMsgScannerType) + public + function ShortDescription: string; override; + function Description: string; override; + function StartScan(Lines: TIDEMessageLineList): TIDEMsgScanner; override; + end; + +procedure Register; + +implementation + +procedure Register; +var + Scanner: TGCCMsgScannerType; +begin + Scanner:=TGCCMsgScannerType.Create(nil); + Scanner.Name:='GCC'; + IDEMsgScanners.RegisterType(Scanner); +end; + +{ TGCCMessageScanner } + +function TGCCMessageScanner.ParseLine(MsgLine: TIDEMessageLine; + var Show: boolean): boolean; +begin + DebugLn(['TGCCMessageScanner.ParseLine "',MsgLine.Msg,'"']); + Result:=false; +end; + +{ TGCCMsgScannerType } + +function TGCCMsgScannerType.ShortDescription: string; +begin + Result:=lcGNUProjectCAndCCompiler; +end; + +function TGCCMsgScannerType.Description: string; +begin + Result:=ShortDescription; +end; + +function TGCCMsgScannerType.StartScan(Lines: TIDEMessageLineList + ): TIDEMsgScanner; +begin + Result:=TGCCMessageScanner.Create(Self,Lines); +end; + +end. + diff --git a/packager/globallinks/lazc-0.lpl b/packager/globallinks/lazc-0.lpl new file mode 100644 index 0000000000..87d9c2b7f3 --- /dev/null +++ b/packager/globallinks/lazc-0.lpl @@ -0,0 +1 @@ +$(LazarusDir)/components/compilers/c/lazc.lpk