Re: Re: CMSG_SPACE on NetBSD

2010-02-23 Thread Alexander Nasonov
Hi Nicholas,
I don't think that variable size array inside a union is allowed by C99. I 
don't have a copy of the standard but N1256 says:

(in 6.7.2.1 Structure and union specifiers)
"A member of a structure or union may have any object type other than a 
variably modified type."

"variably modified type" is defined in 6.7.5 Declarators:

"A full declarator is a declarator that is not part of another declarator. The 
end of a full declarator is
a sequence point. If, in the nested sequence of declarators in a full 
declarator, there is a declarator
specifying a variable length array type, the type specified by the full 
declarator is said to be variably
modified. Furthermore, any type derived by declarator type derivation from a 
variably modified type
is itself variably modified."

I did a quick test using online Comeau C99 compiler and it reports an error:

int main(int argc, char* argv[])
{
union {int a; char b[argc]; } u;
}

"ComeauTest.c", line 3: error: expression must have a constant value
  union {int a; char b[argc]; } u;
   ^

"ComeauTest.c", line 3: warning: variable "u" was declared but never referenced
  union {int a; char b[argc]; } u;
^

1 error detected in the compilation of "ComeauTest.c".

Alex


23.02.10, 00:11, "Nicholas Marriott" :

> Hi
>  
>  Did you try building with -std=c99?
>  
>  
>  On Mon, Feb 22, 2010 at 11:39:44PM +, Alexander Nasonov wrote:
>  > After being subscribed to this list for a while,  the list is
>  > apparently alive. Seems like my message was sent at the worng time.
>  > 
>  > Nikolas,
>  > What's your view on using a buffer with a size known only at runtime?
>  > 
>  > Thanks,
>  > Alex
>  > 
>  > Alexander Nasonov wrote:
>  > > Hi,
>  > > 
>  > > CMSG_SPACE(sizeof(int)) does not return a constant on NetBSD.
>  > > If you compile tmux with the Intel C++ compiler 11.1, the program
>  > > will crash in msgbuf_write because the compiler can't deduce a size
>  > > of buf and sets it to 0:
>  > > 
>  > >  union {
>  > >  struct cmsghdr  hdr;
>  > >  charbuf[CMSG_SPACE(sizeof(int))];
>  > >  } cmsgbuf;
>  > > 
>  > > and the result of sizeof(buf) is 0. This leads to a crash.
>  > > 
>  > > Any chance to get this fixed in the next version?
>  > > 
>  > > Thanks,
>  > > Alex
>  > > 
>  > > PS see this commit message in NetBSD repository for more information 
> about CMSG_SPACE:
>  > > 
>  > > 
> http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/socket.h?only_with_tag=MAIN#rev1.51
>  > > 
>  > > Revision 1.51 / (download) - annotate - [select for diffs], Thu Mar 2 
> 07:41:50 2000 UTC (9 years, 8 months ago) by itojun 
>  > > Branch: MAIN 
>  > > Changes since 1.50: +10 -4 lines
>  > > Diff to previous 1.50 (colored) 
>  > > 
>  > > make CMSG_ALIGN always synchronize with kernel's idea of ALIGNBYTES.
>  > > ancillary data alignment will be ALIGNBYTES, not sizeof(long) - 1, from 
> now.
>  > > 
>  > > CMSG_xx will NOT resolve into constant.  if you use CMSG_xx to allocate
>  > > arrays, you'll lose.
>  > > 
>  > > bump shlib minor for libc.
>  > > 
>  > > NOTE: if you are on top of arch with ALIGNBYTES != sizeof(long) - 1,
>  > > you need to recompile IPv6-related binaries.  there is no way to 
> guarantee
>  > > backward compat in this aspect.  sorry for this.  this should be the last
>  > > backward compat breakage for IPv6-related ancillary data manipulation.
>  > > (we still have PR 9516 for unix-domain sockets...)
>  > > 
>  > > 
> --
>  > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 
> 30-Day 
>  > > trial. Simplify your report design, integration and deployment - and 
> focus on 
>  > > what you do best, core application coding. Discover what's new with
>  > > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>  > > ___
>  > > tmux-users mailing list
>  > > tmux-users@lists.sourceforge.net
>  > > https://lists.sourceforge.net/lists/listinfo/tmux-users
>  > 
>  > 
>  > 
> --
>  > Download Intel® Parallel Studio Eval
>  > Try the new software tools for yourself. Speed compiling, find bugs
>  > proactively, and fine-tune applications for parallel performance.
>  > See why Intel Parallel Studio got high marks during beta.
>  > http://p.sf.net/sfu/intel-sw-dev
>  > ___
>  > tmux-users mailing list
>  > tmux-users@lists.sourceforge.net
>  > https://lists.sourceforge.net/lists/listinfo/tmux-users
>  
>  

