NULL characters embedded in the token strings).
+ Added a number of sniffing tests. The rules returned
by the parser appear to sniff properly now.
Incidentally, our sniffer supports conjunctions, i.e the rule
1.0 ('abc') [9] ('xyz')
is equivalent to the rule
1.0 ('abc______xyz' & 0xFFF000000FFF)
This is different than the R5 sniffer, which doesn't reject
rules like the former, but appears to ignore all expressions
in the rule except for the first, i.e. it would treat the first
rule as
1.0 ('abc')
The only problem I can see with this is if someone for
some reason wrote such a rule with multiple expressions
for use with the R5 sniffer. It would likely work differently
with ours. I'm going to search my MIME database and see
if any such rules exist. If so, it'll be easy to switch to the
R5 way of doing things.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@663 a95241bf-73f2-0310-859d-f6bbb57e9c96
instead of const char*'s to allow for rules with NULL characters
embedded in them.
+ Updated Rule::Sniff() to actually return a useful value
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@662 a95241bf-73f2-0310-859d-f6bbb57e9c96
+ Learned the concept of base 8 again and fixed an octal literal. I hate octal.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@651 a95241bf-73f2-0310-859d-f6bbb57e9c96
+ Fixed a bug with 0eXXX floats being handled improperly
+ Updated a few error messages to give proper character
stream positions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@650 a95241bf-73f2-0310-859d-f6bbb57e9c96
This is needed for the VM swap file and if you want to mount disk images
located on the BFS volume.
There is now a BufferPool class that manages a pool of buffers, so that
Inode::ReadAt()/Inode::WriteAt() can access a file without having to use
the cache or malloc()/free().
The real uncached file access is not yet implemented, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@643 a95241bf-73f2-0310-859d-f6bbb57e9c96
license stuff in it :-).
Some cleanup on the other headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@638 a95241bf-73f2-0310-859d-f6bbb57e9c96
+ Patched up the parser tests so they actually test something
now, and accounted for the variations between the R5 error
messages and our error messages where applicable.
+ Added a few extended notation floating point tests to the
parser tests
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@631 a95241bf-73f2-0310-859d-f6bbb57e9c96
+ Fixed a stupid bug in my hexToChar() function
+ Added code to actually return the parsed in priority to ParsePriority()...
+ Added code to actually SetTo() the result in ParseRule()...
+ Changed most "Sniffer scanner error" messages to "Sniffer
pattern error" messages.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@630 a95241bf-73f2-0310-859d-f6bbb57e9c96
swapfile blocks are now put on a free list and properly reused, so it
no longer grows out of control.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@626 a95241bf-73f2-0310-859d-f6bbb57e9c96
+ Added support for extended notation floating point numbers,
as well as signed (+ and -) floats.
+ Finished up parsing code
+ Moved Err class into it's own header/source pair, since I
started using it all over the place in the sniffer code.
+ Did my darndest to make sure I wasn't leaking memory
anywhere.
+ Matched up error messages as best as possible with R5's
error message. Some couldn't be matched, some were improved.
There *are* a few things left to do. I don't think priorities are
verified to be valid (0.0 <= x <= 1.0). More tests also need to
be written. Things have solidified enough now that documentation
is a reasonable thing to start considering as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@608 a95241bf-73f2-0310-859d-f6bbb57e9c96