While trying to write some CS code to generate pretty dates (e.g. 11 -> "November") we ran into the following, seemingly bizarre CS parser crash: The following...
hmm. Yes, I left it calling strtol with a 0 base to allow for hex, but octal seems like a bad idea. Not sure what the better fix is: 1) Still allow hex by...
My vote would be #2 but I'd be happy with #1 as well. I think even with better documentation, this bug would still have really confused me (unless the cs parse...
The number is likely being interpreted as Octal since a prefix 0 is a common lead-in for octal notation. As such, 08 and 09 are not legal numbers but 010 is...
I vote for #3 with eventually improving the error message. Having hex and octal available is useful and eventually necessary for someone. Is there a way to ask...
... What about having a base function? base("ABCD", 16) or base("777", 8) return the decimal equivalent. That should solve anyone's need for the functionality...
Chris Green
cmg@...
Nov 5, 2004 2:36 am
376
I found a problem with this piece of code, and I wonder if this is known: HDF *hdf = NULL; hdf_init(&hdf); for (int i = 0; i < 100000; i++) { char buffer[64]; ...
... I agree. Failing this, however, I'd favour #2 (Force it to base 10 and forget hex); the code that populates the HDF can always convert hex to decimal...
Homme Zwaagstra
hrz@...
Nov 5, 2004 9:57 am
378
Nope, can't say that I've put 1 million nodes in an hdf tree before. Attached is a partial fix (it'll fix the case of lots of nodes in this dimension (next),...
... I'm using PHP, which does support hex and octal literals. You're right - I hadn't thought it through properly; base conversions should be taken care of in...
Homme Zwaagstra
hrz@...
Nov 5, 2004 5:17 pm
381
Thank you so much for your quick response! I've also noticed memory usage is a bit higher than I expected. Like the test program here, it takes 100MB. Assuming...
HDF was not designed to be a low overhead data structure, its actually pretty expensive. If you go over 10 nodes at a particular level, we actually create a...
I want our CGIs to be able to distinguish between cs_parse_file errors where the cs file was simply not found and cases where it was found but there was a...
I've used UTF8 almost exclusively, but haven't done anything on windows. Brandon ... -- "A man said to the universe, 'Sir, I exist.' 'However,' replied the...
ClearSilver is complaining to me that the html_escape filter is an "Unknown function". Can somebody give me a sanity check? Here's the problem code, in Python:...
We should really change this, but currently html_escape and other functions are only available in a CGI context, in python at least. So, you'd have to do...
Yes, calling nerr_init() will assign them all values by calling nerr_register on each of them. Brandon ... -- " ... it's [Titanic] got the highest body-count...
Ah, I found the problem (FYI for fellow CS developers): The innards of hdf_read_file were indeed returning NERR_NOT_FOUND (error code 3) but when that gets...
There are functions which do that for you: nerr_handle and nerr_match... and lo, they are no comments for them. Oops. Basically, nerr_match does exactly what...
Hi, Is there any support in the ClearSilver C API for determining whether an HDF node is a child of another node? The reason I ask is that hdf_copy() crashes...
Homme Zwaagstra
hrz@...
Nov 11, 2004 11:05 am
394
Nope. Its probably cheaper to find if a node is a parent of another node... except it doesn't currently maintain a parent link. hmm. Brandon ... -- "......
I've run across the following problem with clearsilver on several occasions: I have a macros.cs file that defines some macro used by various other pages. Many...
The -c option to cc should be part of the suffix rules, not CFLAGS. diff -Naur clearsilver-0.9.12.orig/rules.mk.in clearsilver-0.9.12/rules.mk.in ... +++...
Doug Porter
dsp@...
Nov 16, 2004 10:55 pm
397
Hi, Building clearsilver failed at the 'make install' stage. This was due to the fact that the Makefile ran the command 'scripts/document.py' and the shebang...
Homme Zwaagstra
hrz@...
Nov 16, 2004 10:55 pm
398
Hello, Whilst developing a ClearSilver extension for PHP I've found a couple of places in the C API where I thought some enhancements would prove useful: 1. It...
Homme Zwaagstra
hrz@...
Nov 16, 2004 10:55 pm
399
Sure, that sounds fine. Brandon ... -- "Power Ennobles. Absolute power ennobles absolutely." -- Harlan Ellison http://www.fiction.net/blong/...