From: Florian Brosch Date: Wed, 24 Dec 2008 13:00:07 +0000 (+0000) Subject: minor fixes X-Git-Tag: 0.37.1~3^2~609 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9114923c74be3254a520da58fb734aa6142f2546;p=thirdparty%2Fvala.git minor fixes minor fixes svn path=/trunk/; revision=25 --- diff --git a/src/doclets/devhelp/doclet/template.vala b/src/doclets/devhelp/doclet/template.vala index f83f2e00e..efe9bd789 100644 --- a/src/doclets/devhelp/doclet/template.vala +++ b/src/doclets/devhelp/doclet/template.vala @@ -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 + "/"; diff --git a/src/doclets/html/doclet/template.vala b/src/doclets/html/doclet/template.vala index 803715507..90d79b5f0 100644 --- a/src/doclets/html/doclet/template.vala +++ b/src/doclets/html/doclet/template.vala @@ -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 files = new Gee.ArrayList (); 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 ); diff --git a/src/doclets/valadoc.org/doclet/template.vala b/src/doclets/valadoc.org/doclet/template.vala index 42eab817b..50307ebab 100644 --- a/src/doclets/valadoc.org/doclet/template.vala +++ b/src/doclets/valadoc.org/doclet/template.vala @@ -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 () ); diff --git a/src/libvaladoc/parser.vala b/src/libvaladoc/parser.vala index 97cd011a2..cd5f410df 100644 --- a/src/libvaladoc/parser.vala +++ b/src/libvaladoc/parser.vala @@ -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 (); diff --git a/src/valadoc/Makefile.am b/src/valadoc/Makefile.am index 6b9c94117..b04feb249 100644 --- a/src/valadoc/Makefile.am +++ b/src/valadoc/Makefile.am @@ -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 + diff --git a/src/valadoc/valadoc.vala b/src/valadoc/valadoc.vala index 717d543d7..aba5ef08c 100755 --- a/src/valadoc/valadoc.vala +++ b/src/valadoc/valadoc.vala @@ -91,30 +91,6 @@ public class ValaDoc : Object { } } - // remove - private Gee.ArrayList sort_sources ( ) { - var to_doc = new Gee.ArrayList(); - - 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 );