Show
Ignore:
Timestamp:
11/01/09 12:06:00 (3 years ago)
Author:
Erwan Velu <erwan.velu@…>
Children:
c2f4ec7d2a22c57853b6616d4ab49d79c6744d25
Parents:
dff89818c3b64eff6f31f04dcef240c5a9daff4c
git-author:
Pierre-Alexandre Meyer <pierre@mouraf.org> / 2009-11-01T00:12:16Z-0700
git-committer:
Erwan Velu <erwan.velu@free.fr> / 2009-11-01T13:06:00Z+0100
Message:

hdt: use plain printf for help, not more_printf (CLI)

The help prints several elements on the same line. This can't
work with more_printf() as the macro assumes each call contains
one and only one \n.

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

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • com32/hdt/hdt-cli-hdt.c

    rdff898 r079f92  
    5454 
    5555    reset_more_printf(); 
    56         more_printf("Available modes:\n"); 
     56        printf("Available modes:\n"); 
    5757        while (list_modes[i]) { 
    58                 more_printf("%s ", list_modes[i]->name); 
     58                printf("%s ", list_modes[i]->name); 
    5959                i++; 
    6060        } 
    61         more_printf("\n"); 
     61        printf("\n"); 
    6262} 
    6363 
     
    120120        find_cli_mode_descr(hdt_cli.mode, &current_mode); 
    121121 
    122     reset_more_printf(); 
    123         more_printf("Available commands are:\n"); 
     122        printf("Available commands are:\n"); 
    124123 
    125124        /* List first default modules of the mode */ 
     
    127126            current_mode->default_modules->modules) { 
    128127                while (current_mode->default_modules->modules[j].name) { 
    129                         more_printf("%s ", 
     128                        printf("%s ", 
    130129                               current_mode->default_modules->modules[j].name); 
    131130                        j++; 
    132131                } 
    133                 more_printf("\n"); 
     132                printf("\n"); 
    134133        } 
    135134 
     
    137136        if (current_mode->show_modules && 
    138137            current_mode->show_modules->modules) { 
    139                 more_printf("\nshow commands:\n"); 
     138                printf("\nshow commands:\n"); 
    140139                j = 0; 
    141140                while (current_mode->show_modules->modules[j].name) { 
    142                         more_printf("%s ", 
     141                        printf("%s ", 
    143142                               current_mode->show_modules->modules[j].name); 
    144143                        j++; 
    145144                } 
    146                 more_printf("\n"); 
     145                printf("\n"); 
    147146        } 
    148147 
     
    150149        if (current_mode->set_modules && 
    151150            current_mode->set_modules->modules) { 
    152                 more_printf("\nset commands:\n"); 
     151                printf("\nset commands:\n"); 
    153152                j = 0; 
    154153                while (current_mode->set_modules->modules[j].name) { 
    155                         more_printf("%s ", 
     154                        printf("%s ", 
    156155                               current_mode->set_modules->modules[j].name); 
    157156                        j++; 
    158157                } 
    159                 more_printf("\n"); 
     158                printf("\n"); 
    160159        } 
    161160 
     
    177176                                             &associated_module); 
    178177                        if (associated_module == NULL) 
    179                                 more_printf("%s ", 
     178                                printf("%s ", 
    180179                                       hdt_mode.default_modules->modules[j].name); 
    181180                        j++; 
    182181                } 
    183                 more_printf("\n"); 
    184         } 
    185  
    186         more_printf("\n"); 
     182                printf("\n"); 
     183        } 
     184 
     185        printf("\n"); 
    187186        main_show_modes(argc, argv, hardware); 
    188187}