set_empty_args
author Michael Goffioul <michael.goffioul@gmail.com>
Sun Aug 31 15:15:08 2008 +0200 (2008-08-31)
changeset 46 9d2c6e36870f
permissions -rw-r--r--
Fix "set" call with empty arguments.
michael@46
     1
Do not call "set" with empty arguments
michael@46
     2
michael@46
     3
diff -r c32085bb3ff6 scripts/ChangeLog
michael@46
     4
--- a/scripts/ChangeLog	Sun Aug 31 12:13:02 2008 +0200
michael@46
     5
+++ b/scripts/ChangeLog	Sun Aug 31 15:13:59 2008 +0200
michael@46
     6
@@ -1,3 +1,9 @@
michael@46
     7
+2008-08-31  Michael Goffioul  <michael.goffioul@gmail.com>
michael@46
     8
+
michael@46
     9
+	* plot/__plt2mm__.m, plot/__plt2mv__.m, plot/__plt2ss__.m,
michael@46
    10
+	plot/__plt2sv__.m, plot/__plt2vm__.m, plot/__plt2vs__.m,
michael@46
    11
+	plot/__plt2vv__.m: Do not call "set" with empty arguments.
michael@46
    12
+
michael@46
    13
 2008-08-29  David Bateman  <dbateman@free.fr>
michael@46
    14
 
michael@46
    15
 	* plot/__plt2mm__.m, plot/__plt2mv__.m, plot/__plt2ss__.m,
michael@46
    16
diff -r c32085bb3ff6 scripts/plot/__plt2mm__.m
michael@46
    17
--- a/scripts/plot/__plt2mm__.m	Sun Aug 31 12:13:02 2008 +0200
michael@46
    18
+++ b/scripts/plot/__plt2mm__.m	Sun Aug 31 15:13:59 2008 +0200
michael@46
    19
@@ -65,7 +65,9 @@
michael@46
    20
 		  "marker", options(i).marker, "parent", hg);
michael@46
    21
 
michael@46
    22
 	__add_line_series__ (h, hg);
michael@46
    23
-	set (hg, args {:});
michael@46
    24
+	if (! isempty( args))
michael@46
    25
+	  set (hg, args {:});
michael@46
    26
+	endif
michael@46
    27
       endfor
michael@46
    28
     else
michael@46
    29
       error ("__plt2mm__: arguments must be a matrices");
michael@46
    30
diff -r c32085bb3ff6 scripts/plot/__plt2mv__.m
michael@46
    31
--- a/scripts/plot/__plt2mv__.m	Sun Aug 31 12:13:02 2008 +0200
michael@46
    32
+++ b/scripts/plot/__plt2mv__.m	Sun Aug 31 15:13:59 2008 +0200
michael@46
    33
@@ -81,7 +81,9 @@
michael@46
    34
 		"marker", options(i).marker, "parent", hg);
michael@46
    35
    
michael@46
    36
       __add_line_series__ (h, hg);
michael@46
    37
-      set (hg, args{:});
michael@46
    38
+      if (! isempty (args))
michael@46
    39
+        set (hg, args{:});
michael@46
    40
+      endif
michael@46
    41
     endfor
michael@46
    42
   else
michael@46
    43
     error ("__plt2mv__: arguments must be a matrices");
michael@46
    44
diff -r c32085bb3ff6 scripts/plot/__plt2ss__.m
michael@46
    45
--- a/scripts/plot/__plt2ss__.m	Sun Aug 31 12:13:02 2008 +0200
michael@46
    46
+++ b/scripts/plot/__plt2ss__.m	Sun Aug 31 15:13:59 2008 +0200
michael@46
    47
@@ -62,7 +62,9 @@
michael@46
    48
 	      "marker", options.marker, "parent", hg);
michael@46
    49
 
michael@46
    50
     __add_line_series__ (h, hg);
michael@46
    51
-    set (hg, properties{:});
michael@46
    52
