17c478bd9Sstevel@tonic-gate /* terminfo.h - read a terminfo entry from the command line */
27c478bd9Sstevel@tonic-gate /*
37c478bd9Sstevel@tonic-gate  *  GRUB  --  GRand Unified Bootloader
47c478bd9Sstevel@tonic-gate  *  Copyright (C) 2002,2003,2004  Free Software Foundation, Inc.
57c478bd9Sstevel@tonic-gate  *
67c478bd9Sstevel@tonic-gate  *  This program is free software; you can redistribute it and/or modify
77c478bd9Sstevel@tonic-gate  *  it under the terms of the GNU General Public License as published by
87c478bd9Sstevel@tonic-gate  *  the Free Software Foundation; either version 2 of the License, or
97c478bd9Sstevel@tonic-gate  *  (at your option) any later version.
107c478bd9Sstevel@tonic-gate  *
117c478bd9Sstevel@tonic-gate  *  This program is distributed in the hope that it will be useful,
127c478bd9Sstevel@tonic-gate  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
137c478bd9Sstevel@tonic-gate  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
147c478bd9Sstevel@tonic-gate  *  GNU General Public License for more details.
157c478bd9Sstevel@tonic-gate  *
167c478bd9Sstevel@tonic-gate  *  You should have received a copy of the GNU General Public License
177c478bd9Sstevel@tonic-gate  *  along with this program; if not, write to the Free Software
187c478bd9Sstevel@tonic-gate  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
197c478bd9Sstevel@tonic-gate  */
207c478bd9Sstevel@tonic-gate 
217c478bd9Sstevel@tonic-gate #ifndef GRUB_TERMCAP_HEADER
227c478bd9Sstevel@tonic-gate #define GRUB_TERMCAP_HEADER	1
237c478bd9Sstevel@tonic-gate 
247c478bd9Sstevel@tonic-gate #define TERMINFO_LEN 40
257c478bd9Sstevel@tonic-gate 
267c478bd9Sstevel@tonic-gate typedef struct terminfo
277c478bd9Sstevel@tonic-gate {
287c478bd9Sstevel@tonic-gate   char name[TERMINFO_LEN];
297c478bd9Sstevel@tonic-gate   char cursor_address[TERMINFO_LEN];
307c478bd9Sstevel@tonic-gate   char clear_screen[TERMINFO_LEN];
317c478bd9Sstevel@tonic-gate   char enter_standout_mode[TERMINFO_LEN];
327c478bd9Sstevel@tonic-gate   char exit_standout_mode[TERMINFO_LEN];
337c478bd9Sstevel@tonic-gate }
347c478bd9Sstevel@tonic-gate terminfo;
357c478bd9Sstevel@tonic-gate 
367c478bd9Sstevel@tonic-gate 
377c478bd9Sstevel@tonic-gate /* Function prototypes.  */
387c478bd9Sstevel@tonic-gate char *ti_escape_memory (const char *in, const char *end);
397c478bd9Sstevel@tonic-gate char *ti_escape_string (const char *in);
407c478bd9Sstevel@tonic-gate char *ti_unescape_memory (const char *in, const char *end);
417c478bd9Sstevel@tonic-gate char *ti_unescape_string (const char *in);
427c478bd9Sstevel@tonic-gate 
437c478bd9Sstevel@tonic-gate void ti_set_term (const struct terminfo *new);
447c478bd9Sstevel@tonic-gate void ti_get_term (struct terminfo *copy);
457c478bd9Sstevel@tonic-gate 
467c478bd9Sstevel@tonic-gate void ti_cursor_address (int x, int y);
477c478bd9Sstevel@tonic-gate void ti_clear_screen (void);
487c478bd9Sstevel@tonic-gate void ti_enter_standout_mode (void);
497c478bd9Sstevel@tonic-gate void ti_exit_standout_mode (void);
507c478bd9Sstevel@tonic-gate 
517c478bd9Sstevel@tonic-gate #endif /* ! GRUB_TERMCAP_HEADER */
52