[Gridflow-cvs] [svn] commit: r3540 - in /trunk: base/main.rb rubyext.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Tue Apr 15 22:21:53 EDT 2008


Author: matju
Date: Tue Apr 15 22:21:53 2008
New Revision: 3540

Log:
remove support for ~/.gridflow_startup and thus removed direct access to GridFlow.data_path

Modified:
    trunk/base/main.rb
    trunk/rubyext.c

Modified: trunk/base/main.rb
==============================================================================
--- trunk/base/main.rb (original)
+++ trunk/base/main.rb Tue Apr 15 22:21:53 2008
@@ -2,7 +2,6 @@
 def self.post(s,*a) post_string(sprintf(s,*a)) end
 class << self
 	attr_accessor :data_path
-	attr_reader :fobjects
 end
 @data_path=[GridFlow::DIR+"/images"]
 class ::Object; def FloatOrSymbol(x) Float(x) rescue x.intern end end
@@ -34,12 +33,3 @@
 	else s end
 end
 end # module GridFlow
-def GridFlow.load_user_config
-	user_config_file = ENV["HOME"] + "/.gridflow_startup"
-	begin
-		load user_config_file if File.exist? user_config_file
-	rescue Exception => e
-		GridFlow.post "#{e.class}: #{e}:\n" + e.backtrace.join("\n")
-		GridFlow.post "while loading ~/.gridflow_startup"
-	end
-end

Modified: trunk/rubyext.c
==============================================================================
--- trunk/rubyext.c (original)
+++ trunk/rubyext.c Tue Apr 15 22:21:53 2008
@@ -183,8 +183,6 @@
 static void BFProxy_method_missing   (BFProxy *self,  t_symbol *s, int argc, t_atom *argv) {
 	BFObject_method_missing(self->parent,self->id,s,argc,argv);
 }
-
-static Ruby GridFlow_s_handle_braces(Ruby rself, Ruby argv);
 
 int handle_braces(int ac, Ruby *av);
 
@@ -523,7 +521,9 @@
 	Ruby foo;
 	if (argc>1) {
 		foo = rb_ary_new4(argc,argv);
-		GridFlow_s_handle_braces(0,foo);
+		try {
+		    handle_braces(rb_ary_len(foo),rb_ary_ptr(foo));
+		} catch (Barf *oozy) {rb_raise(rb_eArgError,"%s",oozy->text);}
 		argc = rb_ary_len(foo);
 		argv = rb_ary_ptr(foo);
 	}
@@ -680,14 +680,6 @@
 	return j;
 }
 
-static Ruby GridFlow_s_handle_braces(Ruby rself, Ruby args) {
-    try {
-	int argc = handle_braces(rb_ary_len(args),rb_ary_ptr(args));
-	while (rb_ary_len(args)>argc) rb_ary_pop(args);
-	return rself;
-    } catch (Barf *oozy) {rb_raise(rb_eArgError,"%s",oozy->text);}
-}
-
 \classinfo {}
 \end class
 
@@ -742,7 +734,6 @@
 #undef FOO
 	mGridFlow = EVAL("module GridFlow; CObject = ::Object; self end");
 	SDEF2("rdtsc",rdtsc,0);
-	SDEF2("handle_braces!",handle_braces,1);
 	SDEF2("post_string",post_string,1);
 	SDEF2("name_lookup",name_lookup,1);
 	rb_ivar_set(mGridFlow, SI(@fobjects), rb_hash_new());
@@ -774,7 +765,6 @@
 		"STDERR.puts \"can't load: #{$!}\nbacktrace: #{$!.backtrace.join\"\n\"}\n$:=#{$:.inspect}\"\n; false end")) return;
 	startup_format();
 	STARTUP_LIST()
-	EVAL("GridFlow.load_user_config");
 	delete[] dirresult;
 	delete[] dirname;
 	hack = clock_new((void*)0,(t_method)ruby_stack_end_hack);



More information about the Gridflow-cvs mailing list