On Sun, Feb 02, 2014 at 12:11:59AM +0100, Samuel Thibault wrote: > Justus Winter, le Sat 01 Feb 2014 16:34:20 +0100, a écrit : > > I thought about doing that. But that would waste one character just > > for the termination. > > That's little compared to security :)
> > GNU Machs printf implementation supports strings with the precision > > given as argument: > > > > printf ("%.*s", sizeof foo->name, foo->name); > > > > I think thats clean, concise and easy to use. > > But people would tend to forget doing it. We can't really fight that. Null-terminated strings is what people will naturally expect and have in mind while reading/editing the code. Doing things differently for something like mere names isn't worth the trouble. -- Richard Braun