diff options
author | Marvin Borner | 2021-03-26 21:55:50 +0100 |
---|---|---|
committer | Marvin Borner | 2021-03-26 22:02:20 +0100 |
commit | 05498860e8f7b1e8bb27880bc7526de026694804 (patch) | |
tree | 3bddf16e9439a950a3810d45e42a5cefdbcb7663 /libtxt/inc/xml.h | |
parent | a96e9c4c858d47f61b89d879aa0ce6a02bdacb38 (diff) |
Renamed libs
Cleaner and more flexible.
Diffstat (limited to 'libtxt/inc/xml.h')
-rw-r--r-- | libtxt/inc/xml.h | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/libtxt/inc/xml.h b/libtxt/inc/xml.h deleted file mode 100644 index 43a8005..0000000 --- a/libtxt/inc/xml.h +++ /dev/null @@ -1,51 +0,0 @@ -// Inspired by sxml (capmar) -// MIT License, Copyright (c) 2020 Marvin Borner - -#ifndef XML_H -#define XML_H - -#include <def.h> - -enum xml_error { - XML_ERROR_INVALID = -1, - XML_SUCCESS = 0, - XML_ERROR_BUFFERDRY = 1, - XML_ERROR_TOKENSFULL = 2 -}; - -struct xml_token { - u16 type; - u16 size; - u32 start_pos; - u32 end_pos; -}; - -struct xml_args { - const char *buffer; - u32 buffer_length; - struct xml_token *tokens; - u32 num_tokens; -}; - -enum xml_type { - XML_START_TAG, - XML_END_TAG, - XML_CHARACTER, - XML_CDATA, - XML_INSTRUCTION, - XML_DOCTYPE, - XML_COMMENT -}; - -struct xml { - u32 buffer_pos; - u32 ntokens; - u32 tag_level; -}; - -enum xml_error xml_parse(struct xml *parser, const char *buffer, u32 buffer_length, - struct xml_token *tokens, u32 num_tokens); - -void xml_init(struct xml *parser); - -#endif |