+    if (! isempty (properties))
michael@46
    53
+      set (hg, properties{:});
michael@46
    54
+    endif
michael@46
    55
   else
michael@46
    56
     error ("__plt2ss__: arguments must be scalars");
michael@46
    57
   endif
michael@46
    58
diff -r c32085bb3ff6 scripts/plot/__plt2sv__.m
michael@46
    59
--- a/scripts/plot/__plt2sv__.m	Sun Aug 31 12:13:02 2008 +0200
michael@46
    60
+++ b/scripts/plot/__plt2sv__.m	Sun Aug 31 15:13:59 2008 +0200
michael@46
    61
@@ -61,7 +61,9 @@
michael@46
    62
 		"marker", options(i).marker, "parent", hg);
michael@46
    63
 
michael@46
    64
       __add_line_series__ (h, hg);
michael@46
    65
-      set (hg, args{:});
michael@46
    66
+      if (! isempty(args))
michael@46
    67
+        set (hg, args{:});
michael@46
    68
+      endif
michael@46
    69
     endfor
michael@46
    70
   else
michael@46
    71
     error ("__plt2sv__: first arg must be scalar, second arg must be vector");
michael@46
    72
diff -r c32085bb3ff6 scripts/plot/__plt2vm__.m
michael@46
    73
--- a/scripts/plot/__plt2vm__.m	Sun Aug 31 12:13:02 2008 +0200
michael@46
    74
+++ b/scripts/plot/__plt2vm__.m	Sun Aug 31 15:13:59 2008 +0200
michael@46
    75
@@ -81,7 +81,9 @@
michael@46
    76
 		"marker", options(i).marker, "parent", hg);
michael@46
    77
 
michael@46
    78
       __add_line_series__ (h, hg);
michael@46
    79
-      set (hg, args{:});
michael@46
    80
+      if (! isempty (args))
michael@46
    81
+        set (hg, args{:});
michael@46
    82
+      endif
michael@46
    83
     endfor
michael@46
    84
   else
michael@46
    85
     error ("__plt2vm__: arguments must be a matrices");
michael@46
    86
diff -r c32085bb3ff6 scripts/plot/__plt2vs__.m
michael@46
    87
--- a/scripts/plot/__plt2vs__.m	Sun Aug 31 12:13:02 2008 +0200
michael@46
    88
+++ b/scripts/plot/__plt2vs__.m	Sun Aug 31 15:13:59 2008 +0200
michael@46
    89
@@ -61,7 +61,9 @@
michael@46
    90
 		"marker", options(i).marker, "parent", hg);
michael@46
    91
 
michael@46
    92
       __add_line_series__ (h, hg);
michael@46
    93
-      set (hg, args{:});
michael@46
    94
+      if (! isempty (args))
michael@46
    95
+        set (hg, args{:});
michael@46
    96
+      endif
michael@46
    97
     endfor
michael@46
    98
   else
michael@46
    99
     error ("__plt2vs__: first arg must be vector, second arg must be scalar");
michael@46
   100
diff -r c32085bb3ff6 scripts/plot/__plt2vv__.m
michael@46
   101
--- a/scripts/plot/__plt2vv__.m	Sun Aug 31 12:13:02 2008 +0200
michael@46
   102
+++ b/scripts/plot/__plt2vv__.m	Sun Aug 31 15:13:59 2008 +0200
michael@46
   103
@@ -76,7 +76,9 @@
michael@46
   104
 	      "marker", options.marker, "parent", hg);
michael@46
   105
 
michael@46
   106
     __add_line_series__ (h, hg);
michael@46
   107
-    set (hg, properties{:});
michael@46
   108
+    if (! isempty (properties))
michael@46
   109
+      set (hg, properties{:});
michael@46
   110
+    endif
michael@46
   111
   else
michael@46
   112
     error ("__plt2vv__: vector lengths must match");
michael@46
   113
   endif