Good question - I looked at the history of the original fish but I wasn't able 
to find anything.  I hate having code that nobody understands, so I'm going to 
apply Moritz's suggestion and not modify init_tabs. We'll see if anything 
breaks.

This was merged as commit bfccc7133d194f0b54f5b89f212a6aab008e6df9

Thanks for taking the time to report this!
_fish

On Aug 17, 2012, at 9:18 AM, David Frascone <d...@frascone.com> wrote:

> Except -- the fish version "fixes" init_tab . . . and now it will never be 
> fixed.  Was that side effect of the former version a requirement and/or 
> optimization?
> 
> -Dave
> 
> On Fri, Aug 17, 2012 at 10:17 AM, David Frascone <d...@frascone.com> wrote:
> Looks good.
> 
> 
> On Fri, Aug 17, 2012 at 9:56 AM, Moritz Wilhelmy <ml+f...@wzff.de> wrote:
> Hello,
> 
> During my work on the pkgsrc package of fish, I noticed the following
> problem: NetBSD has it's own curses implementation in which
> init_tabs evaluates to a macro expansion which is const.
> 
> I therefore propose the following patch, which fixes the compilation on
> NetBSD.
> 
> Best regards,
> 
> Moritz
> 
> 
> --- screen.c.orig       2009-03-08 14:46:47.000000000 +0000
> +++ screen.c
> @@ -92,13 +93,14 @@ static int try_sequence( char *seq, wcha
>   */
>  static int next_tab_stop( int in )
>  {
> +       int itabs = init_tabs;
>         /*
>           Assume tab stops every 8 characters if undefined
>         */
> -       if( init_tabs <= 0 )
> -               init_tabs = 8;
> +       if( itabs <= 0 )
> +               itabs = 8;
> 
> -       return ( (in/init_tabs)+1 )*init_tabs;
> +       return ( (in/itabs)+1 )*itabs;
>  }
> 
>  /**
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
> 
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. 
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to