2 * Samba Unix/Linux SMB client library
4 * Copyright (C) Christopher Davis 2012
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 HE_CURSOR_UP
= 0x1000,
27 HE_CURSOR_DOWN
= 0x1100,
28 HE_CURSOR_LEFT
= 0x1200,
29 HE_CURSOR_RIGHT
= 0x1300,
30 HE_CURSOR_PGUP
= 0x1400,
31 HE_CURSOR_PGDN
= 0x1500
35 offset hex1 hex2 ascii
36 00000000 FF FF FF FF FF FF FF FF ........
41 #define HEX_COL1_END 21
43 #define HEX_COL2_END 34
45 #define ASCII_COL_END LINE_WIDTH
46 #define BYTES_PER_LINE 8
55 size_t cursor_line_offset
;
62 struct hexedit
*hexedit_new(TALLOC_CTX
*ctx
, WINDOW
*parent
, int nlines
,
63 int y
, int x
, const void *data
, size_t sz
);
64 void hexedit_set_cursor(struct hexedit
*buf
);
65 void hexedit_refresh(struct hexedit
*buf
);
66 void hexedit_driver(struct hexedit
*buf
, int c
);
67 WERROR
hexedit_resize_buffer(struct hexedit
*buf
, size_t newsz
);