Sha256: 1de38a17d59e2df294ea949b0ac5982a016f582b507aaf1cad1278b8c27704e9

Contents?: true

Size: 1.51 KB

Versions: 57

Compression:

Stored size: 1.51 KB

Contents

#ifndef CMARK_HOUDINI_H
#define CMARK_HOUDINI_H

#ifdef __cplusplus
extern "C" {
#endif

#include <stdint.h>
#include "config.h"
#include "buffer.h"

#ifdef HAVE___BUILTIN_EXPECT
#define likely(x) __builtin_expect((x), 1)
#define unlikely(x) __builtin_expect((x), 0)
#else
#define likely(x) (x)
#define unlikely(x) (x)
#endif

#ifdef HOUDINI_USE_LOCALE
#define _isxdigit(c) isxdigit(c)
#define _isdigit(c) isdigit(c)
#else
/*
 * Helper _isdigit methods -- do not trust the current locale
 * */
#define _isxdigit(c) (strchr("0123456789ABCDEFabcdef", (c)) != NULL)
#define _isdigit(c) ((c) >= '0' && (c) <= '9')
#endif

#define HOUDINI_ESCAPED_SIZE(x) (((x)*12) / 10)
#define HOUDINI_UNESCAPED_SIZE(x) (x)

CMARK_GFM_EXPORT
bufsize_t houdini_unescape_ent(cmark_strbuf *ob, const uint8_t *src,
                                      bufsize_t size);
CMARK_GFM_EXPORT
int houdini_escape_html(cmark_strbuf *ob, const uint8_t *src,
                               bufsize_t size);
CMARK_GFM_EXPORT
int houdini_escape_html0(cmark_strbuf *ob, const uint8_t *src,
                                bufsize_t size, int secure);
CMARK_GFM_EXPORT
int houdini_unescape_html(cmark_strbuf *ob, const uint8_t *src,
                                 bufsize_t size);
CMARK_GFM_EXPORT
void houdini_unescape_html_f(cmark_strbuf *ob, const uint8_t *src,
                                    bufsize_t size);
CMARK_GFM_EXPORT
int houdini_escape_href(cmark_strbuf *ob, const uint8_t *src,
                               bufsize_t size);

#ifdef __cplusplus
}
#endif

#endif

Version data entries

57 entries across 57 versions & 5 rubygems

Version Path
qiita_marker-0.23.5.0 ext/qiita_marker/houdini.h
commonmarker-0.23.5 ext/commonmarker/houdini.h
qiita_marker-0.23.2.3 ext/qiita_marker/houdini.h
commonmarker-0.23.4 ext/commonmarker/houdini.h
mountapi-0.11.1 vendor/bundle/ruby/2.7.0/gems/commonmarker-0.23.2/ext/commonmarker/houdini.h
markly-0.7.0 ext/markly/houdini.h
qiita_marker-0.23.2.2 ext/qiita_marker/houdini.h
qiita_marker-0.23.2.1 ext/qiita_marker/houdini.h
qiita_marker-0.23.2.0 ext/qiita_marker/houdini.h
commonmarker-0.23.2 ext/commonmarker/houdini.h
commonmarker-0.23.1 ext/commonmarker/houdini.h
markly-0.6.1 ext/markly/houdini.h
commonmarker-0.23.0 ext/commonmarker/houdini.h
markly-0.6.0 ext/markly/houdini.h
commonmarker-0.22.0 ext/commonmarker/houdini.h
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/commonmarker-0.21.2/ext/commonmarker/houdini.h
commonmarker-0.21.2 ext/commonmarker/houdini.h
commonmarker-0.21.1 ext/commonmarker/houdini.h
markly-0.5.2 ext/markly/houdini.h
markly-0.5.1 ext/markly/houdini.h