summaryrefslogtreecommitdiffstats
path: root/languages/fortran
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit114a878c64ce6f8223cfd22d76a20eb16d177e5e (patch)
treeacaf47eb0fa12142d3896416a69e74cbf5a72242 /languages/fortran
downloadtdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.tar.gz
tdevelop-114a878c64ce6f8223cfd22d76a20eb16d177e5e.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/fortran')
-rw-r--r--languages/fortran/Makefile.am20
-rw-r--r--languages/fortran/README.dox48
-rw-r--r--languages/fortran/app_templates/Makefile.am3
-rw-r--r--languages/fortran/app_templates/fortran.appwizard2
-rw-r--r--languages/fortran/app_templates/fortranhello/.kdev_ignore0
-rw-r--r--languages/fortran/app_templates/fortranhello/Makefile.am17
-rw-r--r--languages/fortran/app_templates/fortranhello/app.kdevelop113
-rw-r--r--languages/fortran/app_templates/fortranhello/configure.in10
-rw-r--r--languages/fortran/app_templates/fortranhello/fortran-Makefile.am5
-rw-r--r--languages/fortran/app_templates/fortranhello/fortran-Makefile.cvs8
-rw-r--r--languages/fortran/app_templates/fortranhello/fortranhello10
-rw-r--r--languages/fortran/app_templates/fortranhello/fortranhello.kdevtemplate140
-rw-r--r--languages/fortran/app_templates/fortranhello/fortranhello.pngbin0 -> 10118 bytes
-rw-r--r--languages/fortran/app_templates/fortranhello/main.f7
-rw-r--r--languages/fortran/app_templates/fortranhello/src-Makefile.am8
-rw-r--r--languages/fortran/compiler/Makefile.am6
-rw-r--r--languages/fortran/compiler/pgioptions/Makefile.am18
-rw-r--r--languages/fortran/compiler/pgioptions/kdevpgf77options.desktop53
-rw-r--r--languages/fortran/compiler/pgioptions/kdevpghpfoptions.desktop50
-rw-r--r--languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp69
-rw-r--r--languages/fortran/compiler/pgioptions/pgioptionsfactory.h34
-rw-r--r--languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp324
-rw-r--r--languages/fortran/compiler/pgioptions/pgioptionsplugin.h55
-rw-r--r--languages/fortran/doc/Makefile.am6
-rw-r--r--languages/fortran/doc/fortran_bugs_gcc.toc7
-rw-r--r--languages/fortran/file_templates/Makefile.am2
-rw-r--r--languages/fortran/file_templates/f11
-rw-r--r--languages/fortran/file_templates/f7711
-rw-r--r--languages/fortran/file_templates/f9011
-rw-r--r--languages/fortran/file_templates/f9511
-rw-r--r--languages/fortran/file_templates/for11
-rw-r--r--languages/fortran/file_templates/fpp11
-rw-r--r--languages/fortran/file_templates/ftn11
-rw-r--r--languages/fortran/fixedformparser.cpp94
-rw-r--r--languages/fortran/fixedformparser.h35
-rw-r--r--languages/fortran/fortransupportpart.cpp287
-rw-r--r--languages/fortran/fortransupportpart.h53
-rw-r--r--languages/fortran/ftnchekconfigwidget.cpp290
-rw-r--r--languages/fortran/ftnchekconfigwidget.h41
-rw-r--r--languages/fortran/ftnchekconfigwidgetbase.ui584
-rw-r--r--languages/fortran/kdevfortransupport.desktop80
-rw-r--r--languages/fortran/kdevfortransupport.rc9
42 files changed, 2565 insertions, 0 deletions
diff --git a/languages/fortran/Makefile.am b/languages/fortran/Makefile.am
new file mode 100644
index 00000000..ac6f5be2
--- /dev/null
+++ b/languages/fortran/Makefile.am
@@ -0,0 +1,20 @@
+# Here resides the Fortran support part.
+
+INCLUDES = -I$(top_srcdir)/lib/interfaces \
+ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util \
+ $(all_includes)
+SUBDIRS = file_templates app_templates compiler doc
+
+kde_module_LTLIBRARIES = libkdevfortransupport.la
+libkdevfortransupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN)
+libkdevfortransupport_la_LIBADD = $(top_builddir)/lib/libkdevelop.la
+
+libkdevfortransupport_la_SOURCES = fortransupportpart.cpp fixedformparser.cpp ftnchekconfigwidget.cpp ftnchekconfigwidgetbase.ui
+
+METASOURCES = AUTO
+
+servicedir = $(kde_servicesdir)
+service_DATA = kdevfortransupport.desktop
+
+rcdir = $(kde_datadir)/kdevfortransupport
+rc_DATA = kdevfortransupport.rc
diff --git a/languages/fortran/README.dox b/languages/fortran/README.dox
new file mode 100644
index 00000000..65a4e645
--- /dev/null
+++ b/languages/fortran/README.dox
@@ -0,0 +1,48 @@
+/** \class FortranSupportPart
+This is Fortran language support plugin.
+
+Put a more detailed description of your part in these lines. It can span
+over several lines. You can even use some html commands in these lines like:
+<code>This is code</code>, html links <a href="http://somelocation">link text</a>,
+and images.
+
+\authors <a href="mailto:bernd AT kdevelop.org">Bernd Gehrmann</a>
+
+\maintainer <a href="mailto:$EMAIL$">$AUTHOR$</a>
+\maintainer <a href="mailto:2nd maintainer AT provider.com">2nd maintainer full name</a>
+...
+\maintainer <a href="mailto:nth maintainer AT provider.com">nth maintainer full name</a>
+
+\feature Fortran language support
+\feature Consult \ref LangSupportStatus for a up to date features/status of this programming language support part.
+
+\bug Describe a the 1st bug that you know of, but probably hasn't been reported yet.
+..
+\bug Describe a the nth bug that you know of, but probably hasn't been reported yet.
+
+\requirement Describe a the 1st requirement of your part.
+\requirement Describe a the 2nd requirement of your part.
+...
+\requirement Describe a the nth requirement of your part.
+
+\todo Describe a the 1st TODO of your part.
+\todo Describe a the 2nd TODO of your part.
+...
+\todo Describe a the nth TODO of your part.
+
+\faq <b>First frequenly asked question about your part ?</b> Answer.
+\faq <b>Second frequenly asked question about your part ?</b> Answer.
+...
+\faq <b>Last frequenly asked question about your part ?</b> Answer.
+
+\note First note text.
+\note Second note text.
+...
+\note Last note text.
+
+\warning First warning text.
+\warning Second warning text.
+...
+\warning Last warning text.
+
+*/
diff --git a/languages/fortran/app_templates/Makefile.am b/languages/fortran/app_templates/Makefile.am
new file mode 100644
index 00000000..056dc759
--- /dev/null
+++ b/languages/fortran/app_templates/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = fortranhello
+profilesdir = $(kde_datadir)/kdevelop/profiles/IDE/CompiledLanguageIDE/FortranIDE
+profiles_DATA = fortran.appwizard
diff --git a/languages/fortran/app_templates/fortran.appwizard b/languages/fortran/app_templates/fortran.appwizard
new file mode 100644
index 00000000..7cd8232e
--- /dev/null
+++ b/languages/fortran/app_templates/fortran.appwizard
@@ -0,0 +1,2 @@
+[General]
+List=fortranhello
diff --git a/languages/fortran/app_templates/fortranhello/.kdev_ignore b/languages/fortran/app_templates/fortranhello/.kdev_ignore
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/languages/fortran/app_templates/fortranhello/.kdev_ignore
diff --git a/languages/fortran/app_templates/fortranhello/Makefile.am b/languages/fortran/app_templates/fortranhello/Makefile.am
new file mode 100644
index 00000000..ba97453d
--- /dev/null
+++ b/languages/fortran/app_templates/fortranhello/Makefile.am
@@ -0,0 +1,17 @@
+dataFiles = main.f src-Makefile.am fortran-Makefile.am fortran-Makefile.cvs \
+ configure.in fortranhello.png app.kdevelop
+templateName = fortranhello
+
+### no need to change below:
+template_DATA = $(templateName).kdevtemplate
+templatedir = ${appwizarddatadir}/templates
+
+appwizarddatadir = ${kde_datadir}/kdevappwizard
+$(templateName).tar.gz: ${dataFiles}
+ $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles}
+ $(GZIP_COMMAND) -f9 $(templateName).tar
+
+archivedir = ${appwizarddatadir}
+archive_DATA = $(templateName).tar.gz ${templateName}.png
+
+CLEANFILES = *.tar.gz \ No newline at end of file
diff --git a/languages/fortran/app_templates/fortranhello/app.kdevelop b/languages/fortran/app_templates/fortranhello/app.kdevelop
new file mode 100644
index 00000000..b4abc5ae
--- /dev/null
+++ b/languages/fortran/app_templates/fortranhello/app.kdevelop
@@ -0,0 +1,113 @@
+<?xml version="1.0"?>
+<kdevelop>
+ <general>
+ <author>%{AUTHOR}</author>
+ <email>%{EMAIL}</email>
+ <version>%{VERSION}</version>
+ <projectmanagement>KDevAutoProject</projectmanagement>
+ <primarylanguage>Fortran77</primarylanguage>
+ <keywords>
+ <keyword>Fortran</keyword>
+ </keywords>
+ <ignoreparts>
+ <part>KDevVisualBoyAdvance</part>
+ <part>KDevCTags</part>
+ </ignoreparts>
+ </general>
+ <kdevautoproject>
+ <general>
+ <activetarget>src/%{APPNAMELC}</activetarget>
+ </general>
+ <run>
+ <mainprogram>src/%{APPNAMELC}</mainprogram>
+ <terminal>true</terminal>
+ </run>
+ <makeenvvars>
+ <envvar value="1" name="WANT_AUTOCONF_2_5" />
+ <envvar value="1" name="WANT_AUTOMAKE_1_6" />
+ </makeenvvars>
+ </kdevautoproject>
+ <kdevfilecreate>
+ <useglobaltypes>
+ <type ext="F"/>
+ <type ext="fpp"/>
+ <type ext="f"/>
+ <type ext="for"/>
+ </useglobaltypes>
+ </kdevfilecreate>
+ <kdevfortransupport>
+ <ftnchek>
+ <division>false</division>
+ <extern>false</extern>
+ <declare>false</declare>
+ <pure>false</pure>
+ <argumentsall>false</argumentsall>
+ <commonall>false</commonall>
+ <truncationall>false</truncationall>
+ <usageall>false</usageall>
+ <f77all>false</f77all>
+ <portabilityall>false</portabilityall>
+ <argumentsonly></argumentsonly>
+ <commononly></commononly>
+ <truncationonly></truncationonly>
+ <usageonly></usageonly>
+ <f77only></f77only>
+ <portabilityonly></portabilityonly>
+ </ftnchek>
+ </kdevfortransupport>
+ <kdevdoctreeview>
+ <ignoretocs>
+ <toc>ada</toc>
+ <toc>ada_bugs_gcc</toc>
+ <toc>bash</toc>
+ <toc>bash_bugs</toc>
+ <toc>c++_bugs_gcc</toc>
+ <toc>clanlib</toc>
+ <toc>w3c-dom-level2-html</toc>
+ <toc>gnome1</toc>
+ <toc>gnustep</toc>
+ <toc>gtk</toc>
+ <toc>gtk_bugs</toc>
+ <toc>haskell</toc>
+ <toc>haskell_bugs_ghc</toc>
+ <toc>java_bugs_gcc</toc>
+ <toc>java_bugs_sun</toc>
+ <toc>kde2book</toc>
+ <toc>libc</toc>
+ <toc>libstdc++</toc>
+ <toc>opengl</toc>
+ <toc>pascal_bugs_fp</toc>
+ <toc>php</toc>
+ <toc>php_bugs</toc>
+ <toc>perl</toc>
+ <toc>perl_bugs</toc>
+ <toc>python</toc>
+ <toc>python_bugs</toc>
+ <toc>qt-kdev3</toc>
+ <toc>ruby</toc>
+ <toc>ruby_bugs</toc>
+ <toc>sdl</toc>
+ <toc>stl</toc>
+ <toc>w3c-svg</toc>
+ <toc>sw</toc>
+ <toc>w3c-uaag10</toc>
+ <toc>wxwidgets_bugs</toc>
+ </ignoretocs>
+ <ignoreqt_xml>
+ <toc>Guide to the Qt Translation Tools</toc>
+ <toc>Qt Assistant Manual</toc>
+ <toc>Qt Designer Manual</toc>
+ <toc>Qt Reference Documentation</toc>
+ <toc>qmake User Guide</toc>
+ </ignoreqt_xml>
+ <ignoredoxygen>
+ <toc>KDE Libraries (Doxygen)</toc>
+ </ignoredoxygen>
+ </kdevdoctreeview>
+ <kdevfileview>
+ <groups>
+ <group pattern="*.f;*.for;*.FOR" name="Preprocessed Fortran" />
+ <group pattern="*.F;*.fpp;*.FPP" name="Fortran77 source files" />
+ </groups>
+ </kdevfileview>
+</kdevelop>
diff --git a/languages/fortran/app_templates/fortranhello/configure.in b/languages/fortran/app_templates/fortranhello/configure.in
new file mode 100644
index 00000000..e1b885a7
--- /dev/null
+++ b/languages/fortran/app_templates/fortranhello/configure.in
@@ -0,0 +1,10 @@
+AC_INIT(configure.in)
+
+AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION})
+AM_CONFIG_HEADER(config.h)
+
+AC_LANG_FORTRAN77
+AC_PROG_F77
+AC_F77_LIBRARY_LDFLAGS
+
+AC_OUTPUT(Makefile src/Makefile)
diff --git a/languages/fortran/app_templates/fortranhello/fortran-Makefile.am b/languages/fortran/app_templates/fortranhello/fortran-Makefile.am
new file mode 100644
index 00000000..02520f20
--- /dev/null
+++ b/languages/fortran/app_templates/fortranhello/fortran-Makefile.am
@@ -0,0 +1,5 @@
+# not a GNU package. You can remove this line, if
+# have all needed files, that a GNU package needs
+AUTOMAKE_OPTIONS = foreign 1.4
+
+SUBDIRS = src
diff --git a/languages/fortran/app_templates/fortranhello/fortran-Makefile.cvs b/languages/fortran/app_templates/fortranhello/fortran-Makefile.cvs
new file mode 100644
index 00000000..d1607023
--- /dev/null
+++ b/languages/fortran/app_templates/fortranhello/fortran-Makefile.cvs
@@ -0,0 +1,8 @@
+default: all
+
+all:
+ aclocal
+ autoheader
+ automake
+ autoconf
+
diff --git a/languages/fortran/app_templates/fortranhello/fortranhello b/languages/fortran/app_templates/fortranhello/fortranhello
new file mode 100644
index 00000000..1028a814
--- /dev/null
+++ b/languages/fortran/app_templates/fortranhello/fortranhello
@@ -0,0 +1,10 @@
+# KDE Config File
+[General]
+Name=Simple Hello world program
+Name[fr]=Un simple programme de test � Hello world �
+Icon=fortranhello.png
+Category=Fortran
+Comment=Generates a simple Hello world program in Fortran
+Comment[fr]=G�n�re un simple programme de test du type � Hello world � dans le language FORTRAN.
+FileTemplates=f,None
+ShowFilesAfterGeneration=src/APPNAMELC.f
diff --git a/languages/fortran/app_templates/fortranhello/fortranhello.kdevtemplate b/languages/fortran/app_templates/fortranhello/fortranhello.kdevtemplate
new file mode 100644
index 00000000..b6580853
--- /dev/null
+++ b/languages/fortran/app_templates/fortranhello/fortranhello.kdevtemplate
@@ -0,0 +1,140 @@
+# KDE Config File
+[General]
+Name=Simple Hello world program
+Name[ca]=Simple programa Hello world
+Name[da]=Simpelt Goddag verden program
+Name[de]=Ein einfaches "Hello World"-Programm
+Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε
+Name[es]=Programa «Hola mundo» sencillo
+Name[et]=Lihtne "Tere, maailm" programm
+Name[eu]="Kaixo mundua" programa sinplea
+Name[fa]=برنامۀ سادۀ Hello world
+Name[fr]=Programme « Bonjour monde » simple
+Name[ga]=Ríomhchlár simplí "Hello World"
+Name[gl]=Programa sinxelo Ola mundo
+Name[hu]=Egyszerű Hello world program
+Name[it]=Semplice programma di "Hello world"
+Name[ja]=簡単な Hello world プログラム
+Name[ms]=Program Hello World mudah
+Name[nds]=En eenfach "Moin Welt"-Programm
+Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम
+Name[nl]=Eenvoudig 'Hello World' programma
+Name[pl]=Prosty program witaj świecie
+Name[pt]=Programa simples Olá Mundo
+Name[pt_BR]=Programa simples Olá Mundo
+Name[ru]=Простая программа Hello world
+Name[sk]=Jednoduchý "Ahoj svet" program
+Name[sl]=Preprost program Hello world
+Name[sr]=Једноставан „Здраво свете“ програм
+Name[sr@Latn]=Jednostavan „Zdravo svete“ program
+Name[sv]=Enkelt Hello world-program
+Name[tr]=Basit Merhaba dünya programı
+Name[zh_CN]=简单的 Hello world 程序
+Name[zh_TW]=簡單的 Hello world 程式
+Icon=fortranhello.png
+Category=Fortran
+Comment=Generates a simple Hello world program in Fortran
+Comment[ca]=Genera un simple programa de Hello world en Fortran
+Comment[da]=Genererer et simpelt Goddag verden program i Fortran
+Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Fortran
+Comment[el]=Δημιουργία ενός απλού προγράμματος Γεια σου σε Fortran
+Comment[es]=Genera un sencillo programa «Hola mundo» en Fortran
+Comment[et]=Lihtsa "Tere, maailm" programmi loomine Fortranis
+Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Fortran lengoaian
+Comment[fa]=یک برنامۀ سادۀ Hello world در فرترن تولید می‌کند
+Comment[fr]=Génère un programme « Bonjour monde » simple en Fortran
+Comment[gl]=Xera un programa sinxelo Ola mundo en Fortran
+Comment[hu]=Létrehoz egy egyszerű Hello world programot Fortran nyelven
+Comment[it]=Genera un semplice programma di "Hello world" in Fortran
+Comment[ja]=簡単な Hello world プログラムを Fortran で作成します
+Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in Fortran op
+Comment[ne]=फोर्ट्रानमा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ
+Comment[nl]=Genereert een eenvoudig Hello World-programma in Fortran
+Comment[pl]=Generuje prosty program Witaj świecie w Fortranie
+Comment[pt]=Gera um programa simples Olá Mundo em Fortran
+Comment[pt_BR]=Gera um programa simples Olá Mundo em Fortran
+Comment[ru]=Создание простой программы Hello world на Fortran
+Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program vo Fortran
+Comment[sr]=Прави једноставан „Здраво свете“ у Fortran-у
+Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Fortran-u
+Comment[sv]=Skapar ett enkelt Hello world-program i Fortran
+Comment[tr]=Fortran'da basit bir Merhaba Dünya programı yaratır.
+Comment[zh_CN]=生成一个简单的 Fortran 语言 Hello world 程序
+Comment[zh_TW]=產生一個簡單的 Fortran Hello world 程式
+FileTemplates=f,None
+ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.f
+Archive=fortranhello.tar.gz
+
+[INCADMIN]
+Type=include
+File=%{kdevelop}/template-common/incadmin.kdevtemplate
+
+[GNU]
+Type=include
+File=%{kdevelop}/template-common/gnu.kdevtemplate
+
+[FILE1]
+Type=install
+EscapeXML=true
+Source=%{src}/app.kdevelop
+Dest=%{dest}/%{APPNAMELC}.kdevelop
+
+[FILE2]
+Type=install
+Source=%{src}/fortran-Makefile.am
+Dest=%{dest}/Makefile.am
+
+[FILE3]
+Type=install
+Source=%{src}/fortran-Makefile.cvs
+Dest=%{dest}/Makefile.cvs
+
+[FILE4]
+Type=install
+Source=%{src}/configure.in
+Dest=%{dest}/configure.in
+
+[MkDir1]
+Type=mkdir
+Dir=%{dest}/src
+
+[FILE5]
+Type=install
+Source=%{src}/src-Makefile.am
+Dest=%{dest}/src/Makefile.am
+
+[FILE6]
+Type=install
+Source=%{src}/main.f
+Dest=%{dest}/src/%{APPNAMELC}.f
+
+[MSG]
+Type=message
+Comment=a simple "Hello world" program in fortran was created in %{dest}
+Comment[ca]=Un simple programa de "Hello world" en fortran ha estat creat en %{dest}
+Comment[da]=et simpelt "Goddag verden" program i fortran blev oprettet i %{dest}
+Comment[de]=Ein einfaches "Hello World"-Programm in Fortran wurde in %{dest} erstellt.
+Comment[el]=Ένα απλό πρόγραμμα "Γεια σου κόσμε" σε fortran δημιουργήθηκε στο %{dest}
+Comment[es]=Un sencillo programa «Hola mundo» en Fortran ha sido creado en %{dest}
+Comment[et]=Lihtne "Tere, maailm" programm Fortranis loodi asukohta %{dest}
+Comment[eu]="Kaixo mundua" programa sinple bat sortu da hemen: %{dest}
+Comment[fa]=یک برنامۀ سادۀ «Hello world» در فرترن در %{dest} ایجاد شد
+Comment[fr]=Un programme « Bonjour monde » simple en Fortran a été créé dans %{dest}
+Comment[gl]=Creouse un programa sinxelo "Ola mundo" en fortran en %{dest}
+Comment[hu]=Létrejött egy egyszerű, Fortran nyelvű Hello world program itt: %{dest}
+Comment[it]=È stato creato un semplice programma di "Hello world" in Fortran in %{dest}
+Comment[ja]=Fortran で記述された簡単な Hello world プログラムを %{dest} に作成しました
+Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Fortran opstellt
+Comment[ne]=फोर्ट्रानमा साधारण "हेल्लो वोल्ड" कार्यक्रम %{dest} मा सिर्जना गरियो
+Comment[nl]=een eenvoudig "Hello World"-programma in Fortran is aangemaakt in %{dest}
+Comment[pl]=Prosty program "Witaj świecie" w Fortranie został utworzony w %{dest}
+Comment[pt]=Foi criado um programa simples "Olá mundo" em Fortran em %{dest}
+Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em Fortran em %{dest}
+Comment[ru]=Простая программа "Hello world" на Fortran создана в %{dest}
+Comment[sk]=Jednoduchý "Ahoj svet" program vo Fortran bol vytvorený v %{dest}
+Comment[sr]=Једноставан „Здраво свете“ у Fortran-у направљен је у %{dest}
+Comment[sr@Latn]=Jednostavan „Zdravo svete“ u Fortran-u napravljen je u %{dest}
+Comment[sv]=Ett enkelt "Hello world"-program i Fortran skapades i %{dest}
+Comment[tr]=Fortran'da basit bir "Merhaba Dünya" programı %{dest} içinde yaratıldı.
+Comment[zh_CN]=在 %{dest} 创建了一个简单的 Fortran 语言“Hello world”程序
+Comment[zh_TW]=一個 fortran 的簡單的 "Hello world" 程式已建立於 %{dest}
diff --git a/languages/fortran/app_templates/fortranhello/fortranhello.png b/languages/fortran/app_templates/fortranhello/fortranhello.png
new file mode 100644
index 00000000..888d4f13
--- /dev/null
+++ b/languages/fortran/app_templates/fortranhello/fortranhello.png
Binary files differ
diff --git a/languages/fortran/app_templates/fortranhello/main.f b/languages/fortran/app_templates/fortranhello/main.f
new file mode 100644
index 00000000..3f5d29ca
--- /dev/null
+++ b/languages/fortran/app_templates/fortranhello/main.f
@@ -0,0 +1,7 @@
+c
+c This is the Hello World example
+c
+ program hello
+ print *,'Hello World!'
+ stop
+ end
diff --git a/languages/fortran/app_templates/fortranhello/src-Makefile.am b/languages/fortran/app_templates/fortranhello/src-Makefile.am
new file mode 100644
index 00000000..f3f03092
--- /dev/null
+++ b/languages/fortran/app_templates/fortranhello/src-Makefile.am
@@ -0,0 +1,8 @@
+bin_PROGRAMS = %{APPNAMELC}
+%{APPNAMELC}_SOURCES = %{APPNAMELC}.f
+
+# set the include path found by configure
+INCLUDES= $(all_includes)
+
+# the library search path.
+%{APPNAMELC}_LDFLAGS = $(all_libraries)
diff --git a/languages/fortran/compiler/Makefile.am b/languages/fortran/compiler/Makefile.am
new file mode 100644
index 00000000..3489a85c
--- /dev/null
+++ b/languages/fortran/compiler/Makefile.am
@@ -0,0 +1,6 @@
+# This is the collection of plugins. In contrast to the parts
+# directory, these are 'transient' in a sense and don't
+# share the complete KDevComponent interface.
+
+SUBDIRS = pgioptions
+
diff --git a/languages/fortran/compiler/pgioptions/Makefile.am b/languages/fortran/compiler/pgioptions/Makefile.am
new file mode 100644
index 00000000..3c3dd54e
--- /dev/null
+++ b/languages/fortran/compiler/pgioptions/Makefile.am
@@ -0,0 +1,18 @@
+# Here resides the pgi option dialog plugin.
+# This defines the options for the Portland Group compiler
+
+INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extras \
+ $(all_includes)
+
+kde_module_LTLIBRARIES = libkdevpgioptions.la
+libkdevpgioptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN)
+libkdevpgioptions_la_LIBADD = $(top_builddir)/lib/libkdevelop.la \
+ $(top_builddir)/lib/interfaces/extras/libkdevextras.la
+
+libkdevpgioptions_la_SOURCES = pgioptionsfactory.cpp pgioptionsplugin.cpp
+
+METASOURCES = AUTO
+
+servicedir = $(kde_servicesdir)
+service_DATA = kdevpghpfoptions.desktop kdevpgf77options.desktop
+
diff --git a/languages/fortran/compiler/pgioptions/kdevpgf77options.desktop b/languages/fortran/compiler/pgioptions/kdevpgf77options.desktop
new file mode 100644
index 00000000..8af14494
--- /dev/null
+++ b/languages/fortran/compiler/pgioptions/kdevpgf77options.desktop
@@ -0,0 +1,53 @@
+[Desktop Entry]
+Type=Service
+Exec=pgf77
+Comment=Portland Group Fortran77 Compiler
+Comment[br]=Dastumer Fortran 77 ar strollad Portland
+Comment[ca]=Compilador Fortran 77 de Portland Group
+Comment[da]=Portland Group Fortran77 oversætter
+Comment[el]=Μεταγλωττιστής Fortran77 ομάδας Portland
+Comment[es]=Compilador de Fortran 77 de Portland Group
+Comment[et]=Portland Group Fortran77 kompilaator
+Comment[eu]=Portland Group Fortran77 konpiladorea
+Comment[fa]=مترجم فرترن ۷۷ گروه Portland
+Comment[fr]=Compilateur Fortran77 du Portland Group
+Comment[gl]=Compilador de Fortran77 de Portland Group
+Comment[hi]=पोर्टलैंड समूह फ़ोरट्रॉन77 कम्पायलर
+Comment[hu]=Portland Group Fortran 77 fordítóprogram
+Comment[is]=Portland Group Fortran77 þýðandi
+Comment[it]=Compilatore per Portland Group Fortran77
+Comment[ja]=Portland グループ Fortran77 コンパイラ
+Comment[nds]=Portland Group-Fortran77-Kompilerer
+Comment[ne]=पोर्टल्यान्ड समूह फोर्ट्रान ७७ कम्पाइलर
+Comment[nl]=Portland Group Fortran77-compiler
+Comment[pl]=Kompilator Portland Group Fortran77
+Comment[pt]=Compilador de Fortran77 do Portland Group
+Comment[pt_BR]=Compilador Portland Group Fortran77
+Comment[ru]=Компилятор Portland Group Fortran77
+Comment[sk]=Portland Group Fortran77 kompilátor
+Comment[sl]=Prevajalnik za Portland Group Fortran77
+Comment[sr]=Преводилац Fortran-а 77 од Portland Group-а
+Comment[sr@Latn]=Prevodilac Fortran-a 77 od Portland Group-a
+Comment[sv]=Portland gruppens Fortran 77-kompilator
+Comment[ta]=பொர்ட்லான்ட் குழு பொர்ட்ரான் 77 தொகுப்பி
+Comment[tg]=Талфифгари Portland Group Fortran77
+Comment[tr]=Portland Grubu Fortran 77 Derleyicisi
+Comment[zh_CN]=Portland Group Fortran77 编译器
+Comment[zh_TW]=Portland Group Fortran 77 編譯器
+Name=Pgf77Options
+Name[da]=Portland Group Fortran77 indstillinger
+Name[de]=Pgf77-Einstellungen (KDevelop)
+Name[hi]=पीजीएफ़77विकल्प
+Name[nds]=Pgf77-Instellen (KDevelop)
+Name[pl]=Opcje Pgf77
+Name[sk]=Pgf77 možnosti
+Name[sl]=Možnosti Pgf77
+Name[sv]=Alternativ för pgf77
+Name[ta]=Pgf77 விருப்பங்கள்
+Name[tg]=Pgf77Интихобҳо
+Name[zh_TW]=Pgf77 選項
+ServiceTypes=KDevelop/CompilerOptions
+X-KDE-Library=libkdevpgioptions
+X-KDevelop-Version=5
+X-KDevelop-Language=Fortran
+X-KDevelop-Args=pgf77
diff --git a/languages/fortran/compiler/pgioptions/kdevpghpfoptions.desktop b/languages/fortran/compiler/pgioptions/kdevpghpfoptions.desktop
new file mode 100644
index 00000000..56923deb
--- /dev/null
+++ b/languages/fortran/compiler/pgioptions/kdevpghpfoptions.desktop
@@ -0,0 +1,50 @@
+[Desktop Entry]
+Type=Service
+Exec=pghpf
+Comment=Portland Group High Performance Fortran compiler
+Comment[ca]=Compilador Fortran d'altes prestacions de Portland Group
+Comment[da]=Portland Group Fortran oversætter
+Comment[de]=Portland Group High Performance Fortran Compiler
+Comment[el]=Μεταγλωττιστής υψηλής ταχύτητας Fortran της ομάδας Portland
+Comment[es]=Compilador de Fortran de alto rendimiento de Portland Group
+Comment[et]=Portland Groupi suure jõudlusega Fortrani kompilaator
+Comment[eu]=Portland Group-en errendimendu handiko Fortran konpiladorea
+Comment[fa]=مترجم فرترن با کارایی بالای گروه Portland
+Comment[fr]=Compilateur Fortran hautes performances du Portland Group
+Comment[gl]=Compilador de High Performance Fortran de Portland Group
+Comment[hi]=पोर्टलैंड समूह उच्च परफ़ार्मेंस फ़ोरट्रॉन कम्पायलर
+Comment[hu]=Portland Group nagyteljesítményű Fortran fordítóprogram
+Comment[it]=Compilatore ad alte prestazioni per Fortran del Portland Group
+Comment[ja]=Portland グループ ハイパフォーマンス Fortran コンパイラ
+Comment[nds]=Portland Group-Hoochleistenkompilerer för Fortran
+Comment[ne]=पोर्टल्यान्ड समूह उच्च कार्यसम्पादन फोर्ट्रान कम्पाइलर
+Comment[nl]=Portland Group High Performance Fortran-compiler
+Comment[pl]=Kompilator Portland Group High Performance Fortran
+Comment[pt]=Compilador Portland Group High Performance Fortran
+Comment[pt_BR]=Compilador Portland Group Alta Performance
+Comment[ru]=Компилятор Portland Group High Performance Fortran
+Comment[sk]=Portland Group vysoko výkonný Fortran kompilátor
+Comment[sr]=Преводилац Fortran-а високих перформанси, из Portland Group-а
+Comment[sr@Latn]=Prevodilac Fortran-a visokih performansi, iz Portland Group-a
+Comment[sv]=Portland gruppens högprestanda Fortran 77-kompilator
+Comment[ta]=பொர்ட்லான்ட் குழு உயர் செயல்பாடு பொர்ட்ரான் தொகுப்பி
+Comment[tg]=Талфифгари Portland Group High Performance Fortran
+Comment[tr]=Portland Grubu Yüksek Başarımlı Fortran Derleyicisi
+Comment[zh_CN]=Portland Group 高性能 Fortran 编译器
+Comment[zh_TW]=Portland Group 高效能 Fortran 編譯器
+Name=PghpfOptions
+Name[da]=Portland Group oversætter-indstillinger
+Name[de]=Pghpf-Einstellungen (KDevelop)
+Name[hi]=पीजीएचपीएफ़-विकल्प
+Name[nds]=Pghpf-Optschonen
+Name[pl]=Opcje Pghpf
+Name[sk]=Pghpf možnosti
+Name[sv]=Alternativ för pghpf
+Name[ta]=Pghpf விருப்பங்கள்
+Name[tg]=PghpfИнтихобҳо
+Name[zh_TW]=Pghpf 選項
+ServiceTypes=KDevelop/CompilerOptions
+X-KDE-Library=libkdevpgioptions
+X-KDevelop-Version=5
+X-KDevelop-Language=Fortran
+X-KDevelop-Args=pghpf
diff --git a/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp b/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp
new file mode 100644
index 00000000..5fad6630
--- /dev/null
+++ b/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * Copyright (C) 2001 by Bernd Gehrmann *
+ * bernd@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <kdebug.h>
+#include <kinstance.h>
+#include "pgioptionsplugin.h"
+#include "pgioptionsfactory.h"
+
+
+extern "C" {
+
+ void *init_libkdevpgioptions()
+ {
+ return new PgiOptionsFactory;
+ }
+
+}
+
+
+PgiOptionsFactory::PgiOptionsFactory(QObject *parent, const char *name)
+ : KLibFactory(parent, name)
+{
+ instance();
+}
+
+
+PgiOptionsFactory::~PgiOptionsFactory()
+{
+ delete s_instance;
+ s_instance = 0;
+}
+
+
+QObject *PgiOptionsFactory::createObject(QObject *parent, const char *name,
+ const char * /*classname*/, const QStringList &args)
+{
+ if (args.count() > 0 && qstrcmp(args[0].latin1(), "pghpf") == 0) {
+ kdDebug(9021) << "Building PgiOptions for PGHPF" << endl;
+ return new PgiOptionsPlugin(PgiOptionsPlugin::PGHPF, parent, name);
+ } else if (args.count() > 0 && qstrcmp(args[0].latin1(), "pgf77") == 0) {
+ kdDebug(9021) << "Building PgiOptions for PGF77" << endl;
+ return new PgiOptionsPlugin(PgiOptionsPlugin::PGF77, parent, name);
+ } else {
+ kdDebug(9021) << "Wrong args for kdevpgioptions library" << endl;
+ if (args.count() > 0)
+ kdDebug(9021) << args[0] << endl;
+ return 0;
+ }
+}
+
+
+KInstance *PgiOptionsFactory::s_instance = 0;
+KInstance *PgiOptionsFactory::instance()
+{
+ if (!s_instance)
+ s_instance = new KInstance("kdevpgioptions");
+
+ return s_instance;
+}
+
+#include "pgioptionsfactory.moc"
diff --git a/languages/fortran/compiler/pgioptions/pgioptionsfactory.h b/languages/fortran/compiler/pgioptions/pgioptionsfactory.h
new file mode 100644
index 00000000..9e3113a7
--- /dev/null
+++ b/languages/fortran/compiler/pgioptions/pgioptionsfactory.h
@@ -0,0 +1,34 @@
+/***************************************************************************
+ * Copyright (C) 2001 by Bernd Gehrmann *
+ * bernd@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef _PGIOPTIONSFACTORY_H_
+#define _PGIOPTIONSFACTORY_H_
+
+#include <klibloader.h>
+
+
+class PgiOptionsFactory : public KLibFactory
+{
+ Q_OBJECT
+
+public:
+ PgiOptionsFactory( QObject *parent=0, const char *name=0 );
+ ~PgiOptionsFactory();
+
+ virtual QObject* createObject( QObject *parent, const char *name,
+ const char *classname, const QStringList &args);
+ static KInstance *instance();
+
+private:
+ static KInstance *s_instance;
+};
+
+#endif
diff --git a/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp b/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp
new file mode 100644
index 00000000..8bed362e
--- /dev/null
+++ b/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp
@@ -0,0 +1,324 @@
+/***************************************************************************
+ * Copyright (C) 2001 by Bernd Gehrmann *
+ * bernd@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include <qapplication.h>
+#include <qheader.h>
+#include <qlayout.h>
+#include <qlistview.h>
+#include <qradiobutton.h>
+#include <qvbox.h>
+#include <qvbuttongroup.h>
+#include <kdebug.h>
+#include <klocale.h>
+
+#include "pgioptionsplugin.h"
+
+
+const char * const optimization_flags[] = {
+ "-Mautopar",
+ "-Mextract",
+ "-Minline",
+ "-Mipa",
+ 0
+};
+
+
+const char * const hpf_flags[] = {
+ "-Mbackslash",
+ "-Mcmf",
+ "-Mdclchk",
+ "-Mextend",
+ "-Mf90",
+ "-Mnofree",
+ "-Mstandard",
+ "-Mupcase",
+ "-Mbyteswapio",
+ "-Mdepchk",
+ "-Mdlines",
+ "-Mg",
+ "-Mftn",
+ "-Minfo",
+ "-Minform",
+ "-Mkeepft",
+ "-Mkeepstaticn",
+ "-Mmpi",
+ "-Mmpl",
+ "-Mlist",
+ "-Mnohpfc",
+ "-Mnoindependent",
+ "-Mnoprelink",
+ "-Moverlap",
+ "-Mpreprocess",
+ "-Mprof",
+ "-Mpvm",
+ "-Mr8",
+ "-Mrecursive",
+ "-Mreplicate",
+ "-Mrpm",
+ "-Mrpm1",
+ "-M[no]sequence",
+ "-Msmp",
+ "-Mstats",
+ 0
+};
+
+
+
+class GeneralTab : public QWidget
+{
+public:
+ GeneralTab( QWidget *parent=0, const char *name=0 );
+ ~GeneralTab();
+
+ void readFlags(QStringList *str);
+ void writeFlags(QStringList *str);
+};
+
+
+class OptimizationTab : public QWidget
+{
+public:
+ OptimizationTab( PgiOptionsPlugin::Type type, QWidget *parent=0, const char *name=0 );
+ ~OptimizationTab();
+
+ void readFlags(QStringList *str);
+ void writeFlags(QStringList *str);
+
+private:
+ QRadioButton *Odefault, *O0, *O1, *O2;
+ QListView *optBox;
+};
+
+
+class HpfTab : public QWidget
+{
+public:
+ HpfTab( QWidget *parent=0, const char *name=0 );
+ ~HpfTab();
+
+ void readFlags(QStringList *str);
+ void writeFlags(QStringList *str);
+
+private:
+ QListView *hpfBox;
+};
+
+
+OptimizationTab::OptimizationTab(PgiOptionsPlugin::Type type, QWidget *parent, const char *name)
+ : QWidget(parent, name)
+{
+ QBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ layout->setAutoAdd(true);
+
+ QVButtonGroup *group = new QVButtonGroup(i18n("Optimization Level"), this);
+ Odefault = new QRadioButton(i18n("Default"), group);
+ Odefault->setChecked(true);
+ O0 = new QRadioButton(i18n("No optimization"), group);
+ O1 = new QRadioButton(i18n("Level 1"), group);
+ O2 = new QRadioButton(i18n("Level 2"), group);
+
+ if (type == PgiOptionsPlugin::PGHPF) {
+ optBox = new QListView(this);
+ optBox->addColumn(QString::null);
+ optBox->header()->hide();
+ for (const char * const *p = optimization_flags; *p; ++p) {
+ new QCheckListItem(optBox, *p, QCheckListItem::CheckBox);
+ kdDebug() << (*p) << endl;
+ }
+ } else
+ optBox = 0;
+
+ QApplication::sendPostedEvents(this, QEvent::ChildInserted);
+ layout->addStretch();
+}
+
+
+OptimizationTab::~OptimizationTab()
+{}
+
+
+void OptimizationTab::readFlags(QStringList *list)
+{
+ if (optBox) {
+ QListViewItem *item = optBox->firstChild();
+ for (; item; item = item->nextSibling()) {
+ QStringList::Iterator sli = list->find(item->text(0));
+ if (sli != list->end()) {
+ static_cast<QCheckListItem*>(item)->setOn(true);
+ list->remove(sli);
+ }
+ }
+ }
+
+ QStringList::Iterator sli;
+ sli = list->find("-O0");
+ if (sli != list->end()) {
+ O0->setChecked(true);
+ list->remove(sli);
+ }
+ sli = list->find("-O1");
+ if (sli != list->end()) {
+ O1->setChecked(true);
+ list->remove(sli);
+ }
+ sli = list->find("-O2");
+ if (sli != list->end()) {
+ O2->setChecked(true);
+ list->remove(sli);
+ }
+}
+
+
+void OptimizationTab::writeFlags(QStringList *list)
+{
+ if (optBox) {
+ QListViewItem *item = optBox->firstChild();
+ for (; item; item = item->nextSibling())
+ if (static_cast<QCheckListItem*>(item)->isOn())
+ (*list) << item->text(0);
+ }
+
+ if (O0->isChecked())
+ (*list) << "-O0";
+ else if (O1->isChecked())
+ (*list) << "-O1";
+ else if (O2->isChecked())
+ (*list) << "-O2";
+}
+
+
+HpfTab::HpfTab(QWidget *parent, const char *name)
+ : QWidget(parent, name)
+{
+ QBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ layout->setAutoAdd(true);
+
+ hpfBox = new QListView(this);
+ hpfBox->addColumn(QString::null);
+ hpfBox->header()->hide();
+ for (const char * const *p = hpf_flags; *p; ++p)
+ new QCheckListItem(hpfBox, *p, QCheckListItem::CheckBox);
+
+ QApplication::sendPostedEvents(this, QEvent::ChildInserted);
+ layout->addStretch();
+}
+
+
+HpfTab::~HpfTab()
+{}
+
+
+void HpfTab::readFlags(QStringList *list)
+{
+ QListViewItem *item = hpfBox->firstChild();
+ for (; item; item = item->nextSibling()) {
+ QStringList::Iterator sli = list->find(item->text(0));
+ if (sli != list->end()) {
+ static_cast<QCheckListItem*>(item)->setOn(true);
+ list->remove(sli);
+ }
+ }
+}
+
+
+void HpfTab::writeFlags(QStringList *list)
+{
+ QListViewItem *item = hpfBox->firstChild();
+ for (; item; item = item->nextSibling()) {
+ if (static_cast<QCheckListItem*>(item)->isOn())
+ (*list) << item->text(0);
+ }
+}
+
+
+PgiOptionsDialog::PgiOptionsDialog(PgiOptionsPlugin::Type type, QWidget *parent, const char *name)
+ : KDialogBase(Tabbed, (type == PgiOptionsPlugin::PGHPF)? i18n("PGHPF Compiler Options") : i18n("PGF77 Compiler Options"),
+ Ok|Cancel, Ok, parent, name, true)
+{
+ QVBox *vbox;
+
+ // vbox = addVBoxPage(i18n("General"));
+ // general = new GeneralTab(vbox, "general tab");
+
+ vbox = addVBoxPage(i18n("Optimization"));
+ optimization = new OptimizationTab(type, vbox, "optimization tab");
+
+ if (type == PgiOptionsPlugin::PGHPF) {
+ vbox = addVBoxPage(i18n("HPF"));
+ hpf = new HpfTab(vbox, "optimization tab");
+ } else
+ hpf = 0;
+
+}
+
+
+PgiOptionsDialog::~PgiOptionsDialog()
+{
+}
+
+
+void PgiOptionsDialog::setFlags(const QString &flags)
+{
+ QStringList flaglist = QStringList::split(" ", flags);
+
+ // Hand them to 'general' at last, so it can make a line edit
+ // with the unprocessed items
+ if (hpf)
+ hpf->readFlags(&flaglist);
+ optimization->readFlags(&flaglist);
+ // general->readFlags(&flaglist);
+}
+
+
+QString PgiOptionsDialog::flags() const
+{
+ QStringList flaglist;
+
+ if (hpf)
+ hpf->writeFlags(&flaglist);
+ optimization->writeFlags(&flaglist);
+ // general->writeFlags(&flaglist);
+
+ QString flags;
+ QStringList::ConstIterator li;
+ for (li = flaglist.begin(); li != flaglist.end(); ++li) {
+ flags += (*li);
+ flags += " ";
+ }
+
+ flags.truncate(flags.length()-1);
+ return flags;
+}
+
+
+PgiOptionsPlugin::PgiOptionsPlugin(Type type, QObject *parent, const char *name)
+ : KDevCompilerOptions(parent, name)
+{
+ pgitype = type;
+}
+
+
+PgiOptionsPlugin::~PgiOptionsPlugin()
+{}
+
+
+QString PgiOptionsPlugin::exec(QWidget *parent, const QString &flags)
+{
+ PgiOptionsDialog *dlg = new PgiOptionsDialog(pgitype, parent, "pgi options dialog");
+ QString newFlags = flags;
+ dlg->setFlags(flags);
+ if (dlg->exec() == QDialog::Accepted)
+ newFlags = dlg->flags();
+ delete dlg;
+ return newFlags;
+}
+
+#include "pgioptionsplugin.moc"
diff --git a/languages/fortran/compiler/pgioptions/pgioptionsplugin.h b/languages/fortran/compiler/pgioptions/pgioptionsplugin.h
new file mode 100644
index 00000000..dfbf4547
--- /dev/null
+++ b/languages/fortran/compiler/pgioptions/pgioptionsplugin.h
@@ -0,0 +1,55 @@
+/***************************************************************************
+ * Copyright (C) 2001 by Bernd Gehrmann *
+ * bernd@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef _PGIOPTIONSPLUGIN_H_
+#define _PGIOPTIONSPLUGIN_H_
+
+#include <kdialogbase.h>
+
+#include "kdevcompileroptions.h"
+
+class GeneralTab;
+class OptimizationTab;
+class HpfTab;
+
+
+class PgiOptionsPlugin : public KDevCompilerOptions
+{
+ Q_OBJECT
+
+public:
+ enum Type { PGHPF, PGF77 };
+
+ PgiOptionsPlugin( Type type, QObject *parent=0, const char *name=0 );
+ ~PgiOptionsPlugin();
+
+ virtual QString exec(QWidget *parent, const QString &flags);
+
+private:
+ Type pgitype;
+};
+
+
+class PgiOptionsDialog : public KDialogBase
+{
+public:
+ PgiOptionsDialog(PgiOptionsPlugin::Type type, QWidget *parent=0, const char *name=0 );
+ ~PgiOptionsDialog();
+
+ void setFlags(const QString &flags);
+ QString flags() const;
+
+private:
+ OptimizationTab *optimization;
+ HpfTab *hpf;
+};
+
+#endif
diff --git a/languages/fortran/doc/Makefile.am b/languages/fortran/doc/Makefile.am
new file mode 100644
index 00000000..5e7eab51
--- /dev/null
+++ b/languages/fortran/doc/Makefile.am
@@ -0,0 +1,6 @@
+tocdir = ${kde_datadir}/kdevdocumentation/tocs
+toc_DATA = fortran_bugs_gcc.toc
+
+#indexdir = ${kde_datadir}/devdoctreeview/indices
+#index_DATA =
+
diff --git a/languages/fortran/doc/fortran_bugs_gcc.toc b/languages/fortran/doc/fortran_bugs_gcc.toc
new file mode 100644
index 00000000..444a2a05
--- /dev/null
+++ b/languages/fortran/doc/fortran_bugs_gcc.toc
@@ -0,0 +1,7 @@
+<!DOCTYPE kdeveloptoc>
+<kdeveloptoc>
+<title>Fortran bugs (GCC)</title>
+<base href="http://gcc.gnu.org/bugzilla/"/>
+<tocsect1 name="Query" url="query.cgi">
+</tocsect1>
+</kdeveloptoc>
diff --git a/languages/fortran/file_templates/Makefile.am b/languages/fortran/file_templates/Makefile.am
new file mode 100644
index 00000000..2a8e4365
--- /dev/null
+++ b/languages/fortran/file_templates/Makefile.am
@@ -0,0 +1,2 @@
+templatedir = $(kde_datadir)/kdevfilecreate/file-templates
+template_DATA = f f77 f90 f95 for fpp ftn
diff --git a/languages/fortran/file_templates/f b/languages/fortran/file_templates/f
new file mode 100644
index 00000000..909182fc
--- /dev/null
+++ b/languages/fortran/file_templates/f
@@ -0,0 +1,11 @@
+c
+c Preprocessed Fortran Implementation: $MODULE$
+c
+c Description:
+c
+c
+c Author: $AUTHOR$ <$EMAIL$>, (C) $YEAR$
+c
+c Copyright: See COPYING file that comes with this distribution
+c
+
diff --git a/languages/fortran/file_templates/f77 b/languages/fortran/file_templates/f77
new file mode 100644
index 00000000..a3628bc1
--- /dev/null
+++ b/languages/fortran/file_templates/f77
@@ -0,0 +1,11 @@
+c
+c Fortran 77 Implementation: $MODULE$
+c
+c Description:
+c
+c
+c Author: $AUTHOR$ <$EMAIL$>, (C) $YEAR$
+c
+c Copyright: See COPYING file that comes with this distribution
+c
+
diff --git a/languages/fortran/file_templates/f90 b/languages/fortran/file_templates/f90
new file mode 100644
index 00000000..b3800d65
--- /dev/null
+++ b/languages/fortran/file_templates/f90
@@ -0,0 +1,11 @@
+c
+c Fortran 90 Implementation: $MODULE$
+c
+c Description:
+c
+c
+c Author: $AUTHOR$ <$EMAIL$>, (C) $YEAR$
+c
+c Copyright: See COPYING file that comes with this distribution
+c
+
diff --git a/languages/fortran/file_templates/f95 b/languages/fortran/file_templates/f95
new file mode 100644
index 00000000..a4f452cf
--- /dev/null
+++ b/languages/fortran/file_templates/f95
@@ -0,0 +1,11 @@
+c
+c Fortran 95 Implementation: $MODULE$
+c
+c Description:
+c
+c
+c Author: $AUTHOR$ <$EMAIL$>, (C) $YEAR$
+c
+c Copyright: See COPYING file that comes with this distribution
+c
+
diff --git a/languages/fortran/file_templates/for b/languages/fortran/file_templates/for
new file mode 100644
index 00000000..909182fc
--- /dev/null
+++ b/languages/fortran/file_templates/for
@@ -0,0 +1,11 @@
+c
+c Preprocessed Fortran Implementation: $MODULE$
+c
+c Description:
+c
+c
+c Author: $AUTHOR$ <$EMAIL$>, (C) $YEAR$
+c
+c Copyright: See COPYING file that comes with this distribution
+c
+
diff --git a/languages/fortran/file_templates/fpp b/languages/fortran/file_templates/fpp
new file mode 100644
index 00000000..d8a7ad6c
--- /dev/null
+++ b/languages/fortran/file_templates/fpp
@@ -0,0 +1,11 @@
+c
+c Fortran Implementation: $MODULE$
+c
+c Description:
+c
+c
+c Author: $AUTHOR$ <$EMAIL$>, (C) $YEAR$
+c
+c Copyright: See COPYING file that comes with this distribution
+c
+
diff --git a/languages/fortran/file_templates/ftn b/languages/fortran/file_templates/ftn
new file mode 100644
index 00000000..a3628bc1
--- /dev/null
+++ b/languages/fortran/file_templates/ftn
@@ -0,0 +1,11 @@
+c
+c Fortran 77 Implementation: $MODULE$
+c
+c Description:
+c
+c
+c Author: $AUTHOR$ <$EMAIL$>, (C) $YEAR$
+c
+c Copyright: See COPYING file that comes with this distribution
+c
+
diff --git a/languages/fortran/fixedformparser.cpp b/languages/fortran/fixedformparser.cpp
new file mode 100644
index 00000000..7084fbba
--- /dev/null
+++ b/languages/fortran/fixedformparser.cpp
@@ -0,0 +1,94 @@
+/***************************************************************************
+ * Copyright (C) 2001 by Bernd Gehrmann *
+ * bernd@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "fixedformparser.h"
+
+#include <qfile.h>
+#include <qtextstream.h>
+#include <kdebug.h>
+#include <codemodel.h>
+
+
+FixedFormParser::FixedFormParser(CodeModel* model)
+{
+ m_model = model;
+
+ functionre.setPattern("(integer|real|logical|complex|character|"
+ "double(precision)?)function([^(]+).*");
+ subroutinere.setPattern("subroutine([^(]+).*");
+
+ functionre.setCaseSensitive( false );
+ subroutinere.setCaseSensitive( false );
+}
+
+
+void FixedFormParser::process(const QCString &line, const QString &fileName, int lineNum)
+{
+ QCString simplified;
+ int l = line.length();
+ for (int i=0; i < l; ++i)
+ if (line[i] != ' ')
+ simplified += line[i];
+
+ if ( simplified.isEmpty() ) return;
+
+ QString name;
+ if (functionre.search(simplified) != -1)
+ name = functionre.cap(3);
+ else if (subroutinere.search(simplified) != -1)
+ name = subroutinere.cap(1);
+ else
+ return;
+
+ FunctionDom method = m_model->create<FunctionModel>();
+ method->setName(name);
+ method->setFileName(fileName);
+ method->setStartPosition(lineNum, 0);
+
+ if( !m_file->hasFunction(method->name()) )
+ m_file->addFunction(method);
+}
+
+
+void FixedFormParser::parse(const QString &fileName)
+{
+ QFile f(QFile::encodeName(fileName));
+ if (!f.open(IO_ReadOnly))
+ return;
+ QTextStream stream(&f);
+
+ m_file = m_model->create<FileModel>();
+ m_file->setName( fileName );
+
+ QCString line;
+ int lineNum=0, startLineNum=0;
+ while (!stream.atEnd()) {
+ ++lineNum;
+ QCString str = stream.readLine().local8Bit();
+ if (!str.isEmpty() && QCString("*Cc#!").find(str[0]) != -1)
+ continue;
+ // Continuation line
+ if (str.length() > 6 && str.left(5) == " " && str[5] != ' ') {
+ line += str.right(str.length()-6);
+ continue;
+ }
+ // An initial or invalid line. We don't care
+ // about validity
+ process(line, fileName, startLineNum);
+ line = str.right(str.length()-6);
+ startLineNum = lineNum-1;
+ }
+ process(line, fileName, startLineNum);
+
+ f.close();
+
+ m_model->addFile( m_file );
+}
diff --git a/languages/fortran/fixedformparser.h b/languages/fortran/fixedformparser.h
new file mode 100644
index 00000000..a7016510
--- /dev/null
+++ b/languages/fortran/fixedformparser.h
@@ -0,0 +1,35 @@
+/***************************************************************************
+ * Copyright (C) 2001 by Bernd Gehrmann *
+ * bernd@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef _FIXEDFORMPARSER_H_
+#define _FIXEDFORMPARSER_H_
+
+#include <qstring.h>
+#include <qtextstream.h>
+#include <qregexp.h>
+#include <codemodel.h>
+
+
+class FixedFormParser
+{
+public:
+ FixedFormParser(CodeModel* model);
+
+ void parse(const QString &fileName);
+
+private:
+ void process(const QCString &line, const QString &fileName, int lineNum);
+ CodeModel* m_model;
+ FileDom m_file;
+ QRegExp functionre, subroutinere;
+};
+
+#endif
diff --git a/languages/fortran/fortransupportpart.cpp b/languages/fortran/fortransupportpart.cpp
new file mode 100644
index 00000000..e0c0bde9
--- /dev/null
+++ b/languages/fortran/fortransupportpart.cpp
@@ -0,0 +1,287 @@
+/***************************************************************************
+ * Copyright (C) 2001 by Bernd Gehrmann *
+ * bernd@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * The tooltips for ftnchek contained in this source file are taken *
+ * from the ftnchek man page. ftnchek is written by Robert Moniot and *
+ * others. *
+ * *
+ ***************************************************************************/
+
+#include "fortransupportpart.h"
+#include "ftnchekconfigwidget.h"
+#include "fixedformparser.h"
+
+#include <qdir.h>
+#include <qfileinfo.h>
+#include <qpopupmenu.h>
+#include <qstringlist.h>
+#include <qtextstream.h>
+#include <qtimer.h>
+#include <qvbox.h>
+#include <kapplication.h>
+#include <kdebug.h>
+#include <kdialogbase.h>
+#include <klocale.h>
+#include <kmessagebox.h>
+#include <kprocess.h>
+#include <kregexp.h>
+#include <kdevgenericfactory.h>
+#include <kaction.h>
+#include <kiconloader.h>
+
+#include <kdevcore.h>
+#include <kdevproject.h>
+#include <kdevmakefrontend.h>
+#include <kdevpartcontroller.h>
+#include <domutil.h>
+#include <codemodel.h>
+#include <kdevplugininfo.h>
+
+
+typedef KDevGenericFactory<FortranSupportPart> FortranSupportFactory;
+static const KDevPluginInfo data("kdevfortransupport");
+K_EXPORT_COMPONENT_FACTORY( libkdevfortransupport, FortranSupportFactory( data ) )
+
+FortranSupportPart::FortranSupportPart(QObject *parent, const char *name, const QStringList &)
+ : KDevLanguageSupport(&data, parent, name ? name : "FortranSupportPart")
+{
+ setInstance(FortranSupportFactory::instance());
+
+ setXMLFile("kdevfortransupport.rc");
+
+ connect( core(), SIGNAL(projectConfigWidget(KDialogBase*)),
+ this, SLOT(projectConfigWidget(KDialogBase*)) );
+ connect( core(), SIGNAL(projectOpened()), this, SLOT(projectOpened()) );
+ connect( core(), SIGNAL(projectClosed()), this, SLOT(projectClosed()) );
+ connect( partController(), SIGNAL(savedFile(const KURL&)),
+ this, SLOT(savedFile(const KURL&)) );
+
+ KAction *action;
+
+ action = new KAction( i18n("&Ftnchek"), 0,
+ this, SLOT(slotFtnchek()),
+ actionCollection(), "project_ftnchek" );
+ action->setToolTip(i18n("Run ftnchek"));
+ action->setWhatsThis(i18n("<b>Run ftnchek</b><p>Runs <b>ftnchek</b> to check fortran programs for semantic errors. Configure ftnchek options in project settings dialog, <b>Ftnchek</b> tab."));
+
+ parser = 0;
+}
+
+
+FortranSupportPart::~FortranSupportPart()
+{}
+
+
+void FortranSupportPart::slotFtnchek()
+{
+ // Do something smarter here...
+ if (makeFrontend()->isRunning()) {
+ KMessageBox::sorry(0, i18n("There is currently a job running."));
+ return;
+ }
+
+ if (partController()->saveAllFiles()==false)
+ return; //user cancelled
+
+ QDomDocument &dom = *projectDom();
+
+ QString cmdline = "cd ";
+ cmdline += KProcess::quote(project()->projectDirectory());
+ cmdline += "&& ftnchek -nonovice ";
+
+ if (DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/division"))
+ cmdline += "-division ";
+ if (DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/extern"))
+ cmdline += "-extern ";
+ if (DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/declare"))
+ cmdline += "-declare ";
+ if (DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/pure"))
+ cmdline += "-pure ";
+
+ cmdline += "-arguments=";
+ if (DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/argumentsall"))
+ cmdline += "all ";
+ else
+ cmdline += DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/argumentsonly") + " ";
+
+ cmdline += "-common=";
+ if (DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/commonall"))
+ cmdline += "all ";
+ else
+ cmdline += DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/commononly") + " ";
+
+ cmdline += "-truncation=";
+ if (DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/truncationall"))
+ cmdline += "all ";
+ else
+ cmdline += DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/truncationonly") + " ";
+
+ cmdline += "-usage=";
+ if (DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/usageall"))
+ cmdline += "all ";
+ else
+ cmdline += DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/usageonly") + " ";
+
+ cmdline += "-f77=";
+ if (DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/f77all"))
+ cmdline += "all ";
+ else
+ cmdline += DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/f77only") + " ";
+
+ cmdline += "-portability=";
+ if (DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/portabilityall"))
+ cmdline += "all ";
+ else
+ cmdline += DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/portabilityonly") + " ";
+
+ QStringList list = project()->allFiles();
+ QStringList::ConstIterator it;
+ for (it = list.begin(); it != list.end(); ++it) {
+ QFileInfo fi(*it);
+ QString extension = fi.extension();
+ if (extension == "f77" || extension == "f" || extension == "for"
+ || extension == "ftn") {
+ cmdline += *it + " ";
+ }
+ }
+
+ makeFrontend()->queueCommand(QString::null, cmdline);
+}
+
+
+void FortranSupportPart::projectConfigWidget(KDialogBase *dlg)
+{
+ QVBox *vbox = dlg->addVBoxPage(i18n("Ftnchek"), i18n("Ftnchek"), BarIcon("kdevelop", KIcon::SizeMedium));
+ FtnchekConfigWidget *w = new FtnchekConfigWidget(*projectDom(), vbox, "ftnchek config widget");
+ connect( dlg, SIGNAL(okClicked()), w, SLOT(accept()) );
+}
+
+
+void FortranSupportPart::projectOpened()
+{
+ kdDebug(9019) << "projectOpened()" << endl;
+
+ connect( project(), SIGNAL(addedFilesToProject(const QStringList &)),
+ this, SLOT(addedFilesToProject(const QStringList &)) );
+ connect( project(), SIGNAL(removedFilesFromProject(const QStringList &)),
+ this, SLOT(removedFilesFromProject(const QStringList &)) );
+
+ // We want to parse only after all components have been
+ // properly initialized
+ parser = new FixedFormParser(codeModel());
+
+ QTimer::singleShot(0, this, SLOT(initialParse()));
+}
+
+
+void FortranSupportPart::projectClosed()
+{
+ delete parser;
+ parser = 0;
+}
+
+
+void FortranSupportPart::maybeParse(const QString fileName)
+{
+ QFileInfo fi(fileName);
+ QString extension = fi.extension();
+ if (extension == "f77" || extension == "f" || extension == "for" || extension == "ftn") {
+
+ if( codeModel()->hasFile(fileName) ){
+ emit aboutToRemoveSourceInfo( fileName );
+ codeModel()->removeFile( codeModel()->fileByName(fileName) );
+ }
+
+ parser->parse(fileName);
+ }
+}
+
+
+void FortranSupportPart::initialParse()
+{
+ kdDebug(9019) << "initialParse()" << endl;
+
+ if (project()) {
+ kapp->setOverrideCursor(waitCursor);
+ QStringList files = project()->allFiles();
+ for (QStringList::Iterator it = files.begin(); it != files.end() ;++it) {
+ QFileInfo fileInfo( project()->projectDirectory(), *it );
+ kdDebug(9019) << "maybe parse " << fileInfo.absFilePath() << endl;
+ maybeParse( fileInfo.absFilePath() );
+ }
+
+ emit updatedSourceInfo();
+ kapp->restoreOverrideCursor();
+ } else {
+ kdDebug(9019) << "No project" << endl;
+ }
+}
+
+
+void FortranSupportPart::addedFilesToProject(const QStringList &fileList)
+{
+ kdDebug(9019) << "addedFilesToProject()" << endl;
+
+ QStringList::ConstIterator it;
+
+ for ( it = fileList.begin(); it != fileList.end(); ++it )
+ {
+ QFileInfo fileInfo( project()->projectDirectory(), *it );
+ QString path = fileInfo.absFilePath();
+ maybeParse( path );
+ emit addedSourceInfo( path );
+ }
+
+ //emit updatedSourceInfo();
+}
+
+
+void FortranSupportPart::removedFilesFromProject(const QStringList &fileList)
+{
+ kdDebug(9019) << "removedFilesFromProject()" << endl;
+
+ QStringList::ConstIterator it;
+
+ for ( it = fileList.begin(); it != fileList.end(); ++it )
+ {
+ QFileInfo fileInfo( project()->projectDirectory(), *it );
+ QString path = fileInfo.absFilePath();
+
+ if( codeModel()->hasFile(path) ){
+ emit aboutToRemoveSourceInfo( path );
+ codeModel()->removeFile( codeModel()->fileByName(path) );
+ }
+ }
+
+ //emit updatedSourceInfo();
+}
+
+
+void FortranSupportPart::savedFile(const KURL &fileName)
+{
+ kdDebug(9019) << "savedFile()" << endl;
+
+ if (project()->allFiles().contains(fileName.path().mid ( project()->projectDirectory().length() + 1 ))) {
+ maybeParse(fileName.path());
+ emit addedSourceInfo( fileName.path() );
+ }
+}
+
+
+KDevLanguageSupport::Features FortranSupportPart::features()
+{
+ return Features(Functions);
+}
+
+KDevMakeFrontend * FortranSupportPart::makeFrontend( )
+{
+ return extension<KDevMakeFrontend>("KDevelop/MakeFrontend");
+}
+
+#include "fortransupportpart.moc"
diff --git a/languages/fortran/fortransupportpart.h b/languages/fortran/fortransupportpart.h
new file mode 100644
index 00000000..52dcba5a
--- /dev/null
+++ b/languages/fortran/fortransupportpart.h
@@ -0,0 +1,53 @@
+/***************************************************************************
+ * Copyright (C) 2001 by Bernd Gehrmann *
+ * bernd@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef _FORTRANSUPPORTPART_H_
+#define _FORTRANSUPPORTPART_H_
+
+class FixedFormParser;
+class KDialogBase;
+class QStringList;
+class KDevMakeFrontend;
+
+#include "kdevlanguagesupport.h"
+
+
+class FortranSupportPart : public KDevLanguageSupport
+{
+ Q_OBJECT
+
+public:
+ FortranSupportPart( QObject *parent, const char *name, const QStringList & );
+ ~FortranSupportPart();
+
+protected:
+ virtual KDevLanguageSupport::Features features();
+
+private slots:
+ void slotFtnchek();
+ void projectConfigWidget(KDialogBase *dlg);
+ void projectOpened();
+ void projectClosed();
+ void savedFile(const KURL &fileName);
+ void addedFilesToProject(const QStringList &fileList);
+ void removedFilesFromProject(const QStringList &fileList);
+
+ // Internal
+ void initialParse();
+
+private:
+ void maybeParse(const QString fileName);
+ KDevMakeFrontend *makeFrontend();
+
+ FixedFormParser *parser;
+};
+
+#endif
diff --git a/languages/fortran/ftnchekconfigwidget.cpp b/languages/fortran/ftnchekconfigwidget.cpp
new file mode 100644
index 00000000..fd4f7a87
--- /dev/null
+++ b/languages/fortran/ftnchekconfigwidget.cpp
@@ -0,0 +1,290 @@
+/***************************************************************************
+ * Copyright (C) 2001 by Bernd Gehrmann *
+ * bernd@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "ftnchekconfigwidget.h"
+
+#include <qcheckbox.h>
+#include <qbuttongroup.h>
+#include <qheader.h>
+#include <qlistview.h>
+#include <qradiobutton.h>
+#include <qtooltip.h>
+#include <klocale.h>
+
+#include "domutil.h"
+
+
+class FtnchekItem : public QCheckListItem
+{
+public:
+ FtnchekItem(QListView *parent, const QString &flagstr,
+ const QString &description)
+ : QCheckListItem(parent, flagstr, QCheckListItem::CheckBox),
+ flag(flagstr), desc(description)
+ {
+ setText(1, desc);
+ }
+
+ static void readFlagsToListView(QListView *listview, QStringList *list);
+ static void writeFlagsFromListView(QListView *listview, QStringList *list);
+
+private:
+ QString flag;
+ QString desc;
+ friend class FtnchekToolTip;
+};
+
+
+void FtnchekItem::readFlagsToListView(QListView *listview, QStringList *list)
+{
+ QListViewItem *item = listview->firstChild();
+ for (; item; item = item->nextSibling()) {
+ FtnchekItem *flitem = static_cast<FtnchekItem*>(item);
+ QStringList::Iterator sli = list->find(flitem->flag);
+ if (sli != list->end()) {
+ flitem->setOn(true);
+ list->remove(sli);
+ }
+ }
+}
+
+
+void FtnchekItem::writeFlagsFromListView(QListView *listview, QStringList *list)
+{
+ (*list).clear();
+
+ QListViewItem *item = listview->firstChild();
+ for (; item; item = item->nextSibling()) {
+ FtnchekItem *flitem = static_cast<FtnchekItem*>(item);
+ if (flitem->isOn())
+ (*list) << flitem->flag;
+ }
+}
+
+
+class FtnchekToolTip : public QToolTip
+{
+public:
+ FtnchekToolTip(QWidget *parent)
+ : QToolTip(parent)
+ {}
+protected:
+ void maybeTip(const QPoint &pos)
+ {
+ QListView *listview = static_cast<QListView*>(parentWidget());
+ QListViewItem *item = listview->itemAt(pos);
+ FtnchekItem *flitem = static_cast<FtnchekItem*>(item);
+
+ if (item)
+ tip(listview->itemRect(item), flitem->desc);
+ }
+};
+
+
+const char *arguments_flags[] = {
+ "arrayness", I18N_NOOP("Warn about inconsistent use of arguments that use arrays"),
+ "type", I18N_NOOP("Warn about dummy arguments of a data type different from "
+ "the actual arguments"),
+ "function-type", I18N_NOOP("Warn if the invocation assumes a different data type for the return type, "
+ "different from the actual return type"),
+ "number", I18N_NOOP("Warn about invoking a subprogram with an incorrect number of arguments"),
+ 0, 0
+};
+
+
+const char *common_flags[] = {
+ "dimension", I18N_NOOP("Corresponding arrays in each declaration of a block must agree in size "
+ "and number of dimensions"),
+ "exact", I18N_NOOP("The comparison of two blocks is done variable-by-variable"),
+ "length", I18N_NOOP("Warn if different declarations of the same block are not equal in total length"),
+ "type", I18N_NOOP("In each declaration of a block, corresponding memory locations "
+ "must agree in data type"),
+ 0, 0
+};
+
+
+const char *truncation_flags[] = {
+ "int-div-exponent", I18N_NOOP("Use of the result of integer division as an exponent"),
+ "int-div-real", I18N_NOOP("Conversion of an expression involving an integer division to real"),
+ "int-div-zero", I18N_NOOP("Division in an integer constant expression that yields a result of zero"),
+ 0, 0
+};
+
+
+const char *usage_flags[] = {
+ "arg-alias", I18N_NOOP("A scalar dummy argument is actually the same as another "
+ "and is (or may be) modified"),
+ "arg-array-alias", I18N_NOOP("A dummy argument which is an array or array element "
+ "is the same array as another and is modified"),
+ "arg-common-alias", I18N_NOOP("A scalar dummy argument is the same as a common variable in "
+ "the subprogram, and either is modified"),
+ 0, 0
+};
+
+
+const char *f77_flags[] = {
+ "accept-type", I18N_NOOP("ACCEPT and TYPE I/O statements"),
+ "array-bounds", I18N_NOOP("Expressions defining array bounds that contain array "
+ "elements or function references"),
+ "assignment-stmt", I18N_NOOP("Assignment statements involving arrays"),
+ 0, 0
+};
+
+
+const char *portability_flags[] = {
+ "backslash", I18N_NOOP("Backslash characters in strings"),
+ "common-alignment", I18N_NOOP("COMMON block variables not in descending order of storage sizes"),
+ "hollerith", I18N_NOOP("Hollerith constants"),
+ 0, 0
+};
+
+
+FtnchekConfigWidget::FtnchekConfigWidget(QDomDocument &projectDom, QWidget *parent, const char *name)
+ : FtnchekConfigWidgetBase(parent, name), dom(projectDom)
+{
+ arguments_group = new QButtonGroup;
+ arguments_group->insert(argumentsall_button);
+ arguments_group->insert(argumentsonly_button);
+ common_group = new QButtonGroup;
+ common_group->insert(commonall_button);
+ common_group->insert(commononly_button);
+ truncation_group = new QButtonGroup;
+ truncation_group->insert(truncationall_button);
+ truncation_group->insert(truncationonly_button);
+ usage_group = new QButtonGroup;
+ usage_group->insert(usageall_button);
+ usage_group->insert(usageonly_button);
+ f77_group = new QButtonGroup;
+ f77_group->insert(f77all_button);
+ f77_group->insert(f77only_button);
+ portability_group = new QButtonGroup;
+ portability_group->insert(portabilityall_button);
+ portability_group->insert(portabilityonly_button);
+
+ arguments_listview->header()->hide();
+ new FtnchekToolTip(arguments_listview);
+
+ common_listview->header()->hide();
+ new FtnchekToolTip(common_listview);
+
+ truncation_listview->header()->hide();
+ new FtnchekToolTip(truncation_listview);
+
+ usage_listview->header()->hide();
+ new FtnchekToolTip(usage_listview);
+
+ f77_listview->header()->hide();
+ new FtnchekToolTip(f77_listview);
+
+ portability_listview->header()->hide();
+ new FtnchekToolTip(portability_listview);
+
+ for (const char **p = arguments_flags; *p; p += 2)
+ new FtnchekItem(arguments_listview, QString::fromUtf8(*p), i18n(*(p+1)));
+
+ for (const char **p = common_flags; *p; p += 2)
+ new FtnchekItem(common_listview, QString::fromUtf8(*p), i18n(*(p+1)));
+
+ for (const char **p = truncation_flags; *p; p += 2)
+ new FtnchekItem(truncation_listview, QString::fromUtf8(*p), i18n(*(p+1)));
+
+ for (const char **p = usage_flags; *p; p += 2)
+ new FtnchekItem(usage_listview, QString::fromUtf8(*p), i18n(*(p+1)));
+
+ for (const char **p = f77_flags; *p; p += 2)
+ new FtnchekItem(f77_listview, QString::fromUtf8(*p), i18n(*(p+1)));
+
+ for (const char **p = portability_flags; *p; p += 2)
+ new FtnchekItem(portability_listview, QString::fromUtf8(*p), i18n(*(p+1)));
+
+ readConfig();
+}
+
+
+FtnchekConfigWidget::~FtnchekConfigWidget()
+{
+ delete arguments_group;
+ delete common_group;
+ delete truncation_group;
+ delete usage_group;
+ delete f77_group;
+ delete portability_group;
+}
+
+
+void FtnchekConfigWidget::accept()
+{
+ storeConfig();
+}
+
+
+void FtnchekConfigWidget::readConfig()
+{
+ division_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/division"));
+ extern_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/extern"));
+ declare_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/declare"));
+ pure_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/pure"));
+
+ argumentsall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/argumentsall"));
+ commonall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/commonall"));
+ truncationall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/truncationall"));
+ usageall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/usageall"));
+ f77all_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/f77all"));
+ portabilityall_button->setChecked(DomUtil::readBoolEntry(dom, "/kdevfortransupport/ftnchek/portabilityall"));
+
+ QStringList list;
+
+ list = QStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/argumentsonly"));
+ FtnchekItem::readFlagsToListView(arguments_listview, &list);
+ list = QStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/commononly"));
+ FtnchekItem::readFlagsToListView(common_listview, &list);
+ list = QStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/truncationonly"));
+ FtnchekItem::readFlagsToListView(truncation_listview, &list);
+ list = QStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/usageonly"));
+ FtnchekItem::readFlagsToListView(usage_listview, &list);
+ list = QStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/f77only"));
+ FtnchekItem::readFlagsToListView(f77_listview, &list);
+ list = QStringList::split(',', DomUtil::readEntry(dom, "/kdevfortransupport/ftnchek/portabilityonly"));
+ FtnchekItem::readFlagsToListView(portability_listview, &list);
+}
+
+
+void FtnchekConfigWidget::storeConfig()
+{
+ DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/division", division_box->isChecked());
+ DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/extern", extern_box->isChecked());
+ DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/declare", declare_box->isChecked());
+ DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/pure", pure_box->isChecked());
+
+ DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/argumentsall", argumentsall_button->isChecked());
+ DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/commonall", commonall_button->isChecked());
+ DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/truncationall", truncationall_button->isChecked());
+ DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/usageall", usageall_button->isChecked());
+ DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/f77all", f77all_button->isChecked());
+ DomUtil::writeBoolEntry(dom, "/kdevfortransupport/ftnchek/portabilityall", portabilityall_button->isChecked());
+
+ QStringList list;
+
+ FtnchekItem::writeFlagsFromListView(arguments_listview, &list);
+ DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/argumentsonly", list.join(","));
+ FtnchekItem::writeFlagsFromListView(common_listview, &list);
+ DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/commononly", list.join(","));
+ FtnchekItem::writeFlagsFromListView(truncation_listview, &list);
+ DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/truncationonly", list.join(","));
+ FtnchekItem::writeFlagsFromListView(usage_listview, &list);
+ DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/usageonly", list.join(","));
+ FtnchekItem::writeFlagsFromListView(f77_listview, &list);
+ DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/f77only", list.join(","));
+ FtnchekItem::writeFlagsFromListView(portability_listview, &list);
+ DomUtil::writeEntry(dom, "/kdevfortransupport/ftnchek/portabilityonly", list.join(","));
+}
+
+#include "ftnchekconfigwidget.moc"
diff --git a/languages/fortran/ftnchekconfigwidget.h b/languages/fortran/ftnchekconfigwidget.h
new file mode 100644
index 00000000..053b2598
--- /dev/null
+++ b/languages/fortran/ftnchekconfigwidget.h
@@ -0,0 +1,41 @@
+/***************************************************************************
+ * Copyright (C) 2001 by Bernd Gehrmann *
+ * bernd@kdevelop.org *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef _FTNCHEKCONFIGWIDGET_H_
+#define _FTNCHEKCONFIGWIDGET_H_
+
+#include <qdom.h>
+#include "ftnchekconfigwidgetbase.h"
+
+class QButtonGroup;
+
+class FtnchekConfigWidget : public FtnchekConfigWidgetBase
+{
+ Q_OBJECT
+
+public:
+ FtnchekConfigWidget(QDomDocument &projectDom, QWidget *parent, const char *name);
+ ~FtnchekConfigWidget();
+
+public slots:
+ void accept();
+
+private:
+ void readConfig();
+ void storeConfig();
+
+ QButtonGroup *arguments_group, *common_group;
+ QButtonGroup *truncation_group, *usage_group;
+ QButtonGroup *f77_group, *portability_group;
+ QDomDocument dom;
+};
+
+#endif
diff --git a/languages/fortran/ftnchekconfigwidgetbase.ui b/languages/fortran/ftnchekconfigwidgetbase.ui
new file mode 100644
index 00000000..b6bb2184
--- /dev/null
+++ b/languages/fortran/ftnchekconfigwidgetbase.ui
@@ -0,0 +1,584 @@
+<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
+<class>FtnchekConfigWidgetBase</class>
+<widget class="QWidget">
+ <property name="name">
+ <cstring>ftcheck_config_widget</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>798</width>
+ <height>507</height>
+ </rect>
+ </property>
+ <property name="caption">
+ <string>Ftnchek Options</string>
+ </property>
+ <vbox>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <property name="margin">
+ <number>0</number>
+ </property>
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <widget class="QTabWidget">
+ <property name="name">
+ <cstring>TabWidget4</cstring>
+ </property>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;1</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QCheckBox" row="0" column="2">
+ <property name="name">
+ <cstring>extern_box</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;External subprograms without definition</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="2">
+ <property name="name">
+ <cstring>division_box</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Divisions</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="0" column="0">
+ <property name="name">
+ <cstring>declare_box</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Identifiers without explicit type</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" row="1" column="0">
+ <property name="name">
+ <cstring>pure_box</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Assume functions have no side effects</string>
+ </property>
+ </widget>
+ <spacer row="2" column="0">
+ <property name="name">
+ <cstring>Spacer2_3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="3" column="0">
+ <property name="name">
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property name="text">
+ <string>Ar&amp;guments:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>argumentsall_button</cstring>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="4" column="0">
+ <property name="name">
+ <cstring>argumentsall_button</cstring>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="5" column="0">
+ <property name="name">
+ <cstring>argumentsonly_button</cstring>
+ </property>
+ <property name="text">
+ <string>Only the following:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="6" column="1">
+ <property name="name">
+ <cstring>Spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="2" column="2">
+ <property name="name">
+ <cstring>Spacer3</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QRadioButton" row="4" column="2">
+ <property name="name">
+ <cstring>commonall_button</cstring>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="5" column="2">
+ <property name="name">
+ <cstring>commononly_button</cstring>
+ </property>
+ <property name="text">
+ <string>Only the following:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QListView" row="6" column="0">
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>arguments_listview</cstring>
+ </property>
+ <property name="resizeMode">
+ <enum>NoColumn</enum>
+ </property>
+ </widget>
+ <widget class="QListView" row="6" column="2">
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>common_listview</cstring>
+ </property>
+ <property name="resizeMode">
+ <enum>NoColumn</enum>
+ </property>
+ </widget>
+ <widget class="QLabel" row="3" column="2">
+ <property name="name">
+ <cstring>TextLabel2</cstring>
+ </property>
+ <property name="text">
+ <string>Common &amp;blocks:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>commonall_button</cstring>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;2</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="2" column="0">
+ <property name="name">
+ <cstring>truncationonly_button</cstring>
+ </property>
+ <property name="text">
+ <string>Only the following:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel4</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Truncation and roundoff errors:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>truncationall_button</cstring>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="0">
+ <property name="name">
+ <cstring>truncationall_button</cstring>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="2">
+ <property name="name">
+ <cstring>TextLabel3</cstring>
+ </property>
+ <property name="text">
+ <string>&amp;Use of variables:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>usageall_button</cstring>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="2">
+ <property name="name">
+ <cstring>usageall_button</cstring>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ </widget>
+ <widget class="QListView" row="3" column="0">
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>truncation_listview</cstring>
+ </property>
+ <property name="resizeMode">
+ <enum>NoColumn</enum>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="2" column="2">
+ <property name="name">
+ <cstring>usageonly_button</cstring>
+ </property>
+ <property name="text">
+ <string>Only the following:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>Spacer1_2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QListView" row="3" column="2">
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>usage_listview</cstring>
+ </property>
+ <property name="resizeMode">
+ <enum>NoColumn</enum>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="QWidget">
+ <property name="name">
+ <cstring>tab</cstring>
+ </property>
+ <attribute name="title">
+ <string>&amp;3</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="QRadioButton" row="1" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>f77all_button</cstring>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="2" column="0" rowspan="1" colspan="2">
+ <property name="name">
+ <cstring>f77only_button</cstring>
+ </property>
+ <property name="text">
+ <string>Only the following:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ <widget class="QListView" row="3" column="0">
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>f77_listview</cstring>
+ </property>
+ <property name="resizeMode">
+ <enum>NoColumn</enum>
+ </property>
+ </widget>
+ <widget class="QListView" row="3" column="2">
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="clickable">
+ <bool>true</bool>
+ </property>
+ <property name="resizable">
+ <bool>true</bool>
+ </property>
+ </column>
+ <property name="name">
+ <cstring>portability_listview</cstring>
+ </property>
+ <property name="resizeMode">
+ <enum>NoColumn</enum>
+ </property>
+ </widget>
+ <spacer row="3" column="1">
+ <property name="name">
+ <cstring>Spacer2</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Preferred</enum>
+ </property>
+ <property name="sizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget class="QLabel" row="0" column="0">
+ <property name="name">
+ <cstring>TextLabel4_2</cstring>
+ </property>
+ <property name="text">
+ <string>Fortran 77 language &amp;extensions:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>f77all_button</cstring>
+ </property>
+ </widget>
+ <widget class="QLabel" row="0" column="2">
+ <property name="name">
+ <cstring>TextLabel3_2</cstring>
+ </property>
+ <property name="text">
+ <string>Other &amp;portability warnings:</string>
+ </property>
+ <property name="buddy" stdset="0">
+ <cstring>portabilityall_button</cstring>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="1" column="2">
+ <property name="name">
+ <cstring>portabilityall_button</cstring>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ </widget>
+ <widget class="QRadioButton" row="2" column="2">
+ <property name="name">
+ <cstring>portabilityonly_button</cstring>
+ </property>
+ <property name="text">
+ <string>Only the following:</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ </widget>
+ </vbox>
+</widget>
+<tabstops>
+ <tabstop>declare_box</tabstop>
+ <tabstop>pure_box</tabstop>
+ <tabstop>extern_box</tabstop>
+ <tabstop>division_box</tabstop>
+ <tabstop>argumentsall_button</tabstop>
+ <tabstop>argumentsonly_button</tabstop>
+ <tabstop>arguments_listview</tabstop>
+ <tabstop>commonall_button</tabstop>
+ <tabstop>commononly_button</tabstop>
+ <tabstop>common_listview</tabstop>
+ <tabstop>TabWidget4</tabstop>
+ <tabstop>truncationall_button</tabstop>
+ <tabstop>truncationonly_button</tabstop>
+ <tabstop>truncation_listview</tabstop>
+ <tabstop>usageall_button</tabstop>
+ <tabstop>usageonly_button</tabstop>
+ <tabstop>usage_listview</tabstop>
+ <tabstop>f77all_button</tabstop>
+ <tabstop>f77only_button</tabstop>
+ <tabstop>f77_listview</tabstop>
+ <tabstop>portabilityall_button</tabstop>
+ <tabstop>portabilityonly_button</tabstop>
+ <tabstop>portability_listview</tabstop>
+</tabstops>
+<includes>
+ <include location="global" impldecl="in implementation">kdialog.h</include>
+</includes>
+<layoutdefaults spacing="6" margin="11"/>
+<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+</UI>
diff --git a/languages/fortran/kdevfortransupport.desktop b/languages/fortran/kdevfortransupport.desktop
new file mode 100644
index 00000000..ad4f8185
--- /dev/null
+++ b/languages/fortran/kdevfortransupport.desktop
@@ -0,0 +1,80 @@
+[Desktop Entry]
+Type=Service
+Exec=blubb
+Comment=Fortran 77 Support
+Comment[ca]=Suport per a Fortran 77
+Comment[da]=Fortran 77 understøttelse
+Comment[de]=Unterstützung für Fortran 77 für KDevelop
+Comment[el]=Υποστήριξη Fortran 77
+Comment[es]=Soporte para Fortran 77
+Comment[et]=Fortran 77 toetus
+Comment[eu]=Fortran 77 euskarria
+Comment[fa]=پشتیبانی فرترن ۷۷
+Comment[fr]=Prise en charge du langage Fortran77
+Comment[ga]=Tacaíocht Fortran 77
+Comment[gl]=Soporte para Fortran 77
+Comment[hi]=फ़ोरट्रॉन 77 समर्थन
+Comment[hu]=Fortran 77-támogatás
+Comment[is]=Fortran 77 stuðningur
+Comment[it]=Supporto per Fortran 77
+Comment[ja]=Fortran 77 サポート
+Comment[nds]=Ünnerstütten för Fortran 77
+Comment[ne]=फोर्ट्रान ७७ समर्थन
+Comment[nl]=Ondersteuning voor Fortran 77
+Comment[pl]=Obsługa Fortrana 77
+Comment[pt]=Suporte a Fortran 77
+Comment[pt_BR]=Suporte ao Fortran 77
+Comment[ru]=Поддержка языка Fortran 77
+Comment[sk]=Fortran 77 podpora
+Comment[sl]=Podpora za Fortran 77
+Comment[sr]=Подршка за Fortran 77
+Comment[sr@Latn]=Podrška za Fortran 77
+Comment[sv]=Fortran 77-stöd
+Comment[ta]=பொர்ட்ரான் 77 ஆதரவு
+Comment[tg]=Ёрӣ намудани забони 77 Support
+Comment[tr]=Fortran 77 Desteği
+Comment[zh_CN]=Fortran 77 支持
+Comment[zh_TW]=Fortran 77 支援
+Name=KDevFortranSupport
+Name[da]=KDevelop Fortran77 understøttelse
+Name[nds]=Fortran-Ünnerstütten för KDevelop
+Name[pl]=KDevObsługaFortrana
+Name[sk]=KDev Fortran podpora
+Name[sv]=KDevelop Fortran-stöd
+Name[zh_TW]=KDevelop Fortran 支援
+GenericName=Fortran 77 Support
+GenericName[ca]=Suport per a Fortran 77
+GenericName[da]=Fortran 77 understøttelse
+GenericName[de]=Unterstützung für Fortran 77
+GenericName[el]=Υποστήριξη Fortran 77
+GenericName[es]=Soporte para Fortran 77
+GenericName[et]=Fortran 77 toetus
+GenericName[eu]=Fortran 77 euskarria
+GenericName[fa]=پشتیبانی فرترن ۷۷
+GenericName[fr]=Prise en charge du langage Fortran 77
+GenericName[ga]=Tacaíocht Fortran 77
+GenericName[gl]=Soporte para Fortran 77
+GenericName[hi]=फ़ोरट्रॉन 77 समर्थन
+GenericName[hu]=Fortran 77-támogatás
+GenericName[it]=Supporto Fortran 77
+GenericName[ja]=Fortran 77 サポート
+GenericName[nds]=Ünnerstütten för Fortran-77
+GenericName[ne]=फोर्ट्रान ७७ समर्थन
+GenericName[nl]=Ondersteuning voor Fortran 77
+GenericName[pl]=Obsługa Fortrana 77
+GenericName[pt]=Suporte a Fortran 77
+GenericName[pt_BR]=Suporte ao Fortran 77
+GenericName[ru]=Поддержка языка Fortran 77
+GenericName[sk]=Fortran 77 podpora
+GenericName[sl]=Podpora za Fortran 77
+GenericName[sr]=Подршка за Fortran 77
+GenericName[sr@Latn]=Podrška za Fortran 77
+GenericName[sv]=Fortran 77-stöd
+GenericName[tg]=Ёрӣ намудани забони 77 Support
+GenericName[tr]=Fortran 77 Desteği
+GenericName[zh_CN]=Fortran 77 支持
+GenericName[zh_TW]=Fortran 77 支援
+ServiceTypes=KDevelop/LanguageSupport
+X-KDE-Library=libkdevfortransupport
+X-KDevelop-Version=5
+X-KDevelop-Language=Fortran77
diff --git a/languages/fortran/kdevfortransupport.rc b/languages/fortran/kdevfortransupport.rc
new file mode 100644
index 00000000..40e3f80a
--- /dev/null
+++ b/languages/fortran/kdevfortransupport.rc
@@ -0,0 +1,9 @@
+<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
+<kpartgui name="KDevFortranSupport" version="1">
+<MenuBar>
+ <Menu name="build" >
+ <Action name="project_ftnchek" />
+ </Menu>
+</MenuBar>
+</kpartgui>
+