Avoid some C++ diagnostics reported by Bruno Haible.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 Oct 2006 21:51:45 +0000 (21:51 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 31 Oct 2006 21:51:45 +0000 (21:51 +0000)
commit08262434df55b5f3c509d2afacb1a39d36e340c4
treeb0884cfb310c9d169b1dff153b29bd2ca24d441c
parent20668199737bb0bf121381fa0ffa197f0aafcfd1
Avoid some C++ diagnostics reported by Bruno Haible.
* lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
xmalloc.
(quotearg_alloc): Use xcharalloc rather than xmalloc.
(struct slotvec): Move to top level.
(quotearg_n_options): Rewrite to avoid xmalloc.
* lib/xalloc.h (xcharalloc): New function.
* (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
[defined __cplusplus]: Add function template that provides result
type propagation.  This part of the change is from Bruno Haible.
ChangeLog
lib/quotearg.c
lib/xalloc.h