Re: Option for alternative escape character with cu(1)

2019-03-21 Thread Nicholas Marriott
I will commit this in the next few days unless I hear objections. On Mon, Mar 18, 2019 at 07:39:45AM +, Nicholas Marriott wrote: > > This is OK with me, anyone else? > > > On Fri, Mar 15, 2019 at 06:56:31PM +0200, Artturi Alm wrote: > > On Fri, Mar 15, 2019 at 02:43:04PM +, Nicholas

Re: Option for alternative escape character with cu(1)

2019-03-18 Thread Nicholas Marriott
This is OK with me, anyone else? On Fri, Mar 15, 2019 at 06:56:31PM +0200, Artturi Alm wrote: > On Fri, Mar 15, 2019 at 02:43:04PM +, Nicholas Marriott wrote: > > . > > Another couple of minor changes below, with those it looks good to > > me. Any OK for this? > > > > With joined lines, t

Re: Option for alternative escape character with cu(1)

2019-03-16 Thread Artturi Alm
On Fri, Mar 15, 2019 at 09:51:12PM +, Nicholas Marriott wrote: > On Fri, Mar 15, 2019 at 09:43:56AM -0600, Todd C. Miller wrote: > > Wouldn't it be less error-prone to make escape_char u_char instead > > of int? > > Maybe, I don't mind either way. > > However this in stream_read would still n

Re: Option for alternative escape character with cu(1)

2019-03-15 Thread Nicholas Marriott
On Fri, Mar 15, 2019 at 09:43:56AM -0600, Todd C. Miller wrote: > Wouldn't it be less error-prone to make escape_char u_char instead > of int? Maybe, I don't mind either way. However this in stream_read would still need a cast as ptr is signed: if (state_change && (u_char)*ptr == escape_

Re: Option for alternative escape character with cu(1)

2019-03-15 Thread Artturi Alm
On Fri, Mar 15, 2019 at 02:43:04PM +, Nicholas Marriott wrote: > . > Another couple of minor changes below, with those it looks good to > me. Any OK for this? > With joined lines, the cast, and some runtime testing with ~, % and ^[. -Artturi diff --git a/usr.bin/cu/command.c b/usr.bin/cu/co

Re: Option for alternative escape character with cu(1)

2019-03-15 Thread Todd C . Miller
Wouldn't it be less error-prone to make escape_char u_char instead of int? - todd

Re: Option for alternative escape character with cu(1)

2019-03-15 Thread Hiltjo Posthuma
On Fri, Mar 15, 2019 at 02:43:04PM +, Nicholas Marriott wrote: > . > Another couple of minor changes below, with those it looks good to > me. Any OK for this? > > > On Fri, Mar 15, 2019 at 01:49:52PM +0200, Artturi Alm wrote: > > On Thu, Mar 14, 2019 at 10:18:57AM +, Nicholas Marriott wro

Re: Option for alternative escape character with cu(1)

2019-03-15 Thread Nicholas Marriott
. Another couple of minor changes below, with those it looks good to me. Any OK for this? On Fri, Mar 15, 2019 at 01:49:52PM +0200, Artturi Alm wrote: > On Thu, Mar 14, 2019 at 10:18:57AM +, Nicholas Marriott wrote: > > Thanks, comments inline. > > > > The diff looks much better to me, now

Re: Option for alternative escape character with cu(1)

2019-03-15 Thread Artturi Alm
On Thu, Mar 14, 2019 at 10:18:57AM +, Nicholas Marriott wrote: > Thanks, comments inline. > The diff looks much better to me, now with those things fixed based on your feedback, thanks :] -Artturi diff --git a/usr.bin/cu/command.c b/usr.bin/cu/command.c index c07fe73aeca..27d80f16dd7 10064

Re: Option for alternative escape character with cu(1)

2019-03-14 Thread Nicholas Marriott
Thanks, comments inline. > diff --git a/usr.bin/cu/command.c b/usr.bin/cu/command.c > index c07fe73aeca..e225fb544be 100644 > --- a/usr.bin/cu/command.c > +++ b/usr.bin/cu/command.c > @@ -30,6 +30,7 @@ > #include > #include > #include > +#include > > #include "cu.h" > > @@ -223,6 +224,

Re: Option for alternative escape character with cu(1)

2019-03-13 Thread Artturi Alm
On Wed, Mar 13, 2019 at 07:47:08AM -0600, Todd C. Miller wrote: > On Wed, 13 Mar 2019 14:35:06 +0200, Artturi Alm wrote: > > > i don't have issues with tilde when using locally, but i mostly ssh to > > reach cu, and too many times i've forgotten to configure ssh/use -e, > > with this cu(1) becomes

Re: Option for alternative escape character with cu(1)

2019-03-13 Thread Nicholas Marriott
Why only % rather than have -e take an argument like ssh? On Wed, Mar 13, 2019 at 02:35:06PM +0200, Artturi Alm wrote: > Hi, > > i don't have issues with tilde when using locally, but i mostly ssh to > reach cu, and too many times i've forgotten to configure ssh/use -e, > with this cu(1) becomes

Re: Option for alternative escape character with cu(1)

2019-03-13 Thread Todd C . Miller
On Wed, 13 Mar 2019 14:35:06 +0200, Artturi Alm wrote: > i don't have issues with tilde when using locally, but i mostly ssh to > reach cu, and too many times i've forgotten to configure ssh/use -e, > with this cu(1) becomes safer/easier to use for us with non-english > keyboard. > ~tilde is certa

Option for alternative escape character with cu(1)

2019-03-13 Thread Artturi Alm
Hi, i don't have issues with tilde when using locally, but i mostly ssh to reach cu, and too many times i've forgotten to configure ssh/use -e, with this cu(1) becomes safer/easier to use for us with non-english keyboard. ~tilde is certainly annoying when it's three key presses alone, and then you