hexedit: implement "[enter] goto offset" key

This is a must if you need to edit sector 123456789999 on your /dev/disk.

   text	   data	    bss	    dec	    hex	filename
 922745	    481	   6832	 930058	  e310a	busybox_old
 923023	    481	   6832	 930336	  e3220	busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2017-09-14 10:51:12 +02:00
parent 363fb5ec40
commit d54f58d487
2 changed files with 56 additions and 27 deletions

View File

@@ -281,9 +281,9 @@ static void set_tty_cooked(void)
/* Move the cursor to a position (x,y), where (0,0) is the
top-left corner of the console */
static void move_cursor(int line, int row)
static void move_cursor(int line, int col)
{
printf(ESC"[%u;%uH", line, row);
printf(ESC"[%u;%uH", line, col);
}
static void clear_line(void)