aboutsummaryrefslogtreecommitdiff
path: root/editor.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-09-09 21:50:38 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-09-09 21:50:38 +0200
commitdeca6f4d03d36e4980715ae6709f244f381b1175 (patch)
treee8e8b61824fb4341976c4e010edb89b65d17a770 /editor.h
parent6d2e43b8142e17f4dd0a578a961b1d8cc98894bb (diff)
downloadvis-deca6f4d03d36e4980715ae6709f244f381b1175.tar.gz
vis-deca6f4d03d36e4980715ae6709f244f381b1175.tar.xz
Cleanup header files
Diffstat (limited to 'editor.h')
-rw-r--r--editor.h30
1 files changed, 3 insertions, 27 deletions
diff --git a/editor.h b/editor.h
index 3bb67fc..1aa98ff 100644
--- a/editor.h
+++ b/editor.h
@@ -1,12 +1,12 @@
#ifndef EDITOR_H
#define EDITOR_H
+#include <curses.h>
#include <stddef.h>
-#include <regex.h>
-#include "text-motions.h"
-#include "text-objects.h"
+#include <stdbool.h>
#include "window.h"
#include "register.h"
+#include "syntax.h"
typedef struct Editor Editor;
typedef struct EditorWin EditorWin;
@@ -103,30 +103,6 @@ struct Editor {
bool running; /* (TODO move elsewhere?) */
};
-
-typedef struct {
- short fg, bg; /* fore and background color */
- int attr; /* curses attributes */
-} Color;
-
-typedef struct {
- char *rule; /* regex to search for */
- int cflags; /* compilation flags (REG_*) used when compiling */
- Color color; /* settings to apply in case of a match */
- regex_t regex; /* compiled form of the above rule */
-} SyntaxRule;
-
-#define SYNTAX_REGEX_RULES 10
-
-typedef struct Syntax Syntax;
-
-struct Syntax { /* a syntax definition */
- char *name; /* syntax name */
- char *file; /* apply to files matching this regex */
- regex_t file_regex; /* compiled file name regex */
- SyntaxRule rules[SYNTAX_REGEX_RULES]; /* all rules for this file type */
-};
-
Editor *editor_new(int width, int height);
void editor_free(Editor*);
void editor_resize(Editor*, int width, int height);