summaryrefslogtreecommitdiffstats
path: root/include/linux/console.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-04-29 21:13:14 +0000
committer <ralf@linux-mips.org>1997-04-29 21:13:14 +0000
commit19c9bba94152148523ba0f7ef7cffe3d45656b11 (patch)
tree40b1cb534496a7f1ca0f5c314a523c69f1fee464 /include/linux/console.h
parent7206675c40394c78a90e74812bbdbf8cf3cca1be (diff)
Import of Linux/MIPS 2.1.36
Diffstat (limited to 'include/linux/console.h')
-rw-r--r--include/linux/console.h103
1 files changed, 39 insertions, 64 deletions
diff --git a/include/linux/console.h b/include/linux/console.h
index 80a1c5e69..7589ce794 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -16,70 +16,7 @@
#define NPAR 16
-struct vc_data {
- unsigned long vc_screenbuf_size;
- unsigned short vc_num; /* Console number */
- unsigned short vc_video_erase_char; /* Background erase character */
- unsigned char vc_attr; /* Current attributes */
- unsigned char vc_def_color; /* Default colors */
- unsigned char vc_color; /* Foreground & background */
- unsigned char vc_s_color; /* Saved foreground & background */
- unsigned char vc_ulcolor; /* Colour for underline mode */
- unsigned char vc_halfcolor; /* Colour for half intensity mode */
- unsigned long vc_origin; /* Used for EGA/VGA fast scroll */
- unsigned long vc_scr_end; /* Used for EGA/VGA fast scroll */
- unsigned short *vc_pos;
- unsigned long vc_x,vc_y;
- unsigned long vc_top,vc_bottom;
- unsigned long vc_rows,vc_cols;
- unsigned long vc_size_row;
- unsigned long vc_state;
- unsigned long vc_npar,vc_par[NPAR];
- unsigned short *vc_video_mem_start;
- unsigned long vc_video_mem_end; /* End of video RAM (sort of) */
- unsigned long vc_saved_x;
- unsigned long vc_saved_y;
- /* mode flags */
- unsigned long vc_charset : 1; /* Character set G0 / G1 */
- unsigned long vc_s_charset : 1; /* Saved character set */
- unsigned long vc_disp_ctrl : 1; /* Display chars < 32? */
- unsigned long vc_toggle_meta : 1; /* Toggle high bit? */
- unsigned long vc_decscnm : 1; /* Screen Mode */
- unsigned long vc_decom : 1; /* Origin Mode */
- unsigned long vc_decawm : 1; /* Autowrap Mode */
- unsigned long vc_deccm : 1; /* Cursor Visible */
- unsigned long vc_decim : 1; /* Insert Mode */
- unsigned long vc_deccolm : 1; /* 80/132 Column Mode */
- /* attribute flags */
- unsigned long vc_intensity : 2; /* 0=half-bright, 1=normal, 2=bold */
- unsigned long vc_underline : 1;
- unsigned long vc_blink : 1;
- unsigned long vc_reverse : 1;
- unsigned long vc_s_intensity : 2; /* saved rendition */
- unsigned long vc_s_underline : 1;
- unsigned long vc_s_blink : 1;
- unsigned long vc_s_reverse : 1;
- /* misc */
- unsigned long vc_ques : 1;
- unsigned long vc_need_wrap : 1;
- unsigned long vc_can_do_color : 1;
- unsigned long vc_has_scrolled : 1; /* Info for unblank_screen */
- unsigned long vc_kmalloced : 1; /* kfree_s() needed */
- unsigned long vc_report_mouse : 2;
- unsigned char vc_utf : 1; /* Unicode UTF-8 encoding */
- unsigned char vc_utf_count;
- unsigned long vc_utf_char;
- unsigned long vc_tab_stop[5]; /* Tab stops. 160 columns. */
- unsigned short *vc_translate;
- unsigned char vc_G0_charset;
- unsigned char vc_G1_charset;
- unsigned char vc_saved_G0;
- unsigned char vc_saved_G1;
- unsigned int vc_bell_pitch; /* Console bell pitch */
- unsigned int vc_bell_duration; /* Console bell duration */
- struct consw *vc_sw;
- /* additional information is in vt_kern.h */
-};
+struct vc_data;
/*
* this is what the terminal answers to a ESC-Z or csi0c query.
@@ -121,4 +58,42 @@ extern struct consw *conswitchp;
#define CM_ERASE (2)
#define CM_MOVE (3)
+struct tty_struct;
+int tioclinux(struct tty_struct *tty, unsigned long arg);
+
+/* The interface for /dev/console(s) and printk output */
+
+struct console
+{
+ /*
+ * This function should not return before the string is written.
+ */
+ void (*write)(const char*, unsigned);
+
+ /* To unblank the console in case of panic */
+ void (*unblank)(void);
+
+ /*
+ * Only the console that was registered last with wait_key !=
+ * NULL will be used. This blocks until there is a character
+ * to give back, it does not schedule.
+ */
+ void (*wait_key)(void);
+
+ /*
+ * Return the device to use when opening /dev/console. Only the
+ * last registered console will do.
+ */
+ int (*device)(void);
+
+ /*
+ * For a linked list of consoles for multiple output. Any console
+ * not at the head of the list is used only for output.
+ */
+ struct console *next;
+};
+
+extern void register_console(struct console *);
+extern struct console *console_drivers;
+
#endif /* linux/console.h */