-- 
Alexander Nasonov

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got h

Re: [Patch] Typing end-of-line twice

2010-02-23 Thread clemens fischer
Micah Cowan wrote:

> Typing the end-of-line key once will bring you to the end of the
> textual content of the current row on the screen.
> If the current row contains only a portion of a line had wrapped onto
> the next row, then typing the end-of-line key again will bring you to
> the end of the complete, wrapped line.
> When a rectangular selection is active, typing it the second time will
> bring you to the right edge of the screen (even if it's past the end
> of the line of text), and doesn't do anything special with wrapped
> lines.

That is a very good idea!


clemens


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: [Patch] Typing end-of-line twice

2010-02-23 Thread Micah Cowan
clemens fischer wrote:
> Micah Cowan wrote:
> 
>> Typing the end-of-line key once will bring you to the end of the
>> textual content of the current row on the screen.
>> If the current row contains only a portion of a line had wrapped onto
>> the next row, then typing the end-of-line key again will bring you to
>> the end of the complete, wrapped line.
>> When a rectangular selection is active, typing it the second time will
>> bring you to the right edge of the screen (even if it's past the end
>> of the line of text), and doesn't do anything special with wrapped
>> lines.
> 
> That is a very good idea!

Thanks. It was Nicholas's, not mine, but I ran with it.

-- 
Micah J. Cowan
http://micah.cowan.name/

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Display issues with rxvt-unicode (256 colors patch)

2010-02-23 Thread clemens fischer
Šime Ramov wrote:

> The problem is exactly as described here:
> .

BTW, on page one of this bbs "thread"[1] someone mentions the same problem
I have:  some curses apps (tin in my case) display the background colour
only where they print text, everything else is left alone.

[1] http://bbs.archlinux.org/viewtopic.php?pid=651632#p651632


clemens


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Display issues with rxvt-unicode (256 colors patch)

2010-02-23 Thread Nicholas Marriott
i still have your mail, i just can't reproduce it and i haven't had time to 
look further

On Tue, Feb 23, 2010 at 11:38:37PM +0100, clemens fischer wrote:
> ?ime Ramov wrote:
> 
> > The problem is exactly as described here:
> > .
> 
> BTW, on page one of this bbs "thread"[1] someone mentions the same problem
> I have:  some curses apps (tin in my case) display the background colour
> only where they print text, everything else is left alone.
> 
> [1] http://bbs.archlinux.org/viewtopic.php?pid=651632#p651632
> 
> 
> clemens
> 
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


unlock the client

2010-02-23 Thread Luiz Gustavo
Helo Guys !!!

I locked a client of my session, I did not find the manual tmux how to
unlock the client.

how?

thanks

-- 
Luiz Gustavo Costa (Powered by BSD)
*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+*+
mundoUnix - Consultoria em Software Livre
http://www.mundounix.com.br
ICQ: 2890831 / MSN: cont...@mundounix.com.br
Blog: http://www.luizgustavo.pro.br


--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users