| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
See librdf commit aa3bf4ccf4cc9381a1c198566428812af28944de that works
around this.
|
| |
|
|
|
|
|
| |
Remove the file itself, all #include uses of it, and all references to it,
as this file is no longer needed.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(vsnprintf_check_is_c99): Initialize len to -1 when the variable is
declared instead of in the macro to remove redundancy.
(vsnprintf_is_c99): Check that len < size before looking at
tmp_buffer[len] otherwise we may be looking past the buffer size.
(macro VSNPRINTF_NOT_C99_BLOCK): free tmp_buffer when breaking out
of the while(1) loop. set len to a non-negative value in the buffer
!= NULL case
(raptor_vsnprintf2): Initialize len to -1 here instead of in the
VSNPRINTF_NOT_C99_BLOCK() macro. Return -1 if format is NULL.
(raptor_vasprintf): Copy var args to re-use them when
calling raptor_vsnprintf2()
|
|
|
|
|
|
|
|
|
| |
Thanks to John Emmas for reporting.
* Compute len internally using int, not size_t as standard vsnprintf() returns ints anyway. This fixes for negative value comparison. Cast from size_t to int required for strlen() return value.
* Initialize len earlier
* Use passed in size if a buffer is given
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
(raptor_format_float): Removed unused internal function and thus
removed the only need for trunc() and lround().
configure: Removed checks for trunc(), lround() in libc or libm.
|
|
|
|
|
|
|
|
|
| |
(raptor_format_integer): Add base, width and padding fields
(raptor_format_hexadecimal): Deleted, replaced by above with base =
16.
Updated all callers of above with new parameters.
|
| |
|
|
|
|
|
|
|
|
|
| |
fixed width field.
(raptor_iostream_hexadecimal_write): Use raptor_format_hexadecimal()
(raptor_xml_escape_string_any): Use raptor_format_hexadecimal() to
remove a sprintf for &#xXX.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some good uses:
- narrowing a known, checked unicode char to a U16
Some 'bad' uses:
- only handing error messages, literal language, qname prefixes of a
max len constrained by int
- passing in data to libxml constrained by int max len
- locator column field constrained to int size
Some bad uses:
- iostream read_bytes and write-bytes methods return int but could
easily return a lot more in the size_t range (compare to fread).
API change needed.
- locator byte field constrained to int size. should be size_t
- raptor_nfc_check returns int offset into a buffer that could be
larger
raptor_ntriples_parser_context changed line_length and offset to
size_t
raptor_turtle_parser changed buffer_length to size_t
|
|
|
|
|
|
|
|
|
|
|
| |
vsnprintf_is_c99 macro: start guessing length from len strlen(format)
and grow size by 50% each loop to hopefully get big enough faster.
(raptor_vsnprintf): Error out when raptor_vasprintf result < 0
(raptor_snprintf): Note error is < 0 response
(raptor_vasprintf): Error out when raptor_vsnprintf2 result is < 0
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(raptor_vsnprintf2): Added with actual vsnprintf() calling
contention, deprecating raptor_vsnprintf which doesn't
(raptor_snprintf): Added with snprintf() calling convention using
raptor_vsnprintf2() to provide a portable version.
(raptor_vasprintf): Added with vasprintf() calling convention (GNU)
using raptor_vsnprintf2() to implement it if not present.
Moved the formatted printing code all to src/snprintf.c
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
functions/macros. They were standardised with C99.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
http://dev.mutt.org/hg/mutt/file/55cd4cb611d9/snprintf.c Last Modified: Tue Aug 08 22:49:12 2006 +0000.
|