Re: Module with preprocessor utilities

2020-07-20 Thread Bruno Haible
Marc Nieper-Wißkirchen wrote: > For example, do we want to encourage the writing of > sophisticated macros like the TRACE macros in chapter 16 of (the IMHO > opinionated) book Modern C ([1]). This TRACE macro is an interesting academic example. I say "academic", because who wants a trace

Re: Relicense array, linked and tree based containers under LGPL?

2020-07-20 Thread Bruno Haible
> > Paul, would you agree to this change? > > Yes, sounds good. Thanks. Done as follows: 2020-07-20 Bruno Haible list, oset, omap: Relicense some of the container modules under LGPLv2+. * modules/list (License): Change to LGPLv2+. * modules/array-list (License):

Re: Relicense array, linked and tree based containers under LGPL?

2020-07-20 Thread Paul Eggert
On 7/20/20 1:07 AM, Bruno Haible wrote: Paul, would you agree to this change? Yes, sounds good.

Re: Module with preprocessor utilities

2020-07-20 Thread Marc Nieper-Wißkirchen
> If you know of shortcomings of _GL_CONCAT, we need to determine whether we > should just document a limitation, or spend the necessary macro complexity > in order to fix it. Sorry for the misunderstanding; _GL_CONCAT is fine because it takes a detour over _GL_CONCAT0. But not every

Re: Module with preprocessor utilities

2020-07-20 Thread Marc Nieper-Wißkirchen
Thank you for your input. So I won't come up with a full-featured (meta-programming) macro module but may propose one or the other small module about macros that I have found useful (and fool-proof) in my own code. The amount of macro one needs depends on the programming style, of course. For

oset: Add an 'update' operation

2020-07-20 Thread Bruno Haible
A gl_oset_t keeps itself in sorted order when elements are inserted or removed. In some applications, an element needs to be removed from the set, then it gets modified in some way, then it gets added again - but at a different position since its sorting key is different now. The problem here -

Re: Module with preprocessor utilities

2020-07-20 Thread Paul Eggert
I'm a bit leery of this idea, as it is painful to write and debug reliable preprocessor macros. When you need macros you really need them, but they're best avoided in the first place. The fanciest macros I've contributed to Gnulib are in ; they had to be macros because C won't let you write

Re: Module with preprocessor utilities

2020-07-20 Thread Bruno Haible
Hi Marc, > I was thinking of macros like P99_NARG or P99_FOR, which are > non-trivial to write but can be very helpful to write practical user > macros (e.g. macros with default arguments). In order to avoid bloat, I would suggest to start with a particular problem (e.g. macros with default

Re: Module with preprocessor utilities

2020-07-20 Thread Marc Nieper-Wißkirchen
Dear Bruno, thank you very much for your detailed answer. Am So., 19. Juli 2020 um 17:43 Uhr schrieb Bruno Haible : > > What would be the chances to include a module with sophisticated > > preprocessor macros like P99 ([1]) or the Boost Preprocessing library > > ([2])? I realize that I wasn't

Relicense array, linked and tree based containers under LGPL?

2020-07-20 Thread Bruno Haible
Hi, I would like to relicense the array, linked and tree based container modules under LGPLv2+ (currently under GPL). The container modules based on hash tables can stay under GPL, at least for the moment. list array-list carray-list linked-list avltree-list rbtree-list oset