}
-void *
-_vshMalloc(vshControl *ctl, size_t size, const char *filename, int line)
-{
- char *x;
-
- if (VIR_ALLOC_N(x, size) == 0)
- return x;
- vshError(ctl, _("%s: %d: failed to allocate %d bytes"),
- filename, line, (int) size);
- exit(EXIT_FAILURE);
-}
-
-void *
-vshCalloc(vshControl *ctl G_GNUC_UNUSED, size_t nmemb, size_t size)
-{
- return g_malloc0_n(nmemb, size);
-}
-
int
vshNameSorter(const void *a, const void *b)
{
void vshReadlineHistoryAdd(const char *cmd);
-/* allocation wrappers */
-void *_vshMalloc(vshControl *ctl, size_t sz, const char *filename, int line);
-#define vshMalloc(_ctl, _sz) _vshMalloc(_ctl, _sz, __FILE__, __LINE__)
-
-void *vshCalloc(vshControl *ctl, size_t nmemb, size_t sz);
-
/* Macros to help dealing with mutually exclusive options. */
/* VSH_EXCLUSIVE_OPTIONS_EXPR: