| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
|
|
| |
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
|
|
|
|
| |
Co-authored-by: John-Mark Bell <jmb@netsurf-browser.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the data in the linear buffer was always stored at
the start of the allocation, pointed to by `buffer->data`.
This was achieved by memmoving every time data was consumed
from the front.
Now the allocation is pointed to by `buffer->alloc`, and the
start of the data is pointed to by `buffer->data` (as before).
This means client code does not need to change to get at the
data.
The advantage comes when we discard the from the start of the
buffer, when some data is consumed. We now simply advance the
data pointer by the number of bytes to be discarded, and reduce
the buffer length by the same amount.
If the used portion of the buffer now fits between the start
of the allocation and the current start of the data, it is
memcpyed to the allocation start, otherwise it is left alone.
This is a significant optimisation when the size of the chunk
is large, such as when loading from disc. (When the first
(only) "chunk" is just the whole file.
|
| |
|
|
|
|
| |
Elie Roudninski.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
The gap in teh input was being created at the wrong insertion point!
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=14003
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=13672
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=12608
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=12215
|
|
|
|
|
|
| |
be a pointer to a pointer to const data, and some don't, hack around the issue by casting to void *
svn path=/trunk/libparserutils/; revision=11950
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=11493
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=11022
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=11015
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=11013
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=10973
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=10961
|
|
|
|
|
|
|
|
| |
replaced by UTF-8 if there was no charset detection callback provided, too.
Tidy up the logic in this area, and add more commentary so it's clear.
svn path=/trunk/libparserutils/; revision=10899
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=9628
|
|
|
|
|
|
|
|
|
| |
1) There's outstanding data to be read
2) We haven't read the first chunk of data
3) We've recieved EOF
4) There's insufficient input data to detect the charset
svn path=/trunk/libparserutils/; revision=8789
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=8788
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=8268
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=8267
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=8263
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) You need to include sys/types.h yourself
2) You need to ensure that netinet/in.h is included before arpa/inet.h
3) Neither arpa/inet.h nor netinet/in.h define htonl/ntohl -- it's in
machine/endian.h which, fortunately, is included from sys/types.h
Add a bunch of explicit casts to uint32_t to the results of calls to
ntohl/htonl to appease Norcroft's "implicit narrowing cast" warning.
svn path=/trunk/libparserutils/; revision=7891
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=7579
|
|
|
|
|
|
| |
GCC 2.95 compatibility.
svn path=/trunk/libparserutils/; revision=7094
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=7093
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=7025
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=6854
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=6527
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=6512
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=6008
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=6007
|
|
|
|
|
|
| |
Add new API to enable on-the-fly changing of the input charset. This is only possible if no data has been read from the stream.
svn path=/trunk/libparserutils/; revision=5969
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=5965
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=5964
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=5920
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=5868
|
|
|
|
|
|
| |
Limit maximum length of data items stored in hash/chunked array to 2^16-1.
svn path=/trunk/libparserutils/; revision=5858
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=5853
|
|
|
|
|
|
|
|
|
| |
+ Chunked array
+ Hash table (open addressing)
Constify parameter to parserutils_stack_push
svn path=/trunk/libparserutils/; revision=5850
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=5842
|
|
|
|
| |
svn path=/trunk/libparserutils/; revision=5840
|