Port configure script to C99
Oh, I see! Vectors get created even without create! This might be good enough. I'm not 100% clear as to why syntactical compatibility between 2.x and 3.x is needed. Nor why the vectors need to created in a single command. Is this because the TCL code making the call can't be changed? The reason for my initiating this compatibility discussion is this: if I want to write a code that I can distribute (to students, for example) I need to anticipate the environment in which they will be using it. The...
I think it was me that was probably unclear. If you don't use the "create" keyword, then you can still create multiple vectors with the same command. This works in both 2.x and 3.x. bltsh30 % blt::vector x(30) y(30) z(30) I'm not 100% clear as to why syntactical compatibility between 2.x and 3.x is needed. Nor why the vectors need to created in a single command. Is this because the TCL code making the call can't be changed? [It wasn't my goal in 3.x to be 100% backward compatible with 2.x syntax....
Sorry, @ghowlett, I may have been unclear. It's the loss of ability to declare multiple vectors on one line that represents a discontinuity in syntax: $ bltsh30 % blt::vector create x(5) t w unknown switch "t" The following switches are available: -variable varName -command command -watchunset bool -flush bool -length length although I just noticed that there is in v.2.5.3 from blt-dev an option: vector configure -oldcreate bool which may be doing what I had in mind: The configure operation sets...
I believe the syntax blt::vector /arrayName/(/len/) works the same in both versions. Since the create operation has switches in 3.x, the old syntax of blt::vector create /arrayName/(/len/) ... * * could not be cleanly maintained. [The idea in 2.x was to have the vector look like a data type instead of a command.] ** You would still have to set the values to 0.0 to replicate the 2.x behavior. --gah On 7/6/22 18:27, Edward Sternin wrote: BLT v.3 significantly changed the syntax of the |vector| command....
postscript BB is off
Very simple but useful things that are missing in v.2.x : [x min] and [x max]. This is difficult to overcome (my shortest version is x dup xx; xx sort; puts "$xx(0)" for min), and the best workaround I found is to use critcl: package require BLT namespace import ::blt::* package require critcl critcl::clibraries -lBLT critcl::ccode { #include <tcl.h> #include <blt.h> } critcl::cproc minValue { Tcl_Interp* ip Tcl_Obj* v } double { Blt_Vector *vp; Blt_GetVector(ip, Tcl_GetString(v), &vp); return vp->min;...
BLT v.3 significantly changed the syntax of the vector command. Since a lot of places are still running v.2.47z, trying to write universal code requires accommodations like these: proc newVector { name len } { # BLT 2.x allowed to re-create existing vectors, # this is necessary in BLT 3 but will also work in BLT 2.x global BLT3 $name if { [info exists ${name}] } { vector destroy ${name} } if {$len != "" && $len > 0} { if {$BLT3} { vector create ${name} -length $len # BLT 3 initializes to NaN, restore...
I agree that the behavior should be the same as TCL. I'll make the changes. --gah On 7/5/22 13:17, Edward Sternin wrote: [bugs:#159] https://sourceforge.net/p/blt/bugs/159/ unnecessary and harmful underflow error in vector Status: open Group: Created: Tue Jul 05, 2022 06:17 PM UTC by Edward Sternin Last Updated: Tue Jul 05, 2022 06:17 PM UTC Owner: nobody In |bltVecMath.c| the test for underflow in vector |expr| calculations produces unexpected behaviour, an error "floating-point value too small...
Just updated the code from this site, compiled and verified that the same behaviour is seen in the current version (3.0? 4.0?) of BLT: $ blt-src/src/bltsh30 fpbug.tcl tclsh underflow with y = exp(-x**2) 25.00 --> 3.681e-272 26.00 --> 2.612e-294 27.00 --> 2.508e-317 28.00 --> 0.000e+00 29.00 --> 0.000e+00 30.00 --> 0.000e+00 blt underflow with y = exp(-x^2) 25.0 26.0 27.0 --> 3.6808558548018004e-272 2.6117417612840555e-294 2.507972e-317 25.0 26.0 27.0 28.0 --> floating-point value too small to represent...
unnecessary and harmful underflow error in vector
Add global -nodefault flag to argument parser
Add global -nodefault flag to argument parser
sync master
Fix comment
Round DPI result after floating point arithematic
Don't print usage/help for hidden or disabled arguments
added -include and -exclude switches to import command
Use blt::busy instead of grab for search dialog popup
Fix tree label for no-hashtable lists of children in parents. Broken when fixing labels for hashed children
Merge branch 'master' of /home/gahowlet/blt
don't add scrollbar when requested width or height is 0 in scrollset
Merge branch 'master' of /home/gahowlet/blt
fix parentheses around filter expressions
Merge branch 'master' of /home/gahowlet/blt
Fix scrollset calc, fix tree hash relabel
Merge /home/gah/blt
update autoconf files
update moveop doc
update tableview menus
fix doc
update configure for msys host
save integer base font point size
fix freetype test order
Fix scaling of canvas label font
Fix copying of pathOpts by duplicating Tcl_Objs
Recompute scaling by saving initial text width and height
Merge 192.168.1.23:blt
Queue cell redraws
Updates for handling of separator character in tree path and find operations.
change emacs mode line
Fix indentation
Fix handling of level argument
Allow override switches on tree path operations
Merge branch 'master' of /home/gahowlet/blt
Added tree options: path cget, path configure. Removed tree options: path separator
replace strncpy with memcpy to suppress warnings
Add hidden/disabled arguments
Don't set font for internal menus.
merge line for long line test.
Add section for diff operation
redo data structure
rename variable names
Compute window arrangement from scratch. Don't consider current state of scrollbars
Fix snap operation to maintain aspect ratio
fix configuration switch -root with correct tree
fix configuration switch -root with correct tree
fix configuration switch -root with correct tree
sync with working copy
(fix) node switches require clientData field set (was using old tree value)
(new) add column reorder operation
(fix) last pane on initial layout did not consider extra space leftover
(new) added -emptyvalue for empty values in the tree.
(new) added reorder operation for columns
fix hide/show to use column label instead of title
added back -maxpect switch to graph postscript operation (font scaling and graph sizing is still broken)
added -maxpect switch and forced removal of cache before graph snap operation
remove debug message
fix off-by-1 error in number of non-empty count
fix (thanks to Edward Sternin) error bars
add pkg-config freetype2 test
fix for unsigned integer returned from cksum command
sort option by short name
add cksum algo
sort option by short name
add Unix checkum crc generation
(fix) Hash table use string pools for string keys
fix test for length of argument before description
change -reuse to -ifneeded
added -reuse flag to insert for tree
added asserts to *alloc* calls to verify initialization
Fix: added entry GEOMETRY flag when reusing cells.
added -angle to table columns (not implemented).
added -angle to table columns (not implemented).
Update initial rtext code
more rtext code
more rtext code
more rtext code
fix tableobj flags on tableview
dev continue on rtext
dev continue on rtext
initial work on richtext object
fix Blt_RotatePicture to handle non-orthgonal rotations again
fix Blt_RotatePicture to handle non-orthgonal rotations again
clean up comments and TODO
clean up comments and TODO
added -nodefault switch for arguments in parseargs command
added -nodefault switch for arguments in parseargs command
added -nodefault switch for arguments in parseargs command
cleanup tableview.c