Re: [PATCH] add paste implementation

2017-03-23 Thread Denys Vlasenko
On Tue, Mar 21, 2017 at 7:00 PM, Maxime Coste wrote: > Hello, > > Any update on this ? > > Here is the latest version of the patch, still waiting on a clear decision > regarding loop variable definition location. Applied this version. Please review. Thanks! /* vi: set sw=4

Re: [PATCH] add paste implementation

2017-03-21 Thread Maxime Coste
Hello, Any update on this ? Here is the latest version of the patch, still waiting on a clear decision regarding loop variable definition location. --- AUTHORS| 3 + coreutils/paste.c | 162 +

Re: [PATCH] add paste implementation

2017-03-15 Thread walter harms
Am 15.03.2017 10:29, schrieb Bernhard Reutner-Fischer: > On 10 March 2017 19:07:12 CET, Maxime Coste wrote: >> Hello, >> >> here is my stab at an implementation of patch, I hope this is the >> proper >> patch format and the code is in a good enough shape. > > I'm just

Re: [PATCH] add paste implementation

2017-03-15 Thread Maxime Coste
On Wed, Mar 15, 2017 at 10:29:10AM +0100, Bernhard Reutner-Fischer wrote: > On 10 March 2017 19:07:12 CET, Maxime Coste wrote: > >Hello, > > > >here is my stab at an implementation of patch, I hope this is the > >proper > >patch format and the code is in a good enough shape. >

Re: [PATCH] add paste implementation

2017-03-15 Thread Bernhard Reutner-Fischer
On 10 March 2017 19:07:12 CET, Maxime Coste wrote: >Hello, > >here is my stab at an implementation of patch, I hope this is the >proper >patch format and the code is in a good enough shape. I'm just curious if anybody (or anything for that matter) actually uses paste?

Re: [PATCH] add paste implementation

2017-03-14 Thread Maxime Coste
On Mon, Mar 13, 2017 at 09:30:56AM -0400, Jody Lee Bruchon wrote: > Given that BusyBox is intended to be as small as possible since it is > targeted at embedded platforms, I'd say that declaring variables inside of a > code block which are used only within a code block is better. Not only does

Re: [PATCH] add paste implementation

2017-03-13 Thread Jody Lee Bruchon
On March 13, 2017 8:16:28 AM EDT, Maxime Coste wrote: >Either way is fine by me, being a C++ developper I have a bias towards >declaring variables as close as possible to their place of use Given that BusyBox is intended to be as small as possible since it is targeted at

Re: [PATCH] add paste implementation

2017-03-13 Thread Maxime Coste
On Mon, Mar 13, 2017 at 06:54:17AM +, dietmar.schind...@manroland-web.com wrote: > > Von: walter harms > > Gesendet: Samstag, 11. März 2017 11:05 > > > > Am 10.03.2017 19:07, schrieb Maxime Coste: > > > ... > > > +for (int i = 0; i < file_count; ++i) { > > > > IMHO it is better to put 'int i'

Re: [PATCH] add paste implementation

2017-03-13 Thread Daniel Thompson
On 10/03/17 18:07, Maxime Coste wrote: Hello, here is my stab at an implementation of patch, I hope this is the proper ^^^ Typo. patch format and the code is in a good enough shape. This text will end up in the git history. Might be good to make

AW: [PATCH] add paste implementation

2017-03-13 Thread dietmar.schindler
> Von: walter harms > Gesendet: Samstag, 11. März 2017 11:05 > > Am 10.03.2017 19:07, schrieb Maxime Coste: > > ... > > +for (int i = 0; i < file_count; ++i) { > > IMHO it is better to put 'int i' in the definition section and remove the int > here. > It make things harder to read (for me), same

Re: [PATCH] add paste implementation

2017-03-11 Thread Maxime Coste
On Sat, Mar 11, 2017 at 06:59:52PM +0100, Tito wrote: > > +static const char optstring[] = "d:s"; > > Remove optstring and add it directly to getopt32 for better readability > > > +#define PASTE_OPT_DELIMITERS (1 << 0) > > +#define PASTE_OPT_SEPARATE (1 << 1) My idea here was that optstring

Re: [PATCH] add paste implementation

2017-03-11 Thread Tito
Hi, a few more hints. Hope this helps. Ciao, Tito On 03/11/2017 12:18 PM, Maxime Coste wrote: Applied the suggested changes, except for dynamically allocating the files array. I can do it if thats preferred. I traced the getopt32 call to make sure, and it does not touch the argument pointer

Re: [PATCH] add paste implementation

2017-03-11 Thread Maxime Coste
Applied the suggested changes, except for dynamically allocating the files array. I can do it if thats preferred. I traced the getopt32 call to make sure, and it does not touch the argument pointer when the switch is not present, so giving it a default values works. --- AUTHORS

Re: [PATCH] add paste implementation

2017-03-11 Thread Maxime Coste
Hello Xabier, On Sat, Mar 11, 2017 at 01:22:20PM +0100, Xabier Oneca -- xOneca wrote: > Hi Maxime, > > 2017-03-11 12:34 GMT+01:00 Maxime Coste : > > On Sat, Mar 11, 2017 at 12:18:42PM +0100, Xabier Oneca -- xOneca wrote: > >> > +//usage:#define paste_example_usage > >> >

Re: [PATCH] add paste implementation

2017-03-11 Thread Xabier Oneca -- xOneca
Hi Maxime, 2017-03-11 12:34 GMT+01:00 Maxime Coste : > On Sat, Mar 11, 2017 at 12:18:42PM +0100, Xabier Oneca -- xOneca wrote: >> > +//usage:#define paste_example_usage >> > +//usage: "# write out directory in four columns\n" >> > +//usage: "$ ls | paste - - - -\n"

Re: [PATCH] add paste implementation

2017-03-11 Thread Maxime Coste
On Sat, Mar 11, 2017 at 12:18:42PM +0100, Xabier Oneca -- xOneca wrote: > > +//usage:#define paste_example_usage > > +//usage: "# write out directory in four columns\n" > > +//usage: "$ ls | paste - - - -\n" > > +//usage: "# combine pairs of lines from a file into single lines\n"

Re: [PATCH] add paste implementation

2017-03-11 Thread Xabier Oneca -- xOneca
Hi Maxime, > diff --git a/coreutils/paste.c b/coreutils/paste.c > new file mode 100644 > index 0..ab0ad43c5 > --- /dev/null > +++ b/coreutils/paste.c > @@ -0,0 +1,160 @@ > +/* vi: set sw=4 ts=4: */ > +/* > + * paste.c - implementation of the posix paste command > + * > + * Written by

Re: [PATCH] add paste implementation

2017-03-11 Thread walter harms
Am 10.03.2017 19:07, schrieb Maxime Coste: > Hello, > > here is my stab at an implementation of patch, I hope this is the proper > patch format and the code is in a good enough shape. > > --- > AUTHORS| 3 + > coreutils/paste.c | 160 >

[PATCH] add paste implementation

2017-03-10 Thread Maxime Coste
Hello, here is my stab at an implementation of patch, I hope this is the proper patch format and the code is in a good enough shape. --- AUTHORS| 3 + coreutils/paste.c | 160 + docs/posix_conformance.txt