diff options
| author | Christoph Hellwig <hch@lst.de> | 2005-01-10 17:20:37 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-10 17:20:37 -0800 |
| commit | 77aa6cbfb03f4bc3a3e9676efcd24879946438c4 (patch) | |
| tree | 95bc488821664549fdabec47501aa0106f00eeca /include | |
| parent | cd3ae7b394ba473ef7c2a717b113fc0bc05b198b (diff) | |
[PATCH] cleanup virtual console <-> selection.c interface
Pass around pointers instead of indices into a global array between various
files of the virtual console implementation and stop using obsfucting
macros that expect certain variables to be in scope.
This is a first step to get rid of the various global arrays in the VC
code.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/console_struct.h | 3 | ||||
| -rw-r--r-- | include/linux/selection.h | 23 |
2 files changed, 12 insertions, 14 deletions
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index a9a2a486234c..062049ca5c44 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h @@ -9,6 +9,8 @@ * to achieve effects such as fast scrolling by changing the origin. */ +struct vt_struct; + #define NPAR 16 struct vc_data { @@ -87,6 +89,7 @@ struct vc_data { struct vc_data **vc_display_fg; /* [!] Ptr to var holding fg console for this display */ unsigned long vc_uni_pagedir; unsigned long *vc_uni_pagedir_loc; /* [!] Location of uni_pagedir variable for this console */ + struct vt_struct *vc_vt; /* additional information is in vt_kern.h */ }; diff --git a/include/linux/selection.h b/include/linux/selection.h index 059c958951f3..ed3408b400f1 100644 --- a/include/linux/selection.h +++ b/include/linux/selection.h @@ -10,7 +10,7 @@ #include <linux/tiocl.h> #include <linux/vt_buffer.h> -extern int sel_cons; +extern struct vc_data *sel_cons; extern void clear_selection(void); extern int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *tty); @@ -19,11 +19,6 @@ extern int sel_loadlut(char __user *p); extern int mouse_reporting(void); extern void mouse_report(struct tty_struct * tty, int butt, int mrx, int mry); -#define video_num_columns (vc_cons[currcons].d->vc_cols) -#define video_num_lines (vc_cons[currcons].d->vc_rows) -#define video_size_row (vc_cons[currcons].d->vc_size_row) -#define can_do_color (vc_cons[currcons].d->vc_can_do_color) - extern int console_blanked; extern unsigned char color_table[]; @@ -31,15 +26,15 @@ extern int default_red[]; extern int default_grn[]; extern int default_blu[]; -extern unsigned short *screen_pos(int currcons, int w_offset, int viewed); -extern u16 screen_glyph(int currcons, int offset); -extern void complement_pos(int currcons, int offset); -extern void invert_screen(int currcons, int offset, int count, int shift); +extern unsigned short *screen_pos(struct vc_data *vc, int w_offset, int viewed); +extern u16 screen_glyph(struct vc_data *vc, int offset); +extern void complement_pos(struct vc_data *vc, int offset); +extern void invert_screen(struct vc_data *vc, int offset, int count, int shift); -extern void getconsxy(int currcons, unsigned char *p); -extern void putconsxy(int currcons, unsigned char *p); +extern void getconsxy(struct vc_data *vc, unsigned char *p); +extern void putconsxy(struct vc_data *vc, unsigned char *p); -extern u16 vcs_scr_readw(int currcons, const u16 *org); -extern void vcs_scr_writew(int currcons, u16 val, u16 *org); +extern u16 vcs_scr_readw(struct vc_data *vc, const u16 *org); +extern void vcs_scr_writew(struct vc_data *vc, u16 val, u16 *org); #endif |
