-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest-ansi.c
77 lines (60 loc) · 1.36 KB
/
test-ansi.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#include "config.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "color/lib.h"
#include "gui/lib.h"
struct Mailbox;
struct Menu;
struct PatternList;
struct NeoMutt *NeoMutt = NULL;
bool OptNoCurses = false;
char *HomeDir;
typedef uint16_t TokenFlags;
typedef uint8_t PatternCompFlags;
extern struct AttrColorList MergedColors;
extern struct CursesColorList CursesColors;
struct MailboxView *get_current_mailbox_view(void)
{
return NULL;
}
struct Mailbox *get_current_mailbox(void)
{
return NULL;
}
struct Menu *get_current_menu(void)
{
return NULL;
}
struct PatternList *mutt_pattern_comp(struct Mailbox *m, struct Menu *menu, const char *s,
PatternCompFlags flags, struct Buffer *err)
{
return NULL;
}
void mutt_check_simple(struct Buffer *buf, const char *simple)
{
}
int parse_extract_token(struct Buffer *dest, struct Buffer *tok, TokenFlags flags)
{
return 0;
}
void mutt_pattern_free(struct PatternList **pat)
{
}
int main(int argc, char *argv[])
{
if (argc != 2)
return 1;
initscr();
start_color();
use_default_colors();
endwin();
printf("%d colours\n", COLORS);
TAILQ_INIT(&MergedColors);
TAILQ_INIT(&CursesColors);
struct AnsiColor ansi = { 0 };
int rc = ansi_color_parse(argv[1], &ansi, &MergedColors, false);
printf("%d\n", rc);
return 0;
}