Home | History | Annotate | Download | only in stage2
      1 /* terminfo.h - read a terminfo entry from the command line */
      2 /*
      3  *  GRUB  --  GRand Unified Bootloader
      4  *  Copyright (C) 2002,2003,2004  Free Software Foundation, Inc.
      5  *
      6  *  This program is free software; you can redistribute it and/or modify
      7  *  it under the terms of the GNU General Public License as published by
      8  *  the Free Software Foundation; either version 2 of the License, or
      9  *  (at your option) any later version.
     10  *
     11  *  This program is distributed in the hope that it will be useful,
     12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14  *  GNU General Public License for more details.
     15  *
     16  *  You should have received a copy of the GNU General Public License
     17  *  along with this program; if not, write to the Free Software
     18  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
     19  */
     20 
     21 #ifndef GRUB_TERMCAP_HEADER
     22 #define GRUB_TERMCAP_HEADER	1
     23 
     24 #define TERMINFO_LEN 40
     25 
     26 typedef struct terminfo
     27 {
     28   char name[TERMINFO_LEN];
     29   char cursor_address[TERMINFO_LEN];
     30   char clear_screen[TERMINFO_LEN];
     31   char enter_standout_mode[TERMINFO_LEN];
     32   char exit_standout_mode[TERMINFO_LEN];
     33 }
     34 terminfo;
     35 
     36 
     37 /* Function prototypes.  */
     39 char *ti_escape_memory (const char *in, const char *end);
     40 char *ti_escape_string (const char *in);
     41 char *ti_unescape_memory (const char *in, const char *end);
     42 char *ti_unescape_string (const char *in);
     43 
     44 void ti_set_term (const struct terminfo *new);
     45 void ti_get_term (struct terminfo *copy);
     46 
     47 void ti_cursor_address (int x, int y);
     48 void ti_clear_screen (void);
     49 void ti_enter_standout_mode (void);
     50 void ti_exit_standout_mode (void);
     51 
     52 #endif /* ! GRUB_TERMCAP_HEADER */
     53