Show
Ignore:
Timestamp:
11/01/09 12:05:07 (3 years ago)
Author:
Erwan Velu <erwan.velu@…>
Children:
079f92a31281573b8a7b152b1730e7a349ac6365
Parents:
a7f6dd2b9fc3f8ad29a05135c99288156961329b
git-author:
Pierre-Alexandre Meyer <pierre@mouraf.org> / 2009-10-31T22:32:26Z-0700
git-committer:
Erwan Velu <erwan.velu@free.fr> / 2009-11-01T13:05:07Z+0100
Message:

hdt: change remaining printf to more_printf (CLI)

A lot of places still had printf() instead of more_printf().
This patch does a bulk update and add missing reset_more_printf(),
used to reset the pager counter between each command call.

This also changes the more_printf() routine to delete the "--More--"
line while scrolling.

Signed-off-by: Pierre-Alexandre Meyer <pierre@…>

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • com32/hdt/hdt-common.h

    r47ac91 rdff898  
    6161 
    6262#define pause_printf() do {\ 
    63         printf("--More--");\ 
    64         get_key(stdin, 0);\ 
    65         printf("\n");\ 
     63       printf("--More--");\ 
     64       get_key(stdin, 0);\ 
     65       printf("\033[2K\033[1G\033[1F\n");\ 
    6666} while (0); 
    6767 
    6868#define more_printf(...) do {\ 
    6969 if (display_line_nb == 20) {\ 
    70    printf("\nPress any key to continue");\ 
     70   printf("\n--More--");\ 
    7171   display_line_nb=0;\ 
    7272   get_key(stdin, 0);\ 
     73   printf("\033[2K\033[1G\033[1F");\ 
    7374 }\ 
    74  printf ( __VA_ARGS__);\ 
     75 printf(__VA_ARGS__);\ 
    7576 display_line_nb++; \ 
    7677} while (0);