Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/console-tools/reset.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1122 by niro, Fri Apr 24 18:33:46 2009 UTC revision 1123 by niro, Wed Aug 18 21:56:57 2010 UTC
# Line 28  int reset_main(int argc UNUSED_PARAM, ch Line 28  int reset_main(int argc UNUSED_PARAM, ch
28    
29   if (isatty(STDIN_FILENO) && isatty(STDOUT_FILENO)) {   if (isatty(STDIN_FILENO) && isatty(STDOUT_FILENO)) {
30   /* See 'man 4 console_codes' for details:   /* See 'man 4 console_codes' for details:
31   * "ESC c" -- Reset   * "ESC c"        -- Reset
32   * "ESC ( K" -- Select user mapping   * "ESC ( K"      -- Select user mapping
33   * "ESC [ J" -- Erase display   * "ESC [ J"      -- Erase to the end of screen
34   * "ESC [ 0 m" -- Reset all display attributes   * "ESC [ 0 m"    -- Reset all display attributes
35   * "ESC [ ? 25 h" -- Make cursor visible.   * "ESC [ ? 25 h" -- Make cursor visible
36   */   */
37   printf("\033c\033(K\033[J\033[0m\033[?25h");   printf("\033c\033(K\033[J\033[0m\033[?25h");
38   /* http://bugs.busybox.net/view.php?id=1414:   /* http://bugs.busybox.net/view.php?id=1414:

Legend:
Removed from v.1122  
changed lines
  Added in v.1123