]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
minor fixes
authorFlorian Brosch <flobrosch@src.gnome.org>
Wed, 24 Dec 2008 13:00:07 +0000 (13:00 +0000)
committerFlorian Brosch <flobrosch@src.gnome.org>
Wed, 24 Dec 2008 13:00:07 +0000 (13:00 +0000)
minor fixes

svn path=/trunk/; revision=25

src/doclets/devhelp/doclet/template.vala
src/doclets/html/doclet/template.vala
src/doclets/valadoc.org/doclet/template.vala
src/libvaladoc/parser.vala
src/valadoc/Makefile.am
src/valadoc/valadoc.vala

index f83f2e00e57e28b0a9954b066bb03a5160b891f6..efe9bd78921e5a0f8c8242aedb2d706e1a3cc682 100644 (file)
@@ -185,10 +185,6 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.HtmlHelper {
                this.devhelp = new DevhelpFormat ( settings.pkg_name, "" );
        }
 
-       private string vala_file_package_name;
-       private bool visited_non_package = false;
-
-
        public override void visit_package ( Package file ) {
                string pkg_name = file.name;
                string path = this.settings.get_real_path () + pkg_name + "/";
index 80371550753d2c4b2fb805e973df5a22a254310f..90d79b5f0431115e5e84f39becc53ab845f90d8a 100644 (file)
@@ -70,7 +70,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
        }
 
 
-
+/*
        private string get_full_path ( Basic element ) {
                if ( element.name == null )
                        return "";
@@ -95,7 +95,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
                str.append_unichar ( '/' );
                return str.str;
        }
-
+*/
        public Valadoc.Settings settings {
                construct set;
                protected get;
@@ -104,7 +104,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
        public override void initialisation ( Settings settings ) {
                this.settings = settings;
 
-               var rt = DirUtils.create ( this.settings.path, 0777 );
+               DirUtils.create ( this.settings.path, 0777 );
                this.langlet = new Valadoc.LangletIndex ( settings );
        }
 
@@ -135,7 +135,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
                this.current_path = this.settings.path + this.package_name + "/";
 
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
                GLib.FileStream sfile = GLib.FileStream.open ( this.current_path + "index.html", "w" );
                this.write_file_header ( sfile, this.get_css_link ( ), file.name );
                this.write_navi_file ( sfile, file, file );
@@ -148,7 +148,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
                this.current_path = null;
        }
 
-
+/*
        private bool is_depency ( string dep ) {
                foreach ( string file in this.settings.files ) {
                        if ( dep == file )
@@ -156,7 +156,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
                }
                return true;
        }
-
+*/
        private Gee.ArrayList<Package> files = new Gee.ArrayList<Package> ();
        private Package source_package;
 
