Blame


1 395b9f4e 2021-07-12 op /*
2 395b9f4e 2021-07-12 op * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
3 395b9f4e 2021-07-12 op *
4 395b9f4e 2021-07-12 op * Permission to use, copy, modify, and distribute this software for any
5 395b9f4e 2021-07-12 op * purpose with or without fee is hereby granted, provided that the above
6 395b9f4e 2021-07-12 op * copyright notice and this permission notice appear in all copies.
7 395b9f4e 2021-07-12 op *
8 395b9f4e 2021-07-12 op * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 395b9f4e 2021-07-12 op * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 395b9f4e 2021-07-12 op * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 395b9f4e 2021-07-12 op * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 395b9f4e 2021-07-12 op * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 395b9f4e 2021-07-12 op * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 395b9f4e 2021-07-12 op * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 395b9f4e 2021-07-12 op */
16 395b9f4e 2021-07-12 op
17 395b9f4e 2021-07-12 op #ifndef PARSER_H
18 395b9f4e 2021-07-12 op #define PARSER_H
19 395b9f4e 2021-07-12 op
20 395b9f4e 2021-07-12 op #include "telescope.h"
21 395b9f4e 2021-07-12 op
22 395b9f4e 2021-07-12 op /* gemtext.c */
23 395b9f4e 2021-07-12 op void gemtext_initparser(struct parser*);
24 395b9f4e 2021-07-12 op
25 395b9f4e 2021-07-12 op /* parser.c */
26 395b9f4e 2021-07-12 op int parser_append(struct parser*, const char*, size_t);
27 395b9f4e 2021-07-12 op int parser_set_buf(struct parser*, const char*, size_t);
28 395b9f4e 2021-07-12 op int parser_foreach_line(struct parser*, const char*, size_t, parsechunkfn);
29 395b9f4e 2021-07-12 op
30 395b9f4e 2021-07-12 op /* textplain.c */
31 395b9f4e 2021-07-12 op void textplain_initparser(struct parser*);
32 395b9f4e 2021-07-12 op
33 395b9f4e 2021-07-12 op #endif