summaryrefslogtreecommitdiffstats
path: root/scilab/modules/graphics
diff options
context:
space:
mode:
authorYann Collette <yann.collette@scilab.org>2010-03-12 09:33:27 +0100
committerYann Collette <yann.collette@scilab.org>2010-03-12 09:33:27 +0100
commit78b890f6cb09263dbfd6a38a3bfee76b9fd7700b (patch)
treea2effa911dcb5bdeceb8f3a93d10b1890c39edb7 /scilab/modules/graphics
parent94ca9858558891ca18e1832696d7c18de460413e (diff)
downloadscilab-78b890f6cb09263dbfd6a38a3bfee76b9fd7700b.zip
scilab-78b890f6cb09263dbfd6a38a3bfee76b9fd7700b.tar.gz
allow the user to overload %h_delete
Diffstat (limited to 'scilab/modules/graphics')
-rw-r--r--scilab/modules/graphics/sci_gateway/c/sci_delete.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/scilab/modules/graphics/sci_gateway/c/sci_delete.c b/scilab/modules/graphics/sci_gateway/c/sci_delete.c
index 6803693..f51956e 100644
--- a/scilab/modules/graphics/sci_gateway/c/sci_delete.c
+++ b/scilab/modules/graphics/sci_gateway/c/sci_delete.c
@@ -45,12 +45,14 @@ int sci_delete(char *fname,unsigned long fname_len)
45 CheckRhs(0,1); 45 CheckRhs(0,1);
46 CheckLhs(0,1); 46 CheckLhs(0,1);
47 47
48 lw = 1 + Top - Rhs;
49
48 switch(VarType(1)) 50 switch(VarType(1))
49 { 51 {
50 case sci_handles: /* delete Entity given by a handle */ 52 case sci_handles: /* delete Entity given by a handle */
51 GetRhsVar(1,GRAPHICAL_HANDLE_DATATYPE,&m1,&n1,&l1); /* Gets the Handle passed as argument */ 53 GetRhsVar(1,GRAPHICAL_HANDLE_DATATYPE,&m1,&n1,&l1); /* Gets the Handle passed as argument */
52 if (m1!=1||n1!=1) { 54 if (m1!=1||n1!=1) {
53 lw = 1 + Top - Rhs; 55 //lw = 1 + Top - Rhs;
54 C2F(overload)(&lw,"delete",6); 56 C2F(overload)(&lw,"delete",6);
55 return 0; 57 return 0;
56 } 58 }
@@ -86,7 +88,7 @@ int sci_delete(char *fname,unsigned long fname_len)
86 } 88 }
87 else 89 else
88 { 90 {
89 lw = 1 + Top - Rhs; 91 //lw = 1 + Top - Rhs;
90 C2F(overload)(&lw,"delete",6); 92 C2F(overload)(&lw,"delete",6);
91 return 0; 93 return 0;
92 94
@@ -164,8 +166,10 @@ int sci_delete(char *fname,unsigned long fname_len)
164 166
165 } 167 }
166 168
167 LhsVar(1) = 0; 169 //LhsVar(1) = 0;
168 C2F(putlhsvar)(); 170 //C2F(putlhsvar)();
171
172 C2F(overload)(&lw,"delete",6);
169 173
170 return 0; 174 return 0;
171} 175}