From: <jsi...@us...> - 2007-04-11 19:44:48
|
Revision: 2369 http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2369&view=rev Author: jsimmons Date: 2007-04-11 12:44:35 -0700 (Wed, 11 Apr 2007) Log Message: ----------- updated to 2.6.12 Modified Paths: -------------- branches/ruby-2.6.21/ruby-2.6/drivers/char/selection.c Modified: branches/ruby-2.6.21/ruby-2.6/drivers/char/selection.c =================================================================== --- branches/ruby-2.6.21/ruby-2.6/drivers/char/selection.c 2007-04-11 19:38:01 UTC (rev 2368) +++ branches/ruby-2.6.21/ruby-2.6/drivers/char/selection.c 2007-04-11 19:44:35 UTC (rev 2369) @@ -31,7 +31,7 @@ /* Variables for selection control. */ /* Use a dynamic buffer, instead of static (Dec 1994) */ -struct vc_data *sel_cons; /* must not be disallocated */ +struct vc_data *sel_cons; /* must not be deallocated */ static volatile int sel_start = -1; /* cleared by clear_selection */ static int sel_end; static int sel_buffer_lth; @@ -68,12 +68,10 @@ return inverse_translate(sel_cons, screen_glyph(sel_cons, n)); } -/* - * remove the current selection highlight, if any, - * from the console holding the selection. - */ -void clear_selection(void) -{ +/* remove the current selection highlight, if any, + from the console holding the selection. */ +void +clear_selection(void) { highlight_pointer(-1); /* hide the pointer */ if (sel_start != -1) { highlight(sel_start, sel_end); @@ -256,8 +254,7 @@ clear_selection(); return -ENOMEM; } - if (sel_buffer) - kfree(sel_buffer); + kfree(sel_buffer); sel_buffer = bp; obp = bp; @@ -285,9 +282,10 @@ */ int paste_selection(struct tty_struct *tty) { - struct vc_data *vc = (struct vc_data *) tty->driver_data; - struct tty_ldisc *ld; - int pasted = 0, count; + struct vc_data *vc = (struct vc_data *)tty->driver_data; + int pasted = 0; + unsigned int count; + struct tty_ldisc *ld; DECLARE_WAITQUEUE(wait, current); acquire_console_sem(); @@ -304,7 +302,7 @@ continue; } count = sel_buffer_lth - pasted; - count = min(count, tty->ldisc.receive_room(tty)); + count = min(count, tty->receive_room); tty->ldisc.receive_buf(tty, sel_buffer + pasted, NULL, count); pasted += count; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |