-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patha.h
65 lines (55 loc) · 822 Bytes
/
a.h
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
/* BUFFER */
typedef struct Buffer Buffer;
struct Buffer
{
uchar *data;
usize count;
usize size;
};
int readfile(Buffer*, char*);
int writefile(Buffer*, char*);
int delete(Buffer*, int);
int insert(Buffer*, int);
int append(Buffer*, int);
/* UNDO */
typedef struct Undo Undo;
enum
{
Udelete,
Uinsert,
Uappend,
Uset,
};
struct Undo
{
int action;
int index;
uchar value;
uchar newvalue;
int modified;
};
int canundo(void);
void undo(Undo*);
int canredo(void);
void redo(Undo*);
void pushundo(int, int, uchar, uchar, int);
void patchundo(uchar);
/* DECODE */
void showdec(uchar[8], Mousectl*, Keyboardctl*);
/* ERROR */
void showerr(const char*, Mousectl*, Keyboardctl*);
/* COLORS */
enum
{
BACK,
ADDR,
HEX,
ASCII,
HHEX,
DHEX,
HIGH,
SCROLL,
NCOLS,
};
Image* cols[NCOLS];
void initcols(int);