From 91c0003b158e5f0ed9d0677fb136ae8bb6f86ec5 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Mon, 28 Apr 2008 18:10:15 +0000 Subject: this is an old gridflow, and there's already a svn repository at http://gridflow.ca/svn/trunk svn path=/trunk/; revision=9739 --- externals/gridflow/base/main.rb | 384 ---------------------------------------- 1 file changed, 384 deletions(-) delete mode 100644 externals/gridflow/base/main.rb (limited to 'externals/gridflow/base/main.rb') diff --git a/externals/gridflow/base/main.rb b/externals/gridflow/base/main.rb deleted file mode 100644 index 5b33bfad..00000000 --- a/externals/gridflow/base/main.rb +++ /dev/null @@ -1,384 +0,0 @@ -=begin - $Id: main.rb,v 1.2 2006-03-15 04:37:28 matju Exp $ - - GridFlow - Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard - - 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. - - See file ../COPYING for further informations on licensing terms. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -=end - -# ENV["RUBY_VERBOSE_GC"]="yes" - -# this file gets loaded by main.c upon startup -# module GridFlow is supposed to be created by main.c -# this includes GridFlow.post_string(s) - -# because Ruby1.6 has no #object_id and Ruby1.8 warns on #id -unless Object.instance_methods(true).include? "object_id" - class Object; alias object_id id end -end - -# in case of bug in Ruby ("Error: Success") -module Errno; class E000 < StandardError; end; end - -#$post_log = File.open "/tmp/gridflow.log", "w" -$post_log = nil - -class Array - def split(elem) - r=[] - j=0 - for i in 0...length - (r<" else super end - end - def initialize(*argv) - s = GridFlow.stringify_list argv - @argv = argv - @args = "[" - @args << (self.class.foreign_name || self.to_s) - @args << " " if s.length>0 - @args << s << "]" - @parent_patcher = nil - @properties = {} - @init_messages = [] - end -end - -class FPatcher < FObject - class << self - attr_reader :fobjects - attr_reader :wires - end - def initialize(*) - super - fobjects = self.class.fobjects - wires = self.class.wires - @fobjects = fobjects.map {|x| if String===x then FObject[x] else x.call end } - @inlets = [] - @ninlets = self.class.ninlets or raise "oops" - i=0 - @fobjects << self - while i e - STDERR.puts "#{e.class}: #{e}" - STDERR.puts e.backtrace -end - -def GridFlow.load_user_config - require "gridflow/bridge/puredata.rb" if GridFlow.bridge_name == "puredata" - 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 - -require "gridflow/base/flow_objects.rb" -require "gridflow/format/main.rb" - -%w( - # #for #finished #type #dim #transpose #perspective #store #outer - #grade #redim #import #export #export_list #cast - #scale_by #downscale_by #draw_polygon #draw_image #layer - #print #pack #export_symbol #rotate - #in #out -).each {|k| - GridFlow::FObject.name_lookup(k).add_creator k.gsub(/#/,"@") -} - -END { - GridFlow.fobjects.each {|k,v| k.delete if k.respond_to? :delete } - GridFlow.fobjects.clear - GC.start -} - -- cgit v1.2.1