Hi
> The function is_binary is a bit naive and therefore tags to much as binary
> content. It is quite common with names in the first 32 bytes and it's also
> common with strange characters in names. Strange as in char > 127.
>
> I have rewritten the function a bit and think you probably should
> incorporate this fix or one of your own in a future release.
>
> Here is my version...
I agree. It's a good idea.
> if (((float)strange)/size > 0.3f)
> return 1;
I would like to make the 0.3 a customizable variable like follows:
[File gtags.conf]
+----------------------------
|...
| :binary_boundary=30:... ---+ (0-100%)
| |
|
[Initial processing] |
|
Load binary_boundary |
|
binary_boundary = 0.3; <---+
[Function is_binary()]
if (((float)strange)/size > binary_boundary)
return 1;
The default of binary_boundary might be 0 (same as the current spec).
Any comment?
--
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663 C4B6 3CA5 BBB3 57BE DDA3
_______________________________________________
Bug-global mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-global