Changeset 15878 for trunk/Ohana/src/opihi/lib.shell/stack_math.c
- Timestamp:
- Dec 16, 2007, 2:27:00 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/lib.shell/stack_math.c (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/lib.shell/stack_math.c
r14517 r15878 30 30 } 31 31 OUT[0].type = 'v'; /*** <<--- says this is a temporary matrix ***/ 32 strcpy (OUT[0].name, "tmp"); 32 33 33 M1 = V1[0].ptr; 34 34 M2 = V2[0].ptr; … … 128 128 free (V2[0].vector); 129 129 } 130 131 130 /* at the end, V1 and V2 are deleted only if they were temporary */ 131 132 clear_stack (V1); 133 clear_stack (V2); 132 134 return (TRUE); 133 135 … … 150 152 } 151 153 OUT[0].type = 'v'; /*** <<--- says this is a temporary matrix ***/ 152 strcpy (OUT[0].name, "tmp"); 154 153 155 M1 = V1[0].ptr; 154 156 M2 = V2[0].ptr; … … 243 245 free (V2[0].vector); 244 246 } 247 248 clear_stack (V1); 249 clear_stack (V2); 245 250 246 251 /* at the end, V1 and V2 are deleted only if they were temporary */ … … 265 270 } 266 271 OUT[0].type = 'v'; /*** <<--- says this is a temporary matrix ***/ 267 strcpy (OUT[0].name, "tmp"); 272 268 273 M1 = V1[0].ptr; 269 274 M2 = V2[0].ptr; … … 359 364 free (V1[0].vector); 360 365 } 366 367 clear_stack (V1); 368 clear_stack (V2); 369 361 370 /* at the end, V1 and V2 are deleted only if they were temporary */ 362 371 return (TRUE); … … 387 396 } 388 397 OUT[0].type = 'm'; /*** <<--- says this is a temporary matrix ***/ 389 strcpy (OUT[0].name, "tmp"); 398 390 399 M1 = V1[0].ptr; 391 400 M2 = V2[0].ptr; … … 524 533 free (V2[0].vector); 525 534 } 535 536 clear_stack (V1); 537 clear_stack (V2); 538 526 539 /* at the end, V1 and V2 are deleted only if they were temporary */ 527 540 return (TRUE); … … 551 564 } 552 565 OUT[0].type = 'm'; /*** <<--- says this is a temporary matrix ***/ 553 strcpy (OUT[0].name, "tmp"); 566 554 567 M1 = V1[0].ptr; 555 568 M2 = V2[0].ptr; … … 707 720 free (V2[0].buffer); 708 721 } 722 723 clear_stack (V1); 724 clear_stack (V2); 725 709 726 /* at the end, V1 and V2 are deleted only if they were temporary */ 710 727 return (TRUE); … … 734 751 } 735 752 OUT[0].type = 'm'; /*** <<--- says this is a temporary matrix ***/ 736 strcpy (OUT[0].name, "tmp"); 753 737 754 M1 = V1[0].ptr; 738 755 M2 = V2[0].ptr; … … 834 851 free (V2[0].buffer); 835 852 } 853 854 clear_stack (V1); 855 clear_stack (V2); 856 836 857 /* at the end, V1 and V2 are deleted only if they were temporary */ 837 858 return (TRUE); … … 858 879 } 859 880 OUT[0].type = 'm'; /*** <<--- says this is a temporary matrix ***/ 860 strcpy (OUT[0].name, "tmp"); 881 861 882 M1 = V1[0].ptr; 862 883 M2 = V2[0].ptr; … … 951 972 free (V1[0].buffer); 952 973 } 974 clear_stack (V1); 975 clear_stack (V2); 976 953 977 return (TRUE); 954 978 … … 973 997 } 974 998 OUT[0].type = 'm'; /*** <<--- says this is a temporary matrix ***/ 975 strcpy (OUT[0].name, "tmp"); 999 976 1000 M1 = V1[0].ptr; 977 1001 M2 = V2[0].ptr; … … 1066 1090 free (V2[0].buffer); 1067 1091 } 1092 clear_stack (V1); 1093 clear_stack (V2); 1094 1068 1095 return (TRUE); 1069 1096 … … 1080 1107 OUT[0].ptr = V1[0].ptr; 1081 1108 out = OUT[0].ptr; 1082 strcpy (OUT[0].name, "tmp"); 1109 1083 1110 1084 1111 switch (op[0]) { … … 1147 1174 OUT[0].Float = *(OUT[0].ptr); 1148 1175 OUT[0].type = 'S'; 1176 1177 clear_stack (V1); 1178 clear_stack (V2); 1179 1149 1180 return (TRUE); 1150 1181 … … 1192 1223 1193 1224 escape: 1194 strcpy (OUT[0].name, "tmp");1195 1225 OUT[0].Float = value; 1196 1226 OUT[0].type = 'S'; 1197 1227 OUT[0].ptr = &OUT[0].Float; 1228 1229 clear_stack (V1); 1230 clear_stack (V2); 1198 1231 return (TRUE); 1199 1232 … … 1244 1277 OUT[0].Float = *out; 1245 1278 OUT[0].type = 'S'; 1279 1280 clear_stack (V1); 1246 1281 return (TRUE); 1247 1282 … … 1309 1344 free (V1[0].vector[0].elements); 1310 1345 free (V1[0].vector); 1346 V1[0].vector = NULL; 1311 1347 } 1348 1349 clear_stack (V1); 1312 1350 return (TRUE); 1313 1351 … … 1390 1428 free (V1[0].buffer); 1391 1429 } 1430 1431 clear_stack (V1); 1392 1432 return (TRUE); 1393 1433
Note:
See TracChangeset
for help on using the changeset viewer.