@@ -194,7 +194,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
        public override void visit_property ( Property prop ) {
                string path = this.current_path + prop.name + "/";
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
                this.directory_level++;
 
                GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
@@ -210,7 +210,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
        public override void visit_constant ( Constant constant, ConstantHandler parent ) {
                string path = this.current_path + constant.name + "/";
 
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
                this.directory_level++;
                GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
                this.write_file_header ( file, this.get_css_link ( ), constant.name );
@@ -223,7 +223,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
        public override void visit_field ( Field field, FieldHandler parent ) {
                string path = this.current_path + field.name + "/";
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
                this.directory_level++;
                GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
                this.write_file_header ( file, this.get_css_link ( ), field.name );
@@ -236,7 +236,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
        public override void visit_delegate ( Delegate del ) {
                string path = this.current_path + del.name + "/";
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
 
                this.directory_level++;
                GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
@@ -252,7 +252,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
                string path = this.current_path + sig.name + "/";
                this.directory_level++;
 
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
 
                GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
                this.write_file_header ( file, this.get_css_link ( ), sig.name );
@@ -266,7 +266,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
        public override void visit_method ( Method m, Valadoc.MethodHandler parent ) {
                string path = this.current_path + m.name + "/";
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
 
                this.directory_level++;
                GLib.FileStream file = GLib.FileStream.open ( path + "index.html", "w");
@@ -292,7 +292,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
                        this.current_path = tmp;
                }
 
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
                GLib.FileStream file = GLib.FileStream.open ( this.current_path + "index.html", "w" );
                this.write_file_header ( file, this.get_css_link ( ), ns.name );
                this.write_navi_namespace ( file, ns );
@@ -321,7 +321,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
                this.directory_level++;
 
                this.current_path += en.name + "/";
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
 
                en.visit_enum_values ( this );
                en.visit_methods ( this );
@@ -342,7 +342,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
                this.directory_level++;
 
                this.current_path += errdom.name + "/";
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
 
                errdom.visit_methods ( this );
 
@@ -362,7 +362,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
                this.directory_level++;
 
                this.current_path += stru.name + "/";
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
 
                stru.visit_construction_methods ( this );
                stru.visit_methods ( this );
@@ -385,7 +385,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
                this.directory_level++;
 
                this.current_path += cl.name + "/";
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
 
                cl.visit_construction_methods ( this );
                cl.visit_classes ( this );
@@ -414,7 +414,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
                this.directory_level++;
 
                this.current_path += iface.name + "/";
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
 
                iface.visit_classes ( this );
                iface.visit_structs ( this );
index 42eab817b1c016e3225a80ee32af76fc5acff4bb..50307ebabf7b5f8866ab0c9109ce762c439d2d5b 100644 (file)
@@ -91,7 +91,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
        public override void initialisation ( Settings settings ) {
                this.settings = settings;
 
-               var rt = DirUtils.create ( this.settings.path, 0777 );
+               DirUtils.create ( this.settings.path, 0777 );
                this.langlet = new Valadoc.LangletIndex ( settings );
        }
 
@@ -109,7 +109,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
                string new_path = this.settings.path + package_name + "/";
 
-               var rt = DirUtils.create ( new_path, 0777 );
+               DirUtils.create ( new_path, 0777 );
 
                GLib.FileStream nav = GLib.FileStream.open ( new_path + "navi.html", "w" );
                this.write_navi_file ( nav, file, file );
@@ -137,7 +137,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
                        this.current_path = tmp;
                }
 
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
 
                GLib.FileStream navi = GLib.FileStream.open ( this.current_path + "navi.html", "w" );
                this.write_navi_namespace ( navi, ns );
@@ -165,7 +165,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
        public override void visit_interface ( Interface iface ) {
                string old_path = this.current_path;
                this.current_path += iface.name + "/";
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
 
                iface.visit_classes ( this );
                iface.visit_structs ( this );
@@ -193,7 +193,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
        public override void visit_class ( Class cl ) {
                string old_path = this.current_path;
                this.current_path += cl.name + "/";
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
 
                cl.visit_construction_methods ( this );
                cl.visit_classes ( this );
@@ -224,7 +224,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
        public override void visit_struct ( Struct stru ) {
                string old_path = this.current_path;
                this.current_path += stru.name + "/";
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
 
                stru.visit_construction_methods ( this );
                stru.visit_methods ( this );
@@ -252,7 +252,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
        public override void visit_error_domain ( ErrorDomain errdom ) {
                string old_path = this.current_path;
                this.current_path += errdom.name + "/";
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
 
                errdom.visit_methods ( this );
 
@@ -274,7 +274,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
        public override void visit_enum ( Enum en ) {
                string old_path = this.current_path;
                this.current_path += en.name + "/";
-               var rt = DirUtils.create ( this.current_path, 0777 );
+               DirUtils.create ( this.current_path, 0777 );
 
                en.visit_enum_values ( this );
                en.visit_methods ( this );
@@ -296,7 +296,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
        public override void visit_property ( Property prop ) {
                string path = this.current_path + prop.name + "/";
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
 
                GLib.FileStream cname = GLib.FileStream.open ( path + "cname", "w" );
                if ( prop.parent is Class ) {
@@ -318,7 +318,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
        public override void visit_constant ( Constant constant, ConstantHandler parent ) {
                string path = this.current_path + constant.name + "/";
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
 
                GLib.FileStream navi = GLib.FileStream.open ( path + "navi.html", "w" );
                this.write_navi_constant ( navi, constant );
@@ -331,7 +331,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
        public override void visit_field ( Field field, FieldHandler parent ) {
                string path = this.current_path + field.name + "/";
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
 
                GLib.FileStream cname = GLib.FileStream.open ( path + "cname", "w" );
                if ( field.parent is Class ) {
@@ -365,7 +365,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
        public override void visit_delegate ( Delegate del ) {
                string path = this.current_path + del.name + "/";
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
 
                GLib.FileStream cname = GLib.FileStream.open ( path + "cname", "w" );
                cname.puts ( del.get_cname() );
@@ -382,7 +382,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
        public override void visit_signal ( Signal sig ) {
                string path = this.current_path + sig.name + "/";
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
 
                GLib.FileStream cname = GLib.FileStream.open ( path + "cname", "w" );
                if ( sig.parent is Class ) {
@@ -404,8 +404,7 @@ public class Valadoc.HtmlDoclet : Valadoc.BasicHtmlDoclet, Valadoc.LinkHelper {
 
        public override void visit_method ( Method m, Valadoc.MethodHandler parent ) {
                string path = this.current_path + m.name + "/";
-               string full_name = m.full_name ();
-               var rt = DirUtils.create ( path, 0777 );
+               DirUtils.create ( path, 0777 );
 
                GLib.FileStream cname = GLib.FileStream.open ( path + "cname", "w" );
                cname.puts ( m.get_cname () );
index 97cd011a210eb09dc87fd1c468f45291adf1a2f5..cd5f410df0988fd090d239b804fc68687cfd92e7 100644 (file)
@@ -970,7 +970,6 @@ public class Parser {
 
        private bool parse_cell_attribute ( ref TextPosition pos, ref TextVerticalPosition hpos, ref int size, ref int dsize ) {
                weak string str = this.str.offset ( this.pos );
-               int startpos = this.pos;
 
                if ( str.has_prefix ( ")(" ) ) {
                        pos = TextPosition.CENTER;
@@ -1181,7 +1180,6 @@ public class Parser {
                                        return ;
                                }
                                this.skip_newline ();
-                               int reallinestartpos = this.pos;
                                this.next_nonspace_char ();
                                switch ( str[pos+1] ) {
                                case '\n':
@@ -1511,7 +1509,6 @@ public class Parser {
                                }
                                break;
                        case '\n':
-                               int linepos = this.pos;
                                this.skip_newline ();
                                this.next_nonspace_char ();
 
index 6b9c94117c9abdc9407a6296481784c1190d2c84..b04feb2490f1f680863dea8b2fa0d9e2e2c3fd77 100644 (file)
@@ -1,16 +1,48 @@
+# src/Makefile.am
+
 NULL =
 
-vapidir = $(datadir)/vala/vapi
 
-valadoc-1.0.vapi: ../libvaladoc/valadoc-1.0.vapi
-       cat ../libvaladoc/valadoc-1.0.vapi > valadoc-1.0.vapi
+AM_CFLAGS =                             \
+       -DPACKAGE_DATADIR=\"$(libdir)/valadoc/plugins/\" \
+       -DPACKAGE_VERSION=\"$(VERSION)\"    \
+       -I ../libvaladoc/                   \
+       $(GLIB_CFLAGS)                      \
+       $(LIBVALA_CFLAGS)                   \
+       $(GMODULE_CFLAGS)                   \
+       $(LIBGVC_CFLAGS)                    \
+       $(NULL)
+
+
+
+
+bin_PROGRAMS = valadoc
 
-dist_vapi_DATA =     \
-       valadoc-1.0.vapi \
-       valadoc-1.0.deps \
+BUILT_SOURCES = valadoc.vala.stamp
+
+valadoc_VALASOURCES = \
+       valadoc.vala      \
+    $(NULL)
+
+
+valadoc_SOURCES = \
+       $(valadoc_VALASOURCES:.vala=.c) \
+       $(valadoc_VALASOURCES:.vala=.h) \
        $(NULL)
 
-dist_noinst_DATA = \
+
+valadoc_LDADD =                 \
+       ../libvaladoc/libvaladoc.la \
+       $(GLIB_LIBS)                \
+       $(LIBVALA_LIBS)             \
+       $(GMODULE_LIBS)             \
+       $(LIBGVC_LIBS)              \
        $(NULL)
 
 
+valadoc.vala.stamp: $(libvaladoc_VALASOURCES)
+       $(VALAC) -C --pkg gmodule-2.0 --pkg config --vapidir ../vapi --pkg valadoc-1.0 --basedir $(top_srcdir)/src/valadoc/ valadoc.vala --disable-non-null --save-temps $^
+       touch $@
+
+EXTRA_DIST = $(valadoc_VALASOURCES)  valadoc.vala.stamp 
+
index 717d543d78163364cb0654b13258897005c513ce..aba5ef08c4576af36ad1ca84098cc3a8a1e099bd 100755 (executable)
@@ -91,30 +91,6 @@ public class ValaDoc : Object {
                }
        }
 
-       // remove
-       private Gee.ArrayList<string> sort_sources ( ) {
-               var to_doc = new Gee.ArrayList<string>();
-
-               if ( tsources != null ) {
-                       foreach ( string str in this.tsources ) {
-                               string rpath = realpath ( str );
-                               if ( str.has_suffix ( ".vala" ) || str.has_suffix ( ".gs" ) )
-                                       this.sources.add ( str );
-                               else
-                                       this.packages.add ( str );
-
-                               to_doc.add ( rpath );
-                       }
-               }
-
-               if ( tpackages != null ) {
-                       foreach ( string str in this.tpackages ) {
-                               this.packages.add ( str );
-                       }
-               }
-
-               return to_doc;
-       }
 /*
        private bool check_doclet_structure ( string realpath ) {
                bool tmp = FileUtils.test ( realpath, FileTest.IS_DIR );