bin/dde_main in dde-0.2.9 vs bin/dde_main in dde-0.2.11

- old
+ new

@@ -1,33 +1,33 @@ -#!/usr/bin/env ruby - -lib = File.join(File.dirname(__FILE__), '..', 'lib') -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include? lib - -require 'dde' -require 'win/gui/message' - -include Win::DDE -include Win::GUI::Message - -# console output redirection (may need to wrap it in synchronization code, etc) -def cout *args - print *args -end - -# std::queue<XlTable> q; // Queue contains the tables to output - -# Creating DDE server and staring service with default name 'excel' and default callback -cout "Starting DDE server with service 'excel'\n" -server = DDE::XlServer.new.start_service - -# Command line args define actions to be run after each successful DDE data transaction -server.actions = ARGV.empty? ? [:timer] : ARGV - -# Starting message loop (necessary for DDE message processing) -cout "Starting DDE message loop\n" - -msg = Msg.new # pointer to Msg FFI struct -while msg = get_message(msg) - translate_message(msg); - dispatch_message(msg); +#!/usr/bin/env ruby + +lib = File.join(File.dirname(__FILE__), '..', 'lib') +$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include? lib + +require 'dde' +require 'win/gui/message' + +include Win::Dde +include Win::GUI::Message + +# console output redirection (may need to wrap it in synchronization code, etc) +def cout *args + print *args +end + +# std::queue<XlTable> q; // Queue contains the tables to output + +# Creating DDE server and staring service with default name 'excel' and default callback +cout "Starting DDE server with service 'excel'\n" +server = Dde::XlServer.new.start_service + +# Command line args define actions to be run after each successful DDE data transaction +server.actions = ARGV.empty? ? [:timer] : ARGV + +# Starting message loop (necessary for DDE message processing) +cout "Starting DDE message loop\n" + +msg = Msg.new # pointer to Msg FFI struct +while msg = get_message(msg) + translate_message(msg); + dispatch_message(msg); end \ No newline at end of file