summaryrefslogtreecommitdiff
path: root/src/buffer.h
AgeCommit message (Collapse)Author
2015-08-10Don't include static in CMARK_INLINE.John MacFarlane
ALso don't set CMARK_INLINE to __inline if we're compiling under MSVC in cplusplus mode.
2015-08-10Fix MSVC inline errors when cmark is included in other sources that don't ↵Kevin Wojniak
have the same set of disabled warnings
2015-07-27Use clang-format, llvm style, for formatting.John MacFarlane
* Reformatted all source files. * Added 'format' target to Makefile. * Removed 'astyle' target. * Updated .editorconfig.
2015-07-25Removed cmark_strbuf_printf and cmark_strbuf_vprintf.John MacFarlane
These are no longer needed, and cause complications for MSVC. Also removed HAVE_VA_COPY and HAVE_C99_SNPRINTF feature tests.
2015-06-07Helper to safely call strlenNick Wellnhofer
2015-06-07Check for overflow in S_parser_feedNick Wellnhofer
Guard against too large chunks passed via the API.
2015-06-07Change return type of cmark_strbuf_lenNick Wellnhofer
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