[BusyBox] New version - new patches

Erik Andersen andersen at lineo.com
Wed Mar 21 20:22:57 UTC 2001


On Fri Mar 16, 2001 at 06:51:24PM +0300, Vladimir N. Oleynik wrote:
> diff -rbu busybox.orig/Config.h busybox/Config.h
> --- busybox.orig/Config.h	Thu Mar 15 21:58:06 2001
> +++ busybox/Config.h	Fri Mar 16 18:25:59 2001
> @@ -355,11 +355,7 @@
>  #if defined BB_SH
>  	#if defined BB_FEATURE_COMMAND_EDITING 
>  		#define BB_CMDEDIT
> -		#ifndef BB_FEATURE_USE_TERMIOS
> -			#define BB_FEATURE_USE_TERMIOS
> -		#endif
>  	#else
> -		#undef BB_FEATURE_COMMAND_EDITING
>  		#undef BB_FEATURE_COMMAND_TAB_COMPLETION
>  		#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
>  		#define BB_FEATURE_SH_SIMPLE_PROMPT

Ok.  no problem

> diff -rbu busybox.orig/cmdedit.c busybox/cmdedit.c
> --- busybox.orig/cmdedit.c	Thu Mar 15 23:51:09 2001
> +++ busybox/cmdedit.c	Thu Mar 15 13:56:44 2001
> @@ -560,11 +560,7 @@
>  
>  static void cmdedit_setwidth(int w, int redraw_flg)
>  {
> -	cmdedit_termw = cmdedit_prmt_len + 2;
> -	if (w <= cmdedit_termw) {
> -		cmdedit_termw = cmdedit_termw % w;
> -	}
> -	if (w > cmdedit_termw) {
> +	if (w > (cmdedit_prmt_len+2)) {
>  		cmdedit_termw = w;
>  
>  		if (redraw_flg) {
> @@ -580,6 +576,7 @@
>  
>  extern void cmdedit_init(void)
>  {
> +	cmdedit_prmt_len = 0;
>  	if ((handlers_sets & SET_WCHG_HANDLERS) == 0) {
>  		/* emulate usage handler to set handler and call yours work */
>  		win_changed(-SIGWINCH);


Hmm.  No problem with initializing cmdedit_prmt_len.
We need to come to an agreement on the other part.
I will look over this code on several terminals -- linux
console, xterm, rxvt, and try to come up with a compromise
that we can both agree on.

> diff -rbu busybox.orig/more.c busybox/more.c
> --- busybox.orig/more.c	Fri Feb 23 04:39:26 2001
> +++ busybox/more.c	Fri Mar 16 18:49:02 2001
> @@ -154,12 +154,10 @@
>  
>  #ifdef BB_FEATURE_USE_TERMIOS
>  				/* Erase the "More" message */
> -				while (--len >= 0)
> -					putc('\b', stdout);
> -				while (++len <= terminal_width)
> +				putc('\r', stdout);
> +				while (--len <= 0)
>  					putc(' ', stdout);
> -				while (--len >= 0)
> -					putc('\b', stdout);
> +				putc('\r', stdout);
>  				fflush(stdout);
>  #endif
>  				len=0;

I tried this patch and it did not work when using 'Enter' 
to move one line at a time.

> diff -rbu busybox.orig/sh.c busybox/sh.c
> --- busybox.orig/sh.c	Fri Mar 16 02:01:19 2001
> +++ busybox/sh.c	Fri Mar 16 18:18:44 2001

I've applied Larry's variant on this.  I hope that
is acceptable.

(BTW, sorry this took so long --  I just noticed that
this was in my postponed mail box and never got sent).

 -Erik

--
Erik B. Andersen   email:  andersen at lineo.com
--This message was written using 73% post-consumer electrons--





More information about the busybox mailing list