summaryrefslogtreecommitdiff
path: root/src/autolink.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/autolink.h')
-rw-r--r--src/autolink.h37
1 files changed, 24 insertions, 13 deletions
diff --git a/src/autolink.h b/src/autolink.h
index 8860ee2..528885c 100644
--- a/src/autolink.h
+++ b/src/autolink.h
@@ -9,24 +9,35 @@
extern "C" {
#endif
-enum {
+
+/*************
+ * CONSTANTS *
+ *************/
+
+typedef enum hoedown_autolink_flags {
HOEDOWN_AUTOLINK_SHORT_DOMAINS = (1 << 0)
-};
+} hoedown_autolink_flags;
+
+
+/*************
+ * FUNCTIONS *
+ *************/
+
+/* hoedown_autolink_is_safe: verify that a URL has a safe protocol */
+int hoedown_autolink_is_safe(const uint8_t *data, size_t size);
-int
-hoedown_autolink_is_safe(const uint8_t *link, size_t link_len);
+/* hoedown_autolink__www: search for the next www link in data */
+size_t hoedown_autolink__www(size_t *rewind_p, hoedown_buffer *link,
+ uint8_t *data, size_t offset, size_t size, hoedown_autolink_flags flags);
-size_t
-hoedown_autolink__www(size_t *rewind_p, hoedown_buffer *link,
- uint8_t *data, size_t offset, size_t size, unsigned int flags);
+/* hoedown_autolink__email: search for the next email in data */
+size_t hoedown_autolink__email(size_t *rewind_p, hoedown_buffer *link,
+ uint8_t *data, size_t offset, size_t size, hoedown_autolink_flags flags);
-size_t
-hoedown_autolink__email(size_t *rewind_p, hoedown_buffer *link,
- uint8_t *data, size_t offset, size_t size, unsigned int flags);
+/* hoedown_autolink__url: search for the next URL in data */
+size_t hoedown_autolink__url(size_t *rewind_p, hoedown_buffer *link,
+ uint8_t *data, size_t offset, size_t size, hoedown_autolink_flags flags);
-size_t
-hoedown_autolink__url(size_t *rewind_p, hoedown_buffer *link,
- uint8_t *data, size_t offset, size_t size, unsigned int flags);
#ifdef __cplusplus
}