alsa.audio: move handling of XRUN when writting to the slave task
[AROS.git] / tools / flexcat / src / asprintf.c
blobea718e3d0f95999d5ddd5731e8f7b1eca21ddd5f
1 /*
2 * $Id$
4 * Copyright (C) 1993-1999 by Jochen Wiedmann and Marcin Orlowski
5 * Copyright (C) 2002-2010 by the FlexCat Open Source Team
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 #include <stdarg.h>
24 #include <stdio.h>
25 #include <stdlib.h>
27 extern int vasprintf(char **ptr, const char * format, va_list ap);
29 int asprintf(char **ptr, const char * format, ...)
31 va_list ap;
32 int ret;
34 *ptr = NULL;
35 va_start(ap, format);
36 ret = vasprintf(ptr, format, ap);
37 va_end(ap);
39 return ret;