Changeset f0d7bd9 in mainline
- Timestamp:
- 2012-07-10T12:32:56Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- aca4a04
- Parents:
- 1e01a35
- Location:
- kernel
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/Makefile
r1e01a35 rf0d7bd9 196 196 generic/src/console/chardev.c \ 197 197 generic/src/console/console.c \ 198 generic/src/console/prompt.c \ 198 199 generic/src/cpu/cpu.c \ 199 200 generic/src/ddi/ddi.c \ -
kernel/generic/include/symtab.h
r1e01a35 rf0d7bd9 36 36 #define KERN_SYMTAB_H_ 37 37 38 #define MAX_TAB_HINTS 3739 40 38 #include <symtab_lookup.h> 41 39 #include <console/chardev.h> -
kernel/generic/src/console/kconsole.c
r1e01a35 rf0d7bd9 43 43 #include <console/chardev.h> 44 44 #include <console/cmd.h> 45 #include <console/prompt.h> 45 46 #include <print.h> 46 47 #include <panic.h> … … 214 215 const char *hint; 215 216 char *output = malloc(MAX_CMDLINE, 0); 216 char display = 'y';217 217 size_t hints_to_show = MAX_TAB_HINTS - 1; 218 218 size_t total_hints_shown = 0; 219 char continue_showing_hints = 'y';219 bool continue_showing_hints = true; 220 220 221 221 output[0] = 0; … … 232 232 if (found > MAX_TAB_HINTS) { 233 233 printf("\nDisplay all %zu possibilities? (y or n)", found); 234 wchar_t display; 234 235 do { 235 236 display = indev_pop_character(indev); 236 237 } while (display != 'y' && display != 'n' && display != 'Y' && display != 'N'); 238 continue_showing_hints = (display == 'y') || (display == 'Y'); 237 239 } 238 240 … … 243 245 cmd_info_t *hlp = list_get_instance(pos, cmd_info_t, link); 244 246 245 if ( display == 'y' || display == 'Y') { /* We are still showing hints */247 if (continue_showing_hints) { 246 248 printf("%s (%s)\n", hlp->name, hlp->description); 247 249 --hints_to_show; … … 249 251 250 252 if (hints_to_show == 0 && total_hints_shown != found) { /* Time to ask user to continue */ 251 printf("--More--"); 252 do { 253 continue_showing_hints = indev_pop_character(indev); 254 if (continue_showing_hints == 'y' || continue_showing_hints == 'Y' 255 || continue_showing_hints == ' ') { 256 hints_to_show = MAX_TAB_HINTS - 1; /* Display a full page again */ 257 break; 258 } 259 260 if (continue_showing_hints == 'n' || continue_showing_hints == 'N' 261 || continue_showing_hints == 'q' || continue_showing_hints == 'Q') { 262 display = 'n'; /* Stop displaying hints */ 263 break; 264 } 265 266 if (continue_showing_hints == '\n') { 267 hints_to_show = 1; /* Show one more hint */ 268 break; 269 } 270 } while (1); 271 272 printf("\r \r"); /* Delete the --More-- option */ 253 continue_showing_hints = console_prompt_more_hints(indev, &hints_to_show); 273 254 } 274 255 } -
kernel/generic/src/debug/symtab.c
r1e01a35 rf0d7bd9 43 43 #include <typedefs.h> 44 44 #include <errno.h> 45 #include <console/prompt.h> 45 46 46 47 /** Get name of a symbol that seems most likely to correspond to address. … … 232 233 size_t input_len = str_length(input); 233 234 char *sym_name; 234 char display = 'y';235 235 size_t hints_to_show = MAX_TAB_HINTS - 1; 236 236 size_t total_hints_shown = 0; 237 char continue_showing_hints = 'y';237 bool continue_showing_hints = true; 238 238 239 239 output[0] = 0; … … 256 256 if (found > MAX_TAB_HINTS) { 257 257 printf("\nDisplay all %zu possibilities? (y or n)", found); 258 wchar_t display; 258 259 do { 259 260 display = indev_pop_character(indev); 260 261 } while (display != 'y' && display != 'n' && display != 'Y' && display != 'N'); 262 continue_showing_hints = (display == 'y') || (display == 'Y'); 261 263 } 262 264 … … 268 270 pos++; 269 271 270 if ( display == 'y' || display == 'Y') { /* We are still showing hints */272 if (continue_showing_hints) { /* We are still showing hints */ 271 273 printf("%s\n", sym_name); 272 274 --hints_to_show; … … 274 276 275 277 if (hints_to_show == 0 && total_hints_shown != found) { /* Time to ask user to continue */ 276 printf("--More--"); 277 do { 278 continue_showing_hints = indev_pop_character(indev); 279 if (continue_showing_hints == 'y' || continue_showing_hints == 'Y' 280 || continue_showing_hints == ' ') { 281 hints_to_show = MAX_TAB_HINTS - 1; /* Display a full page again */ 282 break; 283 } 284 285 if (continue_showing_hints == 'n' || continue_showing_hints == 'N' 286 || continue_showing_hints == 'q' || continue_showing_hints == 'Q') { 287 display = 'n'; /* Stop displaying hints */ 288 break; 289 } 290 291 if (continue_showing_hints == '\n') { 292 hints_to_show = 1; /* Show one more hint */ 293 break; 294 } 295 } while (1); 296 297 printf("\r \r"); /* Delete the --More-- option */ 278 continue_showing_hints = console_prompt_more_hints(indev, &hints_to_show); 298 279 } 299 280 }
Note:
See TracChangeset
for help on using the changeset viewer.