summaryrefslogtreecommitdiff
path: root/src/buffer.h
AgeCommit message (Collapse)Author
2015-06-07Remove unused function cmark_strbuf_attachNick Wellnhofer
This function was missing a couple of range checks that I'm too lazy to fix.
2015-06-07Account for null terminator in cmark_strbuf_growNick Wellnhofer
This simplifies overflow checks.
2015-06-07Use custom type bufsize_t for string buffer sizesNick Wellnhofer
This makes it easier to change the type later. No functional change. The rest of the code base still has to be adjusted to use the new type. Also add some TODO comments in buffer.c.
2015-06-07Abort on strbuf errorsNick Wellnhofer
Users of the strbuf API are supposed to check for an OOM condition after appending to strbufs, but: * This is never done in the whole code base. * The implementation was flawed because only `ptr` was set to the OOM value without adjusting `size` and `asize`. After an error, subsequent calls could very well lead to segfaults, contrary to the documentation. Change the code to always abort on errors with a message printed to stderr. The only alternative is to propagate errors throughout the whole library which seems infeasible.
2015-01-05Reformatted code consistently with astyle.John MacFarlane
2014-12-15Re-added cmark_ prefix to strbuf and chunk.John MacFarlane
Reverts 225d720.
2014-12-13Removed cmark_ prefix on chunk and strbuf.John MacFarlane
This isn't needed any more since we don't expose these in the API.
2014-11-28Always define short name macros for private symbolsNick Wellnhofer
Since chunk.h and buffer.h are private now, there's no need to optionally disable the short name macros.
2014-11-16Move inline function definitions to header filesNick Wellnhofer
Inline functions must be defined in header files in order to be inlined in other compilation units. This also fixes the MSVC build where out-of-line versions weren't created and allows to remove the -fgnu89-inline flag.
2014-11-16Feature test for GCC attributesNick Wellnhofer
2014-11-16Declare all functions as extern "C"Nick Wellnhofer
2014-11-16Probe for stdbool.hNick Wellnhofer
Let cmake create a cmark_config.h file to deal with platforms missing stdbool.h.
2014-11-16Remove unneeded #includesNick Wellnhofer
Fixes cross-platform issues.
2014-11-16Rename include guards for consistency and to avoid reserved identifiersCraig Barnes
2014-11-15Expose lower-level parsing API.John MacFarlane
The new functions cmark_new_doc_parser, cmark_free_doc_parser, cmark_process_line, and cmark_finish allow you to feed lines one by one (possibly from several files) to the parser and call finish when you're done. This is now used in main for mulitple files.
2014-11-14Moved code from buffer.h to buffer.c. Make strbuf_cstr static.John MacFarlane
2014-11-14Exported some functions from buffer that are used elsewhere.John MacFarlane
2014-11-14Use cmake's generate_export_header.John MacFarlane
2014-11-13Made buffer functions visible in shared library.John MacFarlane
2014-11-12Prefix names in buffer.hNick Wellnhofer
2014-11-06buffer: added strbuf_rtrim function.John MacFarlane
2014-09-10Cleanup reference implementationVicent Marti
2014-09-09Rename to strbufVicent Marti
2014-09-09338/103Vicent Marti
2014-09-09ffffixVicent Marti
2014-09-09lolVicent Marti