diff options
author | 2021-12-23 13:15:26 +0100 | |
---|---|---|
committer | 2021-12-23 13:55:38 +0100 | |
commit | 57311daf54ab12f7a1af5a844ad60fa6af0e7283 (patch) | |
tree | dcdd424a68485b67df5f117d2a243748eed8e7f4 /highlighter.h | |
download | translate-highlight-from-c-to-go-master.tar.xz translate-highlight-from-c-to-go-master.zip |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'highlighter.h')
-rw-r--r-- | highlighter.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/highlighter.h b/highlighter.h new file mode 100644 index 0000000..30a8484 --- /dev/null +++ b/highlighter.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved. + */ + +#include <sys/types.h> + +enum highlight_type { + HighlightSection, + HighlightField, + HighlightPrivateKey, + HighlightPublicKey, + HighlightPresharedKey, + HighlightIP, + HighlightCidr, + HighlightHost, + HighlightPort, + HighlightMTU, + HighlightKeepalive, + HighlightComment, + HighlightDelimiter, + HighlightTable, + HighlightCmd, + HighlightError, + HighlightEnd +}; + +struct highlight_span { + enum highlight_type type; + size_t start, len; +}; + +struct highlight_span *highlight_config(const char *config); |