Permalink
Browse files

added patches

  • Loading branch information...
1 parent ce3cc62 commit 05f0587209cd0658e1dbe6b3ed9c73698fb8fd99 @rafaelmartins committed Aug 1, 2010
@@ -0,0 +1,15 @@
+diff -Naur fixed-0.7.10/src/Array-f.cc fixed-0.7.10.new/src/Array-f.cc
+--- fixed-0.7.10/src/Array-f.cc 2009-06-07 06:45:16.000000000 -0400
++++ fixed-0.7.10.new/src/Array-f.cc 2009-10-03 07:24:14.000000000 -0400
+@@ -50,9 +50,9 @@
+ (arg (a) > arg (b))));
+ }
+
+-template class OCTAVE_FIXED_API Array<FixedPoint>;
++INSTANTIATE_ARRAY(FixedPoint, OCTAVE_FIXED_API);
+ template class MArray<FixedPoint>;
+-template class OCTAVE_FIXED_API Array<FixedPointComplex>;
++INSTANTIATE_ARRAY(FixedPointComplex, OCTAVE_FIXED_API);
+ template class MArray<FixedPointComplex>;
+
+ INSTANTIATE_MARRAY_FRIENDS (FixedPoint, )
@@ -0,0 +1,236 @@
+diff -Naur parallel-2.0.0/src/__bw_prcv__.cc parallel-2.0.0.new/src/__bw_prcv__.cc
+--- parallel-2.0.0/src/__bw_prcv__.cc 2009-05-08 09:17:57.000000000 -0400
++++ parallel-2.0.0.new/src/__bw_prcv__.cc 2009-10-04 07:25:32.000000000 -0400
+@@ -20,7 +20,7 @@
+ #include <octave/oct-stream.h>
+ #include <octave/oct-map.h>
+
+-DEFUN_DLD (__bw_prcv__, args, nargout, "prcv (pd)\n\
++DEFUN_DLD (__bw_prcv__, args, nargout, "__bw_prcv__ (pd)\n\
+ Reads one variable from pipe stream 'pd'.\n\
+ The variable must have been coded in Octaves binary format,\n\
+ including a header. This can be done by 'psend ()'.\n\
+@@ -29,8 +29,8 @@
+ call 'feof ()' afterwards. If EOF is met later in reading,\n\
+ it causes an error.\n\
+ Normally, a structure is returned with the variable under its name\n\
+-in a single field. With no output arguments, the variable is installed\n\
+-into memory.\n\
++in a single field. Originally, with no output arguments, the variable was\n\
++installed into memory, but this has been disabled.\n\
+ \n\
+ This function may change and is internal to the parallel package.\n")
+ {
+@@ -38,10 +38,10 @@
+ Octave_map retstruct;
+
+ if (args.length () != 1) {
+- error ("prcv: exactly one argument required\n");
++ error ("__bw_prcv__: exactly one argument required\n");
+ return retval;
+ }
+- octave_stream is = octave_stream_list::lookup (args(0), "prcv");
++ octave_stream is = octave_stream_list::lookup (args(0), "__bw_prcv__");
+ if (error_state) return retval;
+
+ if (is.is_open ()) {
+@@ -49,7 +49,7 @@
+ // 114: "r", 43: "+"
+ if (! strchr (mode.c_str (), 114) &&
+ ! strchr (mode.c_str (), 43)) {
+- error ("prcv: stream not readable\n");
++ error ("__bw_prcv__: stream not readable\n");
+ return retval;
+ }
+ #ifdef PATCHED_PIPE_CODE
+@@ -59,13 +59,13 @@
+
+ // 98: "b"
+ if (! strchr (mode.c_str (), 98)) {
+- error ("prcv: stream not binary\n");
++ error ("__bw_prcv__: stream not binary\n");
+ return retval;
+ }
+ #endif
+ }
+ else {
+- error ("prcv: stream not open\n");
++ error ("__bw_prcv__: stream not open\n");
+ return retval;
+ }
+
+@@ -100,50 +100,17 @@
+ // after the header exactly one variable is expected. This
+ // is mended by asking for EOF here.
+ if (ps.eof () || error_state || name.empty ()) {
+- error ("prcv: error in reading variable data\n");
++ error ("__bw_prcv__: error in reading variable data\n");
+ return retval;
+ }
+ if (! tc.is_defined ()) {
+ // What means this?
+- error ("prcv: error in reading variable\n");
++ error ("__bw_prcv__: error in reading variable\n");
+ return retval;
+ }
+
+- if (nargout == 1) {
+- retstruct.assign(name, tc);
+- retval = retstruct;
+- }
+- else {
+- // install_loaded_variable () is static ... here the
+- // code equivalent to
+- //
+- // install_loaded_variable (true, name, tc, global, doc);
+- //
+- // is duplicated (except one error check) ...
+-
+- symbol_record *lsr = curr_sym_tab->lookup (name);
+-
+- bool is_undefined = true;
+- bool is_variable = false;
+-
+- if (lsr) {
+- is_undefined = ! lsr->is_defined ();
+- is_variable = lsr->is_variable ();
+- }
+-
+- symbol_record *sr = 0;
++ retstruct.assign(name, tc);
++ retval = retstruct;
+
+- if (! global && (is_variable || is_undefined)) {
+- lsr = curr_sym_tab->lookup (name, true);
+- sr = lsr;
+- }
+- else {
+- lsr = curr_sym_tab->lookup (name, true);
+- link_to_global_variable (lsr);
+- sr = lsr;
+- }
+- sr->define (tc);
+- sr->document (doc);
+- }
+ return retval;
+ }
+diff -Naur parallel-2.0.0/src/__bw_psend__.cc parallel-2.0.0.new/src/__bw_psend__.cc
+--- parallel-2.0.0/src/__bw_psend__.cc 2009-05-08 09:17:57.000000000 -0400
++++ parallel-2.0.0.new/src/__bw_psend__.cc 2009-10-04 07:25:36.000000000 -0400
+@@ -19,72 +19,31 @@
+ #include <octave/ls-oct-binary.h>
+ #include <octave/oct-stream.h>
+
+-DEFUN_DLD (__bw_psend__, args, , "psend (pd, name[, value])\n\
+-Sends variable named in 'name' through pipe stream 'pd'.\n\
+-With 'value' given and having boolean value 'true', the\n\
+-contents of the second argument itself is sent under the name\n\
+-'psend_var'.\n\
++DEFUN_DLD (__bw_psend__, args, , "psend (pd, var)\n\
++The contents of 'var' is sent through the pipe stream 'pd'\n\
++under the name 'psend_var'.\n\
+ The variable is coded in Octaves binary format,\n\
+ a header is included. It can be read by 'prcv ()'.\n\
+ \n\
+ This function may change and is internal to the parallel package.\n")
+ {
+- std::string name;
+- std::string help;
+- int global;
+ octave_value retval;
+ octave_value tc;
+- bool contents;
+
+- if (args.length () == 2)
+- contents = false;
+- else if (args.length () == 3) {
+- if (! args(2).is_real_scalar ()) {
+- error ("psend: third variable, if given, must be a real scalar.\n");
+- return retval;
+- }
+- contents = args(2).scalar_value ();
+- } else {
+- error ("psend: two or three arguments required\n");
++ if (args.length () != 2) {
++ error ("__bw_psend__: two arguments required\n");
+ return retval;
+ }
+
+- if (contents) {
+- name = "psend_var";
+- tc = args(1);
+- help = "";
+- global = false;
+- }
+- else {
+- if (args(1).is_string ()) name = args(1).string_value ();
+- else {
+- error ("psend: if named variable is to be sent, second argument must be a string\n");
+- return retval;
+- }
+- symbol_record *var = curr_sym_tab->lookup (name);
+- if (! var) {
+- error ("psend: no such variable %s\n", name.c_str ());
+- return retval;
+- }
+- tc = var->def ();
+- help = var->help ();
+- global = var->is_linked_to_global ();
+- }
+- if (! tc.is_defined ()) {
+- // What means this?
+- error ("psend: variable not defined\n");
+- return retval;
+- }
+-
+- octave_stream os = octave_stream_list::lookup (args(0), "psend");
++ octave_stream os = octave_stream_list::lookup (args(0), "__bw_psend__");
+ if (error_state) {
+- error ("psend: no valid file id\n");
++ error ("__bw_psend__: no valid file id\n");
+ return retval;
+ }
+ if (os.is_open ()) {
+ std::string mode = os.mode_as_string (os.mode ());
+ if (mode == "r" || mode == "rb") {
+- error ("psend: stream not writable\n");
++ error ("__bw_psend__: stream not writable\n");
+ return retval;
+ }
+ #ifdef PATCHED_PIPE_CODE_15TH_JUNE_07
+@@ -94,20 +53,20 @@
+
+ // 98: "b"
+ if (! strchr (mode.c_str (), 98)) {
+- error ("psend: stream not binary\n");
++ error ("__bw_psend__: stream not binary\n");
+ return retval;
+ }
+ #endif
+ }
+ else {
+- error ("psend: stream not open\n");
++ error ("__bw_psend__: stream not open\n");
+ return retval;
+ }
+
+ std::ostream *tps = os.output_stream ();
+ std::ostream& ps = *tps;
+ write_header (ps, LS_BINARY);
+- save_binary_data (ps, tc, name, help, global, false);
++ save_binary_data (ps, args(1), "psend_var", "", false, false);
+
+ return retval;
+ }
+diff -Naur parallel-2.0.0/src/pserver.cc parallel-2.0.0.new/src/pserver.cc
+--- parallel-2.0.0/src/pserver.cc 2009-05-08 09:17:57.000000000 -0400
++++ parallel-2.0.0.new/src/pserver.cc 2009-10-04 07:25:27.000000000 -0400
+@@ -58,6 +58,8 @@
+ #include <setjmp.h>
+ #include <netinet/in.h>
+
++#include <iostream>
++
+ // SSIZE_MAX might be for 64-bit. Limit to 2^31-1
+ #define BUFF_SIZE 2147483647
+
@@ -0,0 +1,15 @@
+diff -Naur vrml-1.0.10/inst/vrml_DirectionalLight.m vrml-1.0.10.new/inst/vrml_DirectionalLight.m
+--- vrml-1.0.10/inst/vrml_DirectionalLight.m 2009-06-07 06:45:55.000000000 -0400
++++ vrml-1.0.10.new/inst/vrml_DirectionalLight.m 2009-11-05 22:57:13.453374208 -0500
+@@ -41,9 +41,8 @@
+ error (sprintf ("vrml_PointLight : unknown field '%s'",key));
+ end
+
+- body = [body,\
+- sprintf (" %-20s %s\n",key,
+- sprintf (getfield (tpl,key), val))];
++ ins = sprintf (" %-20s %s\n",key, sprintf (getfield (tpl,key), val));
++ body = [body, inst]
+ end
+ end
+ s = sprintf ("DirectionalLight { \n%s}\n", body);
@@ -0,0 +1,14 @@
+diff -Naur parallel-2.0.0/DESCRIPTION parallel-2.0.0.new/DESCRIPTION
+--- parallel-2.0.0/DESCRIPTION 2009-05-08 09:17:57.000000000 -0400
++++ parallel-2.0.0.new/DESCRIPTION 2009-10-04 10:41:06.000000000 -0400
+@@ -4,9 +4,7 @@
+ Author: Hayato Fujiwara and Olaf Till <olaf.till@uni-jena.de>
+ Maintainer: Hayato Fujiwara and Olaf Till <olaf.till@uni-jena.de>
+ Title: Parallel Computing.
+-Description: Parallel execution package for cluster computers. For
+- parallel execution on a single machine see e.g. function parcellfun
+- (author: Jaroslav Hajek) in package general.
++Description: Parallel execution package for cluster computers. For parallel execution on a single machine see e.g. function parcellfun (author Jaroslav Hajek) in package general.
+ Depends: octave (>= 3.0.0)
+ Autoload: yes
+ License: GPL, see individual files for GPL version
@@ -0,0 +1,22 @@
+diff -Naur parallel-2.0.0/src/pserver.cc parallel-2.0.0.new/src/pserver.cc
+--- parallel-2.0.0/src/pserver.cc 2009-05-08 09:17:57.000000000 -0400
++++ parallel-2.0.0.new/src/pserver.cc 2009-12-10 21:48:02.000000000 -0500
+@@ -61,8 +61,6 @@
+ // SSIZE_MAX might be for 64-bit. Limit to 2^31-1
+ #define BUFF_SIZE 2147483647
+
+-static bool quitting_gracefully = false;
+-
+ // Handle server SIGTERM SIGQUIT
+
+ static RETSIGTYPE
+@@ -99,7 +97,8 @@
+ do_octave_atexit_server (void)
+ {
+ static bool deja_vu = false;
+-
++ extern bool quitting_gracefully;
++
+ while (! octave_atexit_functions.empty ())
+ {
+ std::string fcn = octave_atexit_functions.top ();

0 comments on commit 05f0587

Please sign in to comment.