Package: ivtools / 1.2.11a2-4

debian-changes Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 ivtools (1.2.11a2-4) unstable; urgency=medium
 .
   * track upstream changes (bug fix)
Author: Barak A. Pearlmutter <bap@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2019-02-27

--- ivtools-1.2.11a2.orig/src/ComTerp/assignfunc.cc
+++ ivtools-1.2.11a2/src/ComTerp/assignfunc.cc
@@ -66,18 +66,20 @@ void AssignFunc::execute() {
 	} else if (operand1.global_flag()) {
 	    void* oldval = nil;
 	    comterp()->globaltable()->find(oldval, operand1.symbol_val());
-	    if (oldval) 
-	      *(ComValue*)oldval = operand2;
-	    else
-  	      comterp()->globaltable()->insert(operand1.symbol_val(), operand2);
+	    if (oldval) {
+	      comterp()->globaltable()->remove(operand1.symbol_val());
+	      delete (ComValue*)oldval;
+	    }
+	    comterp()->globaltable()->insert(operand1.symbol_val(), operand2);
 	}
 	else {
 	    void* oldval = nil;
 	    comterp()->localtable()->find(oldval, operand1.symbol_val());
-	    if (oldval) 
-	      *(ComValue*)oldval = operand2;
-	    else
-	      comterp()->localtable()->insert(operand1.symbol_val(), operand2);
+	    if (oldval) {
+	      comterp()->localtable()->remove(operand1.symbol_val());
+	      delete (ComValue*)oldval;
+	    }
+            comterp()->localtable()->insert(operand1.symbol_val(), operand2);
 	}
     } else if (operand1.is_object(Attribute::class_symid())) {
       Attribute* attr = (Attribute*)operand1.obj_val();
--- ivtools-1.2.11a2.orig/src/ComTerp/boolfunc.h
+++ ivtools-1.2.11a2/src/ComTerp/boolfunc.h
@@ -91,7 +91,7 @@ public:
 
 //: != (non-equality) operator.
 // also useful for partial string comparison with :n keyword.
-// neq("string1" "string2" :n 6) returns false.
+// not_eq("string1" "string2" :n 6) returns false.
 // also useful for symbol comparison with :sym keyword.
 class NotEqualFunc : public NumFunc {
 public:
@@ -99,7 +99,7 @@ public:
 
     virtual void execute();
     virtual const char* docstring() { 
-      return "!= is the not-equal operator\nbool=neq(str1 str2 :n len) -- partial string comparison\nbool=neq(sym1 sym2 :sym) -- symbol comparison"; }
+      return "!= is the not-equal operator\nbool=not_eq(str1 str2 :n len) -- partial string comparison\nbool=not_eq(sym1 sym2 :sym) -- symbol comparison"; }
 
 };
 
--- ivtools-1.2.11a2.orig/src/ComTerp/dotfunc.cc
+++ ivtools-1.2.11a2/src/ComTerp/dotfunc.cc
@@ -57,6 +57,9 @@ void DotFunc::execute() {
       if (before_part.is_object())
         cout << " of class " << symbol_pntr(before_part.class_symid());
       cout << ") -- line " << funcstate()->linenum() << "\n";
+      cout << "expression after dot:  ";
+      cout << after_part << "\n";
+
       return;
     }
     if (nargs()>1 && !after_part.is_string()) {
--- ivtools-1.2.11a2.orig/src/ComTerp/iofunc.cc
+++ ivtools-1.2.11a2/src/ComTerp/iofunc.cc
@@ -49,7 +49,11 @@ FileObj::FileObj(const char* filename, c
   _filename = strnew(filename);
   _mode = strnew(mode);
   _pipe = pipeflag;
-  _fptr = _pipe ? popen(filename, mode) : fopen(filename, mode);
+  if (strcmp(filename,"-")!=0 ) { 
+    _fptr = _pipe ? popen(filename, mode) : fopen(filename, mode);
+  } else {
+    _fptr = stdin;
+  }
 }
 
 FileObj::FileObj(FILE* fptr) {
@@ -60,7 +64,7 @@ FileObj::FileObj(FILE* fptr) {
 }
 
 FileObj::~FileObj() { 
-  if( _fptr && _filename) _pipe ? pclose(_fptr) : fclose(_fptr);
+  if( _fptr && _fptr!=stdin && _filename) _pipe ? pclose(_fptr) : fclose(_fptr);
   delete _filename;
   delete _mode;
 }
--- ivtools-1.2.11a2.orig/src/ComTerp/symbolfunc.cc
+++ ivtools-1.2.11a2/src/ComTerp/symbolfunc.cc
@@ -303,7 +303,7 @@ void SplitStrFunc::execute() {
         int delim1=0;
         while(*str && isspace(*str) || *str==delim) {
           if (*str==delim) {
-            if ((delim1 || avl->Number()==0) && !isspace(delim) ) {
+            if ((delim1 || avl->Number()==0) && delim!=' ') {
 	      if (keepflag) {
 		ComValue* comval = new ComValue(delimstr);
 		if (reverseflag) 
--- ivtools-1.2.11a2.orig/src/ComUnidraw/grdotfunc.cc
+++ ivtools-1.2.11a2/src/ComUnidraw/grdotfunc.cc
@@ -59,6 +59,8 @@ void GrDotFunc::execute() {
       if (before_part.is_object())
         cout << " of class " << symbol_pntr(before_part.class_symid());
       cout << ") -- line " << funcstate()->linenum() << "\n";
+      cout << "expression after dot:  ";
+      cout << after_part << "\n";
       reset_stack();
       return;
     }
--- ivtools-1.2.11a2.orig/src/ComUnidraw/grfunc.cc
+++ ivtools-1.2.11a2/src/ComUnidraw/grfunc.cc
@@ -936,7 +936,7 @@ void SelectFunc::execute() {
     ComValue clear_flagv(stack_key(clear_symid));
     boolean clear_flag = clear_flagv.is_true();
 
-    Selection* sel = _ed->GetViewer()->GetSelection();
+    OverlaySelection* sel = (OverlaySelection*)_ed->GetViewer()->GetSelection();
     if (clear_flag) {
       sel->Clear();
       unidraw->Update();
@@ -945,6 +945,9 @@ void SelectFunc::execute() {
     }
       
     OverlaySelection* newSel = ((OverlayEditor*)_ed)->overlay_kit()->MakeSelection();
+    if (sel->HandlesDisabled()) {
+      newSel->DisableHandles();
+    }
     
     Viewer* viewer = _ed->GetViewer();
     AttributeValueList* avl = new AttributeValueList();
@@ -1330,7 +1333,7 @@ TransformerFunc::TransformerFunc(ComTerp
 void TransformerFunc::execute() {
     
     ComValue objv(stack_arg(0));
-    ComValue transv(stack_arg(0));
+    ComValue transv(stack_arg(1));
     reset_stack();
     if (objv.object_compview()) {
       ComponentView* compview = (ComponentView*)objv.obj_val();
@@ -1339,6 +1342,9 @@ void TransformerFunc::execute() {
 	Graphic* gr = comp->GetGraphic();
 	if (gr) {
 	  Transformer* trans = gr->GetTransformer();
+	  if (trans == nil) {
+	    trans = new Transformer();
+	  }
 	  if (transv.is_unknown() || !transv.is_array() || transv.array_val()->Number()!=6) {
 	    AttributeValueList* avl = new AttributeValueList();
 	    float a00, a01, a10, a11, a20, a21;
@@ -1377,8 +1383,9 @@ void TransformerFunc::execute() {
 	    av = avl->GetAttrVal(it);
 	    a21 = av->float_val();
 
-	    Transformer t(a00, a01, a10, a11, a20, a21);
-	    *gr->GetTransformer()=t;
+	    Transformer* t = new Transformer(a00, a01, a10, a11, a20, a21);
+	    gr->SetTransformer(t);
+	    comp->Notify();
 
 	    ComValue compval(new OverlayViewRef(comp), comp->class_symid());
 	    push_stack(compval);