Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-23 Thread Andreas Fritiofson
On Sun, Nov 22, 2009 at 12:42 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Sun, Nov 22, 2009 at 11:04 AM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Sun, Nov 22, 2009 at 9:51 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: Do not use variable length arrays. Use

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-23 Thread Øyvind Harboe
Thanks for following up on this. The style guide needs updating w.r.t. embedded considerations(I was going to work on the style guide the other day, but docs didn't build at the time and then I forgot about it...) However, alloc_vprintf() seems to have a rather cumbersome implementation. Is

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-23 Thread Zach Welch
On Mon, 2009-11-23 at 22:22 +0100, Andreas Fritiofson wrote: On Sun, Nov 22, 2009 at 12:42 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Sun, Nov 22, 2009 at 11:04 AM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Sun, Nov 22, 2009 at 9:51 AM, Øyvind Harboe

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-23 Thread Øyvind Harboe
On Mon, Nov 23, 2009 at 10:57 PM, Zach Welch z...@superlucidity.net wrote: On Mon, 2009-11-23 at 22:22 +0100, Andreas Fritiofson wrote: On Sun, Nov 22, 2009 at 12:42 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Sun, Nov 22, 2009 at 11:04 AM, Andreas Fritiofson

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-22 Thread Øyvind Harboe
On Sun, Nov 22, 2009 at 1:56 AM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Sun, Nov 22, 2009 at 1:13 AM, Zach Welch z...@superlucidity.net wrote: Checkout your branch and run 'git rebase master'.  That will update your branch against the current master.  Then, do the same thing

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-22 Thread Andreas Fritiofson
On Sun, Nov 22, 2009 at 9:51 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: Do not use variable length arrays. Use malloc(). If you use variable length arrays on the stack that messes with embedded / uCLinux hosts. Only if the embedded host uses a home directory path longer than what will

[Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Andreas Fritiofson
Add $HOME/.openocd as the first default script search directory, allowing the user to override the standard scripts. Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- src/helper/options.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Øyvind Harboe
How about using a dynamic allocation and not worrying about max size at all? These changes seem reasonably to me, but without documentation to go with it, I fear nobody would use it. Could you add some? -- Øyvind Harboe http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Andreas Fritiofson
On Sat, Nov 21, 2009 at 7:14 PM, Zach Welch z...@superlucidity.net wrote: On Sat, 2009-11-21 at 16:53 +0100, Andreas Fritiofson wrote: Add $HOME/.openocd as the first default script search directory, allowing the user to override the standard scripts. Comments are in-line and at the end.

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Øyvind Harboe
On Sat, Nov 21, 2009 at 7:14 PM, Zach Welch z...@superlucidity.net wrote: On Sat, 2009-11-21 at 16:53 +0100, Andreas Fritiofson wrote: Add $HOME/.openocd as the first default script search directory, allowing the user to override the standard scripts. Comments are in-line and at the end.

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Andreas Fritiofson
On Sat, Nov 21, 2009 at 9:31 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Sat, Nov 21, 2009 at 7:14 PM, Zach Welch z...@superlucidity.net wrote: PATH_MAX should be defined and available (in limits.h).  Use it. Why not just allocate dynamically and avoid the problem at the root? That

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Zach Welch
On Sun, 2009-11-22 at 00:52 +0100, Andreas Fritiofson wrote: On Sat, Nov 21, 2009 at 9:31 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Sat, Nov 21, 2009 at 7:14 PM, Zach Welch z...@superlucidity.net wrote: PATH_MAX should be defined and available (in limits.h). Use it. Why not

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Andreas Fritiofson
On Sun, Nov 22, 2009 at 1:13 AM, Zach Welch z...@superlucidity.net wrote: Checkout your branch and run 'git rebase master'.  That will update your branch against the current master.  Then, do the same thing with '-i'. Select the patches to change and mark them with 'e', change the files, add

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Zach Welch
On Sun, 2009-11-22 at 01:56 +0100, Andreas Fritiofson wrote: On Sun, Nov 22, 2009 at 1:13 AM, Zach Welch z...@superlucidity.net wrote: Checkout your branch and run 'git rebase master'. That will update your branch against the current master. Then, do the same thing with '-i'. Select the