Sha256: 7d7cb055d47972b6d2bcfe511e1b6bc1b2e1d7960dc152d57aeac3c8a8082300

Contents?: true

Size: 1.64 KB

Versions: 43

Compression:

Stored size: 1.64 KB

Contents

#ifndef __HOUDINI_H__
#define __HOUDINI_H__

#ifdef __cplusplus
extern "C" {
#endif

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

#define likely(x)       __builtin_expect((x),1)
#define unlikely(x)     __builtin_expect((x),0)

#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)

extern int houdini_escape_html(gh_buf *ob, const uint8_t *src, size_t size);
extern int houdini_escape_html0(gh_buf *ob, const uint8_t *src, size_t size, int secure);
extern int houdini_unescape_html(gh_buf *ob, const uint8_t *src, size_t size);
extern int houdini_escape_xml(gh_buf *ob, const uint8_t *src, size_t size);
extern int houdini_escape_uri(gh_buf *ob, const uint8_t *src, size_t size);
extern int houdini_escape_uri_component(gh_buf *ob, const uint8_t *src, size_t size);
extern int houdini_escape_url(gh_buf *ob, const uint8_t *src, size_t size);
extern int houdini_escape_href(gh_buf *ob, const uint8_t *src, size_t size);
extern int houdini_unescape_uri(gh_buf *ob, const uint8_t *src, size_t size);
extern int houdini_unescape_uri_component(gh_buf *ob, const uint8_t *src, size_t size);
extern int houdini_unescape_url(gh_buf *ob, const uint8_t *src, size_t size);
extern int houdini_escape_js(gh_buf *ob, const uint8_t *src, size_t size);
extern int houdini_unescape_js(gh_buf *ob, const uint8_t *src, size_t size);

#ifdef __cplusplus
}
#endif

#endif

Version data entries

43 entries across 43 versions & 3 rubygems

Version Path
escape_utils-1.2.2 ext/escape_utils/houdini.h
hamlit-2.2.4 ext/hamlit/houdini/houdini.h
hamlit-2.5.0 ext/hamlit/houdini/houdini.h
hamlit-2.4.2 ext/hamlit/houdini/houdini.h
hamlit-2.4.1 ext/hamlit/houdini/houdini.h
hamlit-2.4.0 ext/hamlit/houdini/houdini.h
hamlit-2.3.1 ext/hamlit/houdini/houdini.h
hamlit-2.3.0 ext/hamlit/houdini/houdini.h
escape_utils-1.1.1 ext/escape_utils/houdini.h
escape_utils-1.2.1 ext/escape_utils/houdini.h
hamlit-2.2.3 ext/hamlit/houdini/houdini.h
faml-0.8.1 vendor/houdini/houdini.h
hamlit-2.2.2 ext/hamlit/houdini/houdini.h
hamlit-2.2.1 ext/hamlit/houdini/houdini.h
escape_utils-1.2.0 ext/escape_utils/houdini.h
faml-0.8.0 vendor/houdini/houdini.h
faml-0.7.3 vendor/houdini/houdini.h
hamlit-2.2.0 ext/hamlit/houdini/houdini.h
hamlit-2.1.2 ext/hamlit/houdini/houdini.h
hamlit-2.1.1 ext/hamlit/houdini/houdini